@wyfex/ivue 0.19.3 → 0.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/index.es.js +1 -1
  2. package/dist/index.umd.cjs +1 -1
  3. package/dist/ivue.css +1 -1
  4. package/dist/types/{UseCrudTable → UseCrud}/defaultExtConfig.d.ts +6 -0
  5. package/dist/types/{UseCrudTable → UseCrud}/hook.d.ts +15 -2
  6. package/dist/types/{UseCrudTable → UseCrud}/index.vue.d.ts +5 -12
  7. package/dist/types/UseCrud/props.d.ts +13 -0
  8. package/dist/types/{UseCrudTable → UseCrud}/types.d.ts +2 -1
  9. package/dist/types/UseCrud/useCrudWithBusiness.d.ts +46 -0
  10. package/dist/types/UseElButton/index.vue.d.ts +1 -1
  11. package/dist/types/UseElConfigProvider/types.d.ts +4 -0
  12. package/dist/types/UseElDatePicker/index.vue.d.ts +1 -1
  13. package/dist/types/UseElDescriptions/index.vue.d.ts +1 -1
  14. package/dist/types/UseElForm/components/QueryForm.vue.d.ts +1 -1
  15. package/dist/types/UseElForm/components/RowForm.vue.d.ts +1 -1
  16. package/dist/types/UseElForm/index.vue.d.ts +1 -1
  17. package/dist/types/UseElInput/index.vue.d.ts +10 -10
  18. package/dist/types/UseElInput/props.d.ts +5 -5
  19. package/dist/types/UseElSelect/index.vue.d.ts +1 -1
  20. package/dist/types/UseElTable/index.vue.d.ts +2 -2
  21. package/dist/types/index.d.ts +2 -1
  22. package/package.json +8 -8
  23. package/src/components/UseCrud/defaultExtConfig.ts +15 -0
  24. package/src/components/UseCrud/props.ts +25 -0
  25. package/src/components/{UseCrudTable → UseCrud}/types.ts +20 -6
  26. package/src/components/UseElConfigProvider/types.ts +9 -0
  27. package/src/types/index.ts +8 -0
  28. package/dist/types/UseCrudTable/components/ActionBar.vue.d.ts +0 -20
  29. package/dist/types/UseCrudTable/props.d.ts +0 -18
  30. package/src/components/UseCrudTable/defaultExtConfig.ts +0 -28
  31. package/src/components/UseCrudTable/props.ts +0 -32
  32. /package/dist/types/{UseCrudTable → UseCrud}/utils.d.ts +0 -0
@@ -1,4 +1,7 @@
1
1
  declare const _default: {
2
+ mode: {
3
+ type: "PAGE";
4
+ };
2
5
  actionBar: {
3
6
  margin: string;
4
7
  showControlFormDisplayBtn: true;
@@ -8,5 +11,8 @@ declare const _default: {
8
11
  borderStyle: "solid";
9
12
  };
10
13
  };
14
+ modal: {
15
+ type: "Drawer";
16
+ };
11
17
  };
12
18
  export default _default;
@@ -1,7 +1,19 @@
1
- import { ComputedRef } from 'vue';
1
+ import { ComputedRef, Slots } from 'vue';
2
2
  import { Emits, Props } from './types';
3
- export declare const useCrudTable: (mergedProps: ComputedRef<Props>, emits: Emits) => {
3
+ import { GlobalConfig } from '../../types';
4
+ export declare const useCrud: ({ mergedProps, globalConfig, slots, uefRef, modalRef, emits }: {
5
+ mergedProps: ComputedRef<Props>;
6
+ globalConfig: ComputedRef<GlobalConfig>;
7
+ slots: Slots;
8
+ uefRef: any;
9
+ modalRef: any;
10
+ emits: Emits;
11
+ }) => {
4
12
  state: any;
13
+ heightComputed: ComputedRef<string>;
14
+ margin: ComputedRef<string | undefined>;
15
+ actionBar: import('./types').ActionBar | undefined;
16
+ handleDisplayQueryForm: () => void;
5
17
  showModal: import('vue').Ref<boolean, boolean>;
6
18
  modalComponent: import('vue').ShallowRef<null, null> | import('vue').ShallowRef<import('vue').ComponentOptions<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import('vue').ComponentProvideOptions>, import('vue').ComponentOptions<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import('vue').ComponentProvideOptions>> | import('vue').ShallowRef<import('vue').FunctionalComponent<any, {}, any, {}>, import('vue').FunctionalComponent<any, {}, any, {}>> | import('vue').ShallowRef<{
7
19
  new (...args: any[]): any;
@@ -15,4 +27,5 @@ export declare const useCrudTable: (mergedProps: ComputedRef<Props>, emits: Emit
15
27
  __isSuspense?: never;
16
28
  }>;
17
29
  handleShowModal: () => Promise<void>;
30
+ handleCloseModal: ComputedRef<any>;
18
31
  };
@@ -3,17 +3,15 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
3
3
  type: import('vue').PropType<import('./types').Configs[]>;
4
4
  required: boolean;
5
5
  };
6
- tableExtConfig: {
7
- type: import('vue').PropType<import('../UseElTable/types').ExtConfig>;
8
- default: () => {};
9
- };
10
6
  extConfig: {
11
- type: import('vue').PropType<import('./types').ExtConfig>;
7
+ type: import('vue').PropType<import('./types').MergedExtConfig>;
12
8
  default: () => {};
13
9
  };
14
10
  }>, {
15
11
  uefRef: import('vue').Ref<any, any>;
12
+ modalRef: import('vue').Ref<any, any>;
16
13
  handleShowModal: () => Promise<void>;
14
+ handleCloseModal: import('vue').ComputedRef<any>;
17
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
18
16
  onDictKeys: (value?: string[] | undefined) => any;
19
17
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -21,19 +19,14 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
21
19
  type: import('vue').PropType<import('./types').Configs[]>;
22
20
  required: boolean;
23
21
  };
24
- tableExtConfig: {
25
- type: import('vue').PropType<import('../UseElTable/types').ExtConfig>;
26
- default: () => {};
27
- };
28
22
  extConfig: {
29
- type: import('vue').PropType<import('./types').ExtConfig>;
23
+ type: import('vue').PropType<import('./types').MergedExtConfig>;
30
24
  default: () => {};
31
25
  };
32
26
  }>> & Readonly<{
33
27
  onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
34
28
  }>, {
35
- extConfig: import('./types').ExtConfig;
36
- tableExtConfig: import('../UseElTable/types').ExtConfig;
29
+ extConfig: import('./types').MergedExtConfig;
37
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
38
31
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
39
32
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,13 @@
1
+ import { PropType } from 'vue';
2
+ import { Configs, MergedExtConfig } from './types';
3
+ declare const _default: {
4
+ configs: {
5
+ type: PropType<Configs[]>;
6
+ required: boolean;
7
+ };
8
+ extConfig: {
9
+ type: PropType<MergedExtConfig>;
10
+ default: () => {};
11
+ };
12
+ };
13
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import { Component, ExtractPropTypes } from 'vue';
2
2
  import { default as componentProps } from './props';
3
3
  import { FormColumn } from '../UseElForm/types';
4
- import { TableColumn } from '../UseElTable/types';
4
+ import { TableColumn, ExtConfig as TableExtConfig } from '../UseElTable/types';
5
5
  export type Props = ExtractPropTypes<typeof componentProps>;
6
6
  export type Emits = {
7
7
  (e: 'onDictKeys', value?: string[]): void;
@@ -30,3 +30,4 @@ export interface ExtConfig {
30
30
  type?: 'Drawer' | 'Dialog';
31
31
  };
32
32
  }
33
+ export type MergedExtConfig = ExtConfig & TableExtConfig;
@@ -0,0 +1,46 @@
1
+ interface UseCrudState {
2
+ configs: Record<string, any>[];
3
+ formModel: Record<string, any>;
4
+ formParams: Record<string, any>;
5
+ tableLoading: boolean;
6
+ tableData: any[];
7
+ currentPage: number;
8
+ pageSize: number;
9
+ total: number;
10
+ dictMap: Record<string, any>;
11
+ selectionData: any[];
12
+ modalTitle: string;
13
+ }
14
+ interface Options {
15
+ params: Record<string, any>;
16
+ isPageApi: boolean;
17
+ }
18
+ export declare const useCrud: () => {
19
+ state: import('vue').Ref<{
20
+ configs: Record<string, any>[];
21
+ formModel: Record<string, any>;
22
+ formParams: Record<string, any>;
23
+ tableLoading: boolean;
24
+ tableData: any[];
25
+ currentPage: number;
26
+ pageSize: number;
27
+ total: number;
28
+ dictMap: Record<string, any>;
29
+ selectionData: any[];
30
+ modalTitle: string;
31
+ }, UseCrudState | {
32
+ configs: Record<string, any>[];
33
+ formModel: Record<string, any>;
34
+ formParams: Record<string, any>;
35
+ tableLoading: boolean;
36
+ tableData: any[];
37
+ currentPage: number;
38
+ pageSize: number;
39
+ total: number;
40
+ dictMap: Record<string, any>;
41
+ selectionData: any[];
42
+ modalTitle: string;
43
+ }>;
44
+ fetchTableData: (api: Function, options: Options) => Promise<void>;
45
+ };
46
+ export {};
@@ -31,8 +31,8 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
31
31
  }>> & Readonly<{
32
32
  onClick?: ((value?: string | number | Record<string, unknown> | undefined) => any) | undefined;
33
33
  }>, {
34
- extConfig: import('./types').ExtConfig;
35
34
  type: string;
35
+ extConfig: import('./types').ExtConfig;
36
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
37
  declare const _default: typeof __VLS_export;
38
38
  export default _default;
@@ -4,6 +4,10 @@ import { DictProps, UploadConfig } from '../../types';
4
4
  export type Props = ExtractPropTypes<typeof componentProps>;
5
5
  export interface ExtConfig {
6
6
  dictProps?: DictProps;
7
+ crud?: {
8
+ pageHeight?: string;
9
+ modalHeight?: string;
10
+ };
7
11
  table?: {
8
12
  pageHeight?: string;
9
13
  modalHeight?: string;
@@ -79,8 +79,8 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
79
79
  }>> & Readonly<{
80
80
  "onUpdate:modelValue"?: ((value: string | number | any[]) => any) | undefined;
81
81
  }>, {
82
- type: string;
83
82
  useRender: boolean | import('../../types').RenderConfig;
83
+ type: string;
84
84
  modelValue: string | number | unknown[];
85
85
  startPlaceholder: string;
86
86
  endPlaceholder: string;
@@ -94,9 +94,9 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
94
94
  }>> & Readonly<{
95
95
  onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
96
96
  }>, {
97
+ useRender: boolean | RenderConfig;
97
98
  dictMap: import('../../types').DictMap;
98
99
  dictProps: import('../../types').DictProps;
99
- useRender: boolean | RenderConfig;
100
100
  labelWidth: string | number;
101
101
  column: number;
102
102
  border: boolean;
@@ -116,9 +116,9 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
116
116
  }>> & Readonly<{
117
117
  onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
118
118
  }>, {
119
+ useRender: boolean | import('../../../types').RenderConfig;
119
120
  dictMap: import('../../../types').DictMap;
120
121
  dictProps: import('../../../types').DictProps;
121
- useRender: boolean | import('../../../types').RenderConfig;
122
122
  formItemWidth: string;
123
123
  labelSuffix: string;
124
124
  labelWidth: string;
@@ -115,9 +115,9 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
115
115
  }>> & Readonly<{
116
116
  onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
117
117
  }>, {
118
+ useRender: boolean | import('../../../types').RenderConfig;
118
119
  dictMap: import('../../../types').DictMap;
119
120
  dictProps: import('../../../types').DictProps;
120
- useRender: boolean | import('../../../types').RenderConfig;
121
121
  formItemWidth: string;
122
122
  labelSuffix: string;
123
123
  labelWidth: string;
@@ -117,9 +117,9 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
117
117
  default: () => {};
118
118
  };
119
119
  }>> & Readonly<{}>, {
120
+ useRender: boolean | import('../../types').RenderConfig;
120
121
  dictMap: import('../../types').DictMap;
121
122
  dictProps: import('../../types').DictProps;
122
- useRender: boolean | import('../../types').RenderConfig;
123
123
  formItemWidth: string;
124
124
  labelSuffix: string;
125
125
  labelWidth: string;
@@ -20,23 +20,23 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
20
20
  default: boolean;
21
21
  };
22
22
  prefixContent: {
23
- type: (StringConstructor | ObjectConstructor)[];
23
+ type: (ObjectConstructor | StringConstructor)[];
24
24
  default: string;
25
25
  };
26
26
  suffixContent: {
27
- type: (StringConstructor | ObjectConstructor)[];
27
+ type: (ObjectConstructor | StringConstructor)[];
28
28
  default: string;
29
29
  };
30
30
  prependContent: {
31
- type: (StringConstructor | ObjectConstructor)[];
31
+ type: (ObjectConstructor | StringConstructor)[];
32
32
  default: string;
33
33
  };
34
34
  appendContent: {
35
- type: (StringConstructor | ObjectConstructor)[];
35
+ type: (ObjectConstructor | StringConstructor)[];
36
36
  default: string;
37
37
  };
38
38
  unit: {
39
- type: (StringConstructor | ObjectConstructor)[];
39
+ type: (ObjectConstructor | StringConstructor)[];
40
40
  default: string;
41
41
  };
42
42
  resize: {
@@ -71,23 +71,23 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
71
71
  default: boolean;
72
72
  };
73
73
  prefixContent: {
74
- type: (StringConstructor | ObjectConstructor)[];
74
+ type: (ObjectConstructor | StringConstructor)[];
75
75
  default: string;
76
76
  };
77
77
  suffixContent: {
78
- type: (StringConstructor | ObjectConstructor)[];
78
+ type: (ObjectConstructor | StringConstructor)[];
79
79
  default: string;
80
80
  };
81
81
  prependContent: {
82
- type: (StringConstructor | ObjectConstructor)[];
82
+ type: (ObjectConstructor | StringConstructor)[];
83
83
  default: string;
84
84
  };
85
85
  appendContent: {
86
- type: (StringConstructor | ObjectConstructor)[];
86
+ type: (ObjectConstructor | StringConstructor)[];
87
87
  default: string;
88
88
  };
89
89
  unit: {
90
- type: (StringConstructor | ObjectConstructor)[];
90
+ type: (ObjectConstructor | StringConstructor)[];
91
91
  default: string;
92
92
  };
93
93
  resize: {
@@ -22,23 +22,23 @@ declare const _default: {
22
22
  default: boolean;
23
23
  };
24
24
  prefixContent: {
25
- type: (StringConstructor | ObjectConstructor)[];
25
+ type: (ObjectConstructor | StringConstructor)[];
26
26
  default: string;
27
27
  };
28
28
  suffixContent: {
29
- type: (StringConstructor | ObjectConstructor)[];
29
+ type: (ObjectConstructor | StringConstructor)[];
30
30
  default: string;
31
31
  };
32
32
  prependContent: {
33
- type: (StringConstructor | ObjectConstructor)[];
33
+ type: (ObjectConstructor | StringConstructor)[];
34
34
  default: string;
35
35
  };
36
36
  appendContent: {
37
- type: (StringConstructor | ObjectConstructor)[];
37
+ type: (ObjectConstructor | StringConstructor)[];
38
38
  default: string;
39
39
  };
40
40
  unit: {
41
- type: (StringConstructor | ObjectConstructor)[];
41
+ type: (ObjectConstructor | StringConstructor)[];
42
42
  default: string;
43
43
  };
44
44
  resize: {
@@ -79,8 +79,8 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
79
79
  "onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
80
80
  "onUpdate:label"?: ((label: string | string[]) => any) | undefined;
81
81
  }>, {
82
- dictProps: import('../../types').DictProps;
83
82
  useRender: boolean | import('../../types').RenderConfig;
83
+ dictProps: import('../../types').DictProps;
84
84
  width: string;
85
85
  modelValue: string | number | boolean | unknown[];
86
86
  toJoin: boolean;
@@ -111,10 +111,10 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
111
111
  "onUpdate:currentPage"?: ((currentPage: number) => any) | undefined;
112
112
  "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
113
113
  }>, {
114
- tableLoading: boolean;
115
- tableColumnAlign: string;
116
114
  dictMap: import('../../types').DictMap;
117
115
  dictProps: import('../../types').DictProps;
116
+ tableLoading: boolean;
117
+ tableColumnAlign: string;
118
118
  currentPage: number;
119
119
  pageSize: number;
120
120
  showOverflowTooltip: boolean;
@@ -1,4 +1,4 @@
1
- export { default as UseCrudTable } from './UseCrudTable/index.vue';
1
+ export { default as UseCrud } from './UseCrud/index.vue';
2
2
  export { default as UseElButton } from './UseElButton/index.vue';
3
3
  export { default as UseElCheckbox } from './UseElCheckbox/index.vue';
4
4
  export { default as UseElConfigProvider } from './UseElConfigProvider/index.vue';
@@ -17,3 +17,4 @@ export { default as UseIconfont } from './UseIconfont/index.vue';
17
17
  export { default as UseLineTitle } from './UseLineTitle/index.vue';
18
18
  export { default as UseRender } from './UseRender/index.vue';
19
19
  export { default as UseSvgIcon } from './UseSvgIcon/index.vue';
20
+ export { useCrud } from './UseCrud/useCrudWithBusiness';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyfex/ivue",
3
- "version": "0.19.3",
3
+ "version": "0.19.4",
4
4
  "description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的 iVue 组件库",
5
5
  "homepage": "https://wyfex.top/idocs/ivue",
6
6
  "type": "module",
@@ -50,20 +50,20 @@
50
50
  "vue": ">=3.2.0 <4.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@types/node": "^26.1.1",
54
- "@vitejs/plugin-vue": "^6.0.7",
53
+ "@types/node": "^26.1.2",
54
+ "@vitejs/plugin-vue": "^6.0.8",
55
55
  "@vue/tsconfig": "^0.9.1",
56
- "@wyfex/iutils": "^0.45.0",
56
+ "@wyfex/iutils": "^0.55.0",
57
57
  "dayjs": "^1.11.21",
58
- "element-plus": "^2.14.2",
58
+ "element-plus": "^2.14.3",
59
59
  "sass-embedded": "^1.100.0",
60
60
  "typescript": "~6.0.3",
61
61
  "unplugin-auto-import": "^21.0.0",
62
62
  "unplugin-dts": "^1.0.3",
63
63
  "unplugin-vue-components": "^32.1.0",
64
- "vite": "^8.1.4",
64
+ "vite": "^8.1.5",
65
65
  "vite-svg-loader": "^5.1.1",
66
- "vue": "^3.5.39",
67
- "vue-tsc": "^3.3.7"
66
+ "vue": "^3.5.40",
67
+ "vue-tsc": "^3.3.8"
68
68
  }
69
69
  }
@@ -0,0 +1,15 @@
1
+ import type { MergedExtConfig } from './types'
2
+
3
+ /**
4
+ * 默认扩展配置
5
+ */
6
+ export default {
7
+ mode: { type: 'PAGE' },
8
+ actionBar: {
9
+ margin: '20px 0',
10
+ showControlFormDisplayBtn: true,
11
+ reverse: false,
12
+ divider: { show: false, borderStyle: 'solid' }
13
+ },
14
+ modal: { type: 'Drawer' }
15
+ } satisfies MergedExtConfig
@@ -0,0 +1,25 @@
1
+ import type { PropType } from 'vue'
2
+ import type { Configs, MergedExtConfig } from './types'
3
+
4
+ /**
5
+ * 组件props
6
+ */
7
+ export default {
8
+ /**
9
+ * 配置 必传
10
+ * 1、该configs是【formColumns】和【tableColumns】的统一配置入口
11
+ * 2、该configs在【formColumns】和【tableColumns】的配置基础上新增了【onlySearch】和【tableOrder】配置项用于兼容特殊应用场景
12
+ */
13
+ configs: {
14
+ type: Array as PropType<Configs[]>,
15
+ required: true
16
+ },
17
+ /**
18
+ * 扩展配置 如【操作栏/弹窗】等
19
+ * 该extConfig是本组件extConfig和UseElTable组件extConfig合并后的扩展配置
20
+ */
21
+ extConfig: {
22
+ type: Object as PropType<MergedExtConfig>,
23
+ default: () => ({})
24
+ }
25
+ }
@@ -1,7 +1,10 @@
1
1
  import type { Component, ExtractPropTypes } from 'vue'
2
2
  import componentProps from './props'
3
3
  import type { FormColumn } from '../UseElForm/types'
4
- import type { TableColumn } from '../UseElTable/types'
4
+ import type {
5
+ TableColumn,
6
+ ExtConfig as TableExtConfig
7
+ } from '../UseElTable/types'
5
8
 
6
9
  /**
7
10
  * props类型
@@ -33,7 +36,9 @@ export interface Configs extends BaseConfigs {
33
36
  }
34
37
 
35
38
  /**
36
- * 分割线配置项接口
39
+ * 分割线配置接口
40
+ * show:是否显示分割线
41
+ * borderStyle:分割线边框样式
37
42
  */
38
43
  export interface Divider {
39
44
  show?: boolean
@@ -41,7 +46,13 @@ export interface Divider {
41
46
  }
42
47
 
43
48
  /**
44
- * 操作栏配置
49
+ * 操作栏配置接口
50
+ * margin:操作栏外边距
51
+ * showControlFormDisplayBtn:是否显示【收起/展开查询】按钮
52
+ * controlFormDisplayBtnWithOpenedIcon:【收起/展开查询】按钮展开时图标
53
+ * controlFormDisplayBtnWithClosedIcon:【收起/展开查询】按钮收起时图标
54
+ * reverse:是否反转操作栏按钮 仅showControlFormDisplayBtn为true时生效
55
+ * divider:操作栏底部分割线
45
56
  */
46
57
  export interface ActionBar {
47
58
  margin?: string
@@ -65,7 +76,10 @@ export interface ExtConfig {
65
76
  * type:弹窗类型 支持Drawer和Dialog
66
77
  * 其他配置项由于组件内部已进行v-bind透传,不不在此重复声明接口,详见UseElDrawer和UseElDialog组件types
67
78
  */
68
- modal?: {
69
- type?: 'Drawer' | 'Dialog'
70
- }
79
+ modal?: { type?: 'Drawer' | 'Dialog' }
71
80
  }
81
+
82
+ /**
83
+ * 合并后的extConfig类型 本组件ExtConfig和UseElTable组件ExtConfig合并
84
+ */
85
+ export type MergedExtConfig = ExtConfig & TableExtConfig
@@ -15,6 +15,15 @@ export interface ExtConfig {
15
15
  * 字典属性配置项
16
16
  */
17
17
  dictProps?: DictProps
18
+ /**
19
+ * crud配置项
20
+ * pageHeight:crud表格页面高度 extConfig.mode.type='PAGE'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度
21
+ * modalHeight:crud表格弹窗高度 extConfig.mode.type='MODAL'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度
22
+ */
23
+ crud?: {
24
+ pageHeight?: string
25
+ modalHeight?: string
26
+ }
18
27
  /**
19
28
  * 表格配置项
20
29
  * pageHeight:表格页面高度 extConfig.mode.type='PAGE'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度
@@ -139,6 +139,14 @@ export interface GlobalConfig {
139
139
  * 最终字典映射
140
140
  */
141
141
  finalDictMap: DictMap
142
+ /**
143
+ * 最终crud表格页面高度
144
+ */
145
+ finalCrudTablePageHeight: string
146
+ /**
147
+ * 最终crud表格弹窗高度
148
+ */
149
+ finalCrudTableModalHeight: string
142
150
  /**
143
151
  * 最终表格页面高度
144
152
  */
@@ -1,20 +0,0 @@
1
- import { Slots } from 'vue';
2
- import { ActionBar } from '../types';
3
- type __VLS_Props = {
4
- slots: Slots;
5
- actionBar: ActionBar;
6
- uefRef: any;
7
- };
8
- declare var __VLS_1: {};
9
- type __VLS_Slots = {} & {
10
- actionBar?: (props: typeof __VLS_1) => any;
11
- };
12
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;
16
- type __VLS_WithSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
@@ -1,18 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { ExtConfig as TableExtConfig } from '../UseElTable/types';
3
- import { Configs, ExtConfig } from './types';
4
- declare const _default: {
5
- configs: {
6
- type: PropType<Configs[]>;
7
- required: boolean;
8
- };
9
- tableExtConfig: {
10
- type: PropType<TableExtConfig>;
11
- default: () => {};
12
- };
13
- extConfig: {
14
- type: PropType<ExtConfig>;
15
- default: () => {};
16
- };
17
- };
18
- export default _default;
@@ -1,28 +0,0 @@
1
- import type { ExtConfig } from './types'
2
-
3
- /**
4
- * 默认扩展配置
5
- */
6
- export default {
7
- /**
8
- * 操作栏配置项
9
- */
10
- actionBar: {
11
- /**
12
- * 操作栏外边距配置项
13
- */
14
- margin: '20px 0',
15
- /**
16
- * 是否显示【收起/展开查询】按钮配置项
17
- */
18
- showControlFormDisplayBtn: true,
19
- /**
20
- * 是否反转操作栏按钮 仅showControlFormDisplayBtn为true时生效
21
- */
22
- reverse: false,
23
- /**
24
- * 操作栏底部分割线配置项
25
- */
26
- divider: { show: false, borderStyle: 'solid' }
27
- }
28
- } satisfies ExtConfig
@@ -1,32 +0,0 @@
1
- import type { PropType } from 'vue'
2
- import type { ExtConfig as TableExtConfig } from '../UseElTable/types'
3
- import type { Configs, ExtConfig } from './types'
4
-
5
- /**
6
- * 组件props
7
- */
8
- export default {
9
- /**
10
- * 配置 必传
11
- * 1、configs是【formColumns】和【tableColumns】的统一配置入口
12
- * 2、configs在【formColumns】和【tableColumns】的配置基础上新增了【onlySearch】和【tableOrder】配置项用于兼容特殊应用场景
13
- */
14
- configs: {
15
- type: Array as PropType<Configs[]>,
16
- required: true
17
- },
18
- /**
19
- * 表格扩展配置
20
- */
21
- tableExtConfig: {
22
- type: Object as PropType<TableExtConfig>,
23
- default: () => ({})
24
- },
25
- /**
26
- * 扩展配置 如【操作栏/弹窗】等
27
- */
28
- extConfig: {
29
- type: Object as PropType<ExtConfig>,
30
- default: () => ({})
31
- }
32
- }
File without changes