提交 adcb22eb 编写于 作者: Q qiang

fix:(mp-alipay): handleProps eventList forEach

上级 56769ee9
...@@ -113,8 +113,7 @@ function handleProps (ref) { ...@@ -113,8 +113,7 @@ function handleProps (ref) {
let refProps = ref.props let refProps = ref.props
const eventList = (refProps['data-event-list'] || '').split(',') const eventList = (refProps['data-event-list'] || '').split(',')
// 初始化支付宝小程序组件事件 // 初始化支付宝小程序组件事件
Object.keys(refProps).forEach(key => { eventList.forEach(key => {
if (eventList.includes(key)) {
const handler = refProps[key] const handler = refProps[key]
const res = key.match(/^on([A-Z])(\S*)/) const res = key.match(/^on([A-Z])(\S*)/)
const event = res && (res[1].toLowerCase() + res[2]) const event = res && (res[1].toLowerCase() + res[2])
...@@ -127,7 +126,6 @@ function handleProps (ref) { ...@@ -127,7 +126,6 @@ function handleProps (ref) {
__args__: [...arguments] __args__: [...arguments]
}) })
} }
}
}) })
// 处理 props 重写 // 处理 props 重写
Object.defineProperty(ref, 'props', { Object.defineProperty(ref, 'props', {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册