Commit 586a7f6a4a7d2c83c1960f001df97c1f1f2cf355

Authored by YunaiV
1 parent a110ec2d

feat:【infra】代码生成:优化 admin uniapp 模版,增加 const formRef = ref<FormInstance>() 的类型

yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/views/form/index.vue.vm
... ... @@ -107,6 +107,7 @@
107 107 </template>
108 108  
109 109 <script lang="ts" setup>
  110 +import type { FormInstance } from 'wot-design-uni/components/wd-form/types'
110 111 #set ($primaryJavaType = $primaryColumn.javaType.toLowerCase())
111 112 #if(${primaryJavaType} == "long" || ${primaryJavaType} == "integer" || ${primaryJavaType} == "short" || ${primaryJavaType} == "double" || ${primaryJavaType} == "bigdecimal" || ${primaryJavaType} == "byte")
112 113 #set ($primaryTsType = "number")
... ... @@ -204,7 +205,7 @@ const formRules = {
204 205 #end
205 206 #end
206 207 }
207   -const formRef = ref()
  208 +const formRef = ref<FormInstance>()
208 209  
209 210 /** 返回上一页 */
210 211 function handleBack() {
... ...