提交 1d553020 编写于 作者: eagzzycsl's avatar eagzzycsl 提交者: 折腾笔记

fix: 兜底data-event-list 属性为 undefined 的情况

上级 36c9f216
......@@ -111,7 +111,7 @@ export function initChildVues (mpInstance) {
function handleProps (ref) {
const eventProps = {}
let refProps = ref.props
const eventList = refProps['data-event-list'].split(',')
const eventList = (refProps['data-event-list'] || '').split(',')
// 初始化支付宝小程序组件事件
Object.keys(refProps).forEach(key => {
if (eventList.includes(key)) {
......@@ -227,7 +227,7 @@ export const handleLink = (function () {
export const handleWrap = function (mp, destory) {
const vueId = mp.props.vueId
const list = mp.props['data-event-list'].split(',')
const list = (mp.props['data-event-list'] || '').split(',')
list.forEach(eventName => {
const key = `${eventName}${vueId}`
if (destory) {
......
......@@ -37,7 +37,7 @@ export function initSpecialMethods (mpInstance) {
export const handleWrap = function (mp, destory) {
const vueId = mp.props.vueId
const list = mp.props['data-event-list'].split(',')
const list = (mp.props['data-event-list'] || '').split(',')
list.forEach(eventName => {
const key = `${eventName}${vueId}`
if (destory) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册