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

fix(v3): this.mpType => this.$options.mpType

上级 489abe85
...@@ -33,7 +33,7 @@ export function initEvent (Vue) { ...@@ -33,7 +33,7 @@ export function initEvent (Vue) {
const currentTarget = $vueEvent.$origCurrentTarget || $vueEvent.currentTarget const currentTarget = $vueEvent.$origCurrentTarget || $vueEvent.currentTarget
// 当自定义组件根节点触发事件时,nid 补充前缀,避免与组件内部 nid 冲突(根组件page不需要) // 当自定义组件根节点触发事件时,nid 补充前缀,避免与组件内部 nid 冲突(根组件page不需要)
const nid = ((currentTarget === this.$el && this.mpType !== 'page') ? 'r-' : '') + $event.options.nid const nid = ((currentTarget === this.$el && this.$options.mpType !== 'page') ? 'r-' : '') + $event.options.nid
if (typeof nid === 'undefined') { if (typeof nid === 'undefined') {
return console.error(`[${cid}] nid not found`) return console.error(`[${cid}] nid not found`)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册