diff --git a/src/main/resources/templates/generator/index.vue.vm b/src/main/resources/templates/generator/index.vue.vm index 82ae8dd5..f2e1bf63 100644 --- a/src/main/resources/templates/generator/index.vue.vm +++ b/src/main/resources/templates/generator/index.vue.vm @@ -6,12 +6,12 @@ #if($fieldConfig.isShowInQuery == 1) #if($fieldConfig.formType == "INPUT") - + #elseif($fieldConfig.formType == "SELECT") #if($fieldConfig.dictType != "") #else - + @@ -64,9 +64,9 @@ #foreach($fieldConfig in $fieldConfigs) #if($fieldConfig.isShowInList == 1) #end @@ -95,12 +95,12 @@ #if($fieldConfig.isShowInForm == 1) #if($fieldConfig.formType == "INPUT") - + #elseif($fieldConfig.formType == "SELECT") #if($fieldConfig.dictType != "") #else - + @@ -115,15 +115,15 @@ {{ option.label }} #elseif($fieldConfig.formType == "INPUT_NUMBER") - + #elseif($fieldConfig.formType == "SWITCH") #elseif($fieldConfig.formType == "TEXT_AREA") - + #elseif($fieldConfig.formType == "DATE_TIME") - + #elseif($fieldConfig.formType == "DATE") - + #end #end @@ -147,14 +147,14 @@ import ${entityName}API, { ${entityName}PageVO, ${entityName}Form, ${entityName}PageQuery } from "@/api/${lowerFirstEntityName}"; - const queryFormRef = ref(null); - const dataFormRef = ref(null); + const queryFormRef = ref(ElForm); + const dataFormRef = ref(ElForm); const loading = ref(false); const ids = ref([]); const total = ref(0); - const queryParams = reactive({ + const queryParams = reactive<${entityName}PageQuery>({ pageNum: 1, pageSize: 10, keywords: '', @@ -163,7 +163,7 @@ }); // $!{businessName}表格数据 - const pageData = ref([]); + const pageData = ref<${entityName}PageVO[]>([]); // 弹窗 const dialog = reactive({ @@ -171,7 +171,7 @@ visible: false, }); // $!{businessName}表单 - const formData = reactive({ + const formData = reactive<${entityName}Form>({ keywords: '', name: '', code: '', @@ -196,7 +196,7 @@ } /** 重置$!{businessName}查询 */ function handleResetQuery() { - queryFormRef.value.resetFields(); + queryFormRef.value!.resetFields(); queryParams.pageNum = 1; handleQuery(); }