From dbcd7a6d4bd076c47681f9c69a2fc9fbc0f98e08 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 4 Sep 2019 20:00:12 +0800 Subject: [PATCH] feat(cli): wraps text in a tag (nvue) --- packages/vue-cli-plugin-hbuilderx/build/vue-loader.conf.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vue-cli-plugin-hbuilderx/build/vue-loader.conf.js b/packages/vue-cli-plugin-hbuilderx/build/vue-loader.conf.js index 0d77cadc4..6bf09538d 100644 --- a/packages/vue-cli-plugin-hbuilderx/build/vue-loader.conf.js +++ b/packages/vue-cli-plugin-hbuilderx/build/vue-loader.conf.js @@ -17,10 +17,10 @@ const deprecated = { } } -if (process.env.UNI_USING_NVUE_COMPILER) { +if (process.env.UNI_USING_NVUE_COMPILER) { const wrapperTextTag = function (el, options) { const tag = el.tag - if (tag === 'text' || tag === 'button') { + if (tag === 'text' || tag === 'u-text' || tag === 'button') { return } const children = el.children @@ -41,7 +41,7 @@ if (process.env.UNI_USING_NVUE_COMPILER) { } modules.push({ - postTransformNode (el, options) { + postTransformNode (el, options) { wrapperTextTag(el, options) if (TAGS.includes(el.tag)) { -- GitLab