disguise-ui 0.2.0 → 0.2.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.
- package/dist/disguise-ui.js +145 -93
- package/dist/style.css +1 -1
- package/dist/types/components/async-select/async-select.type.d.ts +14 -0
- package/dist/types/components/async-select/async-select.utils.d.ts +12 -0
- package/dist/types/components/async-select/async-select.vue.d.ts +52 -0
- package/dist/types/components/async-select/index.d.ts +2 -0
- package/dist/types/components/card/index.vue.d.ts +15 -0
- package/dist/types/components/crud-page/index.d.ts +2 -0
- package/dist/types/components/crud-page/index.type.d.ts +117 -0
- package/dist/types/components/crud-page/index.vue.d.ts +66 -0
- package/dist/types/components/dialog-list/index.vue.d.ts +688 -0
- package/dist/types/components/dict-tag/index.vue.d.ts +18 -0
- package/dist/types/components/disguise-icon/index.vue.d.ts +14 -0
- package/dist/types/components/drawer-form-page/index.d.ts +3 -0
- package/dist/types/components/drawer-form-page/index.type.d.ts +76 -0
- package/dist/types/components/drawer-form-page/index.vue.d.ts +94 -0
- package/dist/types/components/drawer-form-page/use-drawer-form-page.d.ts +4 -0
- package/dist/types/components/file-upload/components/file-status.vue.d.ts +50 -0
- package/dist/types/components/file-upload/composables/use-file-type.d.ts +41 -0
- package/dist/types/components/file-upload/composables/use-file-upload.d.ts +82 -0
- package/dist/types/components/file-upload/composables/use-file-upload.utils.d.ts +9 -0
- package/dist/types/components/file-upload/composables/use-multiple-file-upload.d.ts +119 -0
- package/dist/types/components/file-upload/file-upload.type.d.ts +68 -0
- package/dist/types/components/file-upload/file-upload.vue.d.ts +33 -0
- package/dist/types/components/file-upload/index.d.ts +2 -0
- package/dist/types/components/image-upload/index.vue.d.ts +26 -0
- package/dist/types/components/images-view/index.vue.d.ts +18 -0
- package/dist/types/components/import-dialog/index.d.ts +3 -0
- package/dist/types/components/import-dialog/index.type.d.ts +101 -0
- package/dist/types/components/import-dialog/index.vue.d.ts +35 -0
- package/dist/types/components/picture-upload/index.d.ts +3 -0
- package/dist/types/components/picture-upload/picture-upload.vue.d.ts +52 -0
- package/dist/types/components/rich-text-editor/index.vue.d.ts +35 -0
- package/dist/types/components/schema-form/index.d.ts +5 -0
- package/dist/types/components/schema-form/readonly-text.vue.d.ts +7 -0
- package/dist/types/components/schema-form/schema-form-item.vue.d.ts +36 -0
- package/dist/types/components/schema-form/schema-form-registry.d.ts +18 -0
- package/dist/types/components/schema-form/schema-form.type.d.ts +190 -0
- package/dist/types/components/schema-form/schema-form.util.d.ts +10 -0
- package/dist/types/components/schema-form/schema-form.vue.d.ts +59 -0
- package/dist/types/components/schema-form/translate-field.vue.d.ts +27 -0
- package/dist/types/components/schema-form/translate-toolbar.vue.d.ts +24 -0
- package/dist/types/components/schema-form/use-field-options.d.ts +4 -0
- package/dist/types/components/search-form/index.d.ts +2 -0
- package/dist/types/components/search-form/index.type.d.ts +3 -0
- package/dist/types/components/search-form/index.vue.d.ts +66 -0
- package/dist/types/components/table-entity/cells/avatar-cell.vue.d.ts +10 -0
- package/dist/types/components/table-entity/cells/file-cell.vue.d.ts +20 -0
- package/dist/types/components/table-entity/cells/index.d.ts +10 -0
- package/dist/types/components/table-entity/cells/list-expand-cell.vue.d.ts +19 -0
- package/dist/types/components/table-entity/cells/picture-cell.vue.d.ts +22 -0
- package/dist/types/components/table-entity/cells/price-cell.vue.d.ts +10 -0
- package/dist/types/components/table-entity/components/ColumnFixedPanel.vue.d.ts +13 -0
- package/dist/types/components/table-entity/components/ColumnSettingsPanel.vue.d.ts +25 -0
- package/dist/types/components/table-entity/composables/use-column-fixed.d.ts +15 -0
- package/dist/types/components/table-entity/composables/use-column-resize.d.ts +25 -0
- package/dist/types/components/table-entity/composables/use-column-settings.d.ts +41 -0
- package/dist/types/components/table-entity/composables/use-row-drag.d.ts +21 -0
- package/dist/types/components/table-entity/composables/use-table-selection.d.ts +23 -0
- package/dist/types/components/table-entity/index.type.d.ts +192 -0
- package/dist/types/components/table-entity/index.vue.d.ts +102 -0
- package/dist/types/components/table-entity/utils/column-slots.d.ts +8 -0
- package/dist/types/components/table-entity/utils/column-utils.d.ts +7 -0
- package/dist/types/components/table-entity/utils/list-expand.d.ts +9 -0
- package/dist/types/components/user-avatar-info/index.vue.d.ts +114 -0
- package/dist/types/composables/use-dict-data.d.ts +192 -0
- package/dist/types/composables/use-image-url.d.ts +8 -0
- package/dist/types/entities/index.d.ts +2 -0
- package/dist/types/entities/registry.d.ts +33 -0
- package/dist/types/index.d.ts +27 -0
- package/dist/types/runtime/access.d.ts +13 -0
- package/dist/types/runtime/context.d.ts +48 -0
- package/dist/types/runtime/dict.d.ts +22 -0
- package/dist/types/runtime/i18n.d.ts +12 -0
- package/dist/types/runtime/modal.d.ts +31 -0
- package/dist/types/runtime/preferences.d.ts +6 -0
- package/dist/types/runtime/request.d.ts +19 -0
- package/dist/types/runtime/types.d.ts +1 -0
- package/dist/types/runtime/upload.d.ts +5 -0
- package/dist/types/runtime/utils.d.ts +16 -0
- package/dist/types/services/file-upload.d.ts +11 -0
- package/dist/types/setup.d.ts +7 -0
- package/package.json +6 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { SchemaFormMode } from '../schema-form';
|
|
2
|
+
import type { SearchFormItem, SearchFormValues } from './index.type';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
collapsedRows?: number;
|
|
5
|
+
columns?: number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
labelAlign?: 'center' | 'left' | 'right';
|
|
8
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
9
|
+
labelWidth?: number | string;
|
|
10
|
+
mode?: SchemaFormMode;
|
|
11
|
+
schema?: SearchFormItem[];
|
|
12
|
+
showActions?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare function getValues(): {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
};
|
|
17
|
+
declare function handleSubmit(): void;
|
|
18
|
+
declare function handleReset(): void;
|
|
19
|
+
declare function validate(): Promise<boolean>;
|
|
20
|
+
type __VLS_ModelProps = {
|
|
21
|
+
modelValue?: SearchFormValues;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
24
|
+
declare const __VLS_template: () => {
|
|
25
|
+
__VLS_Slots: {
|
|
26
|
+
[x: string]: ((props: {
|
|
27
|
+
field: import("../..").ResolvedField;
|
|
28
|
+
value: any;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
updateValue: (value: any) => void;
|
|
31
|
+
}) => any) | undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
35
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
36
|
+
getValues: typeof getValues;
|
|
37
|
+
validate: typeof validate;
|
|
38
|
+
reset: typeof handleReset;
|
|
39
|
+
search: typeof handleSubmit;
|
|
40
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
41
|
+
"update:modelValue": (value: SearchFormValues) => any;
|
|
42
|
+
reset: (values: SearchFormValues) => any;
|
|
43
|
+
search: (values: SearchFormValues) => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
45
|
+
"onUpdate:modelValue"?: ((value: SearchFormValues) => any) | undefined;
|
|
46
|
+
onReset?: ((values: SearchFormValues) => any) | undefined;
|
|
47
|
+
onSearch?: ((values: SearchFormValues) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
mode: SchemaFormMode;
|
|
50
|
+
columns: number;
|
|
51
|
+
showActions: boolean;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
labelPosition: "top" | "left" | "right";
|
|
54
|
+
labelAlign: "center" | "left" | "right";
|
|
55
|
+
labelWidth: string | number;
|
|
56
|
+
schema: import("../schema-form").SchemaFormItem[];
|
|
57
|
+
collapsedRows: number;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
declare const _default: typeof __VLS_export;
|
|
61
|
+
export default _default;
|
|
62
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
row?: Record<string, any>;
|
|
3
|
+
value?: null | number | string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
value: string | number | null;
|
|
7
|
+
row: Record<string, any>;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AttachmentData } from '../../file-upload/file-upload.type';
|
|
2
|
+
/**
|
|
3
|
+
* 附件 / 文件类型单元格组件
|
|
4
|
+
*
|
|
5
|
+
* 功能:
|
|
6
|
+
* - 显示文件类型图标(视觉风格对齐 file-upload)
|
|
7
|
+
* - 悬停图标显示浮层预览(PDF 用 iframe,其他显示文件信息)
|
|
8
|
+
* - 点击图标打开 / 预览文件
|
|
9
|
+
* - 支持多个文件,只展示前 N 个,超出显示「+X」
|
|
10
|
+
*/
|
|
11
|
+
interface Props {
|
|
12
|
+
attachments?: AttachmentData | AttachmentData[] | null;
|
|
13
|
+
maxPreviewCount?: number;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
+
maxPreviewCount: number;
|
|
17
|
+
attachments: AttachmentData | AttachmentData[] | null;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用列表单元格组件
|
|
3
|
+
*
|
|
4
|
+
* 这些组件可在任何列表场景中复用
|
|
5
|
+
*/
|
|
6
|
+
export { default as UserCell } from './avatar-cell.vue';
|
|
7
|
+
export { default as FileCell } from './file-cell.vue';
|
|
8
|
+
export { default as ListExpandCell } from './list-expand-cell.vue';
|
|
9
|
+
export { default as PictureCell } from './picture-cell.vue';
|
|
10
|
+
export { default as PriceCell } from './price-cell.vue';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
expanded?: boolean;
|
|
3
|
+
items: string[];
|
|
4
|
+
/** 折叠时最多展示的条数 */
|
|
5
|
+
max?: number;
|
|
6
|
+
/** 「查看全部 N 个{unit}」中的单位 */
|
|
7
|
+
unit?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
toggle: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onToggle?: (() => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
expanded: boolean;
|
|
15
|
+
max: number;
|
|
16
|
+
unit: string;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ImagesViewProps } from '../../images-view/index.vue';
|
|
2
|
+
/**
|
|
3
|
+
* 图片类型单元格组件
|
|
4
|
+
*
|
|
5
|
+
* 功能:
|
|
6
|
+
* - 显示图片缩略图
|
|
7
|
+
* - 支持点击预览大图
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
/** 图片 URL 列表 */
|
|
11
|
+
urls: string[];
|
|
12
|
+
/** 最多展示的缩略图数量 */
|
|
13
|
+
maxPreviewCount?: number;
|
|
14
|
+
/** ImagesView 的属性,可覆盖透传到图片列表容器 */
|
|
15
|
+
imageListProps?: Partial<Omit<ImagesViewProps, 'images'>>;
|
|
16
|
+
}
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
+
maxPreviewCount: number;
|
|
19
|
+
imageListProps: Partial<Omit<ImagesViewProps, "images">>;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
price: string;
|
|
3
|
+
lodPrice: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
price: string;
|
|
7
|
+
lodPrice: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ColumnFixedItem, ColumnFixedValue } from '../composables/use-column-fixed';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: ColumnFixedItem[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
reset: () => any;
|
|
7
|
+
setFixed: (key: string, value: ColumnFixedValue) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onReset?: (() => any) | undefined;
|
|
10
|
+
onSetFixed?: ((key: string, value: ColumnFixedValue) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ColumnFixedItem, ColumnFixedValue } from '../composables/use-column-fixed';
|
|
2
|
+
import type { ColumnAlignValue, ColumnSettingItem } from '../composables/use-column-settings';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
settings: ColumnSettingItem[];
|
|
5
|
+
fixedItems: ColumnFixedItem[];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
reset: () => any;
|
|
9
|
+
toggle: (key: string) => any;
|
|
10
|
+
setFixed: (key: string, value: ColumnFixedValue) => any;
|
|
11
|
+
"update:settings": (settings: ColumnSettingItem[]) => any;
|
|
12
|
+
setHeaderAlign: (key: string, value: ColumnAlignValue) => any;
|
|
13
|
+
setContentAlign: (key: string, value: ColumnAlignValue) => any;
|
|
14
|
+
setWidth: (key: string, value: number) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onReset?: (() => any) | undefined;
|
|
17
|
+
onToggle?: ((key: string) => any) | undefined;
|
|
18
|
+
onSetFixed?: ((key: string, value: ColumnFixedValue) => any) | undefined;
|
|
19
|
+
"onUpdate:settings"?: ((settings: ColumnSettingItem[]) => any) | undefined;
|
|
20
|
+
onSetHeaderAlign?: ((key: string, value: ColumnAlignValue) => any) | undefined;
|
|
21
|
+
onSetContentAlign?: ((key: string, value: ColumnAlignValue) => any) | undefined;
|
|
22
|
+
onSetWidth?: ((key: string, value: number) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ColumnsItem } from '../index.type';
|
|
3
|
+
export type ColumnFixedValue = 'left' | 'right' | false;
|
|
4
|
+
export interface ColumnFixedItem {
|
|
5
|
+
key: string;
|
|
6
|
+
title: string;
|
|
7
|
+
fixed: ColumnFixedValue;
|
|
8
|
+
initialFixed: ColumnFixedValue;
|
|
9
|
+
}
|
|
10
|
+
export declare function useColumnFixed(columns: Ref<ColumnsItem[]>): {
|
|
11
|
+
orderedItems: import("vue").ComputedRef<ColumnFixedItem[]>;
|
|
12
|
+
setFixed: (key: string, value: ColumnFixedValue) => void;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
applyFixed: (cols: ColumnsItem[]) => ColumnsItem[];
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ColumnsItem } from '../index.type';
|
|
2
|
+
/** ****************************** 列宽拖拽调整 ********************************/
|
|
3
|
+
/**
|
|
4
|
+
* 基于 ElTableV2 原生 header-cell 的列宽拖拽。
|
|
5
|
+
*
|
|
6
|
+
* 思路:不注入自定义 headerCellRenderer,而是通过 CSS ::after 在
|
|
7
|
+
* el-table-v2__header-cell 右侧绘制可拖拽竖线,并在表格容器上委托
|
|
8
|
+
* mousedown 事件检测拖拽意图。
|
|
9
|
+
*/
|
|
10
|
+
export declare function useColumnResize(minWidth?: number): {
|
|
11
|
+
widthOverrides: Record<string, number>;
|
|
12
|
+
resizeState: {
|
|
13
|
+
active: boolean;
|
|
14
|
+
colKey: null | string;
|
|
15
|
+
startX: number;
|
|
16
|
+
startWidth: number;
|
|
17
|
+
currentX: number;
|
|
18
|
+
};
|
|
19
|
+
onViewportMouseDown: (e: MouseEvent) => void;
|
|
20
|
+
applyColumnWidths: (cols: ColumnsItem[]) => ColumnsItem[];
|
|
21
|
+
resizeLineStyle: import("vue").ComputedRef<{
|
|
22
|
+
display: string;
|
|
23
|
+
left: string;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ColumnsItem } from '../index.type';
|
|
3
|
+
/** ****************************** 列显示/排序状态管理 ********************************/
|
|
4
|
+
export type ColumnSettingItem = {
|
|
5
|
+
/** 列唯一标识 */
|
|
6
|
+
key: string;
|
|
7
|
+
/** 列标题 */
|
|
8
|
+
title: string;
|
|
9
|
+
/** 是否可见 */
|
|
10
|
+
visible: boolean;
|
|
11
|
+
/** 原始列配置引用 */
|
|
12
|
+
column: ColumnsItem;
|
|
13
|
+
headerAlign: ColumnAlignValue;
|
|
14
|
+
contentAlign: ColumnAlignValue;
|
|
15
|
+
};
|
|
16
|
+
export type ColumnAlignValue = 'center' | 'left' | 'right';
|
|
17
|
+
/**
|
|
18
|
+
* 管理列的可见性与排序。
|
|
19
|
+
*
|
|
20
|
+
* - `visibleColumns`: 当前可见列(按用户排序)
|
|
21
|
+
* - `hiddenColumns`: 已隐藏列
|
|
22
|
+
* - `orderedSettings`: 完整设置列表(可见在前,隐藏在后,保持用户排序)
|
|
23
|
+
* - `toggleColumn(key)`: 切换某列显隐
|
|
24
|
+
* - `reorderSettings(newOrder)`: 从拖拽结果同步排序 & 显隐
|
|
25
|
+
* - `reset()`: 恢复初始状态
|
|
26
|
+
*/
|
|
27
|
+
export declare function useColumnSettings(columns: Ref<ColumnsItem[]>): {
|
|
28
|
+
orderedKeys: Ref<string[], string[]>;
|
|
29
|
+
hiddenKeys: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
30
|
+
orderedSettings: import("vue").ComputedRef<ColumnSettingItem[]>;
|
|
31
|
+
visibleColumns: import("vue").ComputedRef<ColumnsItem[]>;
|
|
32
|
+
hiddenColumns: import("vue").ComputedRef<ColumnSettingItem[]>;
|
|
33
|
+
toggleColumn: (key: string) => void;
|
|
34
|
+
reorderSettings: (newSettings: ColumnSettingItem[]) => void;
|
|
35
|
+
setHeaderAlign: (key: string, value: ColumnAlignValue) => void;
|
|
36
|
+
setContentAlign: (key: string, value: ColumnAlignValue) => void;
|
|
37
|
+
setWidth: (key: string, value: number) => void;
|
|
38
|
+
applyAlign: (cols: ColumnsItem[]) => ColumnsItem[];
|
|
39
|
+
showAll: () => void;
|
|
40
|
+
reset: () => void;
|
|
41
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TableEntityRowSortPayload } from '../index.type';
|
|
2
|
+
type RowDragOptions = {
|
|
3
|
+
canDrop: (source: Record<string, any>, target: Record<string, any>) => boolean;
|
|
4
|
+
getHandle: () => string | undefined;
|
|
5
|
+
getRoot: () => HTMLElement | undefined;
|
|
6
|
+
getRowHeight: () => number;
|
|
7
|
+
getRows: () => Record<string, any>[];
|
|
8
|
+
isEnabled: () => boolean;
|
|
9
|
+
isTree: () => boolean;
|
|
10
|
+
isRowDisabled: (row: Record<string, any>) => boolean;
|
|
11
|
+
moveRows: (source: Record<string, any>, target: Record<string, any>, fromIndex: number, toIndex: number) => TableEntityRowSortPayload | null;
|
|
12
|
+
onSort: (payload: TableEntityRowSortPayload) => void;
|
|
13
|
+
};
|
|
14
|
+
/** 按数据下标交换行。虚拟表格的行是绝对定位的,不能靠搬 DOM 排序。 */
|
|
15
|
+
export declare function moveTableRow<T>(rows: T[], from: number, to: number): T[];
|
|
16
|
+
export declare function useRowDrag(options: RowDragOptions): {
|
|
17
|
+
draggingIndex: import("vue").Ref<number | null, number | null>;
|
|
18
|
+
onPointerDown: (event: PointerEvent) => void;
|
|
19
|
+
overIndex: import("vue").Ref<number | null, number | null>;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ColumnsItem, TableEntlty } from '../index.type';
|
|
3
|
+
/** ****************************** 类型 ********************************/
|
|
4
|
+
type EmitFn = {
|
|
5
|
+
(e: 'update:selectedKeys', keys: any[]): void;
|
|
6
|
+
(e: 'selection-change', rows: Record<string, any>[]): void;
|
|
7
|
+
};
|
|
8
|
+
/** ****************************** 行选择与选择列 ********************************/
|
|
9
|
+
export declare function useTableSelection(props: TableEntlty, emit: EmitFn, currentRows: Ref<Record<string, any>[]>, allRows?: Ref<Record<string, any>[]>): {
|
|
10
|
+
selectedKeySet: Ref<Set<any> & Omit<Set<any>, keyof Set<any>>, Set<any> | (Set<any> & Omit<Set<any>, keyof Set<any>>)>;
|
|
11
|
+
selectionColumn: import("vue").ComputedRef<ColumnsItem>;
|
|
12
|
+
rowEventHandlers: {
|
|
13
|
+
onMouseenter: ({ rowIndex }: {
|
|
14
|
+
rowIndex: number;
|
|
15
|
+
}) => void;
|
|
16
|
+
onMouseleave: () => void;
|
|
17
|
+
};
|
|
18
|
+
clearSelection: () => void;
|
|
19
|
+
getSelectedRows: () => Record<string, any>[];
|
|
20
|
+
getSelectedCount: () => number;
|
|
21
|
+
setSelectedKeys: (keys: any[]) => void;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { ImportDialogProps } from '../import-dialog/index.type';
|
|
2
|
+
import type { Column } from 'element-plus';
|
|
3
|
+
import type { Component, VNode } from 'vue';
|
|
4
|
+
/** ****************************** 列扩展配置 ********************************/
|
|
5
|
+
/**
|
|
6
|
+
* TableEntity accepts the same column options as ElTableV2, but width is
|
|
7
|
+
* optional because the component calculates a fallback width automatically.
|
|
8
|
+
* dataIndex is kept as a compatibility alias for regular ElTable columns.
|
|
9
|
+
*/
|
|
10
|
+
export type ColumnsItem = {
|
|
11
|
+
width?: number;
|
|
12
|
+
dataKey?: string;
|
|
13
|
+
dataIndex?: string;
|
|
14
|
+
headerAlign?: 'center' | 'left' | 'right';
|
|
15
|
+
/** 单元格内容垂直对齐方式 */
|
|
16
|
+
verticalAlign?: 'bottom' | 'center' | 'top';
|
|
17
|
+
/**
|
|
18
|
+
* 单元格内置渲染类型
|
|
19
|
+
* - dict:按字典编码展示标签
|
|
20
|
+
* - picture:图片缩略图,值为 URL 字符串(可逗号分隔)、URL 数组或 `{ fileUrl }` 数组
|
|
21
|
+
* - file:附件图标,值为 AttachmentData 或其数组
|
|
22
|
+
* - avatar:用户头像信息,读取整行的 userId / nickName / userName / avatar 等字段
|
|
23
|
+
* - listExpand:折叠展示字符串或对象列表,参数通过 cellProps 配置
|
|
24
|
+
*/
|
|
25
|
+
type?: TableEntityCellType;
|
|
26
|
+
/** 字典编码,type 为 dict 时使用 */
|
|
27
|
+
dictCode?: string;
|
|
28
|
+
/** 同 dictCode,兼容 dict-tag 的旧命名 */
|
|
29
|
+
dictType?: string;
|
|
30
|
+
/** 最多展示的缩略图 / 文件图标数量,type 为 picture 或 file 时使用,默认 3 */
|
|
31
|
+
maxPreviewCount?: number;
|
|
32
|
+
/** 内置单元格组件透传属性,picture 会继续透传给 ImagesView */
|
|
33
|
+
cellProps?: Record<string, any>;
|
|
34
|
+
/** 兼容使用 props 作为内置单元格透传配置 */
|
|
35
|
+
props?: Record<string, any>;
|
|
36
|
+
/** 是否允许点击表头进行服务端排序 */
|
|
37
|
+
sortable?: boolean;
|
|
38
|
+
/** 初始排序方向 */
|
|
39
|
+
sortOrder?: TableEntitySortOrder;
|
|
40
|
+
/** 按日期展示单元格。date 为 YYYY-MM-DD,datetime 含时分秒 */
|
|
41
|
+
valueType?: 'date' | 'datetime';
|
|
42
|
+
} & Omit<Column, 'dataKey' | 'type' | 'width'>;
|
|
43
|
+
export type TableEntityCellType = 'avatar' | 'dict' | 'file' | 'listExpand' | 'picture' | 'price';
|
|
44
|
+
export type TableEntityRowKey = number | string | symbol;
|
|
45
|
+
export type TableEntitySortOrder = 'asc' | 'desc';
|
|
46
|
+
export type TableEntityChangePayload = {
|
|
47
|
+
current_page: number;
|
|
48
|
+
page?: number;
|
|
49
|
+
per_page: number;
|
|
50
|
+
sortField?: string;
|
|
51
|
+
sortOrder?: TableEntitySortOrder;
|
|
52
|
+
};
|
|
53
|
+
export type TableEntityQueryParams = Record<string, any>;
|
|
54
|
+
export type TableEntityRecord = Record<string, any>;
|
|
55
|
+
export type TableEntityDataResult<TRecord extends TableEntityRecord = TableEntityRecord> = {
|
|
56
|
+
rows: TRecord[];
|
|
57
|
+
total: number;
|
|
58
|
+
};
|
|
59
|
+
export type TableEntityDataFetcher<TRecord extends TableEntityRecord = TableEntityRecord> = (params: {
|
|
60
|
+
current_page: number;
|
|
61
|
+
page?: number;
|
|
62
|
+
per_page: number;
|
|
63
|
+
query?: TableEntityQueryParams;
|
|
64
|
+
sortField?: string;
|
|
65
|
+
sortOrder?: TableEntitySortOrder;
|
|
66
|
+
}) => Promise<TableEntityDataResult<TRecord>>;
|
|
67
|
+
/** ****************************** 列宽拖拽 ********************************/
|
|
68
|
+
export type ColumnResizeState = {
|
|
69
|
+
/** 正在拖拽的列 key */
|
|
70
|
+
activeKey: null | string;
|
|
71
|
+
/** 拖拽起始 X 坐标 */
|
|
72
|
+
startX: number;
|
|
73
|
+
/** 拖拽起始列宽 */
|
|
74
|
+
startWidth: number;
|
|
75
|
+
};
|
|
76
|
+
/** ****************************** 列插槽作用域 ********************************/
|
|
77
|
+
export type TableEntityColSlotProps = {
|
|
78
|
+
row: Record<string, any>;
|
|
79
|
+
value: unknown;
|
|
80
|
+
cellData: unknown;
|
|
81
|
+
column: ColumnsItem;
|
|
82
|
+
rowIndex: number;
|
|
83
|
+
};
|
|
84
|
+
/** ****************************** 操作列 ********************************/
|
|
85
|
+
/** 内置操作列支持的按钮 */
|
|
86
|
+
export type TableEntityActionName = 'copy' | 'delete' | 'edit' | 'view';
|
|
87
|
+
/** 操作列按钮配置 */
|
|
88
|
+
export type TableEntityActionConfig = {
|
|
89
|
+
name: TableEntityActionName;
|
|
90
|
+
label: string;
|
|
91
|
+
type?: 'danger' | 'info' | 'primary' | 'success' | 'warning';
|
|
92
|
+
};
|
|
93
|
+
/** 自定义追加的操作按钮 */
|
|
94
|
+
export type TableEntityPushAction = {
|
|
95
|
+
/** 唯一标识,无 component 时用于 emit 回传 */
|
|
96
|
+
name?: string;
|
|
97
|
+
/** 按钮文字,无 component 时生效 */
|
|
98
|
+
label?: string;
|
|
99
|
+
/** 按钮颜色类型,无 component 时生效,默认 'primary' */
|
|
100
|
+
type?: 'danger' | 'info' | 'primary' | 'success' | 'warning';
|
|
101
|
+
/**
|
|
102
|
+
* 自定义渲染,传入后忽略 name/label/type。
|
|
103
|
+
* - 传入 Vue 组件:接收 `{ row }` props,组件自行处理事件
|
|
104
|
+
* - 传入函数:签名为 `(ctx: { row }) => VNode`
|
|
105
|
+
*/
|
|
106
|
+
component?: ((ctx: {
|
|
107
|
+
row: Record<string, any>;
|
|
108
|
+
}) => VNode) | Component;
|
|
109
|
+
};
|
|
110
|
+
/** 操作列点击事件载荷 */
|
|
111
|
+
export type TableEntityActionPayload = {
|
|
112
|
+
action: string;
|
|
113
|
+
row: Record<string, any>;
|
|
114
|
+
};
|
|
115
|
+
/** ****************************** 组件 Props ********************************/
|
|
116
|
+
/** 导入弹窗(ImportDialog)配置:import-dialog 需要传入什么,就在这里传什么(弹窗显隐由表格内部控制,故不含 modelValue) */
|
|
117
|
+
export type TableEntityImportDialogConfig = Omit<ImportDialogProps, 'modelValue'>;
|
|
118
|
+
export type TableEntityProps<TRecord extends TableEntityRecord = TableEntityRecord> = {
|
|
119
|
+
columns?: ColumnsItem[];
|
|
120
|
+
data?: TRecord[] | TableEntityDataFetcher<TRecord>;
|
|
121
|
+
height?: number;
|
|
122
|
+
rowHeight?: number;
|
|
123
|
+
/** 虚拟列表在可视区外预渲染的行数,值越小滚动渲染压力越低 */
|
|
124
|
+
cache?: number;
|
|
125
|
+
width?: number;
|
|
126
|
+
selectable?: boolean;
|
|
127
|
+
multiple?: boolean;
|
|
128
|
+
rowKey?: string;
|
|
129
|
+
selectedKeys?: any[];
|
|
130
|
+
tree?: boolean;
|
|
131
|
+
treeChildrenKey?: string;
|
|
132
|
+
expandColumnKey?: string;
|
|
133
|
+
expandedRowKeys?: TableEntityRowKey[];
|
|
134
|
+
defaultExpandedRowKeys?: TableEntityRowKey[];
|
|
135
|
+
indentSize?: number;
|
|
136
|
+
iconSize?: number;
|
|
137
|
+
total?: number;
|
|
138
|
+
per_page?: number;
|
|
139
|
+
current_page?: number;
|
|
140
|
+
query?: TableEntityQueryParams;
|
|
141
|
+
showPagination?: boolean;
|
|
142
|
+
/** 是否显示内置操作列 */
|
|
143
|
+
showActions?: boolean;
|
|
144
|
+
/** @deprecated 操作超过一个时会统一收进更多菜单,仅为兼容保留 */
|
|
145
|
+
maxVisibleActions?: number;
|
|
146
|
+
/** 操作列宽度配置(当前操作列固定为 50px) */
|
|
147
|
+
actionColumnWidth?: number;
|
|
148
|
+
/** 操作列标题,默认 '操作' */
|
|
149
|
+
actionColumnTitle?: string;
|
|
150
|
+
/** 要显示的操作按钮,默认 ['view', 'edit', 'copy', 'delete'] */
|
|
151
|
+
actions?: TableEntityActionName[];
|
|
152
|
+
/** 自定义操作按钮,追加到内置按钮之后 */
|
|
153
|
+
pushActions?: TableEntityPushAction[];
|
|
154
|
+
/** 是否允许拖拽行排序,默认 false。树形表格仅允许同级节点互换顺序 */
|
|
155
|
+
rowDraggable?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* 拖拽把手选择器,限定在行内部。
|
|
158
|
+
* 不传时表格会插入一列拖拽把手。
|
|
159
|
+
*/
|
|
160
|
+
rowDragHandle?: string;
|
|
161
|
+
/** 返回 true 的行不可拖动,也不能作为放置目标 */
|
|
162
|
+
rowDragDisabled?: (row: TRecord) => boolean;
|
|
163
|
+
/** 是否允许拖拽调整列宽,默认 false */
|
|
164
|
+
resizable?: boolean;
|
|
165
|
+
/** 列宽最小值,默认 50 */
|
|
166
|
+
minColumnWidth?: number;
|
|
167
|
+
/** 是否显示列设置面板(排序/显隐),默认 false */
|
|
168
|
+
showColumnSettings?: boolean;
|
|
169
|
+
permissionCode?: string;
|
|
170
|
+
/** 导入弹窗配置:传入后点击“导入”按钮打开 ImportDialog 弹窗 */
|
|
171
|
+
importDialog?: TableEntityImportDialogConfig;
|
|
172
|
+
};
|
|
173
|
+
/** @deprecated 请使用 TableEntityProps。 */
|
|
174
|
+
export type TableEntlty = TableEntityProps;
|
|
175
|
+
export type TableEntityRowSortPayload<TRecord extends TableEntityRecord = TableEntityRecord> = {
|
|
176
|
+
/** 当前拖动层级内的新位置;树形表格为同级数组中的位置 */
|
|
177
|
+
newIndex: number;
|
|
178
|
+
/** 当前拖动层级内的原位置;树形表格为同级数组中的位置 */
|
|
179
|
+
oldIndex: number;
|
|
180
|
+
/** 树形表格重排后的完整树;非树形表格为当前数据行 */
|
|
181
|
+
rows: TRecord[];
|
|
182
|
+
/** 树形表格被排序节点的父节点 key;根节点排序时为 null */
|
|
183
|
+
parentRowKey?: TableEntityRowKey | null;
|
|
184
|
+
};
|
|
185
|
+
export type TableEntityExpose<TRecord extends TableEntityRecord = TableEntityRecord> = {
|
|
186
|
+
clearSelection: () => void;
|
|
187
|
+
getSelectedRows: () => TRecord[];
|
|
188
|
+
getSelectedCount: () => number;
|
|
189
|
+
setSelectedKeys: (keys: any[]) => void;
|
|
190
|
+
openImport: () => boolean;
|
|
191
|
+
reload: (page?: number) => Promise<void>;
|
|
192
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ImportDialogSubmitResult } from '../import-dialog/index.type';
|
|
2
|
+
import type { ColumnsItem, TableEntityActionName, TableEntityActionPayload, TableEntityChangePayload, TableEntityRowKey, TableEntityRowSortPayload, TableEntityProps } from './index.type';
|
|
3
|
+
type __VLS_Props = TableEntityProps;
|
|
4
|
+
declare function openImport(): boolean;
|
|
5
|
+
declare function reload(page?: number): Promise<void>;
|
|
6
|
+
declare const __VLS_template: () => {
|
|
7
|
+
__VLS_Slots: {
|
|
8
|
+
buttons?: (props: {}) => any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
13
|
+
clearSelection: () => void;
|
|
14
|
+
getSelectedRows: () => Record<string, any>[];
|
|
15
|
+
getSelectedCount: () => number;
|
|
16
|
+
setSelectedKeys: (keys: any[]) => void;
|
|
17
|
+
openImport: typeof openImport;
|
|
18
|
+
reload: typeof reload;
|
|
19
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
change: (payload: TableEntityChangePayload) => any;
|
|
21
|
+
"update:selectedKeys": (keys: any[]) => any;
|
|
22
|
+
"update:current_page": (page: number) => any;
|
|
23
|
+
"update:page": (page: number) => any;
|
|
24
|
+
"update:per_page": (size: number) => any;
|
|
25
|
+
"update:expandedRowKeys": (keys: TableEntityRowKey[]) => any;
|
|
26
|
+
"selection-change": (rows: Record<string, any>[]) => any;
|
|
27
|
+
expandedRowsChange: (keys: TableEntityRowKey[]) => any;
|
|
28
|
+
rowExpand: (payload: {
|
|
29
|
+
expanded: boolean;
|
|
30
|
+
rowData: Record<string, any>;
|
|
31
|
+
rowIndex: number;
|
|
32
|
+
rowKey: TableEntityRowKey;
|
|
33
|
+
}) => any;
|
|
34
|
+
pageChange: (page: number) => any;
|
|
35
|
+
refresh: () => any;
|
|
36
|
+
"handle-action": (payload: TableEntityActionPayload) => any;
|
|
37
|
+
importSuccess: (result: ImportDialogSubmitResult) => any;
|
|
38
|
+
importError: (error: Error | ImportDialogSubmitResult) => any;
|
|
39
|
+
rowSort: (payload: TableEntityRowSortPayload) => any;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
41
|
+
onChange?: ((payload: TableEntityChangePayload) => any) | undefined;
|
|
42
|
+
"onUpdate:selectedKeys"?: ((keys: any[]) => any) | undefined;
|
|
43
|
+
"onUpdate:current_page"?: ((page: number) => any) | undefined;
|
|
44
|
+
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
45
|
+
"onUpdate:per_page"?: ((size: number) => any) | undefined;
|
|
46
|
+
"onUpdate:expandedRowKeys"?: ((keys: TableEntityRowKey[]) => any) | undefined;
|
|
47
|
+
"onSelection-change"?: ((rows: Record<string, any>[]) => any) | undefined;
|
|
48
|
+
onExpandedRowsChange?: ((keys: TableEntityRowKey[]) => any) | undefined;
|
|
49
|
+
onRowExpand?: ((payload: {
|
|
50
|
+
expanded: boolean;
|
|
51
|
+
rowData: Record<string, any>;
|
|
52
|
+
rowIndex: number;
|
|
53
|
+
rowKey: TableEntityRowKey;
|
|
54
|
+
}) => any) | undefined;
|
|
55
|
+
onPageChange?: ((page: number) => any) | undefined;
|
|
56
|
+
onRefresh?: (() => any) | undefined;
|
|
57
|
+
"onHandle-action"?: ((payload: TableEntityActionPayload) => any) | undefined;
|
|
58
|
+
onImportSuccess?: ((result: ImportDialogSubmitResult) => any) | undefined;
|
|
59
|
+
onImportError?: ((error: Error | ImportDialogSubmitResult) => any) | undefined;
|
|
60
|
+
onRowSort?: ((payload: TableEntityRowSortPayload) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
data: import("./index.type").TableEntityRecord[] | import("./index.type").TableEntityDataFetcher<import("./index.type").TableEntityRecord>;
|
|
63
|
+
columns: ColumnsItem[];
|
|
64
|
+
height: number;
|
|
65
|
+
rowHeight: number;
|
|
66
|
+
cache: number;
|
|
67
|
+
selectable: boolean;
|
|
68
|
+
multiple: boolean;
|
|
69
|
+
rowKey: string;
|
|
70
|
+
selectedKeys: any[];
|
|
71
|
+
tree: boolean;
|
|
72
|
+
treeChildrenKey: string;
|
|
73
|
+
expandColumnKey: string;
|
|
74
|
+
expandedRowKeys: TableEntityRowKey[];
|
|
75
|
+
defaultExpandedRowKeys: TableEntityRowKey[];
|
|
76
|
+
indentSize: number;
|
|
77
|
+
iconSize: number;
|
|
78
|
+
per_page: number;
|
|
79
|
+
current_page: number;
|
|
80
|
+
query: import("./index.type").TableEntityQueryParams;
|
|
81
|
+
showPagination: boolean;
|
|
82
|
+
showActions: boolean;
|
|
83
|
+
actionColumnTitle: string;
|
|
84
|
+
actions: TableEntityActionName[];
|
|
85
|
+
pushActions: import("./index.type").TableEntityPushAction[];
|
|
86
|
+
rowDraggable: boolean;
|
|
87
|
+
rowDragHandle: string;
|
|
88
|
+
rowDragDisabled: (row: import("./index.type").TableEntityRecord) => boolean;
|
|
89
|
+
resizable: boolean;
|
|
90
|
+
minColumnWidth: number;
|
|
91
|
+
showColumnSettings: boolean;
|
|
92
|
+
permissionCode: string;
|
|
93
|
+
importDialog: import("./index.type").TableEntityImportDialogConfig;
|
|
94
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
95
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
96
|
+
declare const _default: typeof __VLS_export;
|
|
97
|
+
export default _default;
|
|
98
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
99
|
+
new (): {
|
|
100
|
+
$slots: S;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Slots } from 'vue';
|
|
2
|
+
import type { ColumnsItem } from '../index.type';
|
|
3
|
+
export type ColumnSlotListExpand = {
|
|
4
|
+
expandedKeys: Set<string>;
|
|
5
|
+
onToggle: (key: string) => void;
|
|
6
|
+
rowKey: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function applyColumnSlots(cols: ColumnsItem[], slots: Slots, listExpand?: ColumnSlotListExpand): ColumnsItem[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColumnsItem } from '../index.type';
|
|
2
|
+
/** ****************************** 列插槽命名 ********************************/
|
|
3
|
+
export declare function colSlotName(dataKey: string): string;
|
|
4
|
+
/** 日期列在声明字段为空时,再按常见的创建/更新时间字段名取值 */
|
|
5
|
+
export declare function readDateCellValue(row: Record<string, any> | undefined, dataKey: string, cellData: unknown): any;
|
|
6
|
+
export declare function formatColumnValue(value: unknown, valueType?: ColumnsItem['valueType']): string;
|
|
7
|
+
export declare function formatCellText(v: unknown): string;
|