From 48cd61cbd1ff48172728f5a726f113bfe7f41a4d Mon Sep 17 00:00:00 2001 From: anotherso1a <1181581742@qq.com> Date: Tue, 14 Nov 2023 17:23:22 +0800 Subject: [PATCH 1/2] fix: fix ali transfer rules --- packages/webpack-plugin/lib/platform/template/wx/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-plugin/lib/platform/template/wx/index.js b/packages/webpack-plugin/lib/platform/template/wx/index.js index 7c53848387..596686eeaf 100644 --- a/packages/webpack-plugin/lib/platform/template/wx/index.js +++ b/packages/webpack-plugin/lib/platform/template/wx/index.js @@ -435,7 +435,7 @@ module.exports = function getSpec ({ warn, error }) { rules: [ // 通用冒泡事件 { - test: /^(touchstart|touchmove|touchcancel|touchend|tap|longpress|longtap|transitionend|animationstart|animationiteration|animationend|touchforcechange)$/, + test: /^(touchstart|touchmove|touchcancel|touchend|tap|longpress|longtap|animationstart|animationiteration|animationend|touchforcechange)$/, ali (eventName) { const eventMap = { touchstart: 'touchStart', From 9dbb6bda7c0ee8f7ea07dc888276ef16613a4dd5 Mon Sep 17 00:00:00 2001 From: anotherso1a <1181581742@qq.com> Date: Tue, 14 Nov 2023 19:42:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=B0=86=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E8=BF=87=E6=B8=A1=E5=92=8C=E5=8A=A8=E7=94=BB=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E9=80=9A=E7=94=A8=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/platform/template/wx/component-config/view.js | 11 ----------- .../webpack-plugin/lib/platform/template/wx/index.js | 8 ++++++-- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/webpack-plugin/lib/platform/template/wx/component-config/view.js b/packages/webpack-plugin/lib/platform/template/wx/component-config/view.js index 06a35b4c34..e64dd837c2 100644 --- a/packages/webpack-plugin/lib/platform/template/wx/component-config/view.js +++ b/packages/webpack-plugin/lib/platform/template/wx/component-config/view.js @@ -41,18 +41,7 @@ module.exports = function ({ print }) { // 快应用通用事件有touchstart|touchmove|touchend|touchcancel|longpress|click|focus|blur event: [ { - // 支付宝中的view组件额外支持了transitionEnd|animationStart|animationIteration|animationEnd,故在此声明了组件事件转换逻辑 test: /^(transitionend|animationstart|animationiteration|animationend)$/, - // - ali (eventName) { - const eventMap = { - transitionend: 'transitionEnd', - animationstart: 'animationStart', - animationiteration: 'animationIteration', - animationend: 'animationEnd' - } - return eventMap[eventName] - }, qa: qaEventLogError } ] diff --git a/packages/webpack-plugin/lib/platform/template/wx/index.js b/packages/webpack-plugin/lib/platform/template/wx/index.js index 596686eeaf..fa73013100 100644 --- a/packages/webpack-plugin/lib/platform/template/wx/index.js +++ b/packages/webpack-plugin/lib/platform/template/wx/index.js @@ -435,7 +435,7 @@ module.exports = function getSpec ({ warn, error }) { rules: [ // 通用冒泡事件 { - test: /^(touchstart|touchmove|touchcancel|touchend|tap|longpress|longtap|animationstart|animationiteration|animationend|touchforcechange)$/, + test: /^(touchstart|touchmove|touchcancel|touchend|tap|longpress|longtap|transitionend|animationstart|animationiteration|animationend|touchforcechange)$/, ali (eventName) { const eventMap = { touchstart: 'touchStart', @@ -444,7 +444,11 @@ module.exports = function getSpec ({ warn, error }) { touchcancel: 'touchCancel', tap: 'tap', longtap: 'longTap', - longpress: 'longTap' + longpress: 'longTap', + transitionend: 'transitionEnd', + animationstart: 'animationStart', + animationiteration: 'animationIteration', + animationend: 'animationEnd' } if (eventMap[eventName]) { return eventMap[eventName]