From c8476f735f6054f92e2b567beed59fa45d36e3b7 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 8 Dec 2021 11:40:11 +0800 Subject: [PATCH] fix(mp-alipay): emit (#3053) --- packages/uni-mp-alipay/src/runtime/util.ts | 6 +----- packages/uni-mp-core/src/runtime/componentInstance.ts | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/uni-mp-alipay/src/runtime/util.ts b/packages/uni-mp-alipay/src/runtime/util.ts index a16418c3b8..9c2ef99c7c 100644 --- a/packages/uni-mp-alipay/src/runtime/util.ts +++ b/packages/uni-mp-alipay/src/runtime/util.ts @@ -183,12 +183,8 @@ export function triggerEvent( return } - const eventOpts = this.props['data-event-opts'] - const target = { - dataset: { - eventOpts, - }, + dataset: {}, } handler({ diff --git a/packages/uni-mp-core/src/runtime/componentInstance.ts b/packages/uni-mp-core/src/runtime/componentInstance.ts index 19e3b57a31..1b48aee792 100644 --- a/packages/uni-mp-core/src/runtime/componentInstance.ts +++ b/packages/uni-mp-core/src/runtime/componentInstance.ts @@ -36,8 +36,7 @@ function createEmitFn(oldEmit: Function, ctx: Record) { } } if (__PLATFORM__ === 'mp-alipay') { - const vnode = this.$.vnode - const props = vnode && vnode.props + const props = scope.props as unknown as Record if (props && props[`on${capitalize(event)}`]) { return } -- GitLab