diff --git a/src/platforms/mp-alipay/runtime/wrapper/util.js b/src/platforms/mp-alipay/runtime/wrapper/util.js index 508e949e0ec3caf228db245b0c5f8c8469e53c3d..12bd8ab95e27c6ea8f5c6ff8ab28b63129ff341d 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/util.js +++ b/src/platforms/mp-alipay/runtime/wrapper/util.js @@ -113,8 +113,7 @@ function handleProps (ref) { let refProps = ref.props const eventList = (refProps['data-event-list'] || '').split(',') // 初始化支付宝小程序组件事件 - Object.keys(refProps).forEach(key => { - if (eventList.includes(key)) { + eventList.forEach(key => { const handler = refProps[key] const res = key.match(/^on([A-Z])(\S*)/) const event = res && (res[1].toLowerCase() + res[2]) @@ -127,7 +126,6 @@ function handleProps (ref) { __args__: [...arguments] }) } - } }) // 处理 props 重写 Object.defineProperty(ref, 'props', {