diff --git a/packages/taro-alipay/src/create-component.js b/packages/taro-alipay/src/create-component.js index bca40d90f1d1..8601c28e8593 100644 --- a/packages/taro-alipay/src/create-component.js +++ b/packages/taro-alipay/src/create-component.js @@ -95,7 +95,7 @@ function processEvent (eventHandlerName, obj) { keyLower = keyLower.replace(/^on/, '').toLocaleLowerCase() if (keyLower.indexOf(eventType) >= 0) { const argName = keyLower.replace(eventType, '') - if (/^([a-z]|so)$/.test(argName)) { + if (/^(a[a-z]|so)$/.test(argName)) { bindArgs[argName] = dataset[key] } } diff --git a/packages/taro-swan/src/create-component.js b/packages/taro-swan/src/create-component.js index edc5909baf80..4e29a2605b19 100644 --- a/packages/taro-swan/src/create-component.js +++ b/packages/taro-swan/src/create-component.js @@ -94,7 +94,7 @@ function processEvent (eventHandlerName, obj) { keyLower = keyLower.replace(/^e/, '') if (keyLower.indexOf(eventType) >= 0) { const argName = keyLower.replace(eventType, '') - if (/^([a-z]|so)$/.test(argName)) { + if (/^(a[a-z]|so)$/.test(argName)) { bindArgs[argName] = dataset[key] } } diff --git a/packages/taro-tt/src/create-component.js b/packages/taro-tt/src/create-component.js index ecf8211aedc8..4d51e7b44e92 100644 --- a/packages/taro-tt/src/create-component.js +++ b/packages/taro-tt/src/create-component.js @@ -97,7 +97,7 @@ function processEvent (eventHandlerName, obj) { keyLower = keyLower.replace(/^e/, '') if (keyLower.indexOf(eventType) >= 0) { const argName = keyLower.replace(eventType, '') - if (/^([a-z]|so)$/.test(argName)) { + if (/^(a[a-z]|so)$/.test(argName)) { bindArgs[argName] = dataset[key] } } diff --git a/packages/taro-weapp/src/create-component.js b/packages/taro-weapp/src/create-component.js index 29d8a9e978cf..edaacaa3c1e6 100644 --- a/packages/taro-weapp/src/create-component.js +++ b/packages/taro-weapp/src/create-component.js @@ -126,7 +126,7 @@ function processEvent (eventHandlerName, obj) { keyLower = keyLower.replace(/^e/, '') if (keyLower.indexOf(eventType) >= 0) { const argName = keyLower.replace(eventType, '') - if (/^([a-z]|so)$/.test(argName)) { + if (/^(a[a-z]|so)$/.test(argName)) { bindArgs[argName] = dataset[key] } }