Bladeren bron

reactor:【infra 基础设施】调整 vben 字典重构结果

YunaiV 9 maanden geleden
bovenliggende
commit
8170d1563f

+ 4 - 1
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm

@@ -3,12 +3,15 @@ import type { VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { ${apiName} } from '#/api/${table.moduleName}/${table.businessName}';
 
-import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
 #if(${table.templateType} == 2)## 树表需要导入这些
 import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}';
 import { handleTree } from '@vben/utils';
 #end
 
+import { getRangePickerDefaultProps } from '#/utils';
+
 /** 新增/修改的表单 */
 export function useFormSchema(): VbenFormSchema[] {
   return [

+ 2 - 2
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm

@@ -11,8 +11,6 @@ import { message#if ($table.templateType == 11), Tabs#end } from 'ant-design-vue
 import { useVbenForm } from '#/adapter/form';
 import { create${simpleClassName}, get${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
 import { $t } from '#/locales';
-
-import { useFormSchema } from '../data';
 ## 特殊:主子表专属逻辑
 #if ( $table.templateType == 10 || $table.templateType == 12 )
   #foreach ($subSimpleClassName in $subSimpleClassNames)
@@ -22,6 +20,8 @@ import { useFormSchema } from '../data';
   #end
 #end
 
+import { useFormSchema } from '../data';
+
 const emit = defineEmits(['success']);
 const formData = ref<${apiName}.${simpleClassName}>();
 const getTitle = computed(() => {

+ 0 - 1
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm

@@ -206,7 +206,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
 <template>
   <Page auto-content-height>
     <FormModal @success="onRefresh" />
-
 #if ($table.templateType == 11) ## erp情况
   <div>
 #end

+ 4 - 1
yudao-module-infra/src/main/resources/codegen/vue3_vben5_ele/schema/views/data.ts.vm

@@ -3,12 +3,15 @@ import type { VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { ${apiName} } from '#/api/${table.moduleName}/${table.businessName}';
 
-import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
 #if(${table.templateType} == 2)## 树表需要导入这些
 import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}';
 import { handleTree } from '@vben/utils';
 #end
 
+import { getRangePickerDefaultProps } from '#/utils';
+
 /** 新增/修改的表单 */
 export function useFormSchema(): VbenFormSchema[] {
   return [

+ 4 - 4
yudao-module-infra/src/main/resources/codegen/vue3_vben5_ele/schema/views/index.vue.vm

@@ -213,17 +213,17 @@ const [Grid, gridApi] = useVbenVxeGrid({
         #if ($table.templateType == 12) ## 内嵌情况
           <template #expand_content="{ row }">
             <!-- 子表的表单 -->
-            <el-tabs v-model="subTabsName" class="mx-8">
+            <ElTabs v-model="subTabsName" class="mx-8">
                 #foreach ($subTable in $subTables)
                     #set ($index = $foreach.count - 1)
                     #set ($subClassNameVar = $subClassNameVars.get($index))
                     #set ($subSimpleClassName = $subSimpleClassNames.get($index))
                     #set ($subJoinColumn_strikeCase = $subJoinColumn_strikeCases.get($index))
-                  <el-tab-pane name="$subClassNameVar" label="${subTable.classComment}">
+                  <ElTabPane name="$subClassNameVar" label="${subTable.classComment}">
                     <${subSimpleClassName}List :${subJoinColumn_strikeCase}="row?.id" />
-                  </el-tab-pane>
+                  </ElTabPane>
                 #end
-            </el-tabs>
+            </ElTabs>
           </template>
         #end
       <template #toolbar-tools>