From 78c79a17f269d3f50ed2b947b056b83a837f297e Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 24 Dec 2019 18:16:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=B9=B3=E5=8F=B0=E6=94=AF=E6=8C=81onBackPre?= =?UTF-8?q?ss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/mp-alipay/runtime/wrapper/page-parser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platforms/mp-alipay/runtime/wrapper/page-parser.js b/src/platforms/mp-alipay/runtime/wrapper/page-parser.js index b87c58d89c..6b4a0d1fa3 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/page-parser.js +++ b/src/platforms/mp-alipay/runtime/wrapper/page-parser.js @@ -64,6 +64,12 @@ export default function parsePage (vuePageOptions) { onUnload () { this.$vm.__call_hook('onUnload') this.$vm.$destroy() + }, + events: { + // 支付宝小程序有些页面事件只能放在events下 + onBack(){ + this.$vm.__call_hook('onBackPress'); + } }, __r: handleRef, __e: handleEvent, -- GitLab