cosey 0.7.0 → 0.7.1

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 (56) hide show
  1. package/components/editor/components/select.vue.d.ts +2 -2
  2. package/components/editor/editor.d.ts +2 -2
  3. package/components/editor/index.d.ts +6 -6
  4. package/components/field/components/remote-select/remote-select.d.ts +1 -1
  5. package/components/field/field.api.d.ts +1 -1
  6. package/components/form/form-item.api.d.ts +1 -1
  7. package/components/form/index.d.ts +1 -1
  8. package/components/form-drawer/form-drawer.vue.d.ts +6 -6
  9. package/components/form-drawer/index.d.ts +17 -17
  10. package/components/form-list/form-list.api.d.ts +1 -1
  11. package/components/form-list/index.d.ts +4 -4
  12. package/components/form-query/form-query.d.ts +2 -2
  13. package/components/form-query/index.d.ts +6 -6
  14. package/components/image-card/image-card.d.ts +2 -2
  15. package/components/image-card/index.d.ts +6 -6
  16. package/components/index.js +1 -1
  17. package/components/input-number-range/index.d.ts +5 -5
  18. package/components/input-number-range/input-number-range.vue.d.ts +2 -2
  19. package/components/remote-select/index.d.ts +45 -45
  20. package/components/remote-select/remote-select.api.d.ts +1 -1
  21. package/components/remote-select/remote-select.d.ts +16 -16
  22. package/components/snug-menu/index.d.ts +5 -5
  23. package/components/snug-menu/snug-menu-item.vue.js +9 -3
  24. package/components/snug-menu/snug-menu.vue.d.ts +2 -2
  25. package/components/table/index.d.ts +40 -40
  26. package/components/table/index.js +1 -1
  27. package/components/table/table-column/renderer.d.ts +1 -1
  28. package/components/table/table-column/table-column.api.d.ts +131 -0
  29. package/components/table/table-column/table-column.api.js +33 -0
  30. package/components/table/table-column/table-column.d.ts +100 -127
  31. package/components/table/table-column/table-column.js +103 -30
  32. package/components/table/table-column-editor/item.vue.d.ts +1 -1
  33. package/components/table/table-column-editor/list.vue.d.ts +1 -1
  34. package/components/table/table-column-editor/table-column-editor.d.ts +1 -1
  35. package/components/table/table-column-editor/table-column-editor.vue.d.ts +1 -1
  36. package/components/table/table-export/item.vue.d.ts +1 -1
  37. package/components/table/table-export/list.vue.d.ts +1 -1
  38. package/components/table/table-export/table-export.d.ts +1 -1
  39. package/components/table/table-export/table-export.vue.d.ts +6 -6
  40. package/components/table/table-query/table-query.vue.d.ts +2 -2
  41. package/components/table/table.d.ts +8 -8
  42. package/components/table/table.vue.d.ts +23 -23
  43. package/components/table/table.vue.js +2 -2
  44. package/components/table-action/item.d.ts +3 -3
  45. package/components/transition-group/index.d.ts +3 -3
  46. package/components/transition-group/transition-group.d.ts +1 -1
  47. package/components/upload/index.d.ts +6 -6
  48. package/components/upload/upload.d.ts +2 -2
  49. package/layout/layout-menu/layout-menu.vue.js +7 -1
  50. package/layout/layout-menu/style/index.js +4 -0
  51. package/layout/layout-user-menu/style/index.js +1 -1
  52. package/package.json +1 -1
  53. package/utils/excel/index.d.ts +1 -1
  54. package/utils/excel/type.d.ts +1 -1
  55. package/components/table/table-column/table-column.vue.d.ts +0 -104
  56. package/components/table/table-column/table-column.vue.js +0 -106
@@ -0,0 +1,131 @@
1
+ import { type VNode, type ExtractPropTypes, type PropType } from 'vue';
2
+ import { type TableColumnCtx } from 'element-plus';
3
+ import elTableColumnProps from 'element-plus/es/components/table/src/table-column/defaults.mjs';
4
+ import { type RendererType } from './renderer';
5
+ export type TableColumnPropsSlots = string | ((props: {
6
+ row: any;
7
+ column: any;
8
+ $index: number;
9
+ }) => any) | {
10
+ default?: string | ((props: {
11
+ row: any;
12
+ column: any;
13
+ $index: number;
14
+ }) => any);
15
+ header?: string | ((props: {
16
+ column: any;
17
+ $index: number;
18
+ }) => any);
19
+ filterIcon?: string | ((props: {
20
+ filterOpened: boolean;
21
+ }) => any);
22
+ };
23
+ export type TableColumnProps<T = any> = Partial<Omit<ExtractPropTypes<typeof elTableColumnProps>, 'align' | 'tooltipFormatter'>> & {
24
+ slots?: TableColumnPropsSlots;
25
+ renderer?: RendererType;
26
+ hidden?: boolean;
27
+ align?: 'left' | 'center' | 'right';
28
+ columns?: TableColumnProps<T>[];
29
+ internalSlot?: {
30
+ [prop: string]: any;
31
+ };
32
+ tooltip?: string;
33
+ format?: (cellValue: any, row: any, column: TableColumnCtx<any>, index: number) => VNode | string;
34
+ };
35
+ export type MayBeTableColumnProps = TableColumnProps | null | undefined | boolean;
36
+ export declare const tableColumnProps: {
37
+ slots: {
38
+ type: PropType<TableColumnProps["slots"]>;
39
+ };
40
+ renderer: {
41
+ type: PropType<TableColumnProps["renderer"]>;
42
+ default: string;
43
+ };
44
+ hidden: {
45
+ type: BooleanConstructor;
46
+ };
47
+ align: {
48
+ type: PropType<TableColumnProps["align"]>;
49
+ default: string;
50
+ };
51
+ columns: {
52
+ type: PropType<TableColumnProps[]>;
53
+ };
54
+ internalSlot: {
55
+ type: PropType<TableColumnProps["internalSlot"]>;
56
+ };
57
+ tooltip: {
58
+ type: StringConstructor;
59
+ };
60
+ format: {
61
+ type: FunctionConstructor;
62
+ };
63
+ type: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ label: StringConstructor;
68
+ className: StringConstructor;
69
+ labelClassName: StringConstructor;
70
+ property: StringConstructor;
71
+ prop: StringConstructor;
72
+ width: {
73
+ type: (NumberConstructor | StringConstructor)[];
74
+ default: string;
75
+ };
76
+ minWidth: {
77
+ type: (NumberConstructor | StringConstructor)[];
78
+ default: string;
79
+ };
80
+ renderHeader: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["renderHeader"]>;
81
+ sortable: {
82
+ type: (BooleanConstructor | StringConstructor)[];
83
+ default: boolean;
84
+ };
85
+ sortMethod: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortMethod"]>;
86
+ sortBy: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortBy"]>;
87
+ resizable: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ columnKey: StringConstructor;
92
+ headerAlign: StringConstructor;
93
+ showOverflowTooltip: {
94
+ type: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["showOverflowTooltip"]>;
95
+ default: undefined;
96
+ };
97
+ tooltipFormatter: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["tooltipFormatter"]>;
98
+ fixed: (BooleanConstructor | StringConstructor)[];
99
+ formatter: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["formatter"]>;
100
+ selectable: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["selectable"]>;
101
+ reserveSelection: BooleanConstructor;
102
+ filterMethod: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["filterMethod"]>;
103
+ filteredValue: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["filteredValue"]>;
104
+ filters: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["filters"]>;
105
+ filterPlacement: StringConstructor;
106
+ filterMultiple: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
110
+ filterClassName: StringConstructor;
111
+ index: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["index"]>;
112
+ sortOrders: {
113
+ type: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortOrders"]>;
114
+ default: () => (string | null)[];
115
+ validator: (val: import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortOrders"]) => boolean;
116
+ };
117
+ };
118
+ export interface TableColumnSlots {
119
+ default?: (props: {
120
+ row: any;
121
+ column: any;
122
+ $index: number;
123
+ }) => any;
124
+ header?: (props: {
125
+ column: any;
126
+ $index: number;
127
+ }) => any;
128
+ 'filter-icon'?: (props: {
129
+ filterOpened: boolean;
130
+ }) => any;
131
+ }
@@ -0,0 +1,33 @@
1
+ import elTableColumnProps from 'element-plus/es/components/table/src/table-column/defaults.mjs';
2
+
3
+ const tableColumnProps = {
4
+ ...elTableColumnProps,
5
+ slots: {
6
+ type: [String, Object, Function]
7
+ },
8
+ renderer: {
9
+ type: [String, Object],
10
+ default: "text"
11
+ },
12
+ hidden: {
13
+ type: Boolean
14
+ },
15
+ align: {
16
+ type: String,
17
+ default: "left"
18
+ },
19
+ columns: {
20
+ type: Array
21
+ },
22
+ internalSlot: {
23
+ type: Object
24
+ },
25
+ tooltip: {
26
+ type: String
27
+ },
28
+ format: {
29
+ type: Function
30
+ }
31
+ };
32
+
33
+ export { tableColumnProps };
@@ -1,131 +1,104 @@
1
- import { type VNode, type ExtractPropTypes, type PropType } from 'vue';
2
- import { type TableColumnCtx } from 'element-plus';
3
- import elTableColumnProps from 'element-plus/es/components/table/src/table-column/defaults.mjs';
4
- import { type RendererType } from './renderer';
5
- export type TableColumnPropsSlots = string | ((props: {
6
- row: any;
7
- column: any;
8
- $index: number;
9
- }) => any) | {
10
- default?: string | ((props: {
11
- row: any;
12
- column: any;
1
+ import { type TableColumnProps } from './table-column.api';
2
+ declare const TableColumn: import("vue").DefineComponent<{
3
+ label?: string | undefined;
4
+ minWidth?: string | number | undefined;
5
+ width?: string | number | undefined;
6
+ fixed?: string | boolean | undefined;
7
+ type?: string | undefined;
8
+ filters?: import("element-plus/es/components/table/src/table-column/defaults.mjs").Filters | undefined;
9
+ index?: number | ((index: number) => number) | undefined;
10
+ formatter?: ((row: any, column: import("element-plus/es/components/index.mjs").TableColumnCtx<any>, cellValue: any, index: number) => import("vue").VNode | string) | undefined;
11
+ className?: string | undefined;
12
+ labelClassName?: string | undefined;
13
+ property?: string | undefined;
14
+ prop?: string | undefined;
15
+ renderHeader?: ((data: {
16
+ column: import("element-plus/es/components/index.mjs").TableColumnCtx<any>;
13
17
  $index: number;
14
- }) => any);
15
- header?: string | ((props: {
16
- column: any;
17
- $index: number;
18
- }) => any);
19
- filterIcon?: string | ((props: {
20
- filterOpened: boolean;
21
- }) => any);
22
- };
23
- export type TableColumnProps<T = any> = Partial<Omit<ExtractPropTypes<typeof elTableColumnProps>, 'align' | 'tooltipFormatter'>> & {
24
- slots?: TableColumnPropsSlots;
25
- renderer?: RendererType;
26
- hidden?: boolean;
27
- align?: 'left' | 'center' | 'right';
28
- columns?: TableColumnProps<T>[];
18
+ store: import("element-plus/es/components/table/src/store/index.mjs").Store<any>;
19
+ _self: any;
20
+ }) => import("vue").VNode) | undefined;
21
+ sortable?: string | boolean | undefined;
22
+ sortMethod?: ((a: any, b: any) => number) | undefined;
23
+ sortBy?: string | string[] | ((row: any, index: number, array?: any[] | undefined) => string) | undefined;
24
+ resizable?: boolean | undefined;
25
+ columnKey?: string | undefined;
26
+ headerAlign?: string | undefined;
27
+ showOverflowTooltip?: boolean | Partial<Pick<import("element-plus/es/components/index.mjs").ElTooltipProps, "offset" | "transition" | "enterable" | "appendTo" | "placement" | "popperClass" | "showAfter" | "showArrow" | "effect" | "popperOptions" | "hideAfter">> | undefined;
28
+ selectable?: ((row: any, index: number) => boolean) | undefined;
29
+ reserveSelection?: boolean | undefined;
30
+ filterMethod?: import("element-plus/es/components/table/src/table-column/defaults.mjs").FilterMethods<any> | undefined;
31
+ filteredValue?: string[] | undefined;
32
+ filterPlacement?: string | undefined;
33
+ filterMultiple?: boolean | undefined;
34
+ filterClassName?: string | undefined;
35
+ sortOrders?: (import("element-plus/es/components/table/src/table/defaults.mjs").TableSortOrder | null)[] | undefined;
36
+ slots?: import("./table-column.api").TableColumnPropsSlots | undefined;
37
+ renderer?: import("./renderer").RendererType | undefined;
38
+ hidden?: boolean | undefined;
39
+ align?: "left" | "center" | "right" | undefined;
40
+ columns?: TableColumnProps<any>[] | undefined;
29
41
  internalSlot?: {
30
42
  [prop: string]: any;
31
- };
32
- tooltip?: string;
33
- format?: (cellValue: any, row: any, column: TableColumnCtx<any>, index: number) => VNode | string;
34
- };
35
- export type MayBeTableColumnProps = TableColumnProps | null | undefined | boolean;
36
- export declare const tableColumnProps: {
37
- slots: {
38
- type: PropType<TableColumnProps["slots"]>;
39
- };
40
- renderer: {
41
- type: PropType<TableColumnProps["renderer"]>;
42
- default: string;
43
- };
44
- hidden: {
45
- type: BooleanConstructor;
46
- };
47
- align: {
48
- type: PropType<TableColumnProps["align"]>;
49
- default: string;
50
- };
51
- columns: {
52
- type: PropType<TableColumnProps[]>;
53
- };
54
- internalSlot: {
55
- type: PropType<TableColumnProps["internalSlot"]>;
56
- };
57
- tooltip: {
58
- type: StringConstructor;
59
- };
60
- format: {
61
- type: FunctionConstructor;
62
- };
63
- type: {
64
- type: StringConstructor;
65
- default: string;
66
- };
67
- label: StringConstructor;
68
- className: StringConstructor;
69
- labelClassName: StringConstructor;
70
- property: StringConstructor;
71
- prop: StringConstructor;
72
- width: {
73
- type: (NumberConstructor | StringConstructor)[];
74
- default: string;
75
- };
76
- minWidth: {
77
- type: (NumberConstructor | StringConstructor)[];
78
- default: string;
79
- };
80
- renderHeader: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["renderHeader"]>;
81
- sortable: {
82
- type: (BooleanConstructor | StringConstructor)[];
83
- default: boolean;
84
- };
85
- sortMethod: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortMethod"]>;
86
- sortBy: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortBy"]>;
87
- resizable: {
88
- type: BooleanConstructor;
89
- default: boolean;
90
- };
91
- columnKey: StringConstructor;
92
- headerAlign: StringConstructor;
93
- showOverflowTooltip: {
94
- type: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["showOverflowTooltip"]>;
95
- default: undefined;
96
- };
97
- tooltipFormatter: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["tooltipFormatter"]>;
98
- fixed: (BooleanConstructor | StringConstructor)[];
99
- formatter: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["formatter"]>;
100
- selectable: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["selectable"]>;
101
- reserveSelection: BooleanConstructor;
102
- filterMethod: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["filterMethod"]>;
103
- filteredValue: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["filteredValue"]>;
104
- filters: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["filters"]>;
105
- filterPlacement: StringConstructor;
106
- filterMultiple: {
107
- type: BooleanConstructor;
108
- default: boolean;
109
- };
110
- filterClassName: StringConstructor;
111
- index: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["index"]>;
112
- sortOrders: {
113
- type: PropType<import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortOrders"]>;
114
- default: () => (string | null)[];
115
- validator: (val: import("element-plus/es/components/index.mjs").TableColumnCtx<any>["sortOrders"]) => boolean;
116
- };
117
- };
118
- export interface TableColumnSlots {
119
- default?: (props: {
120
- row: any;
121
- column: any;
122
- $index: number;
123
- }) => any;
124
- header?: (props: {
125
- column: any;
43
+ } | undefined;
44
+ tooltip?: string | undefined;
45
+ format?: ((cellValue: any, row: any, column: import("element-plus").TableColumnCtx<any>, index: number) => import("vue").VNode | string) | undefined;
46
+ }, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
47
+ label?: string | undefined;
48
+ minWidth?: string | number | undefined;
49
+ width?: string | number | undefined;
50
+ fixed?: string | boolean | undefined;
51
+ type?: string | undefined;
52
+ filters?: import("element-plus/es/components/table/src/table-column/defaults.mjs").Filters | undefined;
53
+ index?: number | ((index: number) => number) | undefined;
54
+ formatter?: ((row: any, column: import("element-plus/es/components/index.mjs").TableColumnCtx<any>, cellValue: any, index: number) => import("vue").VNode | string) | undefined;
55
+ className?: string | undefined;
56
+ labelClassName?: string | undefined;
57
+ property?: string | undefined;
58
+ prop?: string | undefined;
59
+ renderHeader?: ((data: {
60
+ column: import("element-plus/es/components/index.mjs").TableColumnCtx<any>;
126
61
  $index: number;
127
- }) => any;
128
- 'filter-icon'?: (props: {
129
- filterOpened: boolean;
130
- }) => any;
131
- }
62
+ store: import("element-plus/es/components/table/src/store/index.mjs").Store<any>;
63
+ _self: any;
64
+ }) => import("vue").VNode) | undefined;
65
+ sortable?: string | boolean | undefined;
66
+ sortMethod?: ((a: any, b: any) => number) | undefined;
67
+ sortBy?: string | string[] | ((row: any, index: number, array?: any[] | undefined) => string) | undefined;
68
+ resizable?: boolean | undefined;
69
+ columnKey?: string | undefined;
70
+ headerAlign?: string | undefined;
71
+ showOverflowTooltip?: boolean | Partial<Pick<import("element-plus/es/components/index.mjs").ElTooltipProps, "offset" | "transition" | "enterable" | "appendTo" | "placement" | "popperClass" | "showAfter" | "showArrow" | "effect" | "popperOptions" | "hideAfter">> | undefined;
72
+ selectable?: ((row: any, index: number) => boolean) | undefined;
73
+ reserveSelection?: boolean | undefined;
74
+ filterMethod?: import("element-plus/es/components/table/src/table-column/defaults.mjs").FilterMethods<any> | undefined;
75
+ filteredValue?: string[] | undefined;
76
+ filterPlacement?: string | undefined;
77
+ filterMultiple?: boolean | undefined;
78
+ filterClassName?: string | undefined;
79
+ sortOrders?: (import("element-plus/es/components/table/src/table/defaults.mjs").TableSortOrder | null)[] | undefined;
80
+ slots?: import("./table-column.api").TableColumnPropsSlots | undefined;
81
+ renderer?: import("./renderer").RendererType | undefined;
82
+ hidden?: boolean | undefined;
83
+ align?: "left" | "center" | "right" | undefined;
84
+ columns?: TableColumnProps<any>[] | undefined;
85
+ internalSlot?: {
86
+ [prop: string]: any;
87
+ } | undefined;
88
+ tooltip?: string | undefined;
89
+ format?: ((cellValue: any, row: any, column: import("element-plus").TableColumnCtx<any>, index: number) => import("vue").VNode | string) | undefined;
90
+ }> & Readonly<{}>, {
91
+ minWidth: string | number;
92
+ width: string | number;
93
+ hidden: boolean;
94
+ type: string;
95
+ align: "left" | "right" | "center" | undefined;
96
+ sortable: string | boolean;
97
+ resizable: boolean;
98
+ showOverflowTooltip: boolean | Partial<Pick<import("element-plus/es/components/index.mjs").ElTooltipProps, "offset" | "transition" | "enterable" | "appendTo" | "placement" | "popperClass" | "showAfter" | "showArrow" | "effect" | "popperOptions" | "hideAfter">> | undefined;
99
+ reserveSelection: boolean;
100
+ filterMultiple: boolean;
101
+ sortOrders: (import("element-plus/es/components/table/src/table/defaults.mjs").TableSortOrder | null)[];
102
+ renderer: import("./renderer").RendererType | undefined;
103
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
104
+ export default TableColumn;
@@ -1,33 +1,106 @@
1
- import elTableColumnProps from 'element-plus/es/components/table/src/table-column/defaults.mjs';
1
+ import { defineComponent, computed, createVNode, Fragment } from 'vue';
2
+ import { tableColumnProps } from './table-column.api.js';
3
+ import { renderer, mapRendererColumnProps } from './renderer.js';
4
+ import { ElTableColumn, ElTooltip } from 'element-plus';
5
+ import classNames from 'classnames';
6
+ import stdin_default$1 from './table-column.style.js';
7
+ import stdin_default$2 from '../../icon/icon.vue.js';
8
+ import { useToken } from '../../theme/util/useToken.js';
9
+ import { isString, isPlainObject, isFunction } from '../../../utils/is.js';
10
+ import { useComponentConfig } from '../../config-provider/config-provider.api.js';
11
+ import { useLocale } from '../../../hooks/useLocale.js';
2
12
 
3
- const tableColumnProps = {
4
- ...elTableColumnProps,
5
- slots: {
6
- type: [String, Object, Function]
7
- },
8
- renderer: {
9
- type: [String, Object],
10
- default: "text"
11
- },
12
- hidden: {
13
- type: Boolean
14
- },
15
- align: {
16
- type: String,
17
- default: "left"
18
- },
19
- columns: {
20
- type: Array
21
- },
22
- internalSlot: {
23
- type: Object
24
- },
25
- tooltip: {
26
- type: String
27
- },
28
- format: {
29
- type: Function
13
+ const TableColumn = defineComponent({
14
+ // 使用和ep一样的组件名
15
+ // 是为了在多级表头中瞒骗ep以便和其他 ElTableColumn 一样添加到其子组件列表
16
+ name: "ElTableColumn",
17
+ inheritAttrs: false,
18
+ props: tableColumnProps,
19
+ setup(props) {
20
+ const {
21
+ prefixCls
22
+ } = useComponentConfig("table-column");
23
+ const {
24
+ t
25
+ } = useLocale();
26
+ const {
27
+ hashId
28
+ } = stdin_default$1(prefixCls);
29
+ const {
30
+ token
31
+ } = useToken();
32
+ const mergedProps = computed(() => {
33
+ const obj = {};
34
+ const cls = [props.className, hashId.value, prefixCls.value];
35
+ for (const [key, value] of Object.entries(props)) {
36
+ if (value !== void 0) {
37
+ obj[key] = value;
38
+ }
39
+ }
40
+ if (!obj.formatter) {
41
+ if (obj.format) {
42
+ obj.formatter = (row, column, cellValue, index) => {
43
+ return obj.format(cellValue, row, column, index);
44
+ };
45
+ } else {
46
+ obj.formatter = (row, column, cellValue, index) => {
47
+ return renderer({
48
+ cellValue,
49
+ row,
50
+ column,
51
+ index
52
+ }, obj.renderer, t);
53
+ };
54
+ const renderType = typeof obj.renderer === "object" ? obj.renderer.type : obj.renderer;
55
+ const renderProps = mapRendererColumnProps[renderType];
56
+ if (renderProps) {
57
+ cls.push(renderProps.className);
58
+ if (renderProps.minWidth && !obj.minWidth) {
59
+ obj.minWidth = renderProps.minWidth;
60
+ }
61
+ }
62
+ }
63
+ }
64
+ obj.className = classNames(cls);
65
+ return obj;
66
+ });
67
+ const slots = computed(() => {
68
+ const result = {};
69
+ const slots2 = mergedProps.value.slots;
70
+ if (isString(slots2)) {
71
+ result.default = props.internalSlot?.[slots2];
72
+ } else if (isPlainObject(slots2)) {
73
+ for (const [key, value] of Object.entries(slots2)) {
74
+ result[key] = isString(value) ? props.internalSlot?.[value] : value;
75
+ }
76
+ } else if (isFunction(slots2)) {
77
+ result.default = slots2;
78
+ }
79
+ return result;
80
+ });
81
+ const renderLabel = () => createVNode("span", {
82
+ "class": `${prefixCls.value}-label`
83
+ }, [mergedProps.value.label]);
84
+ const renderTooltip = () => createVNode(Fragment, null, [createVNode(ElTooltip, {
85
+ "content": mergedProps.value.tooltip,
86
+ "placement": "top"
87
+ }, {
88
+ default: () => [createVNode(stdin_default$2, {
89
+ "name": "carbon:help",
90
+ "style": {
91
+ marginInlineStart: token.value.marginXXS + "px"
92
+ }
93
+ }, null)]
94
+ })]);
95
+ return () => mergedProps.value.hidden ? null : createVNode(ElTableColumn, mergedProps.value, {
96
+ ...slots.value,
97
+ header: slots.value.header && mergedProps.value.tooltip ? (...args) => {
98
+ return [slots.value.header(...args), renderTooltip()];
99
+ } : slots.value.header || (mergedProps.value.tooltip ? () => [renderLabel(), renderTooltip()] : void 0),
100
+ default: slotProps => mergedProps.value.columns ? mergedProps.value.columns.map(column => createVNode(TableColumn, column, null)) : slots.value.default?.(slotProps)
101
+ });
30
102
  }
31
- };
103
+ });
104
+ var stdin_default = TableColumn;
32
105
 
33
- export { tableColumnProps };
106
+ export { stdin_default as default };
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  import { type CheckableNode } from '../../../hooks';
3
3
  type __VLS_Props = {
4
4
  node: CheckableNode<TableColumnProps>;
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  import { type CheckableNode } from '../../../hooks';
3
3
  type __VLS_Props = {
4
4
  nodeList: CheckableNode<TableColumnProps>[];
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  export interface TableColumnEditorProps {
3
3
  modelValue?: TableColumnProps[];
4
4
  virtualRef?: any;
@@ -1,5 +1,5 @@
1
1
  import { type TableColumnEditorProps } from './table-column-editor';
2
- import { type TableColumnProps } from '../table-column/table-column';
2
+ import { type TableColumnProps } from '../table-column/table-column.api';
3
3
  declare var __VLS_49: {};
4
4
  type __VLS_Slots = {} & {
5
5
  default?: (props: typeof __VLS_49) => any;
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  import { type CheckableNode } from '../../../hooks';
3
3
  type __VLS_Props = {
4
4
  node: CheckableNode<TableColumnProps>;
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  import { type CheckableNode } from '../../../hooks';
3
3
  type __VLS_Props = {
4
4
  nodeList: CheckableNode<TableColumnProps>[] | undefined;
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  import { type ExtractPropTypes, type PropType } from 'vue';
3
3
  import { type FormDialogEmits } from '../../form-dialog';
4
4
  export declare const tableExportProps: {
@@ -1,4 +1,4 @@
1
- import { type TableColumnProps } from '../table-column/table-column';
1
+ import { type TableColumnProps } from '../table-column/table-column.api';
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
3
  columns: {
4
4
  type: import("vue").PropType<TableColumnProps[]>;
@@ -190,8 +190,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
190
190
  };
191
191
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
192
192
  open: () => any;
193
- "update:modelValue": (value: boolean) => any;
194
193
  close: () => any;
194
+ "update:modelValue": (value: boolean) => any;
195
195
  opened: () => any;
196
196
  closed: () => any;
197
197
  openAutoFocus: () => any;
@@ -387,8 +387,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
387
387
  };
388
388
  }>> & Readonly<{
389
389
  onOpen?: (() => any) | undefined;
390
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
391
390
  onClose?: (() => any) | undefined;
391
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
392
392
  onOpened?: (() => any) | undefined;
393
393
  onClosed?: (() => any) | undefined;
394
394
  onOpenAutoFocus?: (() => any) | undefined;
@@ -401,17 +401,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
401
401
  center: boolean;
402
402
  data: any[];
403
403
  title: string;
404
- modelValue: boolean;
405
- appendTo: string | HTMLElement;
404
+ closeOnPressEscape: boolean;
406
405
  draggable: boolean;
407
406
  appendToBody: boolean;
407
+ appendTo: string | HTMLElement;
408
+ modelValue: boolean;
408
409
  showClose: boolean;
409
410
  confirmText: string;
410
411
  cancelText: string;
411
412
  hideConfirm: boolean;
412
413
  hideCancel: boolean;
413
414
  closeOnClickModal: boolean;
414
- closeOnPressEscape: boolean;
415
415
  destroyOnClose: boolean;
416
416
  lockScroll: boolean;
417
417
  modal: boolean;
@@ -316,12 +316,12 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
316
316
  push?: number | undefined;
317
317
  offset?: number | undefined;
318
318
  span?: number | undefined;
319
- tag?: string | undefined;
320
- xs?: import("../..").ColSize | undefined;
321
319
  sm?: import("../..").ColSize | undefined;
322
320
  md?: import("../..").ColSize | undefined;
323
321
  lg?: import("../..").ColSize | undefined;
324
322
  xl?: import("../..").ColSize | undefined;
323
+ tag?: string | undefined;
324
+ xs?: import("../..").ColSize | undefined;
325
325
  pull?: number | undefined;
326
326
  xxl?: import("../..").ColSize | undefined;
327
327
  };