at-ui
at-ui copied to clipboard
自定义模态框确定按钮的回调
doClose () {
this.visible = false
this.$emit('input', false)
this.$emit('on-cancel')
if (this.action && this.callback) {
this.callback(this.action, this)
}
},
handleAction (action) {
this.action = action
if (action === 'confirm') {
this.$emit('input', false)
this.$emit('on-confirm')
}
this.doClose()
},
doClose 中又执行了'on-cancel' 感觉还是要分开写吧