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