Browse Source

basicFormItem增加formItemProps属性

tongshangming 9 months ago
parent
commit
fe3ef12493
3 changed files with 13 additions and 1 deletions
  1. 1 1
      src/hooks/useExcel.ts
  2. 1 0
      src/types/form.ts
  3. 11 0
      src/views/form/Basic.vue

+ 1 - 1
src/hooks/useExcel.ts

@@ -186,5 +186,5 @@ export const useExcel = () => {
     URL.revokeObjectURL(url)
   }
 
-  return { importExcel, toTwoArray, exportExcel }
+  return { importExcel, toTwoArray, exportExcel, download }
 }

+ 1 - 0
src/types/form.ts

@@ -25,6 +25,7 @@ export type BasicFormItem = {
   notFormItem?: boolean
   hidden?: boolean
   extra?: any
+  formItemProps?: object
 }
 
 export type AdvancedFormItem = {

+ 11 - 0
src/views/form/Basic.vue

@@ -100,6 +100,17 @@ const formConfig = reactive<BasicForm>({
         // }
       ]
     },
+    {
+      label: '',
+      value: '',
+      name: '',
+      type: 'divider',
+      span: 24,
+      props: {},
+      formItemProps: {
+        labelWidth: '1px'
+      }
+    },
     {
       label: '开关',
       value: true,