@wyfex/ivue 0.9.0 → 0.11.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 (43) hide show
  1. package/dist/index.es.js +11 -6
  2. package/dist/index.umd.cjs +11 -6
  3. package/dist/ivue.css +1 -1
  4. package/dist/types/UseElButton/types.d.ts +1 -1
  5. package/dist/types/UseElConfigProvider/index.vue.d.ts +0 -20
  6. package/dist/types/UseElConfigProvider/props.d.ts +0 -9
  7. package/dist/types/UseElDatePicker/index.vue.d.ts +2 -2
  8. package/dist/types/UseElDatePicker/props.d.ts +1 -1
  9. package/dist/types/UseElDescriptions/hook.d.ts +2 -1
  10. package/dist/types/UseElDescriptions/index.vue.d.ts +1 -1
  11. package/dist/types/UseElDialog/hook.d.ts +4 -314
  12. package/dist/types/UseElDialog/index.vue.d.ts +14 -20
  13. package/dist/types/UseElDialog/props.d.ts +5 -9
  14. package/dist/types/UseElDrawer/hook.d.ts +4 -352
  15. package/dist/types/UseElDrawer/index.vue.d.ts +2 -2
  16. package/dist/types/UseElSelect/hook.d.ts +5 -4
  17. package/dist/types/UseElSelect/index.vue.d.ts +2 -2
  18. package/dist/types/UseElSelect/props.d.ts +1 -1
  19. package/dist/types/UseElTable/components/EditableCell.vue.d.ts +4 -0
  20. package/dist/types/UseElTable/components/RecTableColumn.vue.d.ts +86 -0
  21. package/dist/types/UseElTable/components/Selection.vue.d.ts +12 -0
  22. package/dist/types/UseElTable/components/Span.vue.d.ts +4 -0
  23. package/dist/types/UseElTable/defaultExtConfig.d.ts +35 -0
  24. package/dist/types/UseElTable/hooks/useElTable.d.ts +18 -0
  25. package/dist/types/UseElTable/hooks/usePagination.d.ts +9 -0
  26. package/dist/types/UseElTable/hooks/useSelection.d.ts +15 -0
  27. package/dist/types/UseElTable/index.vue.d.ts +122 -0
  28. package/dist/types/UseElTable/props.d.ts +50 -0
  29. package/dist/types/UseElTable/types.d.ts +96 -0
  30. package/dist/types/UseElTable/utils.d.ts +9 -0
  31. package/dist/types/UseRender/index.vue.d.ts +1 -1
  32. package/dist/types/UseSvgIcon/index.vue.d.ts +54 -0
  33. package/dist/types/UseSvgIcon/props.d.ts +27 -0
  34. package/dist/types/index.d.ts +2 -0
  35. package/package.json +3 -3
  36. package/src/components/UseElButton/types.ts +1 -1
  37. package/src/components/UseElConfigProvider/props.ts +0 -15
  38. package/src/components/UseElDialog/props.ts +9 -11
  39. package/src/components/UseElTable/defaultExtConfig.ts +64 -0
  40. package/src/components/UseElTable/props.ts +83 -0
  41. package/src/components/UseElTable/types.ts +144 -0
  42. package/src/components/UseSvgIcon/props.ts +59 -0
  43. package/src/types/index.ts +9 -14
@@ -0,0 +1,122 @@
1
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ tableColumns: {
3
+ type: import('vue').PropType<import('./types').TableColumn[]>;
4
+ required: boolean;
5
+ };
6
+ tableData: {
7
+ type: import('vue').PropType<Record<string, unknown>[]>;
8
+ required: boolean;
9
+ };
10
+ tableHeight: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ tableLoading: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ tableColumnAlign: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ validator: (val: string) => boolean;
22
+ };
23
+ dictMap: {
24
+ type: import('vue').PropType<import('../../types/index.ts').DictMap>;
25
+ default: () => {};
26
+ };
27
+ dictProps: {
28
+ type: import('vue').PropType<import('../../types/index.ts').DictProps>;
29
+ default: () => {};
30
+ };
31
+ showOverflowTooltip: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ headerCellStyle: {
36
+ type: import('vue').PropType<Record<string, string>>;
37
+ default: () => {
38
+ backgroundColor: string;
39
+ color: string;
40
+ };
41
+ };
42
+ extConfig: {
43
+ type: import('vue').PropType<import('./types').ExtConfig>;
44
+ default: () => {};
45
+ };
46
+ }>, {
47
+ validateRequired: (row: Record<string, any>) => boolean;
48
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
49
+ onDictKeys: (value?: string[] | undefined) => any;
50
+ "update:selectionData": (selectionData: any) => any;
51
+ "update:currentRow": (currentRow: any) => any;
52
+ "update:currentPage": (currentPage: number) => any;
53
+ "update:pageSize": (pageSize: number) => any;
54
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
55
+ tableColumns: {
56
+ type: import('vue').PropType<import('./types').TableColumn[]>;
57
+ required: boolean;
58
+ };
59
+ tableData: {
60
+ type: import('vue').PropType<Record<string, unknown>[]>;
61
+ required: boolean;
62
+ };
63
+ tableHeight: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ tableLoading: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ tableColumnAlign: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ validator: (val: string) => boolean;
75
+ };
76
+ dictMap: {
77
+ type: import('vue').PropType<import('../../types/index.ts').DictMap>;
78
+ default: () => {};
79
+ };
80
+ dictProps: {
81
+ type: import('vue').PropType<import('../../types/index.ts').DictProps>;
82
+ default: () => {};
83
+ };
84
+ showOverflowTooltip: {
85
+ type: BooleanConstructor;
86
+ default: boolean;
87
+ };
88
+ headerCellStyle: {
89
+ type: import('vue').PropType<Record<string, string>>;
90
+ default: () => {
91
+ backgroundColor: string;
92
+ color: string;
93
+ };
94
+ };
95
+ extConfig: {
96
+ type: import('vue').PropType<import('./types').ExtConfig>;
97
+ default: () => {};
98
+ };
99
+ }>> & Readonly<{
100
+ onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
101
+ "onUpdate:selectionData"?: ((selectionData: any) => any) | undefined;
102
+ "onUpdate:currentRow"?: ((currentRow: any) => any) | undefined;
103
+ "onUpdate:currentPage"?: ((currentPage: number) => any) | undefined;
104
+ "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
105
+ }>, {
106
+ extConfig: import('./types').ExtConfig;
107
+ dictMap: import('../../types/index.ts').DictMap;
108
+ dictProps: import('../../types/index.ts').DictProps;
109
+ tableHeight: string;
110
+ tableLoading: boolean;
111
+ tableColumnAlign: string;
112
+ showOverflowTooltip: boolean;
113
+ headerCellStyle: Record<string, string>;
114
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
115
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
116
+ declare const _default: typeof __VLS_export;
117
+ export default _default;
118
+ type __VLS_WithSlots<T, S> = T & {
119
+ new (): {
120
+ $slots: S;
121
+ };
122
+ };
@@ -0,0 +1,50 @@
1
+ import { PropType } from 'vue';
2
+ import { ExtConfig, TableColumn } from './types';
3
+ import { DictMap, DictProps } from '../../../types';
4
+ declare const _default: {
5
+ tableColumns: {
6
+ type: PropType<TableColumn[]>;
7
+ required: boolean;
8
+ };
9
+ tableData: {
10
+ type: PropType<Record<string, unknown>[]>;
11
+ required: boolean;
12
+ };
13
+ tableHeight: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ tableLoading: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ tableColumnAlign: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ validator: (val: string) => boolean;
25
+ };
26
+ dictMap: {
27
+ type: PropType<DictMap>;
28
+ default: () => {};
29
+ };
30
+ dictProps: {
31
+ type: PropType<DictProps>;
32
+ default: () => {};
33
+ };
34
+ showOverflowTooltip: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ headerCellStyle: {
39
+ type: PropType<Record<string, string>>;
40
+ default: () => {
41
+ backgroundColor: string;
42
+ color: string;
43
+ };
44
+ };
45
+ extConfig: {
46
+ type: PropType<ExtConfig>;
47
+ default: () => {};
48
+ };
49
+ };
50
+ export default _default;
@@ -0,0 +1,96 @@
1
+ import { Component, ExtractPropTypes } from 'vue';
2
+ import { EditAttrs, GlobalConfig, UseDict } from '../../../types';
3
+ import { default as componentProps } from './props';
4
+ export type Props = ExtractPropTypes<typeof componentProps>;
5
+ export interface Emits {
6
+ (e: 'onDictKeys', value?: string[]): void;
7
+ (e: 'update:selectionData', selectionData: any[] | any): void;
8
+ (e: 'update:currentRow', currentRow: any): void;
9
+ (e: 'update:currentPage', currentPage: number): void;
10
+ (e: 'update:pageSize', pageSize: number): void;
11
+ }
12
+ export interface EditableCellAndSpanVueProps {
13
+ row: Record<string, any>;
14
+ item: TableColumn;
15
+ mergedProps: Props;
16
+ globalConfig: GlobalConfig;
17
+ }
18
+ export interface Header {
19
+ slot?: boolean | string;
20
+ required?: boolean;
21
+ asteriskPosition?: 'before' | 'after';
22
+ }
23
+ export interface Edit {
24
+ component: Component;
25
+ attrs?: EditAttrs;
26
+ }
27
+ export interface TableColumnExtConfig {
28
+ header?: Header;
29
+ edit?: Edit;
30
+ formatter?: Function;
31
+ class?: string | string[];
32
+ style?: string | Record<string, unknown>;
33
+ }
34
+ export interface TableColumn {
35
+ label?: string;
36
+ prop?: string;
37
+ useDict?: boolean | string | UseDict;
38
+ slot?: boolean | string;
39
+ width?: string | number;
40
+ minWidth?: string | number;
41
+ show?: boolean;
42
+ align?: string;
43
+ fixed?: boolean | string;
44
+ sortable?: boolean;
45
+ showOverflowTooltip?: boolean;
46
+ extConfig?: TableColumnExtConfig;
47
+ children?: TableColumn[];
48
+ }
49
+ export interface Selection {
50
+ label?: string;
51
+ type?: string;
52
+ width?: number;
53
+ key?: string;
54
+ enableRowClick?: boolean;
55
+ selectable?: Function;
56
+ disabledConfig?: Record<string, string | number | string[] | number[]> | Array<{
57
+ key: string;
58
+ value: string | number | string[] | number[];
59
+ }>;
60
+ align?: string;
61
+ fixed?: boolean;
62
+ }
63
+ export interface ExtConfig {
64
+ extraHeader?: {
65
+ class?: string;
66
+ style?: {
67
+ padding?: string;
68
+ borderBottom?: string;
69
+ };
70
+ };
71
+ selection?: Selection;
72
+ index?: {
73
+ label?: string;
74
+ width?: number;
75
+ align?: string;
76
+ fixed?: boolean;
77
+ };
78
+ expand?: {
79
+ show?: boolean;
80
+ width?: number;
81
+ };
82
+ operation?: {
83
+ label?: string;
84
+ width?: number;
85
+ fixed?: string;
86
+ };
87
+ pagination?: {
88
+ total?: number;
89
+ marginTop?: number;
90
+ position?: string;
91
+ pageSizes?: number[];
92
+ background?: boolean;
93
+ layout?: string;
94
+ func?: Function;
95
+ };
96
+ }
@@ -0,0 +1,9 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { TableColumn, Props } from './types';
3
+ import { GlobalConfig } from '../../../types';
4
+ export declare const processFieldProp: (row: Record<string, unknown>, item: TableColumn, globalConfig: GlobalConfig) => {
5
+ class: string;
6
+ style: string;
7
+ data: unknown;
8
+ };
9
+ export declare const handleMinWidth: (columns: TableColumn[], data: any, mergedProps: ComputedRef<Props>, globalConfig: GlobalConfig) => void;
@@ -51,9 +51,9 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
51
51
  }>> & Readonly<{}>, {
52
52
  style: string | Record<string, any>;
53
53
  class: string;
54
+ emptyText: string;
54
55
  separator: string;
55
56
  parseKey: string;
56
- emptyText: string;
57
57
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
58
58
  declare const _default: typeof __VLS_export;
59
59
  export default _default;
@@ -0,0 +1,54 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ name: {
3
+ type: StringConstructor;
4
+ required: boolean;
5
+ };
6
+ size: {
7
+ type: (StringConstructor | NumberConstructor)[];
8
+ default: number;
9
+ validator(val: any): any;
10
+ };
11
+ color: {
12
+ type: import('vue').PropType<string | Record<string, any>[]>;
13
+ validator(val: any): any;
14
+ };
15
+ margin: {
16
+ type: StringConstructor;
17
+ };
18
+ clickable: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ hoverClass: {
23
+ type: StringConstructor;
24
+ };
25
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
26
+ name: {
27
+ type: StringConstructor;
28
+ required: boolean;
29
+ };
30
+ size: {
31
+ type: (StringConstructor | NumberConstructor)[];
32
+ default: number;
33
+ validator(val: any): any;
34
+ };
35
+ color: {
36
+ type: import('vue').PropType<string | Record<string, any>[]>;
37
+ validator(val: any): any;
38
+ };
39
+ margin: {
40
+ type: StringConstructor;
41
+ };
42
+ clickable: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ hoverClass: {
47
+ type: StringConstructor;
48
+ };
49
+ }>> & Readonly<{}>, {
50
+ size: string | number;
51
+ clickable: boolean;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
53
+ declare const _default: typeof __VLS_export;
54
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: {
3
+ name: {
4
+ type: StringConstructor;
5
+ required: boolean;
6
+ };
7
+ size: {
8
+ type: (StringConstructor | NumberConstructor)[];
9
+ default: number;
10
+ validator(val: any): any;
11
+ };
12
+ color: {
13
+ type: PropType<string | Record<string, any>[]>;
14
+ validator(val: any): any;
15
+ };
16
+ margin: {
17
+ type: StringConstructor;
18
+ };
19
+ clickable: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ hoverClass: {
24
+ type: StringConstructor;
25
+ };
26
+ };
27
+ export default _default;
@@ -6,4 +6,6 @@ export { default as UseElDialog } from './UseElDialog/index.vue';
6
6
  export { default as UseElDrawer } from './UseElDrawer/index.vue';
7
7
  export { default as UseElInput } from './UseElInput/index.vue';
8
8
  export { default as UseElSelect } from './UseElSelect/index.vue';
9
+ export { default as UseElTable } from './UseElTable/index.vue';
9
10
  export { default as UseRender } from './UseRender/index.vue';
11
+ export { default as UseSvgIcon } from './UseSvgIcon/index.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyfex/ivue",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的 iVue 组件库",
5
5
  "homepage": "https://wyfe.top/idocs/ivue",
6
6
  "type": "module",
@@ -53,7 +53,7 @@
53
53
  "@types/node": "^25.9.3",
54
54
  "@vitejs/plugin-vue": "^6.0.7",
55
55
  "@vue/tsconfig": "^0.9.1",
56
- "@wyfex/iutils": "file:D:/20260516/wyfex/wyfex-iutils/wyfex-iutils-0.30.0.tgz",
56
+ "@wyfex/iutils": "file:D:/20260516/wyfex/wyfex-iutils/wyfex-iutils-0.35.0.tgz",
57
57
  "element-plus": "^2.14.2",
58
58
  "sass-embedded": "^1.100.0",
59
59
  "typescript": "~6.0.3",
@@ -63,6 +63,6 @@
63
63
  "vite": "^8.0.16",
64
64
  "vite-svg-loader": "^5.1.1",
65
65
  "vue": "^3.5.38",
66
- "vue-tsc": "^3.3.4"
66
+ "vue-tsc": "^3.3.5"
67
67
  }
68
68
  }
@@ -42,7 +42,7 @@ export interface ExtConfig {
42
42
  * 二次确认数据 显式设置则开启二次确认
43
43
  * 可为String、Number、Object、Array,无需传递数据则显式设置为null。
44
44
  */
45
- data?: string | number | unknown
45
+ data?: string | number | Record<string, unknown> | unknown[] | null
46
46
  /**
47
47
  * 二次确认类型 同ElButton类型
48
48
  */
@@ -14,21 +14,6 @@ export default {
14
14
  default: 'zh',
15
15
  validator: (val: string) => ['', 'zh', 'en'].includes(val)
16
16
  },
17
- /**
18
- * 主题模式 默认light
19
- */
20
- themeMode: {
21
- type: String,
22
- default: 'light',
23
- validator: (val: string) => ['light', 'dark', ''].includes(val)
24
- },
25
- /**
26
- * 表格底部额外高度 默认20,此处配置同时作用于UseElTable和UseCrudTable组件
27
- */
28
- tableExtraHeight: {
29
- type: Number,
30
- default: 20
31
- },
32
17
  /**
33
18
  * 上传配置 此处配置仅作用于UseElUpload组件
34
19
  */
@@ -1,5 +1,3 @@
1
- import type { PropType } from 'vue'
2
-
3
1
  /**
4
2
  * 组件props
5
3
  */
@@ -18,13 +16,6 @@ export default {
18
16
  type: Boolean,
19
17
  default: true
20
18
  },
21
- /**
22
- * el-dialog头部区域样式配置
23
- */
24
- headerStyleConfig: {
25
- type: Object as PropType<Record<string, any>>,
26
- default: () => ({ bgColor: 'var(--theme-color)', color: '#fff' })
27
- },
28
19
  /**
29
20
  * el-dialog内容区域最大高度
30
21
  */
@@ -60,6 +51,13 @@ export default {
60
51
  type: Boolean,
61
52
  default: true
62
53
  },
54
+ /**
55
+ * 是否显示header底部border 默认是
56
+ */
57
+ showHeaderBottomBorder: {
58
+ type: Boolean,
59
+ default: true
60
+ },
63
61
  /**
64
62
  * 是否显示footer 默认显示,可通过<template #footer></template>插槽自定义footer内容
65
63
  */
@@ -68,9 +66,9 @@ export default {
68
66
  default: true
69
67
  },
70
68
  /**
71
- * 是否显示footer顶部border
69
+ * 是否显示footer顶部border 默认否
72
70
  */
73
- showFooterBorder: {
71
+ showFooterTopBorder: {
74
72
  type: Boolean,
75
73
  default: false
76
74
  },
@@ -0,0 +1,64 @@
1
+ import type { ExtConfig } from './types'
2
+
3
+ /**
4
+ * 默认扩展配置
5
+ */
6
+ export default {
7
+ /**
8
+ * 额外表头配置项
9
+ * class:额外表头类名
10
+ * style:额外表头样式对象
11
+ */
12
+ extraHeader: {
13
+ style: {
14
+ padding: '10px',
15
+ borderBottom: '1px solid var(--el-border-color-light)'
16
+ }
17
+ },
18
+ /**
19
+ * 选择器配置项
20
+ * 绑定v-model:selectionData="selectionData"则开启选择器 不显式设置type则默认为CHECKBOX复选
21
+ * type:选择类型 可选值:CHECKBOX(复选) | CHECKBOXRADIO(复选框单选) | RADIO(单选)
22
+ * label:type为CHECKBOXRADIO、RADIO时表头全选复选框的文本 不设置则为空显示
23
+ * key:选中数据的唯一键 对应tableData中的唯一键 如id
24
+ * selectable:决定当前行复选框是否可以勾选 传入function,如果是简单禁用逻辑推荐优先使用disabledConfig配置项,复杂逻辑才建议使用本配置项
25
+ * disabledConfig:禁用配置 可传对象或对象数组
26
+ * enableRowClick:允许通过点击行触发单选/复选 默认否 PS:默认不高亮当前行,若需高亮当前行,只需给UseElTable组件设置highlightCurrentRow属性即可
27
+ * width:选择器的列宽 默认为40px
28
+ * align:选择器的排列方式 默认为center居中
29
+ * fixed:是否固定 默认为true
30
+ */
31
+ selection: { width: 40, enableRowClick: false, align: 'center', fixed: true },
32
+ /**
33
+ * 序号列配置项
34
+ * label:序号列表头文本 不显式设置则不显示序号列
35
+ * width、align、fixed同选择器配置项
36
+ */
37
+ index: { width: 55, align: 'center', fixed: true },
38
+ /**
39
+ * 展开列配置项
40
+ */
41
+ expand: { show: false },
42
+ /**
43
+ * 操作列配置项
44
+ * label:操作列文案 显式设置则开启操作列
45
+ * width:操作列宽度 默认为128px
46
+ * fixed:固定方向 默认固定在右侧
47
+ */
48
+ operation: { width: 128, fixed: 'right' },
49
+ /**
50
+ * 分页器配置项
51
+ * total:分页总数 为-1时不显示分页器
52
+ * marginTop:分页器与表格的间距 默认20px
53
+ * func:分页方法 显式设置则在组件内部自动处理分页逻辑
54
+ * position:分页器位置 默认为right 可选值:left | center | right
55
+ */
56
+ pagination: {
57
+ total: -1,
58
+ marginTop: 20,
59
+ position: 'right',
60
+ pageSizes: [10, 20, 30, 40, 50],
61
+ background: true,
62
+ layout: 'total, sizes, prev, pager, next, jumper'
63
+ }
64
+ } satisfies ExtConfig
@@ -0,0 +1,83 @@
1
+ import type { PropType } from 'vue'
2
+ import type { ExtConfig, TableColumn } from './types'
3
+ import type { DictMap, DictProps } from '@/types'
4
+
5
+ /**
6
+ * 组件props
7
+ */
8
+ export default {
9
+ /**
10
+ * 表格列 必传
11
+ */
12
+ tableColumns: {
13
+ type: Array as PropType<TableColumn[]>,
14
+ required: true
15
+ },
16
+ /**
17
+ * 表格数据 必传
18
+ */
19
+ tableData: {
20
+ type: Array as PropType<Record<string, unknown>[]>,
21
+ required: true
22
+ },
23
+ /**
24
+ * 表格高度 如为autoCalc则使用组件内部高度自适应逻辑,可指定具体高度值
25
+ */
26
+ tableHeight: {
27
+ type: String,
28
+ default: 'autoCalc'
29
+ },
30
+ /**
31
+ * 表格loading
32
+ */
33
+ tableLoading: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ /**
38
+ * 表格列排列方式 默认center
39
+ */
40
+ tableColumnAlign: {
41
+ type: String,
42
+ default: 'center',
43
+ validator: (val: string) => ['left', 'center', 'right'].includes(val)
44
+ },
45
+ /**
46
+ * 字典映射 数据结构为{ tableColumns[][label | useDict | useDict.data]: Array<{ label: string, value: any }> }
47
+ */
48
+ dictMap: {
49
+ type: Object as PropType<DictMap>,
50
+ default: () => ({})
51
+ },
52
+ /**
53
+ * 字典属性 默认为{ value: 'value', label: 'label',children:'children' },可通过全局配置进行设置,为适配全局配置此处不再设置默认值
54
+ */
55
+ dictProps: {
56
+ type: Object as PropType<DictProps>,
57
+ default: () => ({})
58
+ },
59
+ /**
60
+ * 当内容过长被隐藏时是否显示tooltip 默认是
61
+ */
62
+ showOverflowTooltip: {
63
+ type: Boolean,
64
+ default: true
65
+ },
66
+ /**
67
+ * 表头列样式
68
+ */
69
+ headerCellStyle: {
70
+ type: Object as PropType<Record<string, string>>,
71
+ default: () => ({
72
+ backgroundColor: 'var(--el-fill-color-light)',
73
+ color: 'var(--el-table-header-text-color)'
74
+ })
75
+ },
76
+ /**
77
+ * 扩展配置 如【序号/复选单选/展开列/分页】等
78
+ */
79
+ extConfig: {
80
+ type: Object as PropType<ExtConfig>,
81
+ default: () => ({})
82
+ }
83
+ }