diff --git a/packages/taro-components-library-vue2/src/component-lib/index.ts b/packages/taro-components-library-vue2/src/component-lib/index.ts index 6b357a2cc8f5..02eaac95a622 100644 --- a/packages/taro-components-library-vue2/src/component-lib/index.ts +++ b/packages/taro-components-library-vue2/src/component-lib/index.ts @@ -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] +}