Skip to content

Commit

Permalink
fix: 解决taro vue2工程中在app 的beforeCreate 中设置的Vue.config.ignoredElements …
Browse files Browse the repository at this point in the history
…不生效问题
  • Loading branch information
xujiujiu authored and ZakaryCode committed Jul 17, 2023
1 parent 304998e commit ca26602
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ components.forEach(params => {
}
})

Vue.config.ignoredElements = [
'root',
'block',
/^taro-/
]
const ignoredElements = [/^taro-/, 'root', 'block']
if (!Vue.config.ignoredElements?.includes(ignoredElements[0])) {
Vue.config.ignoredElements = [...Vue.config.ignoredElements, ...ignoredElements]
}

0 comments on commit ca26602

Please sign in to comment.