Commit 4f42e7ca68dc4372dea03e445b3cfc257dfd25fe
1 parent
86160f40
代码生成:Vue2 界面:修正 $refs
Showing
1 changed file
with
4 additions
and
0 deletions
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 { | @@ -297,6 +297,10 @@ public class CodegenEngine { | ||
| 297 | if (StrUtil.count(content, "dateFormatter") == 1) { | 297 | if (StrUtil.count(content, "dateFormatter") == 1) { |
| 298 | content = StrUtils.removeLineContains(content, "dateFormatter"); | 298 | content = StrUtils.removeLineContains(content, "dateFormatter"); |
| 299 | } | 299 | } |
| 300 | + // Vue2 界面:修正 $refs | ||
| 301 | + if (StrUtil.count(content, "this.refs") >= 1) { | ||
| 302 | + content = content.replace("this.refs", "this.$refs"); | ||
| 303 | + } | ||
| 300 | // Vue 界面:去除多的 dict 相关,只有一个的情况下,说明没使用到 | 304 | // Vue 界面:去除多的 dict 相关,只有一个的情况下,说明没使用到 |
| 301 | if (StrUtil.count(content, "getIntDictOptions") == 1) { | 305 | if (StrUtil.count(content, "getIntDictOptions") == 1) { |
| 302 | content = content.replace("getIntDictOptions, ", ""); | 306 | content = content.replace("getIntDictOptions, ", ""); |