Skip to content

Commit

Permalink
fix(vue3): 修复 v-html 缺失组件模板的问题,#12973
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyanting authored and Chen-jj committed Dec 26, 2022
1 parent 0a1af40 commit 64aa742
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/taro-plugin-vue3/src/webpack.mini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ function setVueLoader (ctx: IPluginContext, chain, data, config: IConfig) {
if (node.tagType === 1 /* COMPONENT */) {
node.tagType = 0 /* ELEMENT */
}

// v-html
const props = node.props
if(props.find(prop => prop.type === 7 && prop.name === 'html')) {
['input', 'textarea', 'video', 'audio'].forEach(item => data.componentConfig.includes.add(item))
}

data.componentConfig.includes.add(nodeName)
}

Expand Down

0 comments on commit 64aa742

Please sign in to comment.