From 45d7e775cd5c32a86363fff89f1b8b38fc6c8945 Mon Sep 17 00:00:00 2001 From: zhangyanting Date: Mon, 26 Dec 2022 10:25:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(vue3):=20=E4=BF=AE=E5=A4=8D=20v-html=20?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=BB=84=E4=BB=B6=E6=A8=A1=E6=9D=BF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C#12973?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-plugin-vue3/src/webpack.mini.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/taro-plugin-vue3/src/webpack.mini.ts b/packages/taro-plugin-vue3/src/webpack.mini.ts index bb8291ff3cd3..863fab2704e3 100644 --- a/packages/taro-plugin-vue3/src/webpack.mini.ts +++ b/packages/taro-plugin-vue3/src/webpack.mini.ts @@ -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) }