Browse Source

fix

pull/9/head
tangjinzhou 7 years ago
parent
commit
bbc4a235a2
  1. 10
      components/menu/src/Menu.vue

10
components/menu/src/Menu.vue

@ -33,14 +33,16 @@ const Menu = {
watch: {
'$props': {
handler: function (nextProps) {
const props = {}
if (hasProp(this, 'selectedKeys')) {
props.sSelectedKeys = nextProps.selectedKeys || []
this.setState({
sSelectedKeys: nextProps.selectedKeys || [],
})
}
if (hasProp(this, 'openKeys')) {
props.sOpenKeys = nextProps.openKeys || []
this.setState({
sOpenKeys: nextProps.openKeys || [],
})
}
this.setState(props)
},
deep: true,
},

Loading…
Cancel
Save