fix
parent
804a1eba18
commit
bbc4a235a2
|
@ -33,14 +33,16 @@ const Menu = {
|
||||||
watch: {
|
watch: {
|
||||||
'$props': {
|
'$props': {
|
||||||
handler: function (nextProps) {
|
handler: function (nextProps) {
|
||||||
const props = {}
|
|
||||||
if (hasProp(this, 'selectedKeys')) {
|
if (hasProp(this, 'selectedKeys')) {
|
||||||
props.sSelectedKeys = nextProps.selectedKeys || []
|
this.setState({
|
||||||
|
sSelectedKeys: nextProps.selectedKeys || [],
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (hasProp(this, 'openKeys')) {
|
if (hasProp(this, 'openKeys')) {
|
||||||
props.sOpenKeys = nextProps.openKeys || []
|
this.setState({
|
||||||
|
sOpenKeys: nextProps.openKeys || [],
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.setState(props)
|
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue