cosey 0.7.0 → 0.7.2

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 (59) 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/editor.style.js +2 -2
  4. package/components/editor/index.d.ts +6 -6
  5. package/components/field/components/remote-select/remote-select.d.ts +1 -1
  6. package/components/field/field.api.d.ts +1 -1
  7. package/components/form/form-item.api.d.ts +1 -1
  8. package/components/form/index.d.ts +1 -1
  9. package/components/form-drawer/form-drawer.vue.d.ts +6 -6
  10. package/components/form-drawer/index.d.ts +17 -17
  11. package/components/form-group/style/index.js +3 -3
  12. package/components/form-list/form-list.api.d.ts +1 -1
  13. package/components/form-list/index.d.ts +4 -4
  14. package/components/form-query/form-query.d.ts +2 -2
  15. package/components/form-query/index.d.ts +6 -6
  16. package/components/image-card/image-card.d.ts +2 -2
  17. package/components/image-card/index.d.ts +6 -6
  18. package/components/index.js +1 -1
  19. package/components/input-number-range/index.d.ts +5 -5
  20. package/components/input-number-range/input-number-range.vue.d.ts +2 -2
  21. package/components/remote-select/index.d.ts +45 -45
  22. package/components/remote-select/remote-select.api.d.ts +1 -1
  23. package/components/remote-select/remote-select.d.ts +16 -16
  24. package/components/ribbon/ribbon.style.js +32 -32
  25. package/components/snug-menu/index.d.ts +5 -5
  26. package/components/snug-menu/snug-menu-item.vue.js +9 -3
  27. package/components/snug-menu/snug-menu.vue.d.ts +2 -2
  28. package/components/table/index.d.ts +40 -40
  29. package/components/table/index.js +1 -1
  30. package/components/table/table-column/renderer.d.ts +1 -1
  31. package/components/table/table-column/table-column.api.d.ts +131 -0
  32. package/components/table/table-column/table-column.api.js +33 -0
  33. package/components/table/table-column/table-column.d.ts +100 -127
  34. package/components/table/table-column/table-column.js +103 -30
  35. package/components/table/table-column-editor/item.vue.d.ts +1 -1
  36. package/components/table/table-column-editor/list.vue.d.ts +1 -1
  37. package/components/table/table-column-editor/table-column-editor.d.ts +1 -1
  38. package/components/table/table-column-editor/table-column-editor.vue.d.ts +1 -1
  39. package/components/table/table-export/item.vue.d.ts +1 -1
  40. package/components/table/table-export/list.vue.d.ts +1 -1
  41. package/components/table/table-export/table-export.d.ts +1 -1
  42. package/components/table/table-export/table-export.vue.d.ts +6 -6
  43. package/components/table/table-query/table-query.vue.d.ts +2 -2
  44. package/components/table/table.d.ts +8 -8
  45. package/components/table/table.vue.d.ts +23 -23
  46. package/components/table/table.vue.js +2 -2
  47. package/components/table-action/item.d.ts +3 -3
  48. package/components/transition-group/index.d.ts +3 -3
  49. package/components/transition-group/transition-group.d.ts +1 -1
  50. package/components/upload/index.d.ts +6 -6
  51. package/components/upload/upload.d.ts +2 -2
  52. package/layout/layout-menu/layout-menu.vue.js +7 -1
  53. package/layout/layout-menu/style/index.js +4 -0
  54. package/layout/layout-user-menu/style/index.js +1 -1
  55. package/package.json +1 -1
  56. package/utils/excel/index.d.ts +1 -1
  57. package/utils/excel/type.d.ts +1 -1
  58. package/components/table/table-column/table-column.vue.d.ts +0 -104
  59. package/components/table/table-column/table-column.vue.js +0 -106
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  import { TableColumnCtx, type PaginationProps } from 'element-plus';
2
2
  import { type PropType, type ExtractPropTypes, MaybeRef } from 'vue';
3
- import { type MayBeTableColumnProps } from './table-column/table-column';
3
+ import { type MayBeTableColumnProps } from './table-column/table-column.api';
4
4
  import { TableQueryExpose, type TableQueryProps } from './table-query/table-query';
5
5
  import { TableStatisticsColumn } from './table-stats/table-stats';
6
6
  export interface ToolbarConfig {
@@ -88,19 +88,21 @@ export declare const tableProps: {
88
88
  };
89
89
  emptyText: StringConstructor;
90
90
  sumText: StringConstructor;
91
+ fit: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ lazy: BooleanConstructor;
96
+ showOverflowTooltip: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["showOverflowTooltip"]>;
97
+ tooltipFormatter: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["tooltipFormatter"]>;
91
98
  cellClassName: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["cellClassName"]>;
92
99
  rowStyle: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["rowStyle"]>;
93
100
  scrollbarAlwaysOn: BooleanConstructor;
94
101
  defaultExpandAll: BooleanConstructor;
95
- lazy: BooleanConstructor;
96
102
  indent: {
97
103
  type: NumberConstructor;
98
104
  default: number;
99
105
  };
100
- fit: {
101
- type: BooleanConstructor;
102
- default: boolean;
103
- };
104
106
  stripe: BooleanConstructor;
105
107
  rowKey: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["rowKey"]>;
106
108
  showHeader: {
@@ -135,8 +137,6 @@ export declare const tableProps: {
135
137
  };
136
138
  };
137
139
  flexible: BooleanConstructor;
138
- showOverflowTooltip: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["showOverflowTooltip"]>;
139
- tooltipFormatter: PropType<import("element-plus/es/components/index.mjs").TableProps<any>["tooltipFormatter"]>;
140
140
  appendFilterPanelTo: StringConstructor;
141
141
  scrollbarTabindex: {
142
142
  type: (NumberConstructor | StringConstructor)[];
@@ -10,11 +10,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
10
10
  default: boolean;
11
11
  };
12
12
  columns: {
13
- type: import("vue").PropType<import("..").MayBeTableColumnProps[]>;
13
+ type: import("vue").PropType<import(".").MayBeTableColumnProps[]>;
14
14
  default: () => never[];
15
15
  };
16
16
  actionColumn: {
17
- type: import("vue").PropType<import("..").MayBeTableColumnProps>;
17
+ type: import("vue").PropType<import(".").MayBeTableColumnProps>;
18
18
  };
19
19
  pagination: {
20
20
  type: import("vue").PropType<boolean | PaginationProps>;
@@ -24,7 +24,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
24
24
  type: import("vue").PropType<(expose: TableExpose) => void>;
25
25
  };
26
26
  formProps: {
27
- type: import("vue").PropType<import("..").TableQueryProps>;
27
+ type: import("vue").PropType<import(".").TableQueryProps>;
28
28
  };
29
29
  transformParams: {
30
30
  type: import("vue").PropType<(params: Record<string, any>) => any>;
@@ -73,19 +73,21 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
73
73
  };
74
74
  emptyText: StringConstructor;
75
75
  sumText: StringConstructor;
76
+ fit: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ lazy: BooleanConstructor;
81
+ showOverflowTooltip: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["showOverflowTooltip"]>;
82
+ tooltipFormatter: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["tooltipFormatter"]>;
76
83
  cellClassName: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["cellClassName"]>;
77
84
  rowStyle: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["rowStyle"]>;
78
85
  scrollbarAlwaysOn: BooleanConstructor;
79
86
  defaultExpandAll: BooleanConstructor;
80
- lazy: BooleanConstructor;
81
87
  indent: {
82
88
  type: NumberConstructor;
83
89
  default: number;
84
90
  };
85
- fit: {
86
- type: BooleanConstructor;
87
- default: boolean;
88
- };
89
91
  stripe: BooleanConstructor;
90
92
  rowKey: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["rowKey"]>;
91
93
  showHeader: {
@@ -120,8 +122,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
120
122
  };
121
123
  };
122
124
  flexible: BooleanConstructor;
123
- showOverflowTooltip: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["showOverflowTooltip"]>;
124
- tooltipFormatter: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["tooltipFormatter"]>;
125
125
  appendFilterPanelTo: StringConstructor;
126
126
  scrollbarTabindex: {
127
127
  type: (NumberConstructor | StringConstructor)[];
@@ -181,11 +181,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
181
181
  default: boolean;
182
182
  };
183
183
  columns: {
184
- type: import("vue").PropType<import("..").MayBeTableColumnProps[]>;
184
+ type: import("vue").PropType<import(".").MayBeTableColumnProps[]>;
185
185
  default: () => never[];
186
186
  };
187
187
  actionColumn: {
188
- type: import("vue").PropType<import("..").MayBeTableColumnProps>;
188
+ type: import("vue").PropType<import(".").MayBeTableColumnProps>;
189
189
  };
190
190
  pagination: {
191
191
  type: import("vue").PropType<boolean | PaginationProps>;
@@ -195,7 +195,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
195
195
  type: import("vue").PropType<(expose: TableExpose) => void>;
196
196
  };
197
197
  formProps: {
198
- type: import("vue").PropType<import("..").TableQueryProps>;
198
+ type: import("vue").PropType<import(".").TableQueryProps>;
199
199
  };
200
200
  transformParams: {
201
201
  type: import("vue").PropType<(params: Record<string, any>) => any>;
@@ -244,19 +244,21 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
244
244
  };
245
245
  emptyText: StringConstructor;
246
246
  sumText: StringConstructor;
247
+ fit: {
248
+ type: BooleanConstructor;
249
+ default: boolean;
250
+ };
251
+ lazy: BooleanConstructor;
252
+ showOverflowTooltip: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["showOverflowTooltip"]>;
253
+ tooltipFormatter: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["tooltipFormatter"]>;
247
254
  cellClassName: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["cellClassName"]>;
248
255
  rowStyle: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["rowStyle"]>;
249
256
  scrollbarAlwaysOn: BooleanConstructor;
250
257
  defaultExpandAll: BooleanConstructor;
251
- lazy: BooleanConstructor;
252
258
  indent: {
253
259
  type: NumberConstructor;
254
260
  default: number;
255
261
  };
256
- fit: {
257
- type: BooleanConstructor;
258
- default: boolean;
259
- };
260
262
  stripe: BooleanConstructor;
261
263
  rowKey: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["rowKey"]>;
262
264
  showHeader: {
@@ -291,8 +293,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
291
293
  };
292
294
  };
293
295
  flexible: BooleanConstructor;
294
- showOverflowTooltip: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["showOverflowTooltip"]>;
295
- tooltipFormatter: import("vue").PropType<import("element-plus/es/components/index.mjs").TableProps<any>["tooltipFormatter"]>;
296
296
  appendFilterPanelTo: StringConstructor;
297
297
  scrollbarTabindex: {
298
298
  type: (NumberConstructor | StringConstructor)[];
@@ -307,16 +307,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
307
307
  }>> & Readonly<{}>, {
308
308
  tableLayout: "auto" | "fixed";
309
309
  border: boolean;
310
- columns: import("..").MayBeTableColumnProps[];
310
+ columns: import(".").MayBeTableColumnProps[];
311
311
  data: any[];
312
312
  immediate: boolean;
313
313
  className: string;
314
314
  pagination: boolean | PaginationProps;
315
+ fit: boolean;
316
+ lazy: boolean;
315
317
  scrollbarAlwaysOn: boolean;
316
318
  defaultExpandAll: boolean;
317
- lazy: boolean;
318
319
  indent: number;
319
- fit: boolean;
320
320
  stripe: boolean;
321
321
  showHeader: boolean;
322
322
  showSummary: boolean;
@@ -3,7 +3,7 @@ import { merge, get, cloneDeep } from 'lodash-es';
3
3
  import { reactiveComputed, reactiveOmit } from '@vueuse/core';
4
4
  import { useNamespace, useZIndex, ElButton, Mousewheel } from 'element-plus';
5
5
  import { tableEmitEvents, tableProps, tableEmitOnEvents, defaultTableConfig, elSlotsName, omittedTableProps, tableExposeKeys } from './table.js';
6
- import stdin_default$7 from './table-column/table-column.vue.js';
6
+ import stdin_default$7 from './table-column/table-column.js';
7
7
  import stdin_default$6 from './table-column-editor/table-column-editor.vue.js';
8
8
  import stdin_default$2 from './table-query/table-query.vue.js';
9
9
  import stdin_default$5 from './table-export/table-export.vue.js';
@@ -547,7 +547,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
547
547
  "max-height": "none"
548
548
  }), createSlots({
549
549
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(renderedColumns.value, column => {
550
- return openBlock(), createBlock(stdin_default$7, mergeProps({
550
+ return openBlock(), createBlock(unref(stdin_default$7), mergeProps({
551
551
  key: column.prop || column.property,
552
552
  ref_for: true
553
553
  }, column, {
@@ -208,15 +208,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
208
208
  text: boolean;
209
209
  circle: boolean;
210
210
  disabled: boolean;
211
- type: "text" | "warning" | "success" | "primary" | "info" | "danger";
211
+ type: "text" | "primary" | "success" | "warning" | "info" | "danger";
212
212
  link: boolean;
213
- autofocus: boolean;
214
- loading: boolean;
215
213
  tag: string | import("vue").Component;
214
+ loading: boolean;
216
215
  plain: boolean;
217
216
  nativeType: "button" | "reset" | "submit";
218
217
  loadingIcon: string | import("vue").Component;
219
218
  bg: boolean;
219
+ autofocus: boolean;
220
220
  autoInsertSpace: boolean;
221
221
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
222
222
  export default _default;
@@ -61,9 +61,9 @@ declare const _TransitionGroup: {
61
61
  };
62
62
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
63
63
  name: string;
64
- effect: (string & {}) | "flip" | "fade" | "slide";
65
64
  css: boolean;
66
65
  appear: boolean;
66
+ effect: (string & {}) | "flip" | "fade" | "slide";
67
67
  }, true, {}, import("vue").SlotsType<import("./transition-group.api").TransitionGroupSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
68
68
  P: {};
69
69
  B: {};
@@ -132,9 +132,9 @@ declare const _TransitionGroup: {
132
132
  };
133
133
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
134
134
  name: string;
135
- effect: (string & {}) | "flip" | "fade" | "slide";
136
135
  css: boolean;
137
136
  appear: boolean;
137
+ effect: (string & {}) | "flip" | "fade" | "slide";
138
138
  }>;
139
139
  __isFragment?: never;
140
140
  __isTeleport?: never;
@@ -200,9 +200,9 @@ declare const _TransitionGroup: {
200
200
  };
201
201
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
202
202
  name: string;
203
- effect: (string & {}) | "flip" | "fade" | "slide";
204
203
  css: boolean;
205
204
  appear: boolean;
205
+ effect: (string & {}) | "flip" | "fade" | "slide";
206
206
  }, {}, string, import("vue").SlotsType<import("./transition-group.api").TransitionGroupSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
207
207
  export { _TransitionGroup as TransitionGroup };
208
208
  export default _TransitionGroup;
@@ -118,8 +118,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
118
118
  };
119
119
  }>> & Readonly<{}>, {
120
120
  name: string;
121
- effect: (string & {}) | "flip" | "fade" | "slide";
122
121
  css: boolean;
123
122
  appear: boolean;
123
+ effect: (string & {}) | "flip" | "fade" | "slide";
124
124
  }, import("vue").SlotsType<import("./transition-group.api").TransitionGroupSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
125
125
  export default _default;
@@ -46,8 +46,8 @@ declare const _Upload: {
46
46
  type: import("vue").PropType<Record<PropertyKey, any>>;
47
47
  };
48
48
  }>> & Readonly<{
49
- "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
50
49
  onChange?: ((value: string | File | (string | File)[]) => any) | undefined;
50
+ "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
51
51
  onExceed?: (() => any) | undefined;
52
52
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
53
  exceed: () => boolean;
@@ -58,8 +58,8 @@ declare const _Upload: {
58
58
  multiple: boolean;
59
59
  single: boolean;
60
60
  disabled: boolean;
61
- readonly: boolean;
62
61
  validateEvent: boolean;
62
+ readonly: boolean;
63
63
  accept: string;
64
64
  limit: number;
65
65
  selectOnly: boolean;
@@ -115,16 +115,16 @@ declare const _Upload: {
115
115
  type: import("vue").PropType<Record<PropertyKey, any>>;
116
116
  };
117
117
  }>> & Readonly<{
118
- "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
119
118
  onChange?: ((value: string | File | (string | File)[]) => any) | undefined;
119
+ "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
120
120
  onExceed?: (() => any) | undefined;
121
121
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
122
122
  size: "large" | "small" | "middle" | "mini";
123
123
  multiple: boolean;
124
124
  single: boolean;
125
125
  disabled: boolean;
126
- readonly: boolean;
127
126
  validateEvent: boolean;
127
+ readonly: boolean;
128
128
  accept: string;
129
129
  limit: number;
130
130
  selectOnly: boolean;
@@ -177,8 +177,8 @@ declare const _Upload: {
177
177
  type: import("vue").PropType<Record<PropertyKey, any>>;
178
178
  };
179
179
  }>> & Readonly<{
180
- "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
181
180
  onChange?: ((value: string | File | (string | File)[]) => any) | undefined;
181
+ "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
182
182
  onExceed?: (() => any) | undefined;
183
183
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
184
184
  exceed: () => boolean;
@@ -189,8 +189,8 @@ declare const _Upload: {
189
189
  multiple: boolean;
190
190
  single: boolean;
191
191
  disabled: boolean;
192
- readonly: boolean;
193
192
  validateEvent: boolean;
193
+ readonly: boolean;
194
194
  accept: string;
195
195
  limit: number;
196
196
  selectOnly: boolean;
@@ -91,16 +91,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
91
91
  type: import("vue").PropType<Record<PropertyKey, any>>;
92
92
  };
93
93
  }>> & Readonly<{
94
- "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
95
94
  onChange?: ((value: string | File | (string | File)[]) => any) | undefined;
95
+ "onUpdate:modelValue"?: ((value: string | File | (string | File)[]) => any) | undefined;
96
96
  onExceed?: (() => any) | undefined;
97
97
  }>, {
98
98
  size: "large" | "small" | "middle" | "mini";
99
99
  multiple: boolean;
100
100
  single: boolean;
101
101
  disabled: boolean;
102
- readonly: boolean;
103
102
  validateEvent: boolean;
103
+ readonly: boolean;
104
104
  accept: string;
105
105
  limit: number;
106
106
  selectOnly: boolean;
@@ -65,7 +65,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
65
65
  margin: collapse.value ? 0 : void 0
66
66
  }
67
67
  }, null);
68
- const titleVNode = () => createVNode("span", null, [t(item.title ?? "")]);
68
+ const titleVNode = () => {
69
+ const title = t(item.title ?? "");
70
+ return createVNode("span", {
71
+ "class": `${prefixCls.value}-title`,
72
+ "title": title
73
+ }, [title]);
74
+ };
69
75
  if (item.children && item.children.length > 0) {
70
76
  const slots = {
71
77
  title: () => [iconVNode(), titleVNode()],
@@ -1,3 +1,4 @@
1
+ import { getTruncateStyle } from '../../../components/style/mixins.js';
1
2
  import { getSimpleStyleHook } from '../../../components/theme/getSimpleStyleHook.js';
2
3
 
3
4
  var stdin_default = getSimpleStyleHook("CoLayoutMenu", (token) => {
@@ -18,6 +19,9 @@ var stdin_default = getSimpleStyleHook("CoLayoutMenu", (token) => {
18
19
  textAlign: "center",
19
20
  verticalAlign: "middle",
20
21
  fontSize: 18
22
+ },
23
+ [`${componentCls}-title`]: {
24
+ ...getTruncateStyle()
21
25
  }
22
26
  };
23
27
  });
@@ -1,5 +1,5 @@
1
- import { getTruncateStyle } from '../../../components/style/mixins.js';
2
1
  import { getSimpleStyleHook } from '../../../components/theme/getSimpleStyleHook.js';
2
+ import { getTruncateStyle } from '../../../components/style/mixins.js';
3
3
 
4
4
  var stdin_default = getSimpleStyleHook("CoLayoutUserMenu", (token) => {
5
5
  const { componentCls } = token;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,6 @@
1
1
  import { bookFormats } from './bookFormats';
2
2
  import type { ExportBookType, ExportExcelScheme } from './type';
3
- import { type MayBeTableColumnProps, type TableColumnProps } from '../../components/table/table-column/table-column';
3
+ import { type MayBeTableColumnProps, type TableColumnProps } from '../../components';
4
4
  /**
5
5
  * 只取最底层的列组成表头
6
6
  */