Open thierryxing opened 7 years ago
In 2.3 we re-introduced the .sync modifier for props, but this time it is just syntax sugar that automatically expands into an additional v-on listener:
https://vuejs.org/v2/guide/components.html#sync-Modifier
In case to compatible Vue 2.3, ok and cancel methods must be changed to:
methods: { ok () { this.$emit('ok') this.$emit('update:show', false) }, cancel () { this.$emit('cancel') this.$emit('update:show', false) }, // 点击遮罩层 clickMask () { if (!this.force) { this.cancel() } } }
Thank you @thierryxing
@dracon sure thing
https://vuejs.org/v2/guide/components.html#sync-Modifier
In case to compatible Vue 2.3, ok and cancel methods must be changed to: