From 6e0789f922d9fd4cad647990cf5a311b91d76786 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 1 Apr 2020 11:41:19 +0800 Subject: [PATCH] fix(v3): this.mpType => this.$options.mpType --- src/platforms/app-plus/view/framework/plugins/event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/app-plus/view/framework/plugins/event.js b/src/platforms/app-plus/view/framework/plugins/event.js index 69a676270..26f11119d 100644 --- a/src/platforms/app-plus/view/framework/plugins/event.js +++ b/src/platforms/app-plus/view/framework/plugins/event.js @@ -33,7 +33,7 @@ export function initEvent (Vue) { const currentTarget = $vueEvent.$origCurrentTarget || $vueEvent.currentTarget // 当自定义组件根节点触发事件时,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') { return console.error(`[${cid}] nid not found`) } -- GitLab