fix: first trigger v-model change
parent
8907a9990c
commit
d592854c73
|
@ -173,19 +173,19 @@ const Menu = {
|
|||
this.$emit('click', e);
|
||||
},
|
||||
handleSelect(info) {
|
||||
this.$emit('select', info);
|
||||
this.$emit('update:selectedKeys', info.selectedKeys);
|
||||
this.$emit('select', info);
|
||||
this.$emit('selectChange', info.selectedKeys);
|
||||
},
|
||||
handleDeselect(info) {
|
||||
this.$emit('deselect', info);
|
||||
this.$emit('update:selectedKeys', info.selectedKeys);
|
||||
this.$emit('deselect', info);
|
||||
this.$emit('selectChange', info.selectedKeys);
|
||||
},
|
||||
handleOpenChange(openKeys) {
|
||||
this.setOpenKeys(openKeys);
|
||||
this.$emit('openChange', openKeys);
|
||||
this.$emit('update:openKeys', openKeys);
|
||||
this.$emit('openChange', openKeys);
|
||||
},
|
||||
setOpenKeys(openKeys) {
|
||||
if (!hasProp(this, 'openKeys')) {
|
||||
|
|
|
@ -123,8 +123,8 @@ export default {
|
|||
// static confirm: ModalFunc;
|
||||
methods: {
|
||||
handleCancel(e) {
|
||||
this.$emit('cancel', e);
|
||||
this.$emit('update:visible', false);
|
||||
this.$emit('cancel', e);
|
||||
this.$emit('change', false);
|
||||
},
|
||||
|
||||
|
|
|
@ -58,11 +58,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
setVisible(visible, e) {
|
||||
this.$emit('update:visible', false);
|
||||
this.$emit('close', e);
|
||||
if (e.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
this.$emit('update:visible', false);
|
||||
if (!hasProp(this, 'visible')) {
|
||||
this.setState({ _visible: visible });
|
||||
}
|
||||
|
|
|
@ -169,8 +169,8 @@ const TimePicker = {
|
|||
},
|
||||
|
||||
handleOpenClose({ open }) {
|
||||
this.$emit('openChange', open);
|
||||
this.$emit('update:open', open);
|
||||
this.$emit('openChange', open);
|
||||
},
|
||||
|
||||
focus() {
|
||||
|
|
Loading…
Reference in New Issue