fast-element-plus 2.0.21 → 2.0.22
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/CHANGELOG.md +13 -0
- package/dist/component.d.ts +15 -15
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.mjs.map +1 -1
- package/dist/components/button/index.d.ts +3 -3
- package/dist/components/button/index.mjs.map +1 -1
- package/dist/components/button/src/button.d.ts +1 -1
- package/dist/components/carNumber/index.d.ts +1 -1
- package/dist/components/carNumber/index.mjs.map +1 -1
- package/dist/components/contextMenu/index.d.ts +1 -1
- package/dist/components/contextMenu/index.mjs.map +1 -1
- package/dist/components/contextMenu/src/contextMenu.type.d.ts +1 -1
- package/dist/components/dialog/index.d.ts +3 -3
- package/dist/components/dialog/index.mjs.map +1 -1
- package/dist/components/dialog/src/dialog.d.ts +3 -3
- package/dist/components/drawer/index.d.ts +3 -3
- package/dist/components/drawer/index.mjs.map +1 -1
- package/dist/components/drawer/src/drawer.d.ts +3 -3
- package/dist/components/form/index.d.ts +4 -4
- package/dist/components/form/index.mjs.map +1 -1
- package/dist/components/form/utils/form.d.ts +2 -2
- package/dist/components/form/utils/form.mjs +2 -2
- package/dist/components/form/utils/form.mjs.map +1 -1
- package/dist/components/formItemTip/index.d.ts +2 -2
- package/dist/components/formItemTip/index.mjs.map +1 -1
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/icon/index.mjs.map +1 -1
- package/dist/components/iconSelector/index.d.ts +1 -1
- package/dist/components/iconSelector/index.mjs.map +1 -1
- package/dist/components/image/index.d.ts +2 -2
- package/dist/components/image/index.mjs.map +1 -1
- package/dist/components/image/src/image.d.ts +1 -1
- package/dist/components/inputDialogPage/index.d.ts +3 -3
- package/dist/components/inputDialogPage/index.mjs.map +1 -1
- package/dist/components/layoutGrid/index.d.ts +2 -2
- package/dist/components/layoutGrid/index.mjs.map +1 -1
- package/dist/components/select/index.d.ts +4 -4
- package/dist/components/select/index.mjs.map +1 -1
- package/dist/components/select/src/select.d.ts +1 -1
- package/dist/components/select/src/select.type.d.ts +2 -2
- package/dist/components/selectPage/index.d.ts +3 -3
- package/dist/components/selectPage/index.mjs.map +1 -1
- package/dist/components/selectPage/src/selectPage.d.ts +1 -1
- package/dist/components/selectV2/index.d.ts +3 -3
- package/dist/components/selectV2/index.mjs.map +1 -1
- package/dist/components/selectV2/src/selectV2.d.ts +1 -1
- package/dist/components/table/index.d.ts +4 -4
- package/dist/components/table/index.mjs.map +1 -1
- package/dist/components/table/src/page.type.d.ts +2 -2
- package/dist/components/table/src/table.type.d.ts +5 -5
- package/dist/components/table/src/table.type.mjs.map +1 -1
- package/dist/components/table/src/tableColumn.d.ts +2 -2
- package/dist/components/table/src/tableColumn.mjs.map +1 -1
- package/dist/components/table/utils/table.d.ts +18 -15
- package/dist/components/table/utils/table.mjs +18 -15
- package/dist/components/table/utils/table.mjs.map +1 -1
- package/dist/components/tree/index.d.ts +3 -3
- package/dist/components/tree/index.mjs.map +1 -1
- package/dist/components/tree/src/tree.props.d.ts +2 -2
- package/dist/components/tree/src/tree.type.d.ts +2 -2
- package/dist/components/treeSelect/index.d.ts +3 -3
- package/dist/components/treeSelect/index.mjs.map +1 -1
- package/dist/components/treeSelect/src/treeSelect.d.ts +1 -1
- package/dist/components/upload/index.d.ts +3 -3
- package/dist/components/upload/index.mjs.map +1 -1
- package/dist/components/upload/utils/upload.d.ts +15 -10
- package/dist/components/upload/utils/upload.mjs +15 -10
- package/dist/components/upload/utils/upload.mjs.map +1 -1
- package/dist/components/uploadImage/index.d.ts +3 -3
- package/dist/components/uploadImage/index.mjs.map +1 -1
- package/dist/components/uploadImages/index.d.ts +3 -3
- package/dist/components/uploadImages/index.mjs.map +1 -1
- package/dist/index.global.min.js +4 -4
- package/dist/index.global.min.js.map +1 -1
- package/dist/internal/props.d.ts +1 -1
- package/dist/internal/props.mjs.map +1 -1
- package/dist/utils/async/index.d.ts +4 -4
- package/dist/utils/async/index.mjs +9 -9
- package/dist/utils/async/index.mjs.map +1 -1
- package/dist/utils/date/index.d.ts +8 -8
- package/dist/utils/date/index.mjs +16 -16
- package/dist/utils/date/index.mjs.map +1 -1
- package/dist/utils/dom/index.d.ts +1 -1
- package/dist/utils/dom/index.mjs +4 -4
- package/dist/utils/dom/index.mjs.map +1 -1
- package/dist/utils/object/index.d.ts +10 -10
- package/dist/utils/object/index.mjs +6 -6
- package/dist/utils/object/index.mjs.map +1 -1
- package/dist/utils/string/index.d.ts +4 -4
- package/dist/utils/string/index.mjs +14 -40
- package/dist/utils/string/index.mjs.map +1 -1
- package/dist/utils/vue/emits.d.ts +8 -8
- package/dist/utils/vue/emits.mjs +7 -7
- package/dist/utils/vue/emits.mjs.map +1 -1
- package/dist/utils/vue/expose.d.ts +3 -3
- package/dist/utils/vue/expose.mjs +3 -3
- package/dist/utils/vue/expose.mjs.map +1 -1
- package/dist/utils/vue/func.d.ts +2 -2
- package/dist/utils/vue/func.mjs +2 -2
- package/dist/utils/vue/func.mjs.map +1 -1
- package/dist/utils/vue/install.d.ts +9 -9
- package/dist/utils/vue/install.mjs +24 -24
- package/dist/utils/vue/install.mjs.map +1 -1
- package/dist/utils/vue/props.d.ts +4 -4
- package/dist/utils/vue/props.mjs +5 -5
- package/dist/utils/vue/props.mjs.map +1 -1
- package/dist/utils/vue/render.d.ts +1 -1
- package/dist/utils/vue/render.mjs +2 -2
- package/dist/utils/vue/render.mjs.map +1 -1
- package/dist/utils/vue/slots.d.ts +4 -4
- package/dist/utils/vue/slots.mjs.map +1 -1
- package/dist/utils/vue/with.d.ts +1 -1
- package/dist/utils/vue/with.mjs +1 -1
- package/dist/utils/vue/with.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -6,9 +6,9 @@ export declare const FaInputDialogPage: TSXWithInstall<typeof InputDialogPage>;
|
|
|
6
6
|
export default FaInputDialogPage;
|
|
7
7
|
export { faInputDialogPageProps, faInputDialogPageEmits };
|
|
8
8
|
export type { FaInputDialogPageSlots } from "./src/inputDialogPage";
|
|
9
|
-
/** FaInputDialogPage
|
|
9
|
+
/** FaInputDialogPage 暴露的组件实例类型 */
|
|
10
10
|
export type FaInputDialogPageInstance = InstanceType<typeof InputDialogPage>;
|
|
11
|
-
/** FaInputDialogPage 的完整 Props
|
|
11
|
+
/** FaInputDialogPage 的完整 Props 类型 */
|
|
12
12
|
export type FaInputDialogPageProps = ExtractPropTypes<typeof faInputDialogPageProps>;
|
|
13
|
-
/** FaInputDialogPage 的 Emits
|
|
13
|
+
/** FaInputDialogPage 的 Emits 类型 */
|
|
14
14
|
export type FaInputDialogPageEmits = typeof faInputDialogPageEmits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["InputDialogPage"],"sources":["../../../src/components/inputDialogPage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport InputDialogPage, { faInputDialogPageEmits, faInputDialogPageProps } from \"./src/inputDialogPage\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 在对话框中提供分页选择与输入交互的组件。 */\nexport const FaInputDialogPage: TSXWithInstall<typeof InputDialogPage> = withInstall(InputDialogPage);\nexport default FaInputDialogPage;\n\nexport { faInputDialogPageProps, faInputDialogPageEmits };\nexport type { FaInputDialogPageSlots } from \"./src/inputDialogPage\";\n\n/** FaInputDialogPage
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["InputDialogPage"],"sources":["../../../src/components/inputDialogPage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport InputDialogPage, { faInputDialogPageEmits, faInputDialogPageProps } from \"./src/inputDialogPage\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 在对话框中提供分页选择与输入交互的组件。 */\nexport const FaInputDialogPage: TSXWithInstall<typeof InputDialogPage> = withInstall(InputDialogPage);\nexport default FaInputDialogPage;\n\nexport { faInputDialogPageProps, faInputDialogPageEmits };\nexport type { FaInputDialogPageSlots } from \"./src/inputDialogPage\";\n\n/** FaInputDialogPage 暴露的组件实例类型 */\nexport type FaInputDialogPageInstance = InstanceType<typeof InputDialogPage>;\n\n/** FaInputDialogPage 的完整 Props 类型 */\nexport type FaInputDialogPageProps = ExtractPropTypes<typeof faInputDialogPageProps>;\n\n/** FaInputDialogPage 的 Emits 类型 */\nexport type FaInputDialogPageEmits = typeof faInputDialogPageEmits;\n"],"mappings":";;;;AAMA,MAAa,oBAA4D,YAAYA,uBAAe"}
|
|
@@ -11,7 +11,7 @@ export declare const FaLayoutGridItem: TSXWithInstall<typeof LayoutGridItem>;
|
|
|
11
11
|
export type * from "./src/layoutGrid.type";
|
|
12
12
|
export type { FaLayoutGridSlots } from "./src/layoutGrid";
|
|
13
13
|
export type { FaLayoutGridItemSlots } from "./src/layoutGridItem";
|
|
14
|
-
/** FaLayoutGrid
|
|
14
|
+
/** FaLayoutGrid 暴露的组件实例类型 */
|
|
15
15
|
export type FaLayoutGridInstance = InstanceType<typeof LayoutGrid>;
|
|
16
|
-
/** FaLayoutGridItem
|
|
16
|
+
/** FaLayoutGridItem 暴露的组件实例类型 */
|
|
17
17
|
export type FaLayoutGridItemInstance = InstanceType<typeof LayoutGridItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["LayoutGrid","LayoutGridItem"],"sources":["../../../src/components/layoutGrid/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport LayoutGrid from \"./src/layoutGrid\";\nimport LayoutGridItem from \"./src/layoutGridItem\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 根据断点和容器宽度排列内容的响应式布局组件。 */\nexport const FaLayoutGrid: TSXWithInstall<typeof LayoutGrid> & { LayoutGridItem: typeof LayoutGridItem } = withInstall(LayoutGrid, {\n\tLayoutGridItem,\n});\nexport default FaLayoutGrid;\n\n/** 可独立注册的响应式布局项组件。 */\nexport const FaLayoutGridItem: TSXWithInstall<typeof LayoutGridItem> = withNoopInstall(LayoutGridItem);\n\nexport type * from \"./src/layoutGrid.type\";\nexport type { FaLayoutGridSlots } from \"./src/layoutGrid\";\nexport type { FaLayoutGridItemSlots } from \"./src/layoutGridItem\";\n\n/** FaLayoutGrid
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["LayoutGrid","LayoutGridItem"],"sources":["../../../src/components/layoutGrid/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport LayoutGrid from \"./src/layoutGrid\";\nimport LayoutGridItem from \"./src/layoutGridItem\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 根据断点和容器宽度排列内容的响应式布局组件。 */\nexport const FaLayoutGrid: TSXWithInstall<typeof LayoutGrid> & { LayoutGridItem: typeof LayoutGridItem } = withInstall(LayoutGrid, {\n\tLayoutGridItem,\n});\nexport default FaLayoutGrid;\n\n/** 可独立注册的响应式布局项组件。 */\nexport const FaLayoutGridItem: TSXWithInstall<typeof LayoutGridItem> = withNoopInstall(LayoutGridItem);\n\nexport type * from \"./src/layoutGrid.type\";\nexport type { FaLayoutGridSlots } from \"./src/layoutGrid\";\nexport type { FaLayoutGridItemSlots } from \"./src/layoutGridItem\";\n\n/** FaLayoutGrid 暴露的组件实例类型 */\nexport type FaLayoutGridInstance = InstanceType<typeof LayoutGrid>;\n\n/** FaLayoutGridItem 暴露的组件实例类型 */\nexport type FaLayoutGridItemInstance = InstanceType<typeof LayoutGridItem>;\n"],"mappings":";;;;;AAMA,MAAa,eAA8F,YAAYA,oBAAY,EAClI,gBAAA,uBACD,CAAC;;AAID,MAAa,mBAA0D,gBAAgBC,sBAAc"}
|
|
@@ -13,11 +13,11 @@ export declare const FaSelectOption: TSXWithInstall<typeof SelectOption>;
|
|
|
13
13
|
export { faSelectProps };
|
|
14
14
|
export type { FaSelectSlots } from "./src/select";
|
|
15
15
|
export type * from "./src/select.type";
|
|
16
|
-
/** FaSelect
|
|
16
|
+
/** FaSelect 暴露的组件实例类型 */
|
|
17
17
|
export type FaSelectInstance = InstanceType<typeof Select>;
|
|
18
|
-
/** FaSelect 的完整 Props
|
|
18
|
+
/** FaSelect 的完整 Props 类型 */
|
|
19
19
|
export type FaSelectProps = ExtractPropTypes<typeof faSelectProps>;
|
|
20
|
-
/** FaSelect 的 Emits
|
|
20
|
+
/** FaSelect 的 Emits 类型 */
|
|
21
21
|
export type FaSelectEmits = typeof faSelectEmits;
|
|
22
|
-
/** FaSelectOption
|
|
22
|
+
/** FaSelectOption 暴露的组件实例类型 */
|
|
23
23
|
export type FaSelectOptionInstance = InstanceType<typeof SelectOption>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Select","SelectOption"],"sources":["../../../src/components/select/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Select, { faSelectProps } from \"./src/select\";\nimport SelectOption from \"./src/selectOption\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faSelectEmits } from \"./src/select\";\n\n/** 支持远程数据、分页和自定义选项的选择器组件。 */\nexport const FaSelect: TSXWithInstall<typeof Select> & { SelectOption: typeof SelectOption } = withInstall(Select, {\n\tSelectOption,\n});\nexport default FaSelect;\n\n/** 可独立注册的 FaSelect 选项组件。 */\nexport const FaSelectOption: TSXWithInstall<typeof SelectOption> = withNoopInstall(SelectOption);\n\nexport { faSelectProps };\nexport type { FaSelectSlots } from \"./src/select\";\nexport type * from \"./src/select.type\";\n\n/** FaSelect
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Select","SelectOption"],"sources":["../../../src/components/select/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Select, { faSelectProps } from \"./src/select\";\nimport SelectOption from \"./src/selectOption\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faSelectEmits } from \"./src/select\";\n\n/** 支持远程数据、分页和自定义选项的选择器组件。 */\nexport const FaSelect: TSXWithInstall<typeof Select> & { SelectOption: typeof SelectOption } = withInstall(Select, {\n\tSelectOption,\n});\nexport default FaSelect;\n\n/** 可独立注册的 FaSelect 选项组件。 */\nexport const FaSelectOption: TSXWithInstall<typeof SelectOption> = withNoopInstall(SelectOption);\n\nexport { faSelectProps };\nexport type { FaSelectSlots } from \"./src/select\";\nexport type * from \"./src/select.type\";\n\n/** FaSelect 暴露的组件实例类型 */\nexport type FaSelectInstance = InstanceType<typeof Select>;\n\n/** FaSelect 的完整 Props 类型 */\nexport type FaSelectProps = ExtractPropTypes<typeof faSelectProps>;\n\n/** FaSelect 的 Emits 类型 */\nexport type FaSelectEmits = typeof faSelectEmits;\n\n/** FaSelectOption 暴露的组件实例类型 */\nexport type FaSelectOptionInstance = InstanceType<typeof SelectOption>;\n"],"mappings":";;;;;AAQA,MAAa,WAAkF,YAAYA,gBAAQ,EAClH,cAAA,qBACD,CAAC;;AAID,MAAa,iBAAsD,gBAAgBC,oBAAY"}
|
|
@@ -584,10 +584,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
584
584
|
"onRemove-tag"?: ((val: unknown) => any) | undefined;
|
|
585
585
|
}>, {
|
|
586
586
|
data: ElSelectorOutput<ElSelectorValue, any>[];
|
|
587
|
-
loading: boolean;
|
|
588
587
|
props: SelectComponentProps;
|
|
589
588
|
offset: number;
|
|
590
589
|
placement: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | ((new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | null)[], import("element-plus").Placement, unknown>;
|
|
590
|
+
loading: boolean;
|
|
591
591
|
disabled: boolean;
|
|
592
592
|
modelValue: ElSelectorModelValue;
|
|
593
593
|
autocomplete: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 选择器支持的单项值类型 */
|
|
2
2
|
export type ElSelectorValue = string | number | boolean | object;
|
|
3
3
|
/** 选择器的单值、多值或空模型。 */
|
|
4
4
|
export type ElSelectorModelValue = ElSelectorValue | ElSelectorValue[] | null | undefined;
|
|
5
|
-
/**
|
|
5
|
+
/** 选择器标准化后的选项数据 */
|
|
6
6
|
export interface ElSelectorOutput<T = ElSelectorValue, Data = any> {
|
|
7
7
|
/**
|
|
8
8
|
* 显示
|
|
@@ -6,9 +6,9 @@ export declare const FaSelectPage: TSXWithInstall<typeof SelectPage>;
|
|
|
6
6
|
export default FaSelectPage;
|
|
7
7
|
export { faSelectPageProps, faSelectPageEmits };
|
|
8
8
|
export type { FaSelectPageSlots } from "./src/selectPage";
|
|
9
|
-
/** FaSelectPage
|
|
9
|
+
/** FaSelectPage 暴露的组件实例类型 */
|
|
10
10
|
export type FaSelectPageInstance = InstanceType<typeof SelectPage>;
|
|
11
|
-
/** FaSelectPage 的完整 Props
|
|
11
|
+
/** FaSelectPage 的完整 Props 类型 */
|
|
12
12
|
export type FaSelectPageProps = ExtractPropTypes<typeof faSelectPageProps>;
|
|
13
|
-
/** FaSelectPage 的 Emits
|
|
13
|
+
/** FaSelectPage 的 Emits 类型 */
|
|
14
14
|
export type FaSelectPageEmits = typeof faSelectPageEmits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["SelectPage"],"sources":["../../../src/components/selectPage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport SelectPage, { faSelectPageEmits, faSelectPageProps } from \"./src/selectPage\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 支持分页数据源和远程检索的选择器组件。 */\nexport const FaSelectPage: TSXWithInstall<typeof SelectPage> = withInstall(SelectPage);\nexport default FaSelectPage;\n\nexport { faSelectPageProps, faSelectPageEmits };\nexport type { FaSelectPageSlots } from \"./src/selectPage\";\n\n/** FaSelectPage
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["SelectPage"],"sources":["../../../src/components/selectPage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport SelectPage, { faSelectPageEmits, faSelectPageProps } from \"./src/selectPage\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 支持分页数据源和远程检索的选择器组件。 */\nexport const FaSelectPage: TSXWithInstall<typeof SelectPage> = withInstall(SelectPage);\nexport default FaSelectPage;\n\nexport { faSelectPageProps, faSelectPageEmits };\nexport type { FaSelectPageSlots } from \"./src/selectPage\";\n\n/** FaSelectPage 暴露的组件实例类型 */\nexport type FaSelectPageInstance = InstanceType<typeof SelectPage>;\n\n/** FaSelectPage 的完整 Props 类型 */\nexport type FaSelectPageProps = ExtractPropTypes<typeof faSelectPageProps>;\n\n/** FaSelectPage 的 Emits 类型 */\nexport type FaSelectPageEmits = typeof faSelectPageEmits;\n"],"mappings":";;;;AAMA,MAAa,eAAkD,YAAYA,kBAAU"}
|
|
@@ -550,10 +550,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
550
550
|
}) => any) | undefined;
|
|
551
551
|
"onRemove-tag"?: ((val: unknown) => any) | undefined;
|
|
552
552
|
}>, {
|
|
553
|
-
loading: boolean;
|
|
554
553
|
props: SelectComponentProps;
|
|
555
554
|
offset: number;
|
|
556
555
|
placement: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | ((new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | null)[], import("element-plus").Placement, unknown>;
|
|
556
|
+
loading: boolean;
|
|
557
557
|
disabled: boolean;
|
|
558
558
|
modelValue: ElSelectorModelValue;
|
|
559
559
|
autocomplete: string;
|
|
@@ -7,9 +7,9 @@ export declare const FaSelectV2: TSXWithInstall<typeof SelectV2>;
|
|
|
7
7
|
export default FaSelectV2;
|
|
8
8
|
export { SelectV2Props, faSelectV2Props };
|
|
9
9
|
export type { FaSelectV2Slots } from "./src/selectV2";
|
|
10
|
-
/** FaSelectV2
|
|
10
|
+
/** FaSelectV2 暴露的组件实例类型 */
|
|
11
11
|
export type FaSelectV2Instance = InstanceType<typeof SelectV2>;
|
|
12
|
-
/** FaSelectV2 的完整 Props
|
|
12
|
+
/** FaSelectV2 的完整 Props 类型 */
|
|
13
13
|
export type FaSelectV2Props = ExtractPropTypes<typeof faSelectV2Props>;
|
|
14
|
-
/** FaSelectV2 的 Emits
|
|
14
|
+
/** FaSelectV2 的 Emits 类型 */
|
|
15
15
|
export type FaSelectV2Emits = typeof faSelectV2Emits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["SelectV2"],"sources":["../../../src/components/selectV2/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport SelectV2, { SelectV2Props, faSelectV2Props } from \"./src/selectV2\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faSelectV2Emits } from \"./src/selectV2\";\n\n/** 面向大数据量选项并支持远程分页的虚拟化选择器组件。 */\nexport const FaSelectV2: TSXWithInstall<typeof SelectV2> = withInstall(SelectV2);\nexport default FaSelectV2;\n\nexport { SelectV2Props, faSelectV2Props };\nexport type { FaSelectV2Slots } from \"./src/selectV2\";\n\n/** FaSelectV2
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["SelectV2"],"sources":["../../../src/components/selectV2/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport SelectV2, { SelectV2Props, faSelectV2Props } from \"./src/selectV2\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faSelectV2Emits } from \"./src/selectV2\";\n\n/** 面向大数据量选项并支持远程分页的虚拟化选择器组件。 */\nexport const FaSelectV2: TSXWithInstall<typeof SelectV2> = withInstall(SelectV2);\nexport default FaSelectV2;\n\nexport { SelectV2Props, faSelectV2Props };\nexport type { FaSelectV2Slots } from \"./src/selectV2\";\n\n/** FaSelectV2 暴露的组件实例类型 */\nexport type FaSelectV2Instance = InstanceType<typeof SelectV2>;\n\n/** FaSelectV2 的完整 Props 类型 */\nexport type FaSelectV2Props = ExtractPropTypes<typeof faSelectV2Props>;\n\n/** FaSelectV2 的 Emits 类型 */\nexport type FaSelectV2Emits = typeof faSelectV2Emits;\n"],"mappings":";;;;;AAOA,MAAa,aAA8C,YAAYA,gBAAQ"}
|
|
@@ -743,10 +743,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
743
743
|
"onRemove-tag"?: ((_value: ElSelectorValue) => any) | undefined;
|
|
744
744
|
}>, {
|
|
745
745
|
data: ElSelectorOutput<ElSelectorValue, any>[];
|
|
746
|
-
loading: boolean;
|
|
747
746
|
props: import("./selectV2").Props;
|
|
748
747
|
offset: number;
|
|
749
748
|
placement: import("element-plus").Placement;
|
|
749
|
+
loading: boolean;
|
|
750
750
|
disabled: boolean;
|
|
751
751
|
modelValue: ElSelectorModelValue;
|
|
752
752
|
autocomplete: "none" | "both" | "inline" | "list";
|
|
@@ -23,12 +23,12 @@ export type * from "./src/table.type";
|
|
|
23
23
|
export { faTableEmits, faTableProps, tableColumnProps, tableProps };
|
|
24
24
|
export type { FaTableSlots };
|
|
25
25
|
export type { FaTableColumnSlots, FaTableColumnSlotsResult } from "./src/tableColumn";
|
|
26
|
-
/** FaTable
|
|
26
|
+
/** FaTable 暴露的组件实例类型 */
|
|
27
27
|
export type FaTableInstance = InstanceType<typeof Table>;
|
|
28
|
-
/** FaTable 的完整 Props
|
|
28
|
+
/** FaTable 的完整 Props 类型 */
|
|
29
29
|
export type FaTableProps = ExtractPropTypes<typeof faTableProps>;
|
|
30
|
-
/** FaTable 的 Emits
|
|
30
|
+
/** FaTable 的 Emits 类型 */
|
|
31
31
|
export type FaTableEmits = typeof faTableEmits;
|
|
32
|
-
/** FaTableColumn
|
|
32
|
+
/** FaTableColumn 暴露的组件实例类型 */
|
|
33
33
|
export type FaTableColumnInstance = InstanceType<typeof TableColumn>;
|
|
34
34
|
export * from "./utils/table";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Table","TableColumn"],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Table, { type FaTableSlots, faTableEmits, faTableProps, tableProps } from \"./src/table\";\nimport TableColumn, { tableColumnProps } from \"./src/tableColumn\";\nimport TableColumnsSettingDialog from \"./src/tableColumnSettingDialog\";\nimport TablePagination from \"./src/tablePagination\";\nimport TableSearchForm from \"./src/tableSearchForm\";\nimport TableSearchFormItem from \"./src/tableSearchFormItem\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 集成查询、分页、列配置和枚举映射的业务表格组件。 */\nexport const FaTable: TSXWithInstall<typeof Table> & {\n\tTableColumn: typeof TableColumn;\n\tTableColumnsSettingDialog: typeof TableColumnsSettingDialog;\n\tTablePagination: typeof TablePagination;\n\tTableSearchForm: typeof TableSearchForm;\n\tTableSearchFormItem: typeof TableSearchFormItem;\n} = withInstall(Table, {\n\tTableColumn,\n\tTableColumnsSettingDialog,\n\tTablePagination,\n\tTableSearchForm,\n\tTableSearchFormItem,\n});\nexport default FaTable;\n\n/** 可独立注册的 FaTable 列组件。 */\nexport const FaTableColumn: TSXWithInstall<typeof TableColumn> = withNoopInstall(TableColumn);\n\nexport type * from \"./src/page.type\";\nexport type * from \"./src/table.state\";\nexport type * from \"./src/table.type\";\n\nexport { faTableEmits, faTableProps, tableColumnProps, tableProps };\nexport type { FaTableSlots };\nexport type { FaTableColumnSlots, FaTableColumnSlotsResult } from \"./src/tableColumn\";\n\n/** FaTable
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Table","TableColumn"],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Table, { type FaTableSlots, faTableEmits, faTableProps, tableProps } from \"./src/table\";\nimport TableColumn, { tableColumnProps } from \"./src/tableColumn\";\nimport TableColumnsSettingDialog from \"./src/tableColumnSettingDialog\";\nimport TablePagination from \"./src/tablePagination\";\nimport TableSearchForm from \"./src/tableSearchForm\";\nimport TableSearchFormItem from \"./src/tableSearchFormItem\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 集成查询、分页、列配置和枚举映射的业务表格组件。 */\nexport const FaTable: TSXWithInstall<typeof Table> & {\n\tTableColumn: typeof TableColumn;\n\tTableColumnsSettingDialog: typeof TableColumnsSettingDialog;\n\tTablePagination: typeof TablePagination;\n\tTableSearchForm: typeof TableSearchForm;\n\tTableSearchFormItem: typeof TableSearchFormItem;\n} = withInstall(Table, {\n\tTableColumn,\n\tTableColumnsSettingDialog,\n\tTablePagination,\n\tTableSearchForm,\n\tTableSearchFormItem,\n});\nexport default FaTable;\n\n/** 可独立注册的 FaTable 列组件。 */\nexport const FaTableColumn: TSXWithInstall<typeof TableColumn> = withNoopInstall(TableColumn);\n\nexport type * from \"./src/page.type\";\nexport type * from \"./src/table.state\";\nexport type * from \"./src/table.type\";\n\nexport { faTableEmits, faTableProps, tableColumnProps, tableProps };\nexport type { FaTableSlots };\nexport type { FaTableColumnSlots, FaTableColumnSlotsResult } from \"./src/tableColumn\";\n\n/** FaTable 暴露的组件实例类型 */\nexport type FaTableInstance = InstanceType<typeof Table>;\n\n/** FaTable 的完整 Props 类型 */\nexport type FaTableProps = ExtractPropTypes<typeof faTableProps>;\n\n/** FaTable 的 Emits 类型 */\nexport type FaTableEmits = typeof faTableEmits;\n\n/** FaTableColumn 暴露的组件实例类型 */\nexport type FaTableColumnInstance = InstanceType<typeof TableColumn>;\n\nexport * from \"./utils/table\";\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,UAMT,YAAYA,eAAO;CACtB,aAAA;CACA,2BAAA;CACA,iBAAA;CACA,iBAAA;CACA,qBAAA;AACD,CAAC;;AAID,MAAa,gBAAoD,gBAAgBC,mBAAW"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** FaTable
|
|
1
|
+
/** FaTable 统一分页返回结果 */
|
|
2
2
|
export interface PagedResult<Output = Record<string, any>> {
|
|
3
3
|
/**
|
|
4
4
|
* 当前页
|
|
@@ -111,7 +111,7 @@ export interface PagedSortInput {
|
|
|
111
111
|
*/
|
|
112
112
|
mode?: string;
|
|
113
113
|
}
|
|
114
|
-
/** FaTable
|
|
114
|
+
/** FaTable 分页、搜索和排序请求参数 */
|
|
115
115
|
export interface PagedInput {
|
|
116
116
|
/**
|
|
117
117
|
* 当前页面索引值,默认为1
|
|
@@ -20,9 +20,9 @@ export interface FaTableDefaultSlotsResult {
|
|
|
20
20
|
* @returns 可传给业务插槽的选择、搜索和加载状态。
|
|
21
21
|
*/
|
|
22
22
|
export declare const getTableDefaultSlots: (state: FaTableState) => FaTableDefaultSlotsResult;
|
|
23
|
-
/** FaTable
|
|
23
|
+
/** FaTable 默认时间搜索支持的快捷日期范围 */
|
|
24
24
|
export type FaTableDataRange = "Past1D" | "Past3D" | "Past1W" | "Past1M" | "Past3M" | "Past6M" | "Past1Y" | "Past3Y";
|
|
25
|
-
/** FaTable
|
|
25
|
+
/** FaTable 枚举列的选项配置 */
|
|
26
26
|
export interface FaTableEnumColumnCtx {
|
|
27
27
|
/**
|
|
28
28
|
* 选项框显示的文字
|
|
@@ -58,9 +58,9 @@ export interface FaTableEnumColumnCtx {
|
|
|
58
58
|
export type FaTableEnumColumnType = string | FaTableEnumColumnCtx[] | ((context?: {
|
|
59
59
|
row: DefaultRow;
|
|
60
60
|
}) => FaTableEnumColumnCtx[]);
|
|
61
|
-
/** FaTable
|
|
61
|
+
/** FaTable 搜索项支持的内置组件名或自定义组件名 */
|
|
62
62
|
export type FaTableSearchColumnEl = "" | "el-input" | "el-input-number" | "el-select" | "el-select-v2" | "el-tree-select" | "el-cascader" | "el-date-picker" | "el-time-picker" | "el-time-select" | "el-switch" | "el-slider" | "slot" | (string & Record<never, never>);
|
|
63
|
-
/** FaTable
|
|
63
|
+
/** FaTable 单列搜索项的组件、布局和默认值配置 */
|
|
64
64
|
export type FaTableSearchColumnCtx = Partial<Record<FaLayoutGridBreakpoint, FaLayoutGridItemResponsive>> & {
|
|
65
65
|
/**
|
|
66
66
|
* 当前项搜索框的类型
|
|
@@ -100,7 +100,7 @@ export type FaTableSearchColumnCtx = Partial<Record<FaLayoutGridBreakpoint, FaLa
|
|
|
100
100
|
defaultValue?: unknown;
|
|
101
101
|
};
|
|
102
102
|
/**
|
|
103
|
-
* FaTable
|
|
103
|
+
* FaTable 内置业务列类型
|
|
104
104
|
* @property default 默认
|
|
105
105
|
* @property selection 选择列
|
|
106
106
|
* @property expand 可展开按钮列
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.type.mjs","names":[],"sources":["../../../../src/components/table/src/table.type.ts"],"sourcesContent":["import type { TableColumnCtx } from \"element-plus\";\nimport type { VNode } from \"vue\";\nimport type { FaLayoutGridBreakpoint, FaLayoutGridItemResponsive } from \"../../layoutGrid\";\nimport type { PagedInput } from \"./page.type\";\nimport type { DefaultRow, FaTableState } from \"./table.state\";\n\n/** FaTable 默认插槽共享的状态与操作。 */\nexport interface FaTableDefaultSlotsResult {\n\tloading: boolean;\n\tsearchParam: PagedInput;\n\tselected: boolean;\n\tselectedList: DefaultRow[];\n\tselectedListIds: (string | number)[];\n\tindeterminateSelectedListIds: (string | number)[];\n\t/** 可能为空 */\n\tsearch?: () => Promise<void>;\n}\n\n/**\n * 获取 FaTable 默认插槽共享数据。\n * @param state - FaTable 内部状态。\n * @returns 可传给业务插槽的选择、搜索和加载状态。\n */\nexport const getTableDefaultSlots = (state: FaTableState): FaTableDefaultSlotsResult => {\n\treturn {\n\t\tloading: state.loading,\n\t\tsearchParam: state.searchParam,\n\t\tselected: state.selected,\n\t\tselectedList: state.selectedList,\n\t\tselectedListIds: state.selectedListIds,\n\t\tindeterminateSelectedListIds: state.indeterminateSelectedListIds,\n\t};\n};\n\n/** FaTable
|
|
1
|
+
{"version":3,"file":"table.type.mjs","names":[],"sources":["../../../../src/components/table/src/table.type.ts"],"sourcesContent":["import type { TableColumnCtx } from \"element-plus\";\nimport type { VNode } from \"vue\";\nimport type { FaLayoutGridBreakpoint, FaLayoutGridItemResponsive } from \"../../layoutGrid\";\nimport type { PagedInput } from \"./page.type\";\nimport type { DefaultRow, FaTableState } from \"./table.state\";\n\n/** FaTable 默认插槽共享的状态与操作。 */\nexport interface FaTableDefaultSlotsResult {\n\tloading: boolean;\n\tsearchParam: PagedInput;\n\tselected: boolean;\n\tselectedList: DefaultRow[];\n\tselectedListIds: (string | number)[];\n\tindeterminateSelectedListIds: (string | number)[];\n\t/** 可能为空 */\n\tsearch?: () => Promise<void>;\n}\n\n/**\n * 获取 FaTable 默认插槽共享数据。\n * @param state - FaTable 内部状态。\n * @returns 可传给业务插槽的选择、搜索和加载状态。\n */\nexport const getTableDefaultSlots = (state: FaTableState): FaTableDefaultSlotsResult => {\n\treturn {\n\t\tloading: state.loading,\n\t\tsearchParam: state.searchParam,\n\t\tselected: state.selected,\n\t\tselectedList: state.selectedList,\n\t\tselectedListIds: state.selectedListIds,\n\t\tindeterminateSelectedListIds: state.indeterminateSelectedListIds,\n\t};\n};\n\n/** FaTable 默认时间搜索支持的快捷日期范围 */\nexport type FaTableDataRange = \"Past1D\" | \"Past3D\" | \"Past1W\" | \"Past1M\" | \"Past3M\" | \"Past6M\" | \"Past1Y\" | \"Past3Y\";\n\n/** FaTable 枚举列的选项配置 */\nexport interface FaTableEnumColumnCtx {\n\t/**\n\t * 选项框显示的文字\n\t */\n\tlabel: string;\n\t/**\n\t * 选项框值\n\t */\n\tvalue: string | number | boolean;\n\t/**\n\t * 显示\n\t */\n\tshow?: boolean;\n\t/**\n\t * 是否禁用此选项\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * 为树形选择是,可以通过 children 属性指定子选项\n\t */\n\tchildren?: FaTableEnumColumnCtx[];\n\t/**\n\t * 提示\n\t */\n\ttips?: string;\n\t/**\n\t * Tag的类型,默认 \"primary\"\n\t */\n\ttype?: \"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\";\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 枚举项允许携带业务接口定义的附加字段。\n\t[key: string]: any;\n}\n\n/** FaTable 枚举列接受的字典名称、选项集合或选项工厂。 */\nexport type FaTableEnumColumnType = string | FaTableEnumColumnCtx[] | ((context?: { row: DefaultRow }) => FaTableEnumColumnCtx[]);\n\n/** FaTable 搜索项支持的内置组件名或自定义组件名 */\nexport type FaTableSearchColumnEl =\n\t| \"\"\n\t| \"el-input\"\n\t| \"el-input-number\"\n\t| \"el-select\"\n\t| \"el-select-v2\"\n\t| \"el-tree-select\"\n\t| \"el-cascader\"\n\t| \"el-date-picker\"\n\t| \"el-time-picker\"\n\t| \"el-time-select\"\n\t| \"el-switch\"\n\t| \"el-slider\"\n\t| \"slot\"\n\t| (string & Record<never, never>);\n\n/** FaTable 单列搜索项的组件、布局和默认值配置 */\nexport type FaTableSearchColumnCtx = Partial<Record<FaLayoutGridBreakpoint, FaLayoutGridItemResponsive>> & {\n\t/**\n\t * 当前项搜索框的类型\n\t */\n\tel: FaTableSearchColumnEl;\n\t/**\n\t * 搜索项参数,根据 element plus 官方文档来传递,该属性所有值会透传到组件\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 搜索组件透传属性由具体组件和业务配置共同定义。\n\tprops?: Record<string, any>;\n\t/**\n\t * 当搜索项 label 不为列 label 属性时,可通过 label 指定\n\t */\n\tlabel?: string;\n\t/**\n\t * 当搜索项 key 不为 prop 属性时,可通过 key 指定\n\t */\n\tkey?: string;\n\t/**\n\t * 搜索项排序(从大到小)\n\t */\n\torder?: number;\n\t/**\n\t * 搜索项所占用的列数,默认为1列\n\t */\n\tspan?: number;\n\t/**\n\t * 搜索字段左侧偏移列数\n\t */\n\toffset?: number;\n\t/**\n\t * 插槽名称\n\t */\n\tslot?: string;\n\t/**\n\t * 搜索项默认值\n\t */\n\tdefaultValue?: unknown;\n};\n\n/**\n * FaTable 内置业务列类型\n * @property default 默认\n * @property selection\t 选择列\n * @property expand 可展开按钮列\n * @property expand 可展开按钮列\n * @property image 图片列\n * @property date 日期显示(格式 \"YYYY-MM-DD\")\n * @property time 时间显示(格式 \"HH:mm:ss\")\n * @property dateTime 日期时间显示(格式 \"YYYY-MM-DD HH:mm:ss\")\n * @property d2 数值列,保留 2 位小数,不带千分位\n * @property d4 数值列,保留 4 位小数,不带千分位\n * @property d6 数值列,保留 6 位小数,不带千分位\n * @property gd2 数值列,保留 2 位小数,带千分位\n * @property gd4 数值列,保留 4 位小数,带千分位\n * @property gd6 数值列,保留 6 位小数,带千分位\n * @property timeInfo 时间信息列\n */\nexport type FaTableColumnType =\n\t\"default\" | \"selection\" | \"index\" | \"expand\" | \"image\" | \"date\" | \"time\" | \"dateTime\" | \"d2\" | \"d4\" | \"d6\" | \"gd2\" | \"gd4\" | \"gd6\" | \"timeInfo\";\n\n/** FaTable 日期、时间列支持的格式化模板。 */\nexport type FaTableColumnDateFormat =\n\t| \"YYYY-MM-DD HH:mm:ss\"\n\t| \"YYYY-MM-DD HH:mm\"\n\t| \"YYYY-MM-DD\"\n\t| \"YYYY-MM\"\n\t| \"YYYY\"\n\t| \"MM\"\n\t| \"DD\"\n\t| \"MM-DD\"\n\t| \"HH:mm:ss\"\n\t| \"HH:mm\"\n\t| \"HH\"\n\t| \"mm:ss\"\n\t| \"mm\"\n\t| \"ss\";\n\n/** FaTable 列配置,扩展 Element Plus 列能力和 Fast 业务渲染选项。 */\nexport type FaTableColumnCtx<T extends DefaultRow = DefaultRow> = Partial<\n\tOmit<TableColumnCtx<T>, \"order\" | \"type\" | \"prop\" | \"sortable\" | \"_children\">\n> & {\n\t/**\n\t * 内部的计算属性,一般不做使用\n\t */\n\tmultiOrder?: \"\" | \"ascending\" | \"descending\";\n\t/**\n\t * 列Id\n\t */\n\tcolumnId?: number | string;\n\t/**\n\t * 排序\n\t */\n\torder?: number;\n\t/**\n\t * 排序字段\n\t */\n\tsortableField?: string;\n\t/**\n\t * 禁用排序配置\n\t */\n\tdisabledSortable?: boolean;\n\t/**\n\t * 合并行字段\n\t */\n\tspanProp?: string;\n\t/**\n\t * 纯搜索\n\t */\n\tpureSearch?: boolean;\n\t/**\n\t * 搜索项配置\n\t */\n\tsearch?: FaTableSearchColumnCtx;\n\t/** 上面所有属性,全部非 FaTableColumn props,均为计算属性 */\n\t/**\n\t * 对应列的类型\n\t */\n\ttype?: FaTableColumnType;\n\t/**\n\t * 字段名称\n\t */\n\tprop?: string;\n\t/**\n\t * 是否显示在表格当中,默认 true\n\t */\n\tshow?: boolean;\n\t/**\n\t * 对应列是否可以排序,\n\t * 默认为 'custom' 模式,即远程排序,\n\t * 需要监听 Table 的 sort-change 事件\n\t */\n\tsortable?: boolean;\n\t/**\n\t * 小页面的宽度,如果为空,则继承默认宽度\n\t */\n\tsmallWidth?: string | number;\n\t/**\n\t * 自适应宽度\n\t */\n\tautoWidth?: boolean;\n\t/**\n\t * 插槽名称\n\t */\n\tslot?: string;\n\t/**\n\t * 表格头部插槽名称\n\t */\n\theaderSlot?: string;\n\t/**\n\t * 自定义表头内容渲染(tsx语法)\n\t */\n\theaderRender?: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number } & FaTableDefaultSlotsResult) => VNode[];\n\t/**\n\t * 自定义单元格内容渲染(tsx语法)\n\t */\n\trender?: ({ row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number } & FaTableDefaultSlotsResult) => VNode[];\n\t/**\n\t * 多级表头\n\t */\n\t_children?: FaTableColumnCtx<T>[];\n\t/**\n\t * 复制\n\t */\n\tcopy?: boolean;\n\t/**\n\t * 是否为 Link Button\n\t */\n\tlink?: boolean;\n\t/**\n\t * 点击事件,优先级最高\n\t */\n\tclick?: ({ row, $index }: { row: T; $index?: number } & FaTableDefaultSlotsResult) => void;\n\t/**\n\t * 点击Emits事件回调\n\t */\n\tclickEmit?: string;\n\t/**\n\t * 图片列是否显示为原图,默认 false 显示缩略图\n\t */\n\toriginalImage?: boolean;\n\t/**\n\t * 显示时间格式化字符串,默认 false\n\t */\n\tdateFix?: boolean;\n\t/**\n\t * 显示在页面中的日期格式\n\t */\n\tdateFormat?: FaTableColumnDateFormat;\n\t/**\n\t * 是否是标签展示,默认 false\n\t */\n\ttag?: boolean;\n\t/**\n\t * 枚举类型(渲染值的字典)\n\t */\n\tenum?: FaTableEnumColumnType;\n\t/**\n\t * 数据删除字段,如果为 true 会显示遮罩层\n\t */\n\tdataDeleteField?: string;\n\t/**\n\t * 时间信息字段\n\t */\n\ttimeInfoField?: { userName?: string; time?: string };\n};\n"],"mappings":";;;;;;AAuBA,MAAa,wBAAwB,UAAmD;CACvF,OAAO;EACN,SAAS,MAAM;EACf,aAAa,MAAM;EACnB,UAAU,MAAM;EAChB,cAAc,MAAM;EACpB,iBAAiB,MAAM;EACvB,8BAA8B,MAAM;CACrC;AACD"}
|
|
@@ -3,7 +3,7 @@ import type { VNode } from "vue";
|
|
|
3
3
|
import type { DefaultRow } from "./table.state";
|
|
4
4
|
import type { FaTableColumnCtx, FaTableColumnDateFormat, FaTableColumnType, FaTableDefaultSlotsResult, FaTableEnumColumnType } from "./table.type";
|
|
5
5
|
export { tableColumnProps } from "../../../internal/props";
|
|
6
|
-
/** FaTableColumn
|
|
6
|
+
/** FaTableColumn 插槽返回的行列上下文 */
|
|
7
7
|
export interface FaTableColumnSlotsResult {
|
|
8
8
|
/** slots为表格内容的时候才会返回 */
|
|
9
9
|
row?: DefaultRow;
|
|
@@ -352,7 +352,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
352
352
|
minWidth: string | number;
|
|
353
353
|
align: string;
|
|
354
354
|
headerAlign: string;
|
|
355
|
-
showOverflowTooltip: boolean | Partial<Omit<import("element-plus").UseTooltipProps, "
|
|
355
|
+
showOverflowTooltip: boolean | Partial<Omit<import("element-plus").UseTooltipProps, "rawContent" | "visible" | "referenceEl" | "triggerTargetEl" | "virtualTriggering" | "content" | "persistent" | "autoClose" | "virtualRef">> | undefined;
|
|
356
356
|
reserveSelection: boolean;
|
|
357
357
|
filterMultiple: boolean;
|
|
358
358
|
sortOrders: (import("element-plus/es/components/table/src/table/defaults.mjs").TableSortOrder | null)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableColumn.mjs","names":[],"sources":["../../../../src/components/table/src/tableColumn.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, h, inject, resolveComponent } from \"vue\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElImage, ElMessage, ElTableColumn, ElTag, ElText, dayjs, useGlobalSize } from \"element-plus\";\nimport { tableColumnProps } from \"../../../internal/props\";\nimport { copy as copyToClipboard, definePropType, formatChineseRelativeTime, makeSlots, useProps, useRender } from \"../../../utils\";\nimport FaImage from \"../../image\";\nimport artwork from \"../images/artwork.png\";\nimport notImage from \"../images/notImage.png\";\nimport { tableUtil } from \"../utils/table\";\nimport { getTableDefaultSlots } from \"./table.type\";\nimport { enumMapKey, tableStateKey } from \"./useTable\";\nimport type { TableColumnCtx } from \"element-plus\";\nimport type { VNode } from \"vue\";\nimport type { DefaultRow } from \"./table.state\";\nimport type {\n\tFaTableColumnCtx,\n\tFaTableColumnDateFormat,\n\tFaTableColumnType,\n\tFaTableDefaultSlotsResult,\n\tFaTableEnumColumnCtx,\n\tFaTableEnumColumnType,\n} from \"./table.type\";\n\nexport { tableColumnProps } from \"../../../internal/props\";\n\n/** FaTableColumn 插槽返回的行列上下文。 */\nexport interface FaTableColumnSlotsResult {\n\t/** slots为表格内容的时候才会返回 */\n\trow?: DefaultRow;\n\t/** slot为表头内容的时候返回 'TableColumnCtx<DefaultRow>' 否则返回 'FaTableColumnCtx' */\n\tcolumn?: TableColumnCtx<DefaultRow> | FaTableColumnCtx;\n\t$index?: number;\n}\n\ntype FaTableColumnDefaultSlots = Record<string, FaTableDefaultSlotsResult & FaTableColumnSlotsResult>;\n\n/** FaTableColumn 的固定插槽和动态命名插槽。 */\nexport type FaTableColumnSlots = Record<string, unknown> & {\n\t/** 默认内容插槽 */\n\tdefault: FaTableDefaultSlotsResult & { row: DefaultRow; column: FaTableColumnCtx; $index: number };\n\t/** 自定义表头的内容 */\n\theader: FaTableDefaultSlotsResult & { column: FaTableColumnCtx; $index: number };\n\t/** 自定义 filter 图标 */\n\tfilterIcon: FaTableDefaultSlotsResult & { filterOpened: boolean };\n\t/** 展开列的自定义内容 */\n\texpand: FaTableDefaultSlotsResult & { expanded: boolean };\n} & FaTableColumnDefaultSlots;\n\nexport default defineComponent({\n\tname: \"FaTableColumn\",\n\tprops: {\n\t\t...tableColumnProps,\n\t\t/**\n\t\t * type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n\t\t */\n\t\ttype: {\n\t\t\ttype: definePropType<FaTableColumnType>(String),\n\t\t\tdefault: \"default\",\n\t\t},\n\t\t/**\n\t\t * column width\n\t\t */\n\t\twidth: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: \"auto\",\n\t\t},\n\t\t/** alignment, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\talign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\theaderAlign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** 是否显示在表格当中 */\n\t\tshow: Boolean,\n\t\t/** 小页面的宽度,如果为空,则继承默认宽度 */\n\t\tsmallWidth: {\n\t\t\ttype: [String, Number],\n\t\t},\n\t\t/** 自适应宽度 */\n\t\tautoWidth: Boolean,\n\t\t/** 插槽名称 */\n\t\tslot: String,\n\t\t/** 表格头部插槽名称 */\n\t\theaderSlot: String,\n\t\t/** 自定义表头内容渲染(tsx语法) */\n\t\theaderRender: {\n\t\t\ttype: definePropType<({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number } & FaTableDefaultSlotsResult) => VNode[]>(\n\t\t\t\tFunction\n\t\t\t),\n\t\t},\n\t\t/** 自定义单元格内容渲染(tsx语法) */\n\t\trender: {\n\t\t\ttype: definePropType<\n\t\t\t\t({ row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number } & FaTableDefaultSlotsResult) => VNode[]\n\t\t\t>(Function),\n\t\t},\n\t\t/** 多级表头 */\n\t\t_children: {\n\t\t\ttype: definePropType<FaTableColumnCtx[]>(Array),\n\t\t},\n\t\t/** 隐藏图片 */\n\t\thideImage: Boolean,\n\t\t/** 复制 */\n\t\tcopy: Boolean,\n\t\t/** 是否为 Link Button */\n\t\tlink: Boolean,\n\t\t/** 合并行字段 */\n\t\tspanProp: String,\n\t\t/** Link 按钮的点击事件,优先级最高 */\n\t\tclick: {\n\t\t\ttype: definePropType<({ row, $index }: { row: DefaultRow; $index?: number } & FaTableDefaultSlotsResult) => void>(Function),\n\t\t},\n\t\t/** 点击Emits事件回调 */\n\t\tclickEmit: String,\n\t\t/** 图片列是否显示为原图,默认 false 显示缩略图 */\n\t\toriginalImage: Boolean,\n\t\t/** 显示时间格式化字符串 */\n\t\tdateFix: Boolean,\n\t\t/** 显示在页面中的日期格式 */\n\t\tdateFormat: {\n\t\t\ttype: definePropType<FaTableColumnDateFormat>(String),\n\t\t},\n\t\t/** 是否是标签展示 */\n\t\ttag: Boolean,\n\t\t/** 枚举类型(渲染值的字典) */\n\t\tenum: {\n\t\t\ttype: definePropType<FaTableEnumColumnType>([String, Array, Function]),\n\t\t},\n\t\t/** 数据删除字段,如果为 true 会显示遮罩层 */\n\t\tdataDeleteField: String,\n\t\t/** 时间信息字段 */\n\t\ttimeInfoField: {\n\t\t\ttype: definePropType<{ userName?: string; time?: string }>(Object),\n\t\t\tdefault: () => ({\n\t\t\t\tuserName: \"createdUserName\",\n\t\t\t\ttime: \"createdTime\",\n\t\t\t}),\n\t\t},\n\t},\n\temits: {\n\t\t/** 图片预览 */\n\t\timagePreview: (url: string) => typeof url === \"string\",\n\t\t/** 自定义单元格点击事件 */\n\t\tcustomCellClick: (emitName: string, { row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number }) =>\n\t\t\t(emitName == null || typeof emitName === \"string\") &&\n\t\t\ttypeof row === \"object\" &&\n\t\t\trow !== null &&\n\t\t\ttypeof column === \"object\" &&\n\t\t\tcolumn !== null &&\n\t\t\ttypeof $index === \"number\",\n\t},\n\tslots: makeSlots<FaTableColumnSlots>(),\n\tsetup(props, { slots, emit }) {\n\t\tconst globalSize = useGlobalSize();\n\t\tconst tableState = inject(tableStateKey);\n\t\tconst enumMap = inject(enumMapKey);\n\t\tif (tableState === undefined || enumMap === undefined) {\n\t\t\tthrow new Error(\"FaTableColumn 必须在 FaTable 内部渲染。\");\n\t\t}\n\n\t\tconst columnCtx = computed(() => props as FaTableColumnCtx);\n\n\t\t/** 获取ClassName */\n\t\tconst getClassName = () => {\n\t\t\tlet className = \"\";\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\tif (props.dateFix) {\n\t\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (props.className) {\n\t\t\t\treturn `${className} ${props.className}`;\n\t\t\t}\n\t\t\treturn className;\n\t\t};\n\n\t\t/** 获取宽度 */\n\t\tconst getWidth = (defAttr: string) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\tconst autoWidthEntry = tableState.autoColumnWidth.find((f) => f.prop === props.prop);\n\t\t\t\treturn autoWidthEntry ? `${autoWidthEntry.width}px` : \"auto\";\n\t\t\t}\n\t\t\tif (globalSize.value === \"small\") {\n\t\t\t\treturn props.smallWidth || props.width || props.minWidth || defAttr;\n\t\t\t}\n\t\t\treturn props.width || props.minWidth || defAttr;\n\t\t};\n\n\t\t/** 表头自动宽度渲染 */\n\t\tconst autoWidthHeaderRender = (el: VNode[]) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [\n\t\t\t\t\t<div class={[\"fa-table__auto-width-column__cell-header\", `__fa-table__auto-width-column__cell-header__${props.prop}`]}>{el}</div>,\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 自动宽度渲染 */\n\t\tconst autoWidthRender = (el: VNode[]) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [<div class={[\"fa-table__auto-width-column__cell\", `__fa-table__auto-width-column__cell__${props.prop}`]}>{el}</div>];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 表头渲染 */\n\t\tconst headerRender = ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\tif (props.headerRender) {\n\t\t\t\treturn autoWidthHeaderRender(props.headerRender({ column, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t} else if (props.headerSlot) {\n\t\t\t\treturn autoWidthHeaderRender(slots[props.headerSlot]?.({ column, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t} else {\n\t\t\t\treturn autoWidthHeaderRender([<span>{props.label}</span>]);\n\t\t\t}\n\t\t};\n\n\t\t/** 复制渲染 */\n\t\tconst displayText = (value: unknown) => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") return String(value);\n\t\t\treturn \"\";\n\t\t};\n\n\t\tconst copyRender = (value: unknown, copy?: boolean) => {\n\t\t\tif (!(props.copy || copy) || !value) return [];\n\n\t\t\treturn [\n\t\t\t\t<ElIcon\n\t\t\t\t\tclass=\"fa__copy-icon\"\n\t\t\t\t\ttitle=\"复制\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tcopyToClipboard(displayText(value)).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<CopyDocument />\n\t\t\t\t</ElIcon>,\n\t\t\t];\n\t\t};\n\n\t\t/** 渲染单元格数据 */\n\t\tconst renderCellData = ({ row }: { row: DefaultRow }) => {\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (typeof props.enum === \"string\") {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (Array.isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (typeof props.enum === \"function\") {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tif (enumData) {\n\t\t\t\treturn tableUtil.filterEnum(cellValue, enumData);\n\t\t\t} else {\n\t\t\t\treturn tableUtil.formatValue(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 格式化渲染 */\n\t\tconst formatterRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, cellValue: unknown, index: number) => {\n\t\t\tconst formatter = column.formatter as TableColumnCtx<DefaultRow>[\"formatter\"] | null | undefined;\n\t\t\tif (formatter) {\n\t\t\t\treturn formatter(row, column, cellValue, index);\n\t\t\t} else {\n\t\t\t\treturn displayText(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 时间信息列渲染 */\n\t\tconst timeInfoRender = (row: DefaultRow, _column: TableColumnCtx<DefaultRow>, _$index: number) => {\n\t\t\tconst userName = displayText(row[props.timeInfoField.userName ?? \"createdUserName\"]);\n\t\t\tconst time = displayText(row[props.timeInfoField.time ?? \"createdTime\"]);\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t<div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\" title={time}>\n\t\t\t\t\t\t{userName && <span style=\"margin-right: 5px;\">{userName}</span>}\n\t\t\t\t\t\t<span>{time}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{time && (\n\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t{formatChineseRelativeTime(time)}\n\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 标签列渲染 */\n\t\tconst tagRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst renderValue = formatterRender(row, column, renderCellData({ row }), $index);\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (typeof props.enum === \"string\") {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (Array.isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (typeof props.enum === \"function\") {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tconst enumValue: unknown = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst type = enumData?.find((item) => item.value === enumValue)?.type ?? \"info\";\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue ? <ElTag type={type}>{renderValue}</ElTag> : null}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 时间列渲染 */\n\t\tconst dateRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tlet dateFormat;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"date\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"time\":\n\t\t\t\t\tdateFormat = \"HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dateTime\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"default\":\n\t\t\t\tcase \"index\":\n\t\t\t\tcase \"selection\":\n\t\t\t\tcase \"expand\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"d2\":\n\t\t\t\tcase \"d4\":\n\t\t\t\tcase \"d6\":\n\t\t\t\tcase \"gd2\":\n\t\t\t\tcase \"gd4\":\n\t\t\t\tcase \"gd6\":\n\t\t\t\tcase \"timeInfo\":\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst renderValue = cellValue\n\t\t\t\t? formatterRender(row, column, dayjs(cellValue as Parameters<typeof dayjs>[0]).format(props.dateFormat ?? dateFormat), $index)\n\t\t\t\t: null;\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t\t{props.dateFix && renderValue && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t\t{formatChineseRelativeTime(displayText(renderValue))}\n\t\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 数值列渲染 */\n\t\tconst numberRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tif (!cellValue || typeof cellValue !== \"number\") {\n\t\t\t\treturn [<Fragment>{formatterRender(row, column, cellValue, $index)}</Fragment>];\n\t\t\t}\n\t\t\tlet useGrouping = false;\n\t\t\tlet maximumFractionDigits = 2;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"d2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"default\":\n\t\t\t\tcase \"index\":\n\t\t\t\tcase \"selection\":\n\t\t\t\tcase \"expand\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"date\":\n\t\t\t\tcase \"time\":\n\t\t\t\tcase \"dateTime\":\n\t\t\t\tcase \"timeInfo\":\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{formatterRender(\n\t\t\t\t\t\trow,\n\t\t\t\t\t\tcolumn,\n\t\t\t\t\t\tcellValue.toLocaleString(\"zh-CN\", {\n\t\t\t\t\t\t\tminimumFractionDigits: 2,\n\t\t\t\t\t\t\tmaximumFractionDigits,\n\t\t\t\t\t\t\tuseGrouping,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t$index\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 链接列渲染 */\n\t\tconst linkRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst renderValue = formatterRender(row, column, cellValue, $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue && (\n\t\t\t\t\t\t<ElText\n\t\t\t\t\t\t\tclass={\"el-link is-hover-underline fa-table__link-column__text\"}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t// 数据删除拦截点击\n\t\t\t\t\t\t\t\tif (props.dataDeleteField && row[props.dataDeleteField] === true) return;\n\t\t\t\t\t\t\t\tif (props.click) {\n\t\t\t\t\t\t\t\t\tprops.click({ row, $index, ...getTableDefaultSlots(tableState) });\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\temit(\"customCellClick\", props.clickEmit ?? \"\", {\n\t\t\t\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\t\t\t\tcolumn: columnCtx.value,\n\t\t\t\t\t\t\t\t\t\t$index,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderValue}\n\t\t\t\t\t\t</ElText>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst defaultRender = ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\treturn timeInfoRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.tag) {\n\t\t\t\treturn tagRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\treturn dateRender(row, column, $index);\n\t\t\t}\n\t\t\tif (\n\t\t\t\tprops.type === \"d2\" ||\n\t\t\t\tprops.type === \"d4\" ||\n\t\t\t\tprops.type === \"d6\" ||\n\t\t\t\tprops.type === \"gd2\" ||\n\t\t\t\tprops.type === \"gd4\" ||\n\t\t\t\tprops.type === \"gd6\"\n\t\t\t) {\n\t\t\t\treturn numberRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.link) {\n\t\t\t\treturn linkRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.render) {\n\t\t\t\treturn autoWidthRender(props.render({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t}\n\t\t\tif (props.slot) {\n\t\t\t\treturn autoWidthRender(slots[props.slot]?.({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t}\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst renderValue = formatterRender(row, column, cellValue, $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst elTableColumnProps = useProps(props, tableColumnProps, [\n\t\t\t\"type\",\n\t\t\t\"width\",\n\t\t\t\"minWidth\",\n\t\t\t\"sortable\",\n\t\t\t\"sortOrders\",\n\t\t\t\"resizable\",\n\t\t\t\"showOverflowTooltip\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<Fragment>\n\t\t\t\t{\n\t\t\t\t\t// 如果有配置多级表头的数据,则递归该组件\n\t\t\t\t\tprops._children?.length ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\t\t\t(props._children ?? []).map((col: FaTableColumnCtx) =>\n\t\t\t\t\t\t\t\t\t\th(\n\t\t\t\t\t\t\t\t\t\t\tresolveComponent(\"FaTableColumn\"),\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t...col,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tslots\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : props.type === \"image\" ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tclassName=\"fa-table__image-column\"\n\t\t\t\t\t\t\tminWidth=\"50px\"\n\t\t\t\t\t\t\tsortable={false}\n\t\t\t\t\t\t\tresizable={false}\n\t\t\t\t\t\t\tshowOverflowTooltip={false}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\t\t\t\t\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\t\t\t\t\t\t\tconst renderValue = displayText(cellValue);\n\t\t\t\t\t\t\t\t\treturn renderValue ? (\n\t\t\t\t\t\t\t\t\t\tprops.hideImage ? (\n\t\t\t\t\t\t\t\t\t\t\t<ElImage\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tlazy\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={artwork}\n\t\t\t\t\t\t\t\t\t\t\t\tfit=\"cover\"\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewSrcList={[renderValue]}\n\t\t\t\t\t\t\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\t\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewTeleported\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<FaImage lazy src={renderValue} fit=\"cover\" original={props.originalImage} thumb />\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<ElImage class=\"fa-image\" lazy src={notImage} fit=\"cover\" />\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// 其他正常的列\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\ttype={props.type === \"selection\" || props.type === \"index\" || props.type === \"expand\" ? props.type : \"default\"}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.header\n\t\t\t\t\t\t\t\t\t\t? slots.header({ column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: headerRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.default\n\t\t\t\t\t\t\t\t\t\t? slots.default({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: defaultRender({ row, column, $index }),\n\t\t\t\t\t\t\t\tfilterIcon: ({ filterOpened }: { filterOpened: boolean }) =>\n\t\t\t\t\t\t\t\t\tslots.filterIcon?.({ filterOpened, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t\texpand: ({ expanded }: { expanded: boolean })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U;GAAE,CAAC,IACrF,aAAa;IAAE;IAAQ;GAAO,CAAC;GACnC,UAAU,EAAE,KAAK,QAAQ,aACxB,MAAM,UACH,MAAM,QAAQ;IAAE;IAAK,QAAQ,UAAU;IAAO;IAAQ,GAAG,qBAAqB,UAAU;GAAE,CAAC,IAC3F,cAAc;IAAE;IAAK;IAAQ;GAAO,CAAC;GACzC,aAAa,EAAE,mBACd,MAAM,aAAa;IAAE;IAAc,GAAG,qBAAqB,UAAU;GAAE,CAAC;GACzE,SAAS,EAAE,eAAsC,MAAM,SAAS;IAAE;IAAU,GAAG,qBAAqB,UAAU;GAAE,CAAC;EAAC,CAAA,CAGpH,CAAA,CAGH;CACF;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"tableColumn.mjs","names":[],"sources":["../../../../src/components/table/src/tableColumn.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, h, inject, resolveComponent } from \"vue\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElImage, ElMessage, ElTableColumn, ElTag, ElText, dayjs, useGlobalSize } from \"element-plus\";\nimport { tableColumnProps } from \"../../../internal/props\";\nimport { copy as copyToClipboard, definePropType, formatChineseRelativeTime, makeSlots, useProps, useRender } from \"../../../utils\";\nimport FaImage from \"../../image\";\nimport artwork from \"../images/artwork.png\";\nimport notImage from \"../images/notImage.png\";\nimport { tableUtil } from \"../utils/table\";\nimport { getTableDefaultSlots } from \"./table.type\";\nimport { enumMapKey, tableStateKey } from \"./useTable\";\nimport type { TableColumnCtx } from \"element-plus\";\nimport type { VNode } from \"vue\";\nimport type { DefaultRow } from \"./table.state\";\nimport type {\n\tFaTableColumnCtx,\n\tFaTableColumnDateFormat,\n\tFaTableColumnType,\n\tFaTableDefaultSlotsResult,\n\tFaTableEnumColumnCtx,\n\tFaTableEnumColumnType,\n} from \"./table.type\";\n\nexport { tableColumnProps } from \"../../../internal/props\";\n\n/** FaTableColumn 插槽返回的行列上下文 */\nexport interface FaTableColumnSlotsResult {\n\t/** slots为表格内容的时候才会返回 */\n\trow?: DefaultRow;\n\t/** slot为表头内容的时候返回 'TableColumnCtx<DefaultRow>' 否则返回 'FaTableColumnCtx' */\n\tcolumn?: TableColumnCtx<DefaultRow> | FaTableColumnCtx;\n\t$index?: number;\n}\n\ntype FaTableColumnDefaultSlots = Record<string, FaTableDefaultSlotsResult & FaTableColumnSlotsResult>;\n\n/** FaTableColumn 的固定插槽和动态命名插槽。 */\nexport type FaTableColumnSlots = Record<string, unknown> & {\n\t/** 默认内容插槽 */\n\tdefault: FaTableDefaultSlotsResult & { row: DefaultRow; column: FaTableColumnCtx; $index: number };\n\t/** 自定义表头的内容 */\n\theader: FaTableDefaultSlotsResult & { column: FaTableColumnCtx; $index: number };\n\t/** 自定义 filter 图标 */\n\tfilterIcon: FaTableDefaultSlotsResult & { filterOpened: boolean };\n\t/** 展开列的自定义内容 */\n\texpand: FaTableDefaultSlotsResult & { expanded: boolean };\n} & FaTableColumnDefaultSlots;\n\nexport default defineComponent({\n\tname: \"FaTableColumn\",\n\tprops: {\n\t\t...tableColumnProps,\n\t\t/**\n\t\t * type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n\t\t */\n\t\ttype: {\n\t\t\ttype: definePropType<FaTableColumnType>(String),\n\t\t\tdefault: \"default\",\n\t\t},\n\t\t/**\n\t\t * column width\n\t\t */\n\t\twidth: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: \"auto\",\n\t\t},\n\t\t/** alignment, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\talign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\theaderAlign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** 是否显示在表格当中 */\n\t\tshow: Boolean,\n\t\t/** 小页面的宽度,如果为空,则继承默认宽度 */\n\t\tsmallWidth: {\n\t\t\ttype: [String, Number],\n\t\t},\n\t\t/** 自适应宽度 */\n\t\tautoWidth: Boolean,\n\t\t/** 插槽名称 */\n\t\tslot: String,\n\t\t/** 表格头部插槽名称 */\n\t\theaderSlot: String,\n\t\t/** 自定义表头内容渲染(tsx语法) */\n\t\theaderRender: {\n\t\t\ttype: definePropType<({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number } & FaTableDefaultSlotsResult) => VNode[]>(\n\t\t\t\tFunction\n\t\t\t),\n\t\t},\n\t\t/** 自定义单元格内容渲染(tsx语法) */\n\t\trender: {\n\t\t\ttype: definePropType<\n\t\t\t\t({ row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number } & FaTableDefaultSlotsResult) => VNode[]\n\t\t\t>(Function),\n\t\t},\n\t\t/** 多级表头 */\n\t\t_children: {\n\t\t\ttype: definePropType<FaTableColumnCtx[]>(Array),\n\t\t},\n\t\t/** 隐藏图片 */\n\t\thideImage: Boolean,\n\t\t/** 复制 */\n\t\tcopy: Boolean,\n\t\t/** 是否为 Link Button */\n\t\tlink: Boolean,\n\t\t/** 合并行字段 */\n\t\tspanProp: String,\n\t\t/** Link 按钮的点击事件,优先级最高 */\n\t\tclick: {\n\t\t\ttype: definePropType<({ row, $index }: { row: DefaultRow; $index?: number } & FaTableDefaultSlotsResult) => void>(Function),\n\t\t},\n\t\t/** 点击Emits事件回调 */\n\t\tclickEmit: String,\n\t\t/** 图片列是否显示为原图,默认 false 显示缩略图 */\n\t\toriginalImage: Boolean,\n\t\t/** 显示时间格式化字符串 */\n\t\tdateFix: Boolean,\n\t\t/** 显示在页面中的日期格式 */\n\t\tdateFormat: {\n\t\t\ttype: definePropType<FaTableColumnDateFormat>(String),\n\t\t},\n\t\t/** 是否是标签展示 */\n\t\ttag: Boolean,\n\t\t/** 枚举类型(渲染值的字典) */\n\t\tenum: {\n\t\t\ttype: definePropType<FaTableEnumColumnType>([String, Array, Function]),\n\t\t},\n\t\t/** 数据删除字段,如果为 true 会显示遮罩层 */\n\t\tdataDeleteField: String,\n\t\t/** 时间信息字段 */\n\t\ttimeInfoField: {\n\t\t\ttype: definePropType<{ userName?: string; time?: string }>(Object),\n\t\t\tdefault: () => ({\n\t\t\t\tuserName: \"createdUserName\",\n\t\t\t\ttime: \"createdTime\",\n\t\t\t}),\n\t\t},\n\t},\n\temits: {\n\t\t/** 图片预览 */\n\t\timagePreview: (url: string) => typeof url === \"string\",\n\t\t/** 自定义单元格点击事件 */\n\t\tcustomCellClick: (emitName: string, { row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number }) =>\n\t\t\t(emitName == null || typeof emitName === \"string\") &&\n\t\t\ttypeof row === \"object\" &&\n\t\t\trow !== null &&\n\t\t\ttypeof column === \"object\" &&\n\t\t\tcolumn !== null &&\n\t\t\ttypeof $index === \"number\",\n\t},\n\tslots: makeSlots<FaTableColumnSlots>(),\n\tsetup(props, { slots, emit }) {\n\t\tconst globalSize = useGlobalSize();\n\t\tconst tableState = inject(tableStateKey);\n\t\tconst enumMap = inject(enumMapKey);\n\t\tif (tableState === undefined || enumMap === undefined) {\n\t\t\tthrow new Error(\"FaTableColumn 必须在 FaTable 内部渲染。\");\n\t\t}\n\n\t\tconst columnCtx = computed(() => props as FaTableColumnCtx);\n\n\t\t/** 获取ClassName */\n\t\tconst getClassName = () => {\n\t\t\tlet className = \"\";\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\tif (props.dateFix) {\n\t\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (props.className) {\n\t\t\t\treturn `${className} ${props.className}`;\n\t\t\t}\n\t\t\treturn className;\n\t\t};\n\n\t\t/** 获取宽度 */\n\t\tconst getWidth = (defAttr: string) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\tconst autoWidthEntry = tableState.autoColumnWidth.find((f) => f.prop === props.prop);\n\t\t\t\treturn autoWidthEntry ? `${autoWidthEntry.width}px` : \"auto\";\n\t\t\t}\n\t\t\tif (globalSize.value === \"small\") {\n\t\t\t\treturn props.smallWidth || props.width || props.minWidth || defAttr;\n\t\t\t}\n\t\t\treturn props.width || props.minWidth || defAttr;\n\t\t};\n\n\t\t/** 表头自动宽度渲染 */\n\t\tconst autoWidthHeaderRender = (el: VNode[]) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [\n\t\t\t\t\t<div class={[\"fa-table__auto-width-column__cell-header\", `__fa-table__auto-width-column__cell-header__${props.prop}`]}>{el}</div>,\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 自动宽度渲染 */\n\t\tconst autoWidthRender = (el: VNode[]) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [<div class={[\"fa-table__auto-width-column__cell\", `__fa-table__auto-width-column__cell__${props.prop}`]}>{el}</div>];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 表头渲染 */\n\t\tconst headerRender = ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\tif (props.headerRender) {\n\t\t\t\treturn autoWidthHeaderRender(props.headerRender({ column, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t} else if (props.headerSlot) {\n\t\t\t\treturn autoWidthHeaderRender(slots[props.headerSlot]?.({ column, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t} else {\n\t\t\t\treturn autoWidthHeaderRender([<span>{props.label}</span>]);\n\t\t\t}\n\t\t};\n\n\t\t/** 复制渲染 */\n\t\tconst displayText = (value: unknown) => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") return String(value);\n\t\t\treturn \"\";\n\t\t};\n\n\t\tconst copyRender = (value: unknown, copy?: boolean) => {\n\t\t\tif (!(props.copy || copy) || !value) return [];\n\n\t\t\treturn [\n\t\t\t\t<ElIcon\n\t\t\t\t\tclass=\"fa__copy-icon\"\n\t\t\t\t\ttitle=\"复制\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tcopyToClipboard(displayText(value)).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<CopyDocument />\n\t\t\t\t</ElIcon>,\n\t\t\t];\n\t\t};\n\n\t\t/** 渲染单元格数据 */\n\t\tconst renderCellData = ({ row }: { row: DefaultRow }) => {\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (typeof props.enum === \"string\") {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (Array.isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (typeof props.enum === \"function\") {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tif (enumData) {\n\t\t\t\treturn tableUtil.filterEnum(cellValue, enumData);\n\t\t\t} else {\n\t\t\t\treturn tableUtil.formatValue(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 格式化渲染 */\n\t\tconst formatterRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, cellValue: unknown, index: number) => {\n\t\t\tconst formatter = column.formatter as TableColumnCtx<DefaultRow>[\"formatter\"] | null | undefined;\n\t\t\tif (formatter) {\n\t\t\t\treturn formatter(row, column, cellValue, index);\n\t\t\t} else {\n\t\t\t\treturn displayText(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 时间信息列渲染 */\n\t\tconst timeInfoRender = (row: DefaultRow, _column: TableColumnCtx<DefaultRow>, _$index: number) => {\n\t\t\tconst userName = displayText(row[props.timeInfoField.userName ?? \"createdUserName\"]);\n\t\t\tconst time = displayText(row[props.timeInfoField.time ?? \"createdTime\"]);\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t<div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\" title={time}>\n\t\t\t\t\t\t{userName && <span style=\"margin-right: 5px;\">{userName}</span>}\n\t\t\t\t\t\t<span>{time}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{time && (\n\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t{formatChineseRelativeTime(time)}\n\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 标签列渲染 */\n\t\tconst tagRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst renderValue = formatterRender(row, column, renderCellData({ row }), $index);\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (typeof props.enum === \"string\") {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (Array.isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (typeof props.enum === \"function\") {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tconst enumValue: unknown = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst type = enumData?.find((item) => item.value === enumValue)?.type ?? \"info\";\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue ? <ElTag type={type}>{renderValue}</ElTag> : null}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 时间列渲染 */\n\t\tconst dateRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tlet dateFormat;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"date\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"time\":\n\t\t\t\t\tdateFormat = \"HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dateTime\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"default\":\n\t\t\t\tcase \"index\":\n\t\t\t\tcase \"selection\":\n\t\t\t\tcase \"expand\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"d2\":\n\t\t\t\tcase \"d4\":\n\t\t\t\tcase \"d6\":\n\t\t\t\tcase \"gd2\":\n\t\t\t\tcase \"gd4\":\n\t\t\t\tcase \"gd6\":\n\t\t\t\tcase \"timeInfo\":\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst renderValue = cellValue\n\t\t\t\t? formatterRender(row, column, dayjs(cellValue as Parameters<typeof dayjs>[0]).format(props.dateFormat ?? dateFormat), $index)\n\t\t\t\t: null;\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t\t{props.dateFix && renderValue && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t\t{formatChineseRelativeTime(displayText(renderValue))}\n\t\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 数值列渲染 */\n\t\tconst numberRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tif (!cellValue || typeof cellValue !== \"number\") {\n\t\t\t\treturn [<Fragment>{formatterRender(row, column, cellValue, $index)}</Fragment>];\n\t\t\t}\n\t\t\tlet useGrouping = false;\n\t\t\tlet maximumFractionDigits = 2;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"d2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"default\":\n\t\t\t\tcase \"index\":\n\t\t\t\tcase \"selection\":\n\t\t\t\tcase \"expand\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"date\":\n\t\t\t\tcase \"time\":\n\t\t\t\tcase \"dateTime\":\n\t\t\t\tcase \"timeInfo\":\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{formatterRender(\n\t\t\t\t\t\trow,\n\t\t\t\t\t\tcolumn,\n\t\t\t\t\t\tcellValue.toLocaleString(\"zh-CN\", {\n\t\t\t\t\t\t\tminimumFractionDigits: 2,\n\t\t\t\t\t\t\tmaximumFractionDigits,\n\t\t\t\t\t\t\tuseGrouping,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t$index\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 链接列渲染 */\n\t\tconst linkRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst renderValue = formatterRender(row, column, cellValue, $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue && (\n\t\t\t\t\t\t<ElText\n\t\t\t\t\t\t\tclass={\"el-link is-hover-underline fa-table__link-column__text\"}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t// 数据删除拦截点击\n\t\t\t\t\t\t\t\tif (props.dataDeleteField && row[props.dataDeleteField] === true) return;\n\t\t\t\t\t\t\t\tif (props.click) {\n\t\t\t\t\t\t\t\t\tprops.click({ row, $index, ...getTableDefaultSlots(tableState) });\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\temit(\"customCellClick\", props.clickEmit ?? \"\", {\n\t\t\t\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\t\t\t\tcolumn: columnCtx.value,\n\t\t\t\t\t\t\t\t\t\t$index,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderValue}\n\t\t\t\t\t\t</ElText>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst defaultRender = ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\treturn timeInfoRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.tag) {\n\t\t\t\treturn tagRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\treturn dateRender(row, column, $index);\n\t\t\t}\n\t\t\tif (\n\t\t\t\tprops.type === \"d2\" ||\n\t\t\t\tprops.type === \"d4\" ||\n\t\t\t\tprops.type === \"d6\" ||\n\t\t\t\tprops.type === \"gd2\" ||\n\t\t\t\tprops.type === \"gd4\" ||\n\t\t\t\tprops.type === \"gd6\"\n\t\t\t) {\n\t\t\t\treturn numberRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.link) {\n\t\t\t\treturn linkRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.render) {\n\t\t\t\treturn autoWidthRender(props.render({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t}\n\t\t\tif (props.slot) {\n\t\t\t\treturn autoWidthRender(slots[props.slot]?.({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t}\n\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst renderValue = formatterRender(row, column, cellValue, $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst elTableColumnProps = useProps(props, tableColumnProps, [\n\t\t\t\"type\",\n\t\t\t\"width\",\n\t\t\t\"minWidth\",\n\t\t\t\"sortable\",\n\t\t\t\"sortOrders\",\n\t\t\t\"resizable\",\n\t\t\t\"showOverflowTooltip\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<Fragment>\n\t\t\t\t{\n\t\t\t\t\t// 如果有配置多级表头的数据,则递归该组件\n\t\t\t\t\tprops._children?.length ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\t\t\t(props._children ?? []).map((col: FaTableColumnCtx) =>\n\t\t\t\t\t\t\t\t\t\th(\n\t\t\t\t\t\t\t\t\t\t\tresolveComponent(\"FaTableColumn\"),\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t...col,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tslots\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : props.type === \"image\" ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tclassName=\"fa-table__image-column\"\n\t\t\t\t\t\t\tminWidth=\"50px\"\n\t\t\t\t\t\t\tsortable={false}\n\t\t\t\t\t\t\tresizable={false}\n\t\t\t\t\t\t\tshowOverflowTooltip={false}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\t\t\t\t\t\t\tconst cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\t\t\t\t\t\t\tconst renderValue = displayText(cellValue);\n\t\t\t\t\t\t\t\t\treturn renderValue ? (\n\t\t\t\t\t\t\t\t\t\tprops.hideImage ? (\n\t\t\t\t\t\t\t\t\t\t\t<ElImage\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tlazy\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={artwork}\n\t\t\t\t\t\t\t\t\t\t\t\tfit=\"cover\"\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewSrcList={[renderValue]}\n\t\t\t\t\t\t\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\t\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewTeleported\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<FaImage lazy src={renderValue} fit=\"cover\" original={props.originalImage} thumb />\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<ElImage class=\"fa-image\" lazy src={notImage} fit=\"cover\" />\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// 其他正常的列\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\ttype={props.type === \"selection\" || props.type === \"index\" || props.type === \"expand\" ? props.type : \"default\"}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.header\n\t\t\t\t\t\t\t\t\t\t? slots.header({ column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: headerRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.default\n\t\t\t\t\t\t\t\t\t\t? slots.default({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: defaultRender({ row, column, $index }),\n\t\t\t\t\t\t\t\tfilterIcon: ({ filterOpened }: { filterOpened: boolean }) =>\n\t\t\t\t\t\t\t\t\tslots.filterIcon?.({ filterOpened, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t\texpand: ({ expanded }: { expanded: boolean }) => slots.expand?.({ expanded, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Fragment>\n\t\t));\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAqBsB,SAAA,QAAA,GAAA;CAAA,OAA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AO,CAAC;GACzC,aAAa,EAAE,mBACd,MAAM,aAAa;IAAE;IAAc,GAAG,qBAAqB,UAAU;GAAE,CAAC;GACzE,SAAS,EAAE,eAAsC,MAAM,SAAS;IAAE;IAAU,GAAG,qBAAqB,UAAU;GAAE,CAAC;EAAC,CAAA,CAGpH,CAAA,CAGH;CACF;AACD,CAAC"}
|
|
@@ -6,42 +6,45 @@ import type { FaTableColumnCtx, FaTableEnumColumnCtx, FaTableEnumColumnType } fr
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const tableUtil: {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param
|
|
9
|
+
* 将非空数组连接为逗号分隔的文本,空数组返回 null;其他值原样返回。
|
|
10
|
+
* @param callValue - 需要处理的值
|
|
11
11
|
*/
|
|
12
12
|
formatValue(callValue: unknown): unknown;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
14
|
+
* 按点分隔的属性路径读取行数据,例如 user.name。
|
|
15
|
+
* @param row - 当前行数据
|
|
16
|
+
* @param prop - 当前 prop
|
|
17
|
+
* @returns 目标属性值;中间节点不是对象或属性不存在时返回 undefined。
|
|
17
18
|
*/
|
|
18
19
|
handleRowAccordingToProp(row: DefaultRow, prop: string): unknown;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @param
|
|
21
|
+
* 返回点分隔属性路径的最后一级名称。
|
|
22
|
+
* @param prop - 当前 prop
|
|
22
23
|
*/
|
|
23
24
|
handleProp(prop: string): string;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
26
|
+
* 按值匹配枚举项,并读取指定的标签字段或 Tag 类型。
|
|
27
|
+
* @param callValue - 当前单元格值
|
|
28
|
+
* @param enumData - 字典列表
|
|
29
|
+
* @param fieldNames - 标签与值的字段名
|
|
30
|
+
* @param type - 过滤类型(目前只有 tag)
|
|
31
|
+
* @returns 匹配项的标签;未匹配时返回 null。查询 Tag 类型时默认返回 info。
|
|
30
32
|
*/
|
|
31
33
|
filterEnum(callValue: unknown, enumData: FaTableEnumColumnCtx[], fieldNames?: {
|
|
32
34
|
label: string;
|
|
33
35
|
value: string;
|
|
34
36
|
}, type?: "tag"): unknown;
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
38
|
+
* 创建按排序条件依次比较行数据的函数,支持点分隔的属性路径。
|
|
37
39
|
*/
|
|
38
40
|
arrayDynamicSort(sortList: PagedSortInput[]): (a: DefaultRow, b: DefaultRow) => number;
|
|
39
41
|
/**
|
|
40
|
-
*
|
|
42
|
+
* 将静态枚举或同步枚举函数的返回值存入映射。
|
|
41
43
|
*/
|
|
42
44
|
setEnumMap(columnEnum: FaTableEnumColumnType, prop: string, enumMap: Map<string, FaTableEnumColumnCtx[]>): void;
|
|
43
45
|
/**
|
|
44
|
-
*
|
|
46
|
+
* 收集叶子列,并补齐列的 show 默认值与枚举映射。
|
|
47
|
+
* @remarks 会修改传入列的 show 属性;嵌套子列不继承本次枚举映射参数。
|
|
45
48
|
*/
|
|
46
49
|
flatColumns(columns: FaTableColumnCtx[], enumMap?: Map<string, FaTableEnumColumnCtx[]>): FaTableColumnCtx[];
|
|
47
50
|
};
|