提交 affafb58 编写于 作者: fxy060608's avatar fxy060608

fix(v3): stop propagation

上级 12c43362
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -8,7 +8,7 @@ export function initEvent (Vue) {
get () {
return getCurrentPages()[0].$page
}
})
})
Vue.prototype.$handleVModelEvent = function (nid, value) {
vd.sendUIEvent(this._$id, nid, {
......@@ -17,10 +17,13 @@ export function initEvent (Vue) {
value
}
})
}
}
Vue.prototype.$handleViewEvent = function ($vueEvent, options) {
Vue.prototype.$handleViewEvent = function ($vueEvent, options = {}) {
// const isCustomEvent = $vueEvent._processed // 自定义事件已提前处理过
if (options.stop) {
$vueEvent.stopPropagation()
}
const $event = this.$handleEvent($vueEvent)
const cid = this._$id
// 当自定义组件根节点触发事件时,nid 始终为 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册