From 4f42e7ca68dc4372dea03e445b3cfc257dfd25fe Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 27 Nov 2023 16:31:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=EF=BC=9AVu?= =?UTF-8?q?e2=20=E7=95=8C=E9=9D=A2=EF=BC=9A=E4=BF=AE=E6=AD=A3=20$refs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/service/codegen/inner/CodegenEngine.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 933b27a46..c14edeac5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -297,6 +297,10 @@ public class CodegenEngine { if (StrUtil.count(content, "dateFormatter") == 1) { content = StrUtils.removeLineContains(content, "dateFormatter"); } + // Vue2 界面:修正 $refs + if (StrUtil.count(content, "this.refs") >= 1) { + content = content.replace("this.refs", "this.$refs"); + } // Vue 界面:去除多的 dict 相关,只有一个的情况下,说明没使用到 if (StrUtil.count(content, "getIntDictOptions") == 1) { content = content.replace("getIntDictOptions, ", "");