@wyfex/ivue 0.15.0 → 0.16.0

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 (95) hide show
  1. package/dist/index.es.js +9 -9
  2. package/dist/index.umd.cjs +9 -9
  3. package/dist/ivue.css +1 -1
  4. package/dist/types/UseCrudTable/defaultExtConfig.d.ts +12 -0
  5. package/dist/types/UseCrudTable/index.vue.d.ts +44 -0
  6. package/dist/types/UseCrudTable/props.d.ts +18 -0
  7. package/dist/types/UseCrudTable/types.d.ts +26 -0
  8. package/dist/types/UseCrudTable/utils.d.ts +2 -0
  9. package/dist/types/{components/UseElDatePicker → UseElDatePicker}/index.vue.d.ts +3 -3
  10. package/dist/types/{components/UseElDatePicker → UseElDatePicker}/props.d.ts +1 -1
  11. package/dist/types/{components/UseElForm → UseElForm}/components/QueryForm.vue.d.ts +10 -4
  12. package/dist/types/{components/UseElForm → UseElForm}/components/useQueryColSpan.d.ts +1 -1
  13. package/dist/types/{components/UseElSelect → UseElSelect}/index.vue.d.ts +5 -5
  14. package/dist/types/{components/UseElSelect → UseElSelect}/props.d.ts +1 -1
  15. package/dist/types/{components/UseElTable → UseElTable}/defaultExtConfig.d.ts +0 -2
  16. package/dist/types/UseElTable/hooks/useTableHeightAdaptive.d.ts +11 -0
  17. package/dist/types/{components/index.d.ts → index.d.ts} +1 -0
  18. package/package.json +1 -1
  19. package/src/components/UseCrudTable/defaultExtConfig.ts +28 -0
  20. package/src/components/UseCrudTable/props.ts +32 -0
  21. package/src/components/UseCrudTable/types.ts +51 -0
  22. package/src/components/UseElConfigProvider/defaultExtConfig.ts +6 -0
  23. package/src/components/UseElForm/types.ts +1 -1
  24. package/src/components/UseElTable/defaultExtConfig.ts +3 -7
  25. package/src/types/index.ts +4 -0
  26. package/dist/types/components/UseElTable/hooks/useTableHeightAdaptive.d.ts +0 -5
  27. package/dist/types/{components/UseElButton → UseElButton}/defaultExtConfig.d.ts +0 -0
  28. package/dist/types/{components/UseElButton → UseElButton}/hook.d.ts +0 -0
  29. package/dist/types/{components/UseElButton → UseElButton}/index.vue.d.ts +1 -1
  30. package/dist/types/{components/UseElButton → UseElButton}/props.d.ts +0 -0
  31. package/dist/types/{components/UseElButton → UseElButton}/types.d.ts +0 -0
  32. package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/defaultExtConfig.d.ts +0 -0
  33. package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/index.vue.d.ts +0 -0
  34. package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/props.d.ts +0 -0
  35. package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/types.d.ts +0 -0
  36. package/dist/types/{components/UseElDatePicker → UseElDatePicker}/types.d.ts +0 -0
  37. package/dist/types/{components/UseElDescriptions → UseElDescriptions}/hook.d.ts +0 -0
  38. package/dist/types/{components/UseElDescriptions → UseElDescriptions}/index.vue.d.ts +2 -2
  39. package/dist/types/{components/UseElDescriptions → UseElDescriptions}/props.d.ts +0 -0
  40. package/dist/types/{components/UseElDescriptions → UseElDescriptions}/types.d.ts +0 -0
  41. package/dist/types/{components/UseElDialog → UseElDialog}/hook.d.ts +0 -0
  42. package/dist/types/{components/UseElDialog → UseElDialog}/index.vue.d.ts +0 -0
  43. package/dist/types/{components/UseElDialog → UseElDialog}/props.d.ts +0 -0
  44. package/dist/types/{components/UseElDialog → UseElDialog}/types.d.ts +0 -0
  45. package/dist/types/{components/UseElDrawer → UseElDrawer}/hook.d.ts +0 -0
  46. package/dist/types/{components/UseElDrawer → UseElDrawer}/index.vue.d.ts +0 -0
  47. package/dist/types/{components/UseElDrawer → UseElDrawer}/props.d.ts +0 -0
  48. package/dist/types/{components/UseElDrawer → UseElDrawer}/types.d.ts +0 -0
  49. package/dist/types/{components/UseElForm → UseElForm}/components/RowForm.vue.d.ts +2 -2
  50. package/dist/types/{components/UseElForm → UseElForm}/components/controls/Cascader.vue.d.ts +0 -0
  51. package/dist/types/{components/UseElForm → UseElForm}/components/controls/DatePicker.vue.d.ts +0 -0
  52. package/dist/types/{components/UseElForm → UseElForm}/components/controls/Input.vue.d.ts +0 -0
  53. package/dist/types/{components/UseElForm → UseElForm}/components/controls/InputNumber.vue.d.ts +0 -0
  54. package/dist/types/{components/UseElForm → UseElForm}/components/controls/InputRange.vue.d.ts +0 -0
  55. package/dist/types/{components/UseElForm → UseElForm}/components/controls/Radio.vue.d.ts +0 -0
  56. package/dist/types/{components/UseElForm → UseElForm}/components/controls/Select.vue.d.ts +0 -0
  57. package/dist/types/{components/UseElForm → UseElForm}/components/controls/Switch.vue.d.ts +0 -0
  58. package/dist/types/{components/UseElForm → UseElForm}/components/controls/TimePicker.vue.d.ts +0 -0
  59. package/dist/types/{components/UseElForm → UseElForm}/components/controls/TimeSelect.vue.d.ts +0 -0
  60. package/dist/types/{components/UseElForm → UseElForm}/components/controls/TreeSelect.vue.d.ts +0 -0
  61. package/dist/types/{components/UseElForm → UseElForm}/hook.d.ts +0 -0
  62. package/dist/types/{components/UseElForm → UseElForm}/index.vue.d.ts +2 -2
  63. package/dist/types/{components/UseElForm → UseElForm}/props.d.ts +0 -0
  64. package/dist/types/{components/UseElForm → UseElForm}/types.d.ts +0 -0
  65. package/dist/types/{components/UseElInput → UseElInput}/index.vue.d.ts +3 -3
  66. package/dist/types/{components/UseElInput → UseElInput}/props.d.ts +0 -0
  67. package/dist/types/{components/UseElInput → UseElInput}/types.d.ts +0 -0
  68. package/dist/types/{components/UseElSelect → UseElSelect}/hook.d.ts +0 -0
  69. package/dist/types/{components/UseElSelect → UseElSelect}/types.d.ts +0 -0
  70. package/dist/types/{components/UseElSwitch → UseElSwitch}/index.vue.d.ts +0 -0
  71. package/dist/types/{components/UseElSwitch → UseElSwitch}/props.d.ts +0 -0
  72. package/dist/types/{components/UseElTable → UseElTable}/components/EditableCell.vue.d.ts +0 -0
  73. package/dist/types/{components/UseElTable → UseElTable}/components/RecTableColumn.vue.d.ts +1 -1
  74. package/dist/types/{components/UseElTable → UseElTable}/components/Selection.vue.d.ts +0 -0
  75. package/dist/types/{components/UseElTable → UseElTable}/components/Span.vue.d.ts +0 -0
  76. package/dist/types/{components/UseElTable → UseElTable}/hooks/useElTable.d.ts +0 -0
  77. package/dist/types/{components/UseElTable → UseElTable}/hooks/usePagination.d.ts +0 -0
  78. package/dist/types/{components/UseElTable → UseElTable}/hooks/useSelection.d.ts +0 -0
  79. package/dist/types/{components/UseElTable → UseElTable}/hooks/useTableColumnMinWidth.d.ts +0 -0
  80. package/dist/types/{components/UseElTable → UseElTable}/index.vue.d.ts +3 -3
  81. /package/dist/types/{components/UseElTable → UseElTable}/props.d.ts +0 -0
  82. /package/dist/types/{components/UseElTable → UseElTable}/types.d.ts +0 -0
  83. /package/dist/types/{components/UseElTable → UseElTable}/utils.d.ts +0 -0
  84. /package/dist/types/{components/UseIconfont → UseIconfont}/index.vue.d.ts +0 -0
  85. /package/dist/types/{components/UseIconfont → UseIconfont}/props.d.ts +0 -0
  86. /package/dist/types/{components/UseLineTitle → UseLineTitle}/defaultExtConfig.d.ts +0 -0
  87. /package/dist/types/{components/UseLineTitle → UseLineTitle}/index.vue.d.ts +0 -0
  88. /package/dist/types/{components/UseLineTitle → UseLineTitle}/props.d.ts +0 -0
  89. /package/dist/types/{components/UseLineTitle → UseLineTitle}/types.d.ts +0 -0
  90. /package/dist/types/{components/UseRender → UseRender}/hook.d.ts +0 -0
  91. /package/dist/types/{components/UseRender → UseRender}/index.vue.d.ts +0 -0
  92. /package/dist/types/{components/UseRender → UseRender}/props.d.ts +0 -0
  93. /package/dist/types/{components/UseRender → UseRender}/types.d.ts +0 -0
  94. /package/dist/types/{components/UseSvgIcon → UseSvgIcon}/index.vue.d.ts +0 -0
  95. /package/dist/types/{components/UseSvgIcon → UseSvgIcon}/props.d.ts +0 -0
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ actionBar: {
3
+ margin: string;
4
+ showControlFormDisplayBtn: true;
5
+ reverse: false;
6
+ divider: {
7
+ show: false;
8
+ borderStyle: "solid";
9
+ };
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,44 @@
1
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ configs: {
3
+ type: import('vue').PropType<import('./types').Configs[]>;
4
+ required: boolean;
5
+ };
6
+ tableExtConfig: {
7
+ type: import('vue').PropType<import('../UseElTable/types').ExtConfig>;
8
+ default: () => {};
9
+ };
10
+ extConfig: {
11
+ type: import('vue').PropType<import('./types').ExtConfig>;
12
+ default: () => {};
13
+ };
14
+ }>, {
15
+ uefRef: import('vue').Ref<any, any>;
16
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ onDictKeys: (value?: string[] | undefined) => any;
18
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
+ configs: {
20
+ type: import('vue').PropType<import('./types').Configs[]>;
21
+ required: boolean;
22
+ };
23
+ tableExtConfig: {
24
+ type: import('vue').PropType<import('../UseElTable/types').ExtConfig>;
25
+ default: () => {};
26
+ };
27
+ extConfig: {
28
+ type: import('vue').PropType<import('./types').ExtConfig>;
29
+ default: () => {};
30
+ };
31
+ }>> & Readonly<{
32
+ onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
33
+ }>, {
34
+ extConfig: import('./types').ExtConfig;
35
+ tableExtConfig: import('../UseElTable/types').ExtConfig;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,26 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import { default as componentProps } from './props';
3
+ import { FormColumn } from '../UseElForm/types';
4
+ import { TableColumn } from '../UseElTable/types';
5
+ export type Props = ExtractPropTypes<typeof componentProps>;
6
+ export interface Emits {
7
+ (e: 'onDictKeys', value?: string[]): void;
8
+ }
9
+ export type BaseConfigs = Omit<FormColumn, 'prop'> & Omit<TableColumn, 'prop'>;
10
+ export interface Configs extends BaseConfigs {
11
+ prop: string;
12
+ onlySearch?: boolean;
13
+ tableOrder?: number;
14
+ }
15
+ export interface Divider {
16
+ show: boolean;
17
+ borderStyle: 'none' | 'solid' | 'hidden' | 'dashed';
18
+ }
19
+ export interface ExtConfig {
20
+ actionBar: {
21
+ margin: string;
22
+ showControlFormDisplayBtn: boolean;
23
+ reverse: boolean;
24
+ divider: Divider;
25
+ };
26
+ }
@@ -0,0 +1,2 @@
1
+ export declare const getFilteredFormColumns: (list: any) => any;
2
+ export declare const getFilteredAndSortedTableColumns: (list: any) => any[];
@@ -1,6 +1,6 @@
1
1
  declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  modelValue: {
3
- type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
3
+ type: (ArrayConstructor | StringConstructor | NumberConstructor)[];
4
4
  default: string;
5
5
  };
6
6
  useRender: {
@@ -40,7 +40,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
40
40
  "update:modelValue": (value: string | number | any[]) => any;
41
41
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
42
42
  modelValue: {
43
- type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
43
+ type: (ArrayConstructor | StringConstructor | NumberConstructor)[];
44
44
  default: string;
45
45
  };
46
46
  useRender: {
@@ -80,8 +80,8 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
80
80
  "onUpdate:modelValue"?: ((value: string | number | any[]) => any) | undefined;
81
81
  }>, {
82
82
  type: string;
83
- modelValue: string | number | unknown[];
84
83
  useRender: boolean | import('../../types').RenderConfig;
84
+ modelValue: string | number | unknown[];
85
85
  startPlaceholder: string;
86
86
  endPlaceholder: string;
87
87
  rangeSeparator: string;
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
2
2
  import { RenderConfig } from '../../types';
3
3
  declare const _default: {
4
4
  modelValue: {
5
- type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
5
+ type: (ArrayConstructor | StringConstructor | NumberConstructor)[];
6
6
  default: string;
7
7
  };
8
8
  useRender: {
@@ -1,4 +1,4 @@
1
- declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  formColumns: {
3
3
  type: import('vue').PropType<import('../types').FormColumn[]>;
4
4
  required: boolean;
@@ -55,7 +55,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
55
55
  };
56
56
  }>, {
57
57
  showQueryForm: import('vue').Ref<boolean, boolean>;
58
- handleDisplayQueryForm: () => Promise<void>;
58
+ handleDisplayQueryForm: () => void;
59
59
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
60
60
  onDictKeys: (value?: string[] | undefined) => any;
61
61
  "update:formModel": (value: Record<string, any>) => any;
@@ -119,16 +119,22 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
119
119
  "onUpdate:formModel"?: ((value: Record<string, any>) => any) | undefined;
120
120
  }>, {
121
121
  dictMap: import('../../../types').DictMap;
122
- useRender: boolean | import('../../../types').RenderConfig;
123
122
  dictProps: import('../../../types').DictProps;
124
- labelWidth: string;
123
+ useRender: boolean | import('../../../types').RenderConfig;
125
124
  formItemWidth: string;
126
125
  labelSuffix: string;
126
+ labelWidth: string;
127
127
  labelPosition: string;
128
128
  rowGutter: number;
129
129
  colSpan: number;
130
130
  disabled: boolean;
131
131
  queryConfig: import('../types').QueryConfig;
132
132
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
133
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
133
134
  declare const _default: typeof __VLS_export;
134
135
  export default _default;
136
+ type __VLS_WithSlots<T, S> = T & {
137
+ new (): {
138
+ $slots: S;
139
+ };
140
+ };
@@ -1,6 +1,6 @@
1
1
  import { ComputedRef } from 'vue';
2
2
  import { FormColumn, Props } from '../types';
3
3
  export declare const useQueryColSpan: (props: Props, formColumnsComputed: ComputedRef<FormColumn[]>) => {
4
- queryColSpanComputed: ComputedRef<0 | 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24>;
4
+ queryColSpanComputed: ComputedRef<0 | 1 | 12 | 24 | 8 | 6 | 4 | 3 | 2>;
5
5
  btnColSpanComputed: ComputedRef<number>;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  modelValue: {
3
- type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
3
+ type: (ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
4
4
  default: string;
5
5
  };
6
6
  options: {
@@ -40,7 +40,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
40
40
  "update:label": (label: string | string[]) => any;
41
41
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
42
42
  modelValue: {
43
- type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
43
+ type: (ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
44
44
  default: string;
45
45
  };
46
46
  options: {
@@ -79,12 +79,12 @@ 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
+ useRender: boolean | import('../../types').RenderConfig;
84
+ width: string;
82
85
  toJoin: boolean;
83
86
  modelValue: string | number | boolean | unknown[];
84
- useRender: boolean | import('../../types').RenderConfig;
85
87
  placeholder: string;
86
- dictProps: import('../../types').DictProps;
87
- width: string;
88
88
  clearable: boolean;
89
89
  options: Record<string, any>[];
90
90
  useV2: boolean;
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
2
2
  import { DictProps, RenderConfig } from '../../types';
3
3
  declare const _default: {
4
4
  modelValue: {
5
- type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
5
+ type: (ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
6
6
  default: string;
7
7
  };
8
8
  options: {
@@ -7,8 +7,6 @@ declare const _default: {
7
7
  };
8
8
  heightAdaptive: {
9
9
  isModal: false;
10
- modalFooterHeight: number;
11
- bottomOffset: number;
12
10
  };
13
11
  selection: {
14
12
  width: number;
@@ -0,0 +1,11 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { Props } from '../types';
3
+ import { GlobalConfig } from '../../../types';
4
+ export declare const useTableHeightAdaptive: ({ rootRef, tableWrapperRef, mergedProps, globalConfig }: {
5
+ rootRef: Ref<HTMLDivElement | null>;
6
+ tableWrapperRef: Ref<HTMLDivElement | null>;
7
+ mergedProps: ComputedRef<Props>;
8
+ globalConfig: ComputedRef<GlobalConfig>;
9
+ }) => {
10
+ tableRealHeight: Ref<string, string>;
11
+ };
@@ -1,3 +1,4 @@
1
+ export { default as UseCrudTable } from './UseCrudTable/index.vue';
1
2
  export { default as UseElButton } from './UseElButton/index.vue';
2
3
  export { default as UseElConfigProvider } from './UseElConfigProvider/index.vue';
3
4
  export { default as UseElDatePicker } from './UseElDatePicker/index.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyfex/ivue",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的 iVue 组件库",
5
5
  "homepage": "https://wyfe.top/idocs/ivue",
6
6
  "type": "module",
@@ -0,0 +1,28 @@
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
@@ -0,0 +1,32 @@
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
+ }
@@ -0,0 +1,51 @@
1
+ import type { ExtractPropTypes } from 'vue'
2
+ import componentProps from './props'
3
+ import type { FormColumn } from '../UseElForm/types'
4
+ import type { TableColumn } from '../UseElTable/types'
5
+
6
+ /**
7
+ * props类型
8
+ */
9
+ export type Props = ExtractPropTypes<typeof componentProps>
10
+
11
+ /**
12
+ * emits接口
13
+ */
14
+ export interface Emits {
15
+ // dictKeys事件
16
+ (e: 'onDictKeys', value?: string[]): void
17
+ }
18
+
19
+ /**
20
+ * 基础配置类型
21
+ */
22
+ export type BaseConfigs = Omit<FormColumn, 'prop'> & Omit<TableColumn, 'prop'>
23
+
24
+ /**
25
+ * 配置项接口
26
+ */
27
+ export interface Configs extends BaseConfigs {
28
+ prop: string
29
+ onlySearch?: boolean
30
+ tableOrder?: number
31
+ }
32
+
33
+ /**
34
+ * 分割线配置项接口
35
+ */
36
+ export interface Divider {
37
+ show: boolean
38
+ borderStyle: 'none' | 'solid' | 'hidden' | 'dashed'
39
+ }
40
+
41
+ /**
42
+ * extConfig接口
43
+ */
44
+ export interface ExtConfig {
45
+ actionBar: {
46
+ margin: string
47
+ showControlFormDisplayBtn: boolean
48
+ reverse: boolean
49
+ divider: Divider
50
+ }
51
+ }
@@ -4,7 +4,13 @@ import type { ExtConfig } from './types'
4
4
  * 默认扩展配置
5
5
  */
6
6
  export default {
7
+ /**
8
+ * 字典属性配置项
9
+ */
7
10
  dictProps: { value: 'value', label: 'label', children: 'children' },
11
+ /**
12
+ * 表格配置项
13
+ */
8
14
  table: { bottomOffset: 20, modalFooterHeight: 82 },
9
15
  debug: { open: false, type: 'primary', toJson: false }
10
16
  } satisfies ExtConfig
@@ -13,7 +13,7 @@ export type Props = ExtractPropTypes<typeof componentProps>
13
13
  export interface Emits {
14
14
  // dictKeys事件
15
15
  (e: 'onDictKeys', value?: string[]): void
16
- // 更新formModel 仅formMode为inlineForm时支持
16
+ // 更新formModel
17
17
  (e: 'update:formModel', value: Record<string, any>): void
18
18
  }
19
19
 
@@ -18,14 +18,10 @@ export default {
18
18
  /**
19
19
  * 高度自适应配置项
20
20
  * isModal:是否弹窗模式,弹窗模式自动追加底部按钮预留
21
- * modalFooterHeight:弹窗底部操作栏固定高度,isModal=true 生效
22
- * bottomOffset:底部通用预留偏移
21
+ * modalFooterHeight:弹窗底部操作栏固定高度,isModal=true生效,该项由UseElConfigProvider组件统一提供默认值
22
+ * bottomOffset:底部预留偏移,该项由UseElConfigProvider组件统一提供默认值
23
23
  */
24
- heightAdaptive: {
25
- isModal: false,
26
- modalFooterHeight: 82,
27
- bottomOffset: 20
28
- },
24
+ heightAdaptive: { isModal: false },
29
25
  /**
30
26
  * 选择器配置项
31
27
  * 绑定v-model:selectionData="selectionData"则开启选择器 不显式设置type则默认为CHECKBOX复选
@@ -98,6 +98,10 @@ export interface GlobalConfig {
98
98
  finalDictProps: DictProps
99
99
  // 最终字典映射
100
100
  finalDictMap: DictMap
101
+ // 最终表格底部预留偏移
102
+ finalTableBottomOffset: number
103
+ // 最终表格弹窗底部操作栏固定高度,isModal=true生效
104
+ finalTableModalFooterHeight?: number
101
105
  // 最终上传配置
102
106
  finalUploadConfig: UploadConfig
103
107
  }
@@ -1,5 +0,0 @@
1
- import { ComputedRef, Ref } from 'vue';
2
- import { Props } from '../types';
3
- export declare const useTableHeightAdaptive: (rootRef: Ref<HTMLDivElement | null>, tableWrapperRef: Ref<HTMLDivElement | null>, mergedProps: ComputedRef<Props>) => {
4
- tableRealHeight: Ref<string, string>;
5
- };
@@ -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
- type: string;
35
34
  extConfig: import('./types').ExtConfig;
35
+ type: string;
36
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
37
  declare const _default: typeof __VLS_export;
38
38
  export default _default;
@@ -95,11 +95,11 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
95
95
  onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
96
96
  }>, {
97
97
  dictMap: import('../../types').DictMap;
98
- useRender: boolean | RenderConfig;
99
98
  dictProps: import('../../types').DictProps;
99
+ useRender: boolean | RenderConfig;
100
+ labelWidth: string | number;
100
101
  column: number;
101
102
  border: boolean;
102
- labelWidth: string | number;
103
103
  useTitleCenterWithBg: boolean;
104
104
  labelClass: string;
105
105
  defaultClass: string;
@@ -119,11 +119,11 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
119
119
  "onUpdate:formModel"?: ((value: Record<string, any>) => any) | undefined;
120
120
  }>, {
121
121
  dictMap: import('../../../types/index.js').DictMap;
122
- useRender: boolean | import('../../../types/index.js').RenderConfig;
123
122
  dictProps: import('../../../types/index.js').DictProps;
124
- labelWidth: string;
123
+ useRender: boolean | import('../../../types/index.js').RenderConfig;
125
124
  formItemWidth: string;
126
125
  labelSuffix: string;
126
+ labelWidth: string;
127
127
  labelPosition: string;
128
128
  rowGutter: number;
129
129
  colSpan: number;
@@ -118,11 +118,11 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
118
118
  };
119
119
  }>> & Readonly<{}>, {
120
120
  dictMap: import('../../types').DictMap;
121
- useRender: boolean | import('../../types').RenderConfig;
122
121
  dictProps: import('../../types').DictProps;
123
- labelWidth: string;
122
+ useRender: boolean | import('../../types').RenderConfig;
124
123
  formItemWidth: string;
125
124
  labelSuffix: string;
125
+ labelWidth: string;
126
126
  labelPosition: string;
127
127
  rowGutter: number;
128
128
  colSpan: number;
@@ -101,12 +101,12 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
101
101
  }>> & Readonly<{
102
102
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
103
103
  }>, {
104
+ useRender: boolean | import('../../types').RenderConfig;
105
+ width: string;
106
+ unit: string | Record<string, any>;
104
107
  resize: string;
105
108
  modelValue: string | number;
106
- useRender: boolean | import('../../types').RenderConfig;
107
109
  placeholder: string;
108
- unit: string | Record<string, any>;
109
- width: string;
110
110
  clearable: boolean;
111
111
  prefixContent: string | Record<string, any>;
112
112
  suffixContent: string | Record<string, any>;