@vtable-guild/vtable-guild 2.0.4 → 2.0.6
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/css/index.css +97 -0
- package/css/presets/antdv.css +179 -0
- package/css/presets/element-plus.css +191 -0
- package/css/tokens.css +34 -0
- package/css/transitions.css +21 -0
- package/dist/core/src/components/Button.d.ts +127 -0
- package/dist/core/src/components/Button.d.ts.map +1 -0
- package/dist/core/src/components/Checkbox.d.ts +95 -0
- package/dist/core/src/components/Checkbox.d.ts.map +1 -0
- package/dist/core/src/components/Input.d.ts +106 -0
- package/dist/core/src/components/Input.d.ts.map +1 -0
- package/dist/core/src/components/Radio.d.ts +80 -0
- package/dist/core/src/components/Radio.d.ts.map +1 -0
- package/dist/core/src/components/Scrollbar.d.ts +135 -0
- package/dist/core/src/components/Scrollbar.d.ts.map +1 -0
- package/dist/core/src/components/ScrollbarBar.d.ts +78 -0
- package/dist/core/src/components/ScrollbarBar.d.ts.map +1 -0
- package/dist/core/src/components/Tooltip.d.ts +129 -0
- package/dist/core/src/components/Tooltip.d.ts.map +1 -0
- package/dist/core/src/components/VTableGuildConfigProvider.d.ts +46 -0
- package/dist/core/src/components/VTableGuildConfigProvider.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/Filler.d.ts +32 -0
- package/dist/core/src/components/VirtualList/Filler.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/Item.d.ts +16 -0
- package/dist/core/src/components/VirtualList/Item.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/VirtualList.d.ts +131 -0
- package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/VirtualScrollBar.d.ts +130 -0
- package/dist/core/src/components/VirtualList/VirtualScrollBar.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts +11 -0
- package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.d.ts +4 -0
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useFrameWheel.d.ts +5 -0
- package/dist/core/src/components/VirtualList/hooks/useFrameWheel.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts +5 -0
- package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts +10 -0
- package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.d.ts +3 -0
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useOriginScroll.d.ts +3 -0
- package/dist/core/src/components/VirtualList/hooks/useOriginScroll.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollDrag.d.ts +5 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollDrag.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts +13 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/index.d.ts +7 -0
- package/dist/core/src/components/VirtualList/index.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/interface.d.ts +24 -0
- package/dist/core/src/components/VirtualList/interface.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/utils/CacheMap.d.ts +12 -0
- package/dist/core/src/components/VirtualList/utils/CacheMap.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.d.ts +7 -0
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/utils/isFirefox.d.ts +3 -0
- package/dist/core/src/components/VirtualList/utils/isFirefox.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/utils/scrollbarUtil.d.ts +2 -0
- package/dist/core/src/components/VirtualList/utils/scrollbarUtil.d.ts.map +1 -0
- package/dist/core/src/composables/useScrollbar.d.ts +24 -0
- package/dist/core/src/composables/useScrollbar.d.ts.map +1 -0
- package/dist/core/src/composables/useTheme.d.ts +53 -0
- package/dist/core/src/composables/useTheme.d.ts.map +1 -0
- package/dist/core/src/composables/useTheme.test.d.ts +2 -0
- package/dist/core/src/composables/useTheme.test.d.ts.map +1 -0
- package/dist/core/src/index.d.ts +36 -0
- package/dist/core/src/index.d.ts.map +1 -0
- package/dist/core/src/plugin/index.d.ts +35 -0
- package/dist/core/src/plugin/index.d.ts.map +1 -0
- package/dist/core/src/plugin/index.test.d.ts +7 -0
- package/dist/core/src/plugin/index.test.d.ts.map +1 -0
- package/dist/core/src/utils/mergeDeep.d.ts +3 -0
- package/dist/core/src/utils/mergeDeep.d.ts.map +1 -0
- package/dist/core/src/utils/props.d.ts +41 -0
- package/dist/core/src/utils/props.d.ts.map +1 -0
- package/dist/core/src/utils/tv.d.ts +40 -0
- package/dist/core/src/utils/tv.d.ts.map +1 -0
- package/dist/core/src/utils/types.d.ts +155 -0
- package/dist/core/src/utils/types.d.ts.map +1 -0
- package/dist/css/tokens.css +5 -4
- package/dist/icons/src/AntdvEmptyIcon.d.ts +3 -0
- package/dist/icons/src/AntdvEmptyIcon.d.ts.map +1 -0
- package/dist/icons/src/AntdvSpinIndicator.d.ts +3 -0
- package/dist/icons/src/AntdvSpinIndicator.d.ts.map +1 -0
- package/dist/icons/src/CaretDownIcon.d.ts +3 -0
- package/dist/icons/src/CaretDownIcon.d.ts.map +1 -0
- package/dist/icons/src/CaretRightIcon.d.ts +3 -0
- package/dist/icons/src/CaretRightIcon.d.ts.map +1 -0
- package/dist/icons/src/CaretUpIcon.d.ts +3 -0
- package/dist/icons/src/CaretUpIcon.d.ts.map +1 -0
- package/dist/icons/src/DownOutlinedIcon.d.ts +3 -0
- package/dist/icons/src/DownOutlinedIcon.d.ts.map +1 -0
- package/dist/icons/src/ElArrowDownIcon.d.ts +3 -0
- package/dist/icons/src/ElArrowDownIcon.d.ts.map +1 -0
- package/dist/icons/src/ElCaretBottomIcon.d.ts +3 -0
- package/dist/icons/src/ElCaretBottomIcon.d.ts.map +1 -0
- package/dist/icons/src/ElCaretTopIcon.d.ts +3 -0
- package/dist/icons/src/ElCaretTopIcon.d.ts.map +1 -0
- package/dist/icons/src/ElEmptyIcon.d.ts +3 -0
- package/dist/icons/src/ElEmptyIcon.d.ts.map +1 -0
- package/dist/icons/src/ElFilterIcon.d.ts +3 -0
- package/dist/icons/src/ElFilterIcon.d.ts.map +1 -0
- package/dist/icons/src/ElLoadingIcon.d.ts +3 -0
- package/dist/icons/src/ElLoadingIcon.d.ts.map +1 -0
- package/dist/icons/src/EmptyIcon.d.ts +3 -0
- package/dist/icons/src/EmptyIcon.d.ts.map +1 -0
- package/dist/icons/src/FilterFilledIcon.d.ts +3 -0
- package/dist/icons/src/FilterFilledIcon.d.ts.map +1 -0
- package/dist/icons/src/SearchIcon.d.ts +3 -0
- package/dist/icons/src/SearchIcon.d.ts.map +1 -0
- package/dist/icons/src/SpinIcon.d.ts +3 -0
- package/dist/icons/src/SpinIcon.d.ts.map +1 -0
- package/dist/icons/src/index.d.ts +17 -0
- package/dist/icons/src/index.d.ts.map +1 -0
- package/dist/index.d.ts +28 -2427
- package/dist/index.mjs +911 -908
- package/dist/table/src/components/ColGroup.d.ts +15 -0
- package/dist/table/src/components/ColGroup.d.ts.map +1 -0
- package/dist/table/src/components/ExpandIcon.d.ts +37 -0
- package/dist/table/src/components/ExpandIcon.d.ts.map +1 -0
- package/dist/table/src/components/FilterDropdown.d.ts +102 -0
- package/dist/table/src/components/FilterDropdown.d.ts.map +1 -0
- package/dist/table/src/components/FilterIcon.d.ts +24 -0
- package/dist/table/src/components/FilterIcon.d.ts.map +1 -0
- package/dist/table/src/components/ResizeHandle.d.ts +23 -0
- package/dist/table/src/components/ResizeHandle.d.ts.map +1 -0
- package/dist/table/src/components/SelectionCheckbox.d.ts +35 -0
- package/dist/table/src/components/SelectionCheckbox.d.ts.map +1 -0
- package/dist/table/src/components/SelectionDropdown.d.ts +62 -0
- package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -0
- package/dist/table/src/components/SelectionRadio.d.ts +26 -0
- package/dist/table/src/components/SelectionRadio.d.ts.map +1 -0
- package/dist/table/src/components/SortButton.d.ts +37 -0
- package/dist/table/src/components/SortButton.d.ts.map +1 -0
- package/dist/table/src/components/Table.d.ts +414 -0
- package/dist/table/src/components/Table.d.ts.map +1 -0
- package/dist/table/src/components/TableBody.d.ts +73 -0
- package/dist/table/src/components/TableBody.d.ts.map +1 -0
- package/dist/table/src/components/TableCell.d.ts +66 -0
- package/dist/table/src/components/TableCell.d.ts.map +1 -0
- package/dist/table/src/components/TableEmpty.d.ts +29 -0
- package/dist/table/src/components/TableEmpty.d.ts.map +1 -0
- package/dist/table/src/components/TableHeader.d.ts +47 -0
- package/dist/table/src/components/TableHeader.d.ts.map +1 -0
- package/dist/table/src/components/TableHeaderCell.d.ts +39 -0
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -0
- package/dist/table/src/components/TableLoading.d.ts +13 -0
- package/dist/table/src/components/TableLoading.d.ts.map +1 -0
- package/dist/table/src/components/TableRow.d.ts +28 -0
- package/dist/table/src/components/TableRow.d.ts.map +1 -0
- package/dist/table/src/components/VTable.test.d.ts +2 -0
- package/dist/table/src/components/VTable.test.d.ts.map +1 -0
- package/dist/table/src/components/VTable.vue.d.ts +18 -0
- package/dist/table/src/components/VTable.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableSummary.d.ts +85 -0
- package/dist/table/src/components/VTableSummary.d.ts.map +1 -0
- package/dist/table/src/components/VTableSummary.test.d.ts +2 -0
- package/dist/table/src/components/VTableSummary.test.d.ts.map +1 -0
- package/dist/table/src/components/VTableSummaryCell.d.ts +43 -0
- package/dist/table/src/components/VTableSummaryCell.d.ts.map +1 -0
- package/dist/table/src/components/VTableSummaryRow.d.ts +3 -0
- package/dist/table/src/components/VTableSummaryRow.d.ts.map +1 -0
- package/dist/table/src/components/VirtualTableBody.d.ts +130 -0
- package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -0
- package/dist/table/src/composables/index.d.ts +12 -0
- package/dist/table/src/composables/index.d.ts.map +1 -0
- package/dist/table/src/composables/useColumns.d.ts +38 -0
- package/dist/table/src/composables/useColumns.d.ts.map +1 -0
- package/dist/table/src/composables/useColumns.test.d.ts +2 -0
- package/dist/table/src/composables/useColumns.test.d.ts.map +1 -0
- package/dist/table/src/composables/useExpand.d.ts +14 -0
- package/dist/table/src/composables/useExpand.d.ts.map +1 -0
- package/dist/table/src/composables/useExpand.test.d.ts +2 -0
- package/dist/table/src/composables/useExpand.test.d.ts.map +1 -0
- package/dist/table/src/composables/useFilter.d.ts +24 -0
- package/dist/table/src/composables/useFilter.d.ts.map +1 -0
- package/dist/table/src/composables/useFilter.test.d.ts +2 -0
- package/dist/table/src/composables/useFilter.test.d.ts.map +1 -0
- package/dist/table/src/composables/useResize.d.ts +11 -0
- package/dist/table/src/composables/useResize.d.ts.map +1 -0
- package/dist/table/src/composables/useResize.test.d.ts +2 -0
- package/dist/table/src/composables/useResize.test.d.ts.map +1 -0
- package/dist/table/src/composables/useScroll.d.ts +31 -0
- package/dist/table/src/composables/useScroll.d.ts.map +1 -0
- package/dist/table/src/composables/useScroll.test.d.ts +2 -0
- package/dist/table/src/composables/useScroll.test.d.ts.map +1 -0
- package/dist/table/src/composables/useSelection.d.ts +27 -0
- package/dist/table/src/composables/useSelection.d.ts.map +1 -0
- package/dist/table/src/composables/useSelection.test.d.ts +2 -0
- package/dist/table/src/composables/useSelection.test.d.ts.map +1 -0
- package/dist/table/src/composables/useSorter.d.ts +33 -0
- package/dist/table/src/composables/useSorter.d.ts.map +1 -0
- package/dist/table/src/composables/useSorter.test.d.ts +2 -0
- package/dist/table/src/composables/useSorter.test.d.ts.map +1 -0
- package/dist/table/src/composables/useTreeData.d.ts +50 -0
- package/dist/table/src/composables/useTreeData.d.ts.map +1 -0
- package/dist/table/src/composables/useTreeData.test.d.ts +2 -0
- package/dist/table/src/composables/useTreeData.test.d.ts.map +1 -0
- package/dist/table/src/composables/useVirtual.d.ts +16 -0
- package/dist/table/src/composables/useVirtual.d.ts.map +1 -0
- package/dist/table/src/composables/useVirtual.test.d.ts +2 -0
- package/dist/table/src/composables/useVirtual.test.d.ts.map +1 -0
- package/dist/table/src/constants.d.ts +5 -0
- package/dist/table/src/constants.d.ts.map +1 -0
- package/dist/table/src/context.d.ts +216 -0
- package/dist/table/src/context.d.ts.map +1 -0
- package/dist/table/src/index.d.ts +191 -0
- package/dist/table/src/index.d.ts.map +1 -0
- package/dist/table/src/preset-config.d.ts +14 -0
- package/dist/table/src/preset-config.d.ts.map +1 -0
- package/dist/table/src/types/column.d.ts +224 -0
- package/dist/table/src/types/column.d.ts.map +1 -0
- package/dist/table/src/types/index.d.ts +7 -0
- package/dist/table/src/types/index.d.ts.map +1 -0
- package/dist/table/src/types/table.d.ts +241 -0
- package/dist/table/src/types/table.d.ts.map +1 -0
- package/dist/table/src/utils/cell.d.ts +27 -0
- package/dist/table/src/utils/cell.d.ts.map +1 -0
- package/dist/table/src/utils/vnode.d.ts +3 -0
- package/dist/table/src/utils/vnode.d.ts.map +1 -0
- package/dist/theme/src/augment.d.ts +20 -0
- package/dist/theme/src/augment.d.ts.map +1 -0
- package/dist/theme/src/button.d.ts +9 -0
- package/dist/theme/src/button.d.ts.map +1 -0
- package/dist/theme/src/checkbox.d.ts +9 -0
- package/dist/theme/src/checkbox.d.ts.map +1 -0
- package/dist/theme/src/index.d.ts +36 -0
- package/dist/theme/src/index.d.ts.map +1 -0
- package/dist/theme/src/input.d.ts +9 -0
- package/dist/theme/src/input.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/button.d.ts +75 -0
- package/dist/theme/src/presets/antdv/button.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/checkbox.d.ts +42 -0
- package/dist/theme/src/presets/antdv/checkbox.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/input.d.ts +35 -0
- package/dist/theme/src/presets/antdv/input.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/radio.d.ts +36 -0
- package/dist/theme/src/presets/antdv/radio.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/scrollbar.d.ts +15 -0
- package/dist/theme/src/presets/antdv/scrollbar.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/table-locale.d.ts +53 -0
- package/dist/theme/src/presets/antdv/table-locale.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/table.d.ts +171 -0
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -0
- package/dist/theme/src/presets/antdv/tooltip.d.ts +25 -0
- package/dist/theme/src/presets/antdv/tooltip.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/button.d.ts +74 -0
- package/dist/theme/src/presets/element-plus/button.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/checkbox.d.ts +39 -0
- package/dist/theme/src/presets/element-plus/checkbox.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/input.d.ts +31 -0
- package/dist/theme/src/presets/element-plus/input.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/radio.d.ts +33 -0
- package/dist/theme/src/presets/element-plus/radio.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/scrollbar.d.ts +15 -0
- package/dist/theme/src/presets/element-plus/scrollbar.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/table-locale.d.ts +53 -0
- package/dist/theme/src/presets/element-plus/table-locale.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/table.d.ts +163 -0
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -0
- package/dist/theme/src/presets/element-plus/tooltip.d.ts +20 -0
- package/dist/theme/src/presets/element-plus/tooltip.d.ts.map +1 -0
- package/dist/theme/src/presets/index.d.ts +37 -0
- package/dist/theme/src/presets/index.d.ts.map +1 -0
- package/dist/theme/src/presets/index.test.d.ts +2 -0
- package/dist/theme/src/presets/index.test.d.ts.map +1 -0
- package/dist/theme/src/presets/types.d.ts +21 -0
- package/dist/theme/src/presets/types.d.ts.map +1 -0
- package/dist/theme/src/radio.d.ts +9 -0
- package/dist/theme/src/radio.d.ts.map +1 -0
- package/dist/theme/src/scrollbar.d.ts +4 -0
- package/dist/theme/src/scrollbar.d.ts.map +1 -0
- package/dist/theme/src/table.d.ts +9 -0
- package/dist/theme/src/table.d.ts.map +1 -0
- package/dist/theme/src/theme-overrides.typecheck.d.ts +2 -0
- package/dist/theme/src/theme-overrides.typecheck.d.ts.map +1 -0
- package/dist/theme/src/tooltip.d.ts +9 -0
- package/dist/theme/src/tooltip.d.ts.map +1 -0
- package/dist/vtable-guild/src/index.d.ts +4 -0
- package/dist/vtable-guild/src/index.d.ts.map +1 -0
- package/package.json +14 -13
package/dist/index.d.ts
CHANGED
|
@@ -1,2427 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/** 对齐方式 */
|
|
30
|
-
export declare type AlignType = 'left' | 'center' | 'right';
|
|
31
|
-
|
|
32
|
-
export declare type Breakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
33
|
-
|
|
34
|
-
export declare type BuiltInLocaleName = 'zh-CN' | 'en-US';
|
|
35
|
-
|
|
36
|
-
export declare const Button: DefineComponent<ExtractPropTypes< {
|
|
37
|
-
type: {
|
|
38
|
-
type: PropType<"default" | "primary" | "link">;
|
|
39
|
-
default: string;
|
|
40
|
-
};
|
|
41
|
-
size: {
|
|
42
|
-
type: PropType<"sm" | "md">;
|
|
43
|
-
default: string;
|
|
44
|
-
};
|
|
45
|
-
disabled: {
|
|
46
|
-
type: BooleanConstructor;
|
|
47
|
-
default: boolean;
|
|
48
|
-
};
|
|
49
|
-
ui: {
|
|
50
|
-
type: PropType<SlotProps<{
|
|
51
|
-
slots: Record<ButtonSlots_2, string>;
|
|
52
|
-
}>>;
|
|
53
|
-
default: undefined;
|
|
54
|
-
};
|
|
55
|
-
class: {
|
|
56
|
-
type: StringConstructor;
|
|
57
|
-
default: undefined;
|
|
58
|
-
};
|
|
59
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "click"[], "click", PublicProps, Readonly<ExtractPropTypes< {
|
|
60
|
-
type: {
|
|
61
|
-
type: PropType<"default" | "primary" | "link">;
|
|
62
|
-
default: string;
|
|
63
|
-
};
|
|
64
|
-
size: {
|
|
65
|
-
type: PropType<"sm" | "md">;
|
|
66
|
-
default: string;
|
|
67
|
-
};
|
|
68
|
-
disabled: {
|
|
69
|
-
type: BooleanConstructor;
|
|
70
|
-
default: boolean;
|
|
71
|
-
};
|
|
72
|
-
ui: {
|
|
73
|
-
type: PropType<SlotProps<{
|
|
74
|
-
slots: Record<ButtonSlots_2, string>;
|
|
75
|
-
}>>;
|
|
76
|
-
default: undefined;
|
|
77
|
-
};
|
|
78
|
-
class: {
|
|
79
|
-
type: StringConstructor;
|
|
80
|
-
default: undefined;
|
|
81
|
-
};
|
|
82
|
-
}>> & Readonly<{
|
|
83
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
84
|
-
}>, {
|
|
85
|
-
size: "md" | "sm";
|
|
86
|
-
class: string;
|
|
87
|
-
type: "link" | "default" | "primary";
|
|
88
|
-
disabled: boolean;
|
|
89
|
-
ui: Partial<Record<"root" | "inner", string>>;
|
|
90
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
91
|
-
|
|
92
|
-
export declare type ButtonSlots = keyof typeof buttonTheme.slots;
|
|
93
|
-
|
|
94
|
-
declare type ButtonSlots_2 = keyof typeof defaultButtonTheme.slots;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Ant Design Vue Button 主题。
|
|
98
|
-
*
|
|
99
|
-
* 精确对齐 antdv Button 组件样式:
|
|
100
|
-
* - transition: 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)
|
|
101
|
-
* - font-weight: 400 (normal)
|
|
102
|
-
* - leading: 1.5714
|
|
103
|
-
* - box-shadow: 0 2px 0 rgba(0,0,0,0.02)
|
|
104
|
-
* - disabled: 统一灰底灰字灰边,无 opacity
|
|
105
|
-
*/
|
|
106
|
-
export declare const buttonTheme: {
|
|
107
|
-
readonly slots: {
|
|
108
|
-
readonly root: "inline-flex items-center justify-center border font-normal transition-all duration-200 ease-[cubic-bezier(0.645,0.045,0.355,1)] leading-[1.5714] cursor-pointer";
|
|
109
|
-
readonly inner: "";
|
|
110
|
-
};
|
|
111
|
-
readonly variants: {
|
|
112
|
-
readonly type: {
|
|
113
|
-
readonly default: {
|
|
114
|
-
readonly root: "bg-[color:var(--color-surface)] text-[color:var(--color-on-surface)] border-[color:var(--color-border,#d9d9d9)] shadow-[0_2px_0_rgba(0,0,0,0.02)] hover:text-[color:var(--color-primary-hover)] hover:border-[color:var(--color-primary-hover)]";
|
|
115
|
-
};
|
|
116
|
-
readonly primary: {
|
|
117
|
-
readonly root: "bg-[color:var(--color-primary)] text-white border-transparent shadow-[0_2px_0_rgba(5,145,255,0.1)] hover:bg-[color:var(--color-primary-hover)] active:bg-[color:var(--color-primary-active,#0958d9)]";
|
|
118
|
-
};
|
|
119
|
-
readonly link: {
|
|
120
|
-
readonly root: "bg-transparent text-[color:var(--color-primary)] border-transparent shadow-none hover:text-[color:var(--color-primary-hover)] active:text-[color:var(--color-primary-active,#0958d9)]";
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
readonly size: {
|
|
124
|
-
readonly sm: {
|
|
125
|
-
readonly root: "h-[var(--vtg-btn-height-sm)] px-[var(--vtg-btn-padding-sm)] rounded-[var(--vtg-btn-border-radius-sm,4px)] text-[length:var(--vtg-table-font-size)]";
|
|
126
|
-
};
|
|
127
|
-
readonly md: {
|
|
128
|
-
readonly root: "h-[var(--vtg-btn-height-md)] px-[var(--vtg-btn-padding-md)] rounded-[var(--vtg-btn-border-radius)] text-[length:var(--vtg-table-font-size)]";
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
readonly disabled: {
|
|
132
|
-
readonly true: {
|
|
133
|
-
readonly root: "cursor-not-allowed";
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
readonly compoundVariants: [{
|
|
138
|
-
readonly type: "default";
|
|
139
|
-
readonly disabled: true;
|
|
140
|
-
readonly class: {
|
|
141
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] text-[color:var(--color-text-disabled)] border-[color:var(--color-border,#d9d9d9)] shadow-none hover:bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] hover:text-[color:var(--color-text-disabled)] hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
142
|
-
};
|
|
143
|
-
}, {
|
|
144
|
-
readonly type: "primary";
|
|
145
|
-
readonly disabled: true;
|
|
146
|
-
readonly class: {
|
|
147
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] text-[color:var(--color-text-disabled)] border-[color:var(--color-border,#d9d9d9)] shadow-none hover:bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] hover:text-[color:var(--color-text-disabled)] hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
148
|
-
};
|
|
149
|
-
}, {
|
|
150
|
-
readonly type: "link";
|
|
151
|
-
readonly disabled: true;
|
|
152
|
-
readonly class: {
|
|
153
|
-
readonly root: "text-[color:var(--color-text-disabled)] hover:text-[color:var(--color-text-disabled)]";
|
|
154
|
-
};
|
|
155
|
-
}, {
|
|
156
|
-
readonly type: "link";
|
|
157
|
-
readonly size: "sm";
|
|
158
|
-
readonly class: {
|
|
159
|
-
readonly root: "px-1";
|
|
160
|
-
};
|
|
161
|
-
}];
|
|
162
|
-
readonly defaultVariants: {
|
|
163
|
-
readonly type: "default";
|
|
164
|
-
readonly size: "md";
|
|
165
|
-
readonly disabled: false;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export declare type ButtonThemeConfig = typeof buttonTheme;
|
|
170
|
-
|
|
171
|
-
export declare interface CellAdditionalProps {
|
|
172
|
-
class?: string;
|
|
173
|
-
className?: string;
|
|
174
|
-
style?: CSSProperties;
|
|
175
|
-
colSpan?: number;
|
|
176
|
-
rowSpan?: number;
|
|
177
|
-
colspan?: number;
|
|
178
|
-
rowspan?: number;
|
|
179
|
-
onClick?: (event: MouseEvent) => void;
|
|
180
|
-
onMouseenter?: (event: MouseEvent) => void;
|
|
181
|
-
onMouseleave?: (event: MouseEvent) => void;
|
|
182
|
-
[key: string]: unknown;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export declare const Checkbox: DefineComponent<ExtractPropTypes< {
|
|
186
|
-
checked: {
|
|
187
|
-
type: BooleanConstructor;
|
|
188
|
-
default: boolean;
|
|
189
|
-
};
|
|
190
|
-
disabled: {
|
|
191
|
-
type: BooleanConstructor;
|
|
192
|
-
default: boolean;
|
|
193
|
-
};
|
|
194
|
-
indeterminate: {
|
|
195
|
-
type: BooleanConstructor;
|
|
196
|
-
default: boolean;
|
|
197
|
-
};
|
|
198
|
-
ui: {
|
|
199
|
-
type: PropType<SlotProps<{
|
|
200
|
-
slots: Record<CheckboxSlots_2, string>;
|
|
201
|
-
}>>;
|
|
202
|
-
default: undefined;
|
|
203
|
-
};
|
|
204
|
-
class: {
|
|
205
|
-
type: StringConstructor;
|
|
206
|
-
default: undefined;
|
|
207
|
-
};
|
|
208
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "update:checked")[], "change" | "update:checked", PublicProps, Readonly<ExtractPropTypes< {
|
|
209
|
-
checked: {
|
|
210
|
-
type: BooleanConstructor;
|
|
211
|
-
default: boolean;
|
|
212
|
-
};
|
|
213
|
-
disabled: {
|
|
214
|
-
type: BooleanConstructor;
|
|
215
|
-
default: boolean;
|
|
216
|
-
};
|
|
217
|
-
indeterminate: {
|
|
218
|
-
type: BooleanConstructor;
|
|
219
|
-
default: boolean;
|
|
220
|
-
};
|
|
221
|
-
ui: {
|
|
222
|
-
type: PropType<SlotProps<{
|
|
223
|
-
slots: Record<CheckboxSlots_2, string>;
|
|
224
|
-
}>>;
|
|
225
|
-
default: undefined;
|
|
226
|
-
};
|
|
227
|
-
class: {
|
|
228
|
-
type: StringConstructor;
|
|
229
|
-
default: undefined;
|
|
230
|
-
};
|
|
231
|
-
}>> & Readonly<{
|
|
232
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
233
|
-
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
234
|
-
}>, {
|
|
235
|
-
class: string;
|
|
236
|
-
disabled: boolean;
|
|
237
|
-
checked: boolean;
|
|
238
|
-
indeterminate: boolean;
|
|
239
|
-
ui: Partial<Record<"root" | "checkMark" | "indeterminateMark", string>>;
|
|
240
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
241
|
-
|
|
242
|
-
export declare type CheckboxSlots = keyof typeof checkboxTheme.slots;
|
|
243
|
-
|
|
244
|
-
declare type CheckboxSlots_2 = keyof typeof defaultCheckboxTheme.slots;
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Ant Design Vue Checkbox 主题。
|
|
248
|
-
*
|
|
249
|
-
* 精确对齐 antdv Checkbox 组件样式:
|
|
250
|
-
* - size: 16px (via CSS var)
|
|
251
|
-
* - border-radius: 4px
|
|
252
|
-
* - transition: 0.3s
|
|
253
|
-
* - hover: border 变 primary
|
|
254
|
-
* - disabled: 灰底灰边,无 opacity
|
|
255
|
-
*/
|
|
256
|
-
export declare const checkboxTheme: {
|
|
257
|
-
readonly slots: {
|
|
258
|
-
readonly root: string;
|
|
259
|
-
readonly checkMark: string;
|
|
260
|
-
readonly indeterminateMark: string;
|
|
261
|
-
};
|
|
262
|
-
readonly variants: {
|
|
263
|
-
readonly checked: {
|
|
264
|
-
readonly true: {
|
|
265
|
-
readonly root: "bg-[color:var(--color-primary)] border-[color:var(--color-primary)] hover:bg-[color:var(--color-primary-hover)] hover:border-transparent";
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
readonly indeterminate: {
|
|
269
|
-
readonly true: {
|
|
270
|
-
readonly root: "";
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
readonly disabled: {
|
|
274
|
-
readonly true: {
|
|
275
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] border-[color:var(--color-border,#d9d9d9)] cursor-not-allowed hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
readonly defaultVariants: {
|
|
280
|
-
readonly checked: false;
|
|
281
|
-
readonly indeterminate: false;
|
|
282
|
-
readonly disabled: false;
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
export declare type CheckboxThemeConfig = typeof checkboxTheme;
|
|
287
|
-
|
|
288
|
-
export { cn }
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* 筛选项。
|
|
292
|
-
*/
|
|
293
|
-
export declare interface ColumnFilterItem {
|
|
294
|
-
text: string;
|
|
295
|
-
value: string | number | boolean;
|
|
296
|
-
children?: ColumnFilterItem[];
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* 列组配置(含 children)。
|
|
301
|
-
*/
|
|
302
|
-
declare interface ColumnGroupType<TRecord extends object = Record<string, any>> extends Omit<ColumnType<TRecord>, 'dataIndex' | 'customRender' | 'sorter' | 'sortOrder' | 'defaultSortOrder' | 'sortDirections' | 'filters' | 'onFilter' | 'filterMultiple' | 'filteredValue' | 'defaultFilteredValue' | 'customFilterDropdown' | 'filterSearch' | 'filterMode' | 'filterResetToDefaultFilteredValue' | 'filterDropdownOpen' | 'onFilterDropdownOpenChange' | 'filtered' | 'filterIcon' | 'filterDropdown'> {
|
|
303
|
-
children: Array<ColumnType<TRecord> | ColumnGroupType<TRecord>>;
|
|
304
|
-
}
|
|
305
|
-
export { ColumnGroupType }
|
|
306
|
-
export { ColumnGroupType as TableColumnGroupType }
|
|
307
|
-
|
|
308
|
-
declare type ColumnNode<TRecord extends Record<string, unknown>> = ColumnType<TRecord> | ColumnGroupType<TRecord>;
|
|
309
|
-
|
|
310
|
-
export declare type ColumnSorter<TRecord = Record<string, any>> = boolean | SorterFn<TRecord> | ColumnSorterObject<TRecord>;
|
|
311
|
-
|
|
312
|
-
declare interface ColumnSorterObject<TRecord = Record<string, any>> {
|
|
313
|
-
compare?: SorterFn<TRecord>;
|
|
314
|
-
multiple?: number;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* columns prop 的类型。
|
|
319
|
-
*/
|
|
320
|
-
declare type ColumnsType<TRecord extends object = Record<string, any>> = Array<ColumnType<TRecord> | ColumnGroupType<TRecord>>;
|
|
321
|
-
export { ColumnsType }
|
|
322
|
-
export { ColumnsType as TableColumnsType }
|
|
323
|
-
|
|
324
|
-
declare type ColumnTitle<TRecord extends object = Record<string, any>> = VNodeChild | ((props: ColumnTitleProps<TRecord>) => VNodeChild);
|
|
325
|
-
|
|
326
|
-
declare interface ColumnTitleProps<TRecord extends object = Record<string, any>> {
|
|
327
|
-
sortOrder?: SortOrder;
|
|
328
|
-
sortColumn?: ColumnType<TRecord>;
|
|
329
|
-
sortColumns?: Array<{
|
|
330
|
-
column: ColumnType<TRecord>;
|
|
331
|
-
order: SortOrder;
|
|
332
|
-
}>;
|
|
333
|
-
filters?: Record<string, (string | number | boolean)[] | null>;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* 叶子列配置。
|
|
338
|
-
*/
|
|
339
|
-
declare interface ColumnType<TRecord extends object = Record<string, any>> {
|
|
340
|
-
key?: Key;
|
|
341
|
-
title?: ColumnTitle<TRecord>;
|
|
342
|
-
dataIndex?: DataIndex;
|
|
343
|
-
width?: number | string;
|
|
344
|
-
align?: AlignType;
|
|
345
|
-
ellipsis?: boolean;
|
|
346
|
-
className?: string;
|
|
347
|
-
colSpan?: number;
|
|
348
|
-
customRender?: (ctx: CustomRenderContext<TRecord>) => VNodeChild | RenderedCell;
|
|
349
|
-
customCell?: GetComponentProps<TRecord>;
|
|
350
|
-
customHeaderCell?: GetComponentProps<ColumnType<TRecord> | ColumnGroupType<TRecord>>;
|
|
351
|
-
/** 固定列。'left' 固定到左侧,'right' 固定到右侧。 */
|
|
352
|
-
fixed?: 'left' | 'right';
|
|
353
|
-
/** 是否可拖拽调整列宽 */
|
|
354
|
-
resizable?: boolean;
|
|
355
|
-
/** 最小列宽(拖拽调整时),默认 50 */
|
|
356
|
-
minWidth?: number;
|
|
357
|
-
/** 最大列宽(拖拽调整时) */
|
|
358
|
-
maxWidth?: number;
|
|
359
|
-
/**
|
|
360
|
-
* 排序器。
|
|
361
|
-
* - `true`:使用默认比较(字符串/数字自动判断)
|
|
362
|
-
* - `(a, b) => number`:自定义比较函数(与 Array.sort 签名一致)
|
|
363
|
-
* - 不传或 `undefined`:该列不可排序
|
|
364
|
-
*/
|
|
365
|
-
sorter?: ColumnSorter<TRecord>;
|
|
366
|
-
/**
|
|
367
|
-
* 受控排序方向。
|
|
368
|
-
* 传入后组件不再自行管理排序状态,完全由外部控制。
|
|
369
|
-
*/
|
|
370
|
-
sortOrder?: SortOrder;
|
|
371
|
-
/**
|
|
372
|
-
* 非受控默认排序方向。
|
|
373
|
-
* 仅在组件首次渲染时生效,后续由内部状态管理。
|
|
374
|
-
*/
|
|
375
|
-
defaultSortOrder?: SortOrder;
|
|
376
|
-
/**
|
|
377
|
-
* 可用排序方向列表。
|
|
378
|
-
* 点击表头时按此数组循环切换。
|
|
379
|
-
* 默认 ['ascend', 'descend'](不含 null 则不回到"无排序"状态)。
|
|
380
|
-
*/
|
|
381
|
-
sortDirections?: SortOrder[];
|
|
382
|
-
/**
|
|
383
|
-
* 筛选项列表。传入后该列表头显示筛选图标。
|
|
384
|
-
*/
|
|
385
|
-
filters?: ColumnFilterItem[];
|
|
386
|
-
/**
|
|
387
|
-
* 筛选函数。返回 true 表示该行匹配当前筛选值。
|
|
388
|
-
* @param value - 当前选中的筛选值
|
|
389
|
-
* @param record - 行数据
|
|
390
|
-
*/
|
|
391
|
-
onFilter?: (value: string | number | boolean, record: TRecord) => boolean;
|
|
392
|
-
/**
|
|
393
|
-
* 是否支持多选筛选。默认 true。
|
|
394
|
-
*/
|
|
395
|
-
filterMultiple?: boolean;
|
|
396
|
-
/**
|
|
397
|
-
* 受控筛选值。传入后组件不再自行管理筛选状态。
|
|
398
|
-
*/
|
|
399
|
-
filteredValue?: (string | number | boolean)[] | null;
|
|
400
|
-
/**
|
|
401
|
-
* 非受控默认筛选值。
|
|
402
|
-
*/
|
|
403
|
-
defaultFilteredValue?: (string | number | boolean)[];
|
|
404
|
-
/**
|
|
405
|
-
* 自定义筛选下拉菜单。
|
|
406
|
-
* 设为 true 时,使用 Table 的 customFilterDropdown slot。
|
|
407
|
-
*/
|
|
408
|
-
customFilterDropdown?: boolean;
|
|
409
|
-
/**
|
|
410
|
-
* 筛选搜索框。
|
|
411
|
-
* - `true`:使用默认搜索(text.includes(input))
|
|
412
|
-
* - `(input, filter) => boolean`:自定义搜索函数
|
|
413
|
-
*/
|
|
414
|
-
filterSearch?: boolean | ((input: string, filter: ColumnFilterItem) => boolean);
|
|
415
|
-
/**
|
|
416
|
-
* 筛选模式。
|
|
417
|
-
* - `'menu'`(默认):平铺列表
|
|
418
|
-
* - `'tree'`:树形嵌套
|
|
419
|
-
*/
|
|
420
|
-
filterMode?: 'menu' | 'tree';
|
|
421
|
-
/**
|
|
422
|
-
* 重置时是否恢复为 defaultFilteredValue 而非清空。
|
|
423
|
-
*/
|
|
424
|
-
filterResetToDefaultFilteredValue?: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* 受控筛选下拉可见性。
|
|
427
|
-
*/
|
|
428
|
-
filterDropdownOpen?: boolean;
|
|
429
|
-
/**
|
|
430
|
-
* 筛选下拉可见性变化回调。
|
|
431
|
-
*/
|
|
432
|
-
onFilterDropdownOpenChange?: (visible: boolean) => void;
|
|
433
|
-
/**
|
|
434
|
-
* 外部控制筛选高亮状态(不影响实际筛选逻辑)。
|
|
435
|
-
*/
|
|
436
|
-
filtered?: boolean;
|
|
437
|
-
/**
|
|
438
|
-
* 自定义筛选图标渲染函数。
|
|
439
|
-
*/
|
|
440
|
-
filterIcon?: (opt: {
|
|
441
|
-
filtered: boolean;
|
|
442
|
-
}) => VNodeChild;
|
|
443
|
-
/**
|
|
444
|
-
* 列级别自定义筛选下拉渲染函数。
|
|
445
|
-
* 优先级高于 customFilterDropdown slot。
|
|
446
|
-
*/
|
|
447
|
-
filterDropdown?: VNodeChild | ((props: CustomFilterDropdownSlotProps<TRecord>) => VNodeChild);
|
|
448
|
-
/**
|
|
449
|
-
* 列级别控制是否显示排序 tooltip。
|
|
450
|
-
* 未设置时使用 Table 级别的 showSorterTooltip。
|
|
451
|
-
*/
|
|
452
|
-
showSorterTooltip?: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* 响应式可见断点。
|
|
455
|
-
* 当前屏幕命中任一断点时显示该列。
|
|
456
|
-
*/
|
|
457
|
-
responsive?: Breakpoint[];
|
|
458
|
-
}
|
|
459
|
-
export { ColumnType }
|
|
460
|
-
export { ColumnType as TableColumnType }
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* 创建 vtable-guild 的 Vue 插件。
|
|
464
|
-
*
|
|
465
|
-
* @example
|
|
466
|
-
* ```ts
|
|
467
|
-
* // main.ts
|
|
468
|
-
* import { createApp } from 'vue'
|
|
469
|
-
* import { createVTableGuild } from '@vtable-guild/core'
|
|
470
|
-
*
|
|
471
|
-
* const app = createApp(App)
|
|
472
|
-
*
|
|
473
|
-
* const vtg = createVTableGuild({
|
|
474
|
-
* theme: {
|
|
475
|
-
* table: {
|
|
476
|
-
* slots: { th: 'bg-blue-50 font-bold' },
|
|
477
|
-
* defaultVariants: { size: 'sm' },
|
|
478
|
-
* },
|
|
479
|
-
* },
|
|
480
|
-
* })
|
|
481
|
-
*
|
|
482
|
-
* app.use(vtg)
|
|
483
|
-
* ```
|
|
484
|
-
*/
|
|
485
|
-
export declare function createVTableGuild(options?: VTableGuildOptions): Plugin_2;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* customFilterDropdown slot 的参数类型。
|
|
489
|
-
*/
|
|
490
|
-
export declare interface CustomFilterDropdownSlotProps<TRecord extends object = Record<string, any>> {
|
|
491
|
-
column: ColumnType<TRecord>;
|
|
492
|
-
selectedKeys: (string | number | boolean)[];
|
|
493
|
-
setSelectedKeys: (keys: (string | number | boolean)[]) => void;
|
|
494
|
-
confirm: (options?: {
|
|
495
|
-
closeDropdown?: boolean;
|
|
496
|
-
}) => void;
|
|
497
|
-
clearFilters: (options?: {
|
|
498
|
-
confirm?: boolean;
|
|
499
|
-
closeDropdown?: boolean;
|
|
500
|
-
}) => void;
|
|
501
|
-
filters: ColumnFilterItem[];
|
|
502
|
-
visible: boolean;
|
|
503
|
-
close: () => void;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* customRender 回调参数。
|
|
508
|
-
*/
|
|
509
|
-
export declare interface CustomRenderContext<TRecord extends object = Record<string, any>> {
|
|
510
|
-
/** 当前单元格的值(通过 dataIndex 取出) */
|
|
511
|
-
text: unknown;
|
|
512
|
-
/** 与 ant-design-vue 对齐的 value 别名 */
|
|
513
|
-
value: unknown;
|
|
514
|
-
/** 当前行数据 */
|
|
515
|
-
record: TRecord;
|
|
516
|
-
/** 行索引 */
|
|
517
|
-
index: number;
|
|
518
|
-
/** 当前渲染行索引 */
|
|
519
|
-
renderIndex: number;
|
|
520
|
-
/** 列配置 */
|
|
521
|
-
column: ColumnType<TRecord>;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* 数据索引路径
|
|
526
|
-
*
|
|
527
|
-
* - `'name'` - 直接取record.name
|
|
528
|
-
* - `['address', 'city']` — 取 record.address.city
|
|
529
|
-
*/
|
|
530
|
-
export declare type DataIndex = string | number | Array<string | number>;
|
|
531
|
-
|
|
532
|
-
/** 深度可选,用于 locale / theme 局部覆盖。 */
|
|
533
|
-
export declare type DeepPartial<T> = {
|
|
534
|
-
[K in keyof T]?: T[K] extends Array<infer U> ? Array<DeepPartial<U>> : T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* 默认 Button 主题(antdv 预设)。
|
|
539
|
-
*
|
|
540
|
-
* 与 packages/theme/src/presets/antdv/button.ts 保持一致。
|
|
541
|
-
*/
|
|
542
|
-
declare const defaultButtonTheme: {
|
|
543
|
-
readonly slots: {
|
|
544
|
-
readonly root: "inline-flex items-center justify-center border font-normal transition-all duration-200 ease-[cubic-bezier(0.645,0.045,0.355,1)] leading-[1.5714] cursor-pointer";
|
|
545
|
-
readonly inner: "";
|
|
546
|
-
};
|
|
547
|
-
readonly variants: {
|
|
548
|
-
readonly type: {
|
|
549
|
-
readonly default: {
|
|
550
|
-
readonly root: "bg-[color:var(--color-surface)] text-[color:var(--color-on-surface)] border-[color:var(--color-border,#d9d9d9)] shadow-[0_2px_0_rgba(0,0,0,0.02)] hover:text-[color:var(--color-primary-hover)] hover:border-[color:var(--color-primary-hover)]";
|
|
551
|
-
};
|
|
552
|
-
readonly primary: {
|
|
553
|
-
readonly root: "bg-[color:var(--color-primary)] text-white border-transparent shadow-[0_2px_0_rgba(5,145,255,0.1)] hover:bg-[color:var(--color-primary-hover)] active:bg-[color:var(--color-primary-active,#0958d9)]";
|
|
554
|
-
};
|
|
555
|
-
readonly link: {
|
|
556
|
-
readonly root: "bg-transparent text-[color:var(--color-primary)] border-transparent shadow-none hover:text-[color:var(--color-primary-hover)] active:text-[color:var(--color-primary-active,#0958d9)]";
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
readonly size: {
|
|
560
|
-
readonly sm: {
|
|
561
|
-
readonly root: "h-[var(--vtg-btn-height-sm)] px-[var(--vtg-btn-padding-sm)] rounded-[var(--vtg-btn-border-radius-sm,4px)] text-[length:var(--vtg-table-font-size)]";
|
|
562
|
-
};
|
|
563
|
-
readonly md: {
|
|
564
|
-
readonly root: "h-[var(--vtg-btn-height-md)] px-[var(--vtg-btn-padding-md)] rounded-[var(--vtg-btn-border-radius)] text-[length:var(--vtg-table-font-size)]";
|
|
565
|
-
};
|
|
566
|
-
};
|
|
567
|
-
readonly disabled: {
|
|
568
|
-
readonly true: {
|
|
569
|
-
readonly root: "cursor-not-allowed";
|
|
570
|
-
};
|
|
571
|
-
};
|
|
572
|
-
};
|
|
573
|
-
readonly compoundVariants: [{
|
|
574
|
-
readonly type: "default";
|
|
575
|
-
readonly disabled: true;
|
|
576
|
-
readonly class: {
|
|
577
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] text-[color:var(--color-text-disabled)] border-[color:var(--color-border,#d9d9d9)] shadow-none hover:bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] hover:text-[color:var(--color-text-disabled)] hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
578
|
-
};
|
|
579
|
-
}, {
|
|
580
|
-
readonly type: "primary";
|
|
581
|
-
readonly disabled: true;
|
|
582
|
-
readonly class: {
|
|
583
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] text-[color:var(--color-text-disabled)] border-[color:var(--color-border,#d9d9d9)] shadow-none hover:bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] hover:text-[color:var(--color-text-disabled)] hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
584
|
-
};
|
|
585
|
-
}, {
|
|
586
|
-
readonly type: "link";
|
|
587
|
-
readonly disabled: true;
|
|
588
|
-
readonly class: {
|
|
589
|
-
readonly root: "text-[color:var(--color-text-disabled)] hover:text-[color:var(--color-text-disabled)]";
|
|
590
|
-
};
|
|
591
|
-
}, {
|
|
592
|
-
readonly type: "link";
|
|
593
|
-
readonly size: "sm";
|
|
594
|
-
readonly class: {
|
|
595
|
-
readonly root: "px-1";
|
|
596
|
-
};
|
|
597
|
-
}];
|
|
598
|
-
readonly defaultVariants: {
|
|
599
|
-
readonly type: "default";
|
|
600
|
-
readonly size: "md";
|
|
601
|
-
readonly disabled: false;
|
|
602
|
-
};
|
|
603
|
-
};
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* 默认 Checkbox 主题(antdv 预设)。
|
|
607
|
-
*
|
|
608
|
-
* 与 packages/theme/src/presets/antdv/checkbox.ts 保持一致。
|
|
609
|
-
*/
|
|
610
|
-
declare const defaultCheckboxTheme: {
|
|
611
|
-
readonly slots: {
|
|
612
|
-
readonly root: string;
|
|
613
|
-
readonly checkMark: string;
|
|
614
|
-
readonly indeterminateMark: string;
|
|
615
|
-
};
|
|
616
|
-
readonly variants: {
|
|
617
|
-
readonly checked: {
|
|
618
|
-
readonly true: {
|
|
619
|
-
readonly root: "bg-[color:var(--color-primary)] border-[color:var(--color-primary)] hover:bg-[color:var(--color-primary-hover)] hover:border-transparent";
|
|
620
|
-
};
|
|
621
|
-
};
|
|
622
|
-
readonly indeterminate: {
|
|
623
|
-
readonly true: {
|
|
624
|
-
readonly root: "";
|
|
625
|
-
};
|
|
626
|
-
};
|
|
627
|
-
readonly disabled: {
|
|
628
|
-
readonly true: {
|
|
629
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] border-[color:var(--color-border,#d9d9d9)] cursor-not-allowed hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
630
|
-
};
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
readonly defaultVariants: {
|
|
634
|
-
readonly checked: false;
|
|
635
|
-
readonly indeterminate: false;
|
|
636
|
-
readonly disabled: false;
|
|
637
|
-
};
|
|
638
|
-
};
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* 默认 Input 主题(antdv 预设)。
|
|
642
|
-
*
|
|
643
|
-
* 与 packages/theme/src/presets/antdv/input.ts 保持一致。
|
|
644
|
-
*/
|
|
645
|
-
declare const defaultInputTheme: {
|
|
646
|
-
readonly slots: {
|
|
647
|
-
readonly root: string;
|
|
648
|
-
};
|
|
649
|
-
readonly variants: {
|
|
650
|
-
readonly bare: {
|
|
651
|
-
readonly true: {
|
|
652
|
-
readonly root: "min-w-0 bg-transparent outline-none border-0 shadow-none p-0 focus:shadow-none";
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
readonly disabled: {
|
|
656
|
-
readonly true: {
|
|
657
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] text-[color:var(--color-text-disabled)] cursor-not-allowed";
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
};
|
|
661
|
-
readonly defaultVariants: {
|
|
662
|
-
readonly bare: false;
|
|
663
|
-
readonly disabled: false;
|
|
664
|
-
};
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
* 默认 Radio 主题(antdv 预设)。
|
|
669
|
-
*
|
|
670
|
-
* 与 packages/theme/src/presets/antdv/radio.ts 保持一致。
|
|
671
|
-
*/
|
|
672
|
-
declare const defaultRadioTheme: {
|
|
673
|
-
readonly slots: {
|
|
674
|
-
readonly root: string;
|
|
675
|
-
readonly dot: "rounded-full w-[var(--vtg-radio-size)] h-[var(--vtg-radio-size)] transition-transform duration-300 ease-[cubic-bezier(0.78,0.14,0.15,0.86)]";
|
|
676
|
-
};
|
|
677
|
-
readonly variants: {
|
|
678
|
-
readonly checked: {
|
|
679
|
-
readonly true: {
|
|
680
|
-
readonly root: "border-[color:var(--color-primary)] bg-[color:var(--color-primary)]";
|
|
681
|
-
readonly dot: "scale-[0.375] bg-[color:var(--color-surface)]";
|
|
682
|
-
};
|
|
683
|
-
};
|
|
684
|
-
readonly disabled: {
|
|
685
|
-
readonly true: {
|
|
686
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] cursor-not-allowed hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
687
|
-
};
|
|
688
|
-
};
|
|
689
|
-
};
|
|
690
|
-
readonly defaultVariants: {
|
|
691
|
-
readonly checked: false;
|
|
692
|
-
readonly disabled: false;
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
declare const defaultScrollbarTheme: {
|
|
697
|
-
readonly slots: {
|
|
698
|
-
readonly root: "group relative overflow-hidden";
|
|
699
|
-
readonly wrap: "overflow-auto scrollbar-none h-full";
|
|
700
|
-
readonly view: "block min-w-full w-max";
|
|
701
|
-
readonly track: "absolute z-[3] rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100";
|
|
702
|
-
readonly trackVertical: "right-0.5 top-0.5 bottom-0.5 w-[var(--vtg-scrollbar-thumb-width)]";
|
|
703
|
-
readonly trackHorizontal: "bottom-0.5 left-0.5 right-0.5 h-[var(--vtg-scrollbar-thumb-width)]";
|
|
704
|
-
readonly thumb: string;
|
|
705
|
-
};
|
|
706
|
-
readonly defaultVariants: {};
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* 默认 Tooltip 主题(antdv 预设)。
|
|
711
|
-
*
|
|
712
|
-
* 与 packages/theme/src/presets/antdv/tooltip.ts 保持一致。
|
|
713
|
-
* 仅包含视觉样式,定位逻辑保留 inline style。
|
|
714
|
-
*/
|
|
715
|
-
declare const defaultTooltipTheme: {
|
|
716
|
-
readonly slots: {
|
|
717
|
-
readonly content: string;
|
|
718
|
-
readonly arrow: "absolute block pointer-events-none";
|
|
719
|
-
readonly arrowOuter: "absolute w-0 h-0";
|
|
720
|
-
readonly arrowInner: "absolute w-0 h-0";
|
|
721
|
-
};
|
|
722
|
-
readonly defaultVariants: {};
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
export declare interface Expandable<TRecord extends object = Record<string, any>> {
|
|
726
|
-
/** 展开行渲染函数 */
|
|
727
|
-
expandedRowRender?: (record: TRecord, index: number, indent: number, expanded: boolean) => VNodeChild;
|
|
728
|
-
/** 受控展开行 key 列表 */
|
|
729
|
-
expandedRowKeys?: Key[];
|
|
730
|
-
/** 非受控默认展开行 key 列表 */
|
|
731
|
-
defaultExpandedRowKeys?: Key[];
|
|
732
|
-
/** 点击行展开 */
|
|
733
|
-
expandRowByClick?: boolean;
|
|
734
|
-
/** 自定义展开图标 */
|
|
735
|
-
expandIcon?: (props: {
|
|
736
|
-
expanded: boolean;
|
|
737
|
-
record: TRecord;
|
|
738
|
-
expandable: boolean;
|
|
739
|
-
onExpand: (record: TRecord, e: Event) => void;
|
|
740
|
-
}) => VNodeChild;
|
|
741
|
-
/** 展开/折叠回调 */
|
|
742
|
-
onExpand?: (expanded: boolean, record: TRecord) => void;
|
|
743
|
-
/** 展开行变化回调 */
|
|
744
|
-
onExpandedRowsChange?: (expandedKeys: Key[]) => void;
|
|
745
|
-
/** 展开列宽度 */
|
|
746
|
-
columnWidth?: number | string;
|
|
747
|
-
/** 展开列固定位置 */
|
|
748
|
-
fixed?: 'left' | 'right';
|
|
749
|
-
/** 默认展开所有行 */
|
|
750
|
-
defaultExpandAllRows?: boolean;
|
|
751
|
-
/** 判断行是否可展开 */
|
|
752
|
-
rowExpandable?: (record: TRecord) => boolean;
|
|
753
|
-
/** 是否显示展开列,默认 true */
|
|
754
|
-
showExpandColumn?: boolean;
|
|
755
|
-
/** 展开行 class */
|
|
756
|
-
expandedRowClassName?: string | RowClassName<TRecord>;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
export declare interface ExtraRenderInfo {
|
|
760
|
-
start: number;
|
|
761
|
-
end: number;
|
|
762
|
-
virtual: boolean;
|
|
763
|
-
offsetX: number;
|
|
764
|
-
offsetY: number;
|
|
765
|
-
rtl: boolean;
|
|
766
|
-
getSize: GetSize;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
export declare interface FlattenRow<TRecord = Record<string, unknown>> {
|
|
770
|
-
/** Original data record */
|
|
771
|
-
record: TRecord;
|
|
772
|
-
/** Nesting depth (0 = root) */
|
|
773
|
-
level: number;
|
|
774
|
-
/** Whether this row is currently expanded */
|
|
775
|
-
expanded: boolean;
|
|
776
|
-
/** Whether this row has child rows */
|
|
777
|
-
hasChildren: boolean;
|
|
778
|
-
/** Parent row key (undefined for root rows) */
|
|
779
|
-
parentKey?: Key;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* 根据 dataIndex 路径从 record 中取值。
|
|
784
|
-
*
|
|
785
|
-
* @example
|
|
786
|
-
* ```ts
|
|
787
|
-
* getByDataIndex({ address: { city: 'NYC' } }, ['address', 'city'])
|
|
788
|
-
* // => 'NYC'
|
|
789
|
-
*
|
|
790
|
-
* getByDataIndex({ name: 'Alice' }, 'name')
|
|
791
|
-
* // => 'Alice'
|
|
792
|
-
* ```
|
|
793
|
-
*/
|
|
794
|
-
export declare function getByDataIndex(record: Record<string, unknown>, dataIndex?: DataIndex): unknown;
|
|
795
|
-
|
|
796
|
-
declare type GetComponentProps<TData> = (data: TData, index?: number, column?: ColumnType<any>) => CellAdditionalProps | undefined;
|
|
797
|
-
|
|
798
|
-
declare type GetSize = (startKey: Key_2, endKey?: Key_2) => {
|
|
799
|
-
top: number;
|
|
800
|
-
bottom: number;
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
declare interface HeaderCellMeta<TRecord extends Record<string, unknown>> {
|
|
804
|
-
column: ColumnNode<TRecord>;
|
|
805
|
-
colSpan: number;
|
|
806
|
-
rowSpan: number;
|
|
807
|
-
colStart: number;
|
|
808
|
-
colEnd: number;
|
|
809
|
-
depth: number;
|
|
810
|
-
isLeaf: boolean;
|
|
811
|
-
leafColumns: ColumnType<TRecord>[];
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
declare type HeaderRowMeta<TRecord extends Record<string, unknown>> = HeaderCellMeta<TRecord>[];
|
|
815
|
-
|
|
816
|
-
declare interface InnerProps {
|
|
817
|
-
role?: string;
|
|
818
|
-
id?: string;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
export declare const Input: DefineComponent<ExtractPropTypes< {
|
|
822
|
-
value: {
|
|
823
|
-
type: StringConstructor;
|
|
824
|
-
default: string;
|
|
825
|
-
};
|
|
826
|
-
placeholder: {
|
|
827
|
-
type: StringConstructor;
|
|
828
|
-
default: string;
|
|
829
|
-
};
|
|
830
|
-
disabled: {
|
|
831
|
-
type: BooleanConstructor;
|
|
832
|
-
default: boolean;
|
|
833
|
-
};
|
|
834
|
-
bare: {
|
|
835
|
-
type: BooleanConstructor;
|
|
836
|
-
default: boolean;
|
|
837
|
-
};
|
|
838
|
-
inputClass: {
|
|
839
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
840
|
-
default: undefined;
|
|
841
|
-
};
|
|
842
|
-
ui: {
|
|
843
|
-
type: PropType<SlotProps<{
|
|
844
|
-
slots: Record<InputSlots_2, string>;
|
|
845
|
-
}>>;
|
|
846
|
-
default: undefined;
|
|
847
|
-
};
|
|
848
|
-
class: {
|
|
849
|
-
type: StringConstructor;
|
|
850
|
-
default: undefined;
|
|
851
|
-
};
|
|
852
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "update:value" | "pressEnter")[], "change" | "update:value" | "pressEnter", PublicProps, Readonly<ExtractPropTypes< {
|
|
853
|
-
value: {
|
|
854
|
-
type: StringConstructor;
|
|
855
|
-
default: string;
|
|
856
|
-
};
|
|
857
|
-
placeholder: {
|
|
858
|
-
type: StringConstructor;
|
|
859
|
-
default: string;
|
|
860
|
-
};
|
|
861
|
-
disabled: {
|
|
862
|
-
type: BooleanConstructor;
|
|
863
|
-
default: boolean;
|
|
864
|
-
};
|
|
865
|
-
bare: {
|
|
866
|
-
type: BooleanConstructor;
|
|
867
|
-
default: boolean;
|
|
868
|
-
};
|
|
869
|
-
inputClass: {
|
|
870
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
871
|
-
default: undefined;
|
|
872
|
-
};
|
|
873
|
-
ui: {
|
|
874
|
-
type: PropType<SlotProps<{
|
|
875
|
-
slots: Record<InputSlots_2, string>;
|
|
876
|
-
}>>;
|
|
877
|
-
default: undefined;
|
|
878
|
-
};
|
|
879
|
-
class: {
|
|
880
|
-
type: StringConstructor;
|
|
881
|
-
default: undefined;
|
|
882
|
-
};
|
|
883
|
-
}>> & Readonly<{
|
|
884
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
885
|
-
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
886
|
-
onPressEnter?: ((...args: any[]) => any) | undefined;
|
|
887
|
-
}>, {
|
|
888
|
-
class: string;
|
|
889
|
-
disabled: boolean;
|
|
890
|
-
bare: boolean;
|
|
891
|
-
value: string;
|
|
892
|
-
ui: Partial<Record<"root", string>>;
|
|
893
|
-
placeholder: string;
|
|
894
|
-
inputClass: string | unknown[] | Record<string, any>;
|
|
895
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
896
|
-
|
|
897
|
-
export declare type InputSlots = keyof typeof inputTheme.slots;
|
|
898
|
-
|
|
899
|
-
declare type InputSlots_2 = keyof typeof defaultInputTheme.slots;
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* Ant Design Vue Input 主题。
|
|
903
|
-
*
|
|
904
|
-
* 精确对齐 antdv Input 组件样式:
|
|
905
|
-
* - border-radius: 6px
|
|
906
|
-
* - hover: border 变 primary-hover
|
|
907
|
-
* - focus: border 变 primary, shadow 0 0 0 2px rgba(5,145,255,0.1)
|
|
908
|
-
* - placeholder: rgba(0,0,0,0.25)
|
|
909
|
-
* - disabled: 灰底灰字,无 opacity
|
|
910
|
-
* - bare 变体: 无边框无背景(用于搜索框内嵌)
|
|
911
|
-
*/
|
|
912
|
-
export declare const inputTheme: {
|
|
913
|
-
readonly slots: {
|
|
914
|
-
readonly root: string;
|
|
915
|
-
};
|
|
916
|
-
readonly variants: {
|
|
917
|
-
readonly bare: {
|
|
918
|
-
readonly true: {
|
|
919
|
-
readonly root: "min-w-0 bg-transparent outline-none border-0 shadow-none p-0 focus:shadow-none";
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
readonly disabled: {
|
|
923
|
-
readonly true: {
|
|
924
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] text-[color:var(--color-text-disabled)] cursor-not-allowed";
|
|
925
|
-
};
|
|
926
|
-
};
|
|
927
|
-
};
|
|
928
|
-
readonly defaultVariants: {
|
|
929
|
-
readonly bare: false;
|
|
930
|
-
readonly disabled: false;
|
|
931
|
-
};
|
|
932
|
-
};
|
|
933
|
-
|
|
934
|
-
export declare type InputThemeConfig = typeof inputTheme;
|
|
935
|
-
|
|
936
|
-
/** 行唯一标识 */
|
|
937
|
-
export declare type Key = string | number;
|
|
938
|
-
|
|
939
|
-
declare type Key_2 = string | number;
|
|
940
|
-
|
|
941
|
-
export declare interface ListProps {
|
|
942
|
-
prefixCls?: string;
|
|
943
|
-
data?: any[];
|
|
944
|
-
height?: number;
|
|
945
|
-
itemHeight?: number;
|
|
946
|
-
fullHeight?: boolean;
|
|
947
|
-
itemKey: Key_2 | ((item: any) => Key_2);
|
|
948
|
-
component?: string;
|
|
949
|
-
virtual?: boolean;
|
|
950
|
-
direction?: ScrollBarDirectionType;
|
|
951
|
-
scrollWidth?: number;
|
|
952
|
-
styles?: {
|
|
953
|
-
horizontalScrollBar?: CSSProperties;
|
|
954
|
-
horizontalScrollBarThumb?: CSSProperties;
|
|
955
|
-
verticalScrollBar?: CSSProperties;
|
|
956
|
-
verticalScrollBarThumb?: CSSProperties;
|
|
957
|
-
};
|
|
958
|
-
showScrollBar?: boolean | 'optional' | 'hover';
|
|
959
|
-
onScroll?: (e: Event) => void;
|
|
960
|
-
onVirtualScroll?: (info: VirtualScrollInfo) => void;
|
|
961
|
-
onVisibleChange?: (visibleList: any[], fullList: any[]) => void;
|
|
962
|
-
innerProps?: InnerProps;
|
|
963
|
-
extraRender?: (info: ExtraRenderInfo) => VNode;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
export declare interface ListRef {
|
|
967
|
-
nativeElement?: HTMLDivElement;
|
|
968
|
-
scrollTo: ScrollTo;
|
|
969
|
-
getScrollInfo: () => VirtualScrollInfo;
|
|
970
|
-
getHorizontalRange: () => number;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
export declare type LocaleName = string;
|
|
974
|
-
|
|
975
|
-
export declare type LocaleRegistry = Record<LocaleName, VTableGuildLocale>;
|
|
976
|
-
|
|
977
|
-
export declare function mergeDeep<T extends object>(base: T, override?: DeepPartial<T>): T;
|
|
978
|
-
|
|
979
|
-
/**
|
|
980
|
-
* 合并两层主题配置(默认主题 + 全局配置)。
|
|
981
|
-
*
|
|
982
|
-
* 合并策略(逐字段):
|
|
983
|
-
* - slots: tailwind-merge 智能合并(冲突后者胜,非冲突保留)
|
|
984
|
-
* - variants: 深合并(同名 variant 的同名值做 tailwind-merge 合并)
|
|
985
|
-
* - defaultVariants: 浅合并(Object.assign,用户覆盖默认)
|
|
986
|
-
* - compoundVariants: 追加(用户规则在后,优先级更高)
|
|
987
|
-
* - compoundSlots: 追加(同上)
|
|
988
|
-
*/
|
|
989
|
-
export declare function mergeThemeConfigs(base: ThemeConfig, override?: Partial<ThemeConfig>): ThemeConfig;
|
|
990
|
-
|
|
991
|
-
/**
|
|
992
|
-
* 定义一个可选的 boolean prop。
|
|
993
|
-
*/
|
|
994
|
-
export declare function optionalBoolProp(defaultValue?: boolean): {
|
|
995
|
-
type: BooleanConstructor;
|
|
996
|
-
required: false;
|
|
997
|
-
default: boolean;
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
/**
|
|
1001
|
-
* 定义一个可选的 prop,提供类型推导和默认值支持。
|
|
1002
|
-
*
|
|
1003
|
-
* @example
|
|
1004
|
-
* ```ts
|
|
1005
|
-
* export const tableProps = {
|
|
1006
|
-
* size: optionalProp<'sm' | 'md' | 'lg'>('md'),
|
|
1007
|
-
* bordered: optionalBoolProp(false),
|
|
1008
|
-
* }
|
|
1009
|
-
* ```
|
|
1010
|
-
*/
|
|
1011
|
-
export declare function optionalProp<T>(defaultValue?: T): {
|
|
1012
|
-
type: PropType<T>;
|
|
1013
|
-
required: false;
|
|
1014
|
-
default: T | undefined;
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* 定义一个可选的 string prop。
|
|
1019
|
-
*/
|
|
1020
|
-
export declare function optionalStringProp(defaultValue?: string): {
|
|
1021
|
-
type: StringConstructor;
|
|
1022
|
-
required: false;
|
|
1023
|
-
default: string | undefined;
|
|
1024
|
-
};
|
|
1025
|
-
|
|
1026
|
-
export declare const Radio: DefineComponent<ExtractPropTypes< {
|
|
1027
|
-
checked: {
|
|
1028
|
-
type: BooleanConstructor;
|
|
1029
|
-
default: boolean;
|
|
1030
|
-
};
|
|
1031
|
-
disabled: {
|
|
1032
|
-
type: BooleanConstructor;
|
|
1033
|
-
default: boolean;
|
|
1034
|
-
};
|
|
1035
|
-
ui: {
|
|
1036
|
-
type: PropType<SlotProps<{
|
|
1037
|
-
slots: Record<RadioSlots_2, string>;
|
|
1038
|
-
}>>;
|
|
1039
|
-
default: undefined;
|
|
1040
|
-
};
|
|
1041
|
-
class: {
|
|
1042
|
-
type: StringConstructor;
|
|
1043
|
-
default: undefined;
|
|
1044
|
-
};
|
|
1045
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "update:checked")[], "change" | "update:checked", PublicProps, Readonly<ExtractPropTypes< {
|
|
1046
|
-
checked: {
|
|
1047
|
-
type: BooleanConstructor;
|
|
1048
|
-
default: boolean;
|
|
1049
|
-
};
|
|
1050
|
-
disabled: {
|
|
1051
|
-
type: BooleanConstructor;
|
|
1052
|
-
default: boolean;
|
|
1053
|
-
};
|
|
1054
|
-
ui: {
|
|
1055
|
-
type: PropType<SlotProps<{
|
|
1056
|
-
slots: Record<RadioSlots_2, string>;
|
|
1057
|
-
}>>;
|
|
1058
|
-
default: undefined;
|
|
1059
|
-
};
|
|
1060
|
-
class: {
|
|
1061
|
-
type: StringConstructor;
|
|
1062
|
-
default: undefined;
|
|
1063
|
-
};
|
|
1064
|
-
}>> & Readonly<{
|
|
1065
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
1066
|
-
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
1067
|
-
}>, {
|
|
1068
|
-
class: string;
|
|
1069
|
-
disabled: boolean;
|
|
1070
|
-
checked: boolean;
|
|
1071
|
-
ui: Partial<Record<"root" | "dot", string>>;
|
|
1072
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1073
|
-
|
|
1074
|
-
export declare type RadioSlots = keyof typeof radioTheme.slots;
|
|
1075
|
-
|
|
1076
|
-
declare type RadioSlots_2 = keyof typeof defaultRadioTheme.slots;
|
|
1077
|
-
|
|
1078
|
-
/**
|
|
1079
|
-
* Ant Design Vue Radio 主题。
|
|
1080
|
-
*
|
|
1081
|
-
* 精确对齐 antdv Radio 组件样式:
|
|
1082
|
-
* - size: 16px (via CSS var)
|
|
1083
|
-
* - rounded-full
|
|
1084
|
-
* - transition: 0.3s, cubic-bezier(0.78, 0.14, 0.15, 0.86)
|
|
1085
|
-
* - checked: primary bg, inner dot scale(0.375)
|
|
1086
|
-
* - disabled: 灰底灰边,无 opacity
|
|
1087
|
-
*/
|
|
1088
|
-
export declare const radioTheme: {
|
|
1089
|
-
readonly slots: {
|
|
1090
|
-
readonly root: string;
|
|
1091
|
-
readonly dot: "rounded-full w-[var(--vtg-radio-size)] h-[var(--vtg-radio-size)] transition-transform duration-300 ease-[cubic-bezier(0.78,0.14,0.15,0.86)]";
|
|
1092
|
-
};
|
|
1093
|
-
readonly variants: {
|
|
1094
|
-
readonly checked: {
|
|
1095
|
-
readonly true: {
|
|
1096
|
-
readonly root: "border-[color:var(--color-primary)] bg-[color:var(--color-primary)]";
|
|
1097
|
-
readonly dot: "scale-[0.375] bg-[color:var(--color-surface)]";
|
|
1098
|
-
};
|
|
1099
|
-
};
|
|
1100
|
-
readonly disabled: {
|
|
1101
|
-
readonly true: {
|
|
1102
|
-
readonly root: "bg-[color:var(--color-bg-disabled,rgba(0,0,0,0.04))] cursor-not-allowed hover:border-[color:var(--color-border,#d9d9d9)]";
|
|
1103
|
-
};
|
|
1104
|
-
};
|
|
1105
|
-
};
|
|
1106
|
-
readonly defaultVariants: {
|
|
1107
|
-
readonly checked: false;
|
|
1108
|
-
readonly disabled: false;
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
|
|
1112
|
-
export declare type RadioThemeConfig = typeof radioTheme;
|
|
1113
|
-
|
|
1114
|
-
export declare interface RenderedCell {
|
|
1115
|
-
props?: CellAdditionalProps;
|
|
1116
|
-
children?: VNodeChild;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* 定义一个必选的 prop。
|
|
1121
|
-
*/
|
|
1122
|
-
export declare function requiredProp<T>(): {
|
|
1123
|
-
type: PropType<T>;
|
|
1124
|
-
required: true;
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
export declare function resolveBuiltInLocale(name?: ThemePresetName, localeName?: LocaleName): VTableGuildLocale | undefined;
|
|
1128
|
-
|
|
1129
|
-
export declare function resolveBuiltInTableLocale(name?: ThemePresetName, localeName?: LocaleName): VTableGuildTableLocale | undefined;
|
|
1130
|
-
|
|
1131
|
-
export declare function resolveButtonThemePreset(name?: ThemePresetName): ButtonThemeConfig;
|
|
1132
|
-
|
|
1133
|
-
export declare function resolveCheckboxThemePreset(name?: ThemePresetName): CheckboxThemeConfig;
|
|
1134
|
-
|
|
1135
|
-
export declare function resolveInputThemePreset(name?: ThemePresetName): InputThemeConfig;
|
|
1136
|
-
|
|
1137
|
-
export declare function resolveRadioThemePreset(name?: ThemePresetName): RadioThemeConfig;
|
|
1138
|
-
|
|
1139
|
-
export declare function resolveScrollbarThemePreset(name?: ThemePresetName): ScrollbarThemeConfig;
|
|
1140
|
-
|
|
1141
|
-
export declare function resolveTableLocalePreset(name?: ThemePresetName): VTableGuildTableLocale;
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
* 解析特定组件的主题预设。
|
|
1145
|
-
*
|
|
1146
|
-
* 返回窄类型 AntdvTableThemeConfig,确保消费端 useTheme 能推导出
|
|
1147
|
-
* 具体 slot 名称(root、table、th 等),而非拓宽为 string。
|
|
1148
|
-
*
|
|
1149
|
-
* @param name - 预设名称
|
|
1150
|
-
* @returns Table 的 AntdvTableThemeConfig(保留字面量 slot key)
|
|
1151
|
-
*/
|
|
1152
|
-
export declare function resolveTableThemePreset(name?: ThemePresetName): TableThemeConfig;
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
* 解析主题预设。
|
|
1156
|
-
*
|
|
1157
|
-
* @param name - 预设名称,默认 'antdv'
|
|
1158
|
-
* @returns 完整的 ThemePreset 对象
|
|
1159
|
-
*/
|
|
1160
|
-
export declare function resolveThemePreset(name?: ThemePresetName): ThemePreset;
|
|
1161
|
-
|
|
1162
|
-
export declare function resolveTooltipThemePreset(name?: ThemePresetName): TooltipThemeConfig;
|
|
1163
|
-
|
|
1164
|
-
declare type RowClassName<TRecord = Record<string, any>> = (record: TRecord, index: number, indent: number) => string;
|
|
1165
|
-
|
|
1166
|
-
export declare interface RowSelection<TRecord extends object = Record<string, any>> {
|
|
1167
|
-
preserveSelectedRowKeys?: boolean;
|
|
1168
|
-
type?: RowSelectionType;
|
|
1169
|
-
selectedRowKeys?: Key[];
|
|
1170
|
-
defaultSelectedRowKeys?: Key[];
|
|
1171
|
-
onChange?: (selectedRowKeys: Key[], selectedRows: TRecord[]) => void;
|
|
1172
|
-
onSelect?: (record: TRecord, selected: boolean, selectedRows: TRecord[]) => void;
|
|
1173
|
-
onSelectMultiple?: (selected: boolean, selectedRows: TRecord[], changeRows: TRecord[]) => void;
|
|
1174
|
-
onSelectAll?: (selected: boolean, selectedRows: TRecord[], changeRows: TRecord[]) => void;
|
|
1175
|
-
onSelectInvert?: (selectedRowKeys: Key[]) => void;
|
|
1176
|
-
onSelectNone?: () => void;
|
|
1177
|
-
getCheckboxProps?: (record: TRecord) => {
|
|
1178
|
-
disabled?: boolean;
|
|
1179
|
-
name?: string;
|
|
1180
|
-
};
|
|
1181
|
-
columnWidth?: number | string;
|
|
1182
|
-
fixed?: boolean | 'left' | 'right';
|
|
1183
|
-
columnTitle?: string | VNodeChild;
|
|
1184
|
-
renderCell?: (value: boolean, record: TRecord, index: number, originNode: VNodeChild) => VNodeChild | RenderedCell;
|
|
1185
|
-
checkStrictly?: boolean;
|
|
1186
|
-
/** 自定义选择项。true 显示默认项,数组可混合 SELECTION_ALL 等哨兵与自定义项 */
|
|
1187
|
-
selections?: boolean | (SelectionItem | SelectionSentinel)[];
|
|
1188
|
-
/** 隐藏全选 checkbox 及自定义选择下拉 */
|
|
1189
|
-
hideSelectAll?: boolean;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
export declare type RowSelectionType = 'checkbox' | 'radio';
|
|
1193
|
-
|
|
1194
|
-
export declare const Scrollbar: DefineComponent<ExtractPropTypes< {
|
|
1195
|
-
height: {
|
|
1196
|
-
type: PropType<string | number>;
|
|
1197
|
-
default: undefined;
|
|
1198
|
-
};
|
|
1199
|
-
maxHeight: {
|
|
1200
|
-
type: PropType<string | number>;
|
|
1201
|
-
default: undefined;
|
|
1202
|
-
};
|
|
1203
|
-
native: {
|
|
1204
|
-
type: BooleanConstructor;
|
|
1205
|
-
default: boolean;
|
|
1206
|
-
};
|
|
1207
|
-
always: {
|
|
1208
|
-
type: BooleanConstructor;
|
|
1209
|
-
default: boolean;
|
|
1210
|
-
};
|
|
1211
|
-
minSize: {
|
|
1212
|
-
type: NumberConstructor;
|
|
1213
|
-
default: number;
|
|
1214
|
-
};
|
|
1215
|
-
tag: {
|
|
1216
|
-
type: StringConstructor;
|
|
1217
|
-
default: string;
|
|
1218
|
-
};
|
|
1219
|
-
wrapClass: {
|
|
1220
|
-
type: StringConstructor;
|
|
1221
|
-
default: undefined;
|
|
1222
|
-
};
|
|
1223
|
-
wrapStyle: {
|
|
1224
|
-
type: PropType<StyleValue>;
|
|
1225
|
-
default: undefined;
|
|
1226
|
-
};
|
|
1227
|
-
viewClass: {
|
|
1228
|
-
type: StringConstructor;
|
|
1229
|
-
default: undefined;
|
|
1230
|
-
};
|
|
1231
|
-
viewStyle: {
|
|
1232
|
-
type: PropType<StyleValue>;
|
|
1233
|
-
default: undefined;
|
|
1234
|
-
};
|
|
1235
|
-
ui: {
|
|
1236
|
-
type: PropType<SlotProps<{
|
|
1237
|
-
slots: Record<ScrollbarSlots_2, string>;
|
|
1238
|
-
}>>;
|
|
1239
|
-
default: undefined;
|
|
1240
|
-
};
|
|
1241
|
-
class: {
|
|
1242
|
-
type: StringConstructor;
|
|
1243
|
-
default: undefined;
|
|
1244
|
-
};
|
|
1245
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "scroll"[], "scroll", PublicProps, Readonly<ExtractPropTypes< {
|
|
1246
|
-
height: {
|
|
1247
|
-
type: PropType<string | number>;
|
|
1248
|
-
default: undefined;
|
|
1249
|
-
};
|
|
1250
|
-
maxHeight: {
|
|
1251
|
-
type: PropType<string | number>;
|
|
1252
|
-
default: undefined;
|
|
1253
|
-
};
|
|
1254
|
-
native: {
|
|
1255
|
-
type: BooleanConstructor;
|
|
1256
|
-
default: boolean;
|
|
1257
|
-
};
|
|
1258
|
-
always: {
|
|
1259
|
-
type: BooleanConstructor;
|
|
1260
|
-
default: boolean;
|
|
1261
|
-
};
|
|
1262
|
-
minSize: {
|
|
1263
|
-
type: NumberConstructor;
|
|
1264
|
-
default: number;
|
|
1265
|
-
};
|
|
1266
|
-
tag: {
|
|
1267
|
-
type: StringConstructor;
|
|
1268
|
-
default: string;
|
|
1269
|
-
};
|
|
1270
|
-
wrapClass: {
|
|
1271
|
-
type: StringConstructor;
|
|
1272
|
-
default: undefined;
|
|
1273
|
-
};
|
|
1274
|
-
wrapStyle: {
|
|
1275
|
-
type: PropType<StyleValue>;
|
|
1276
|
-
default: undefined;
|
|
1277
|
-
};
|
|
1278
|
-
viewClass: {
|
|
1279
|
-
type: StringConstructor;
|
|
1280
|
-
default: undefined;
|
|
1281
|
-
};
|
|
1282
|
-
viewStyle: {
|
|
1283
|
-
type: PropType<StyleValue>;
|
|
1284
|
-
default: undefined;
|
|
1285
|
-
};
|
|
1286
|
-
ui: {
|
|
1287
|
-
type: PropType<SlotProps<{
|
|
1288
|
-
slots: Record<ScrollbarSlots_2, string>;
|
|
1289
|
-
}>>;
|
|
1290
|
-
default: undefined;
|
|
1291
|
-
};
|
|
1292
|
-
class: {
|
|
1293
|
-
type: StringConstructor;
|
|
1294
|
-
default: undefined;
|
|
1295
|
-
};
|
|
1296
|
-
}>> & Readonly<{
|
|
1297
|
-
onScroll?: ((...args: any[]) => any) | undefined;
|
|
1298
|
-
}>, {
|
|
1299
|
-
class: string;
|
|
1300
|
-
ui: Partial<Record<"wrap" | "root" | "view" | "track" | "trackVertical" | "trackHorizontal" | "thumb", string>>;
|
|
1301
|
-
height: string | number;
|
|
1302
|
-
always: boolean;
|
|
1303
|
-
maxHeight: string | number;
|
|
1304
|
-
native: boolean;
|
|
1305
|
-
minSize: number;
|
|
1306
|
-
tag: string;
|
|
1307
|
-
wrapClass: string;
|
|
1308
|
-
wrapStyle: StyleValue;
|
|
1309
|
-
viewClass: string;
|
|
1310
|
-
viewStyle: StyleValue;
|
|
1311
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1312
|
-
|
|
1313
|
-
export declare type ScrollBarDirectionType = 'ltr' | 'rtl';
|
|
1314
|
-
|
|
1315
|
-
export declare type ScrollbarSlots = keyof typeof scrollbarTheme.slots;
|
|
1316
|
-
|
|
1317
|
-
declare type ScrollbarSlots_2 = keyof typeof defaultScrollbarTheme.slots;
|
|
1318
|
-
|
|
1319
|
-
export declare const scrollbarTheme: {
|
|
1320
|
-
readonly slots: {
|
|
1321
|
-
readonly root: "group relative overflow-hidden";
|
|
1322
|
-
readonly wrap: "overflow-auto scrollbar-none h-full";
|
|
1323
|
-
readonly view: "block min-w-full w-max";
|
|
1324
|
-
readonly track: "absolute z-[3] rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100";
|
|
1325
|
-
readonly trackVertical: "right-0.5 top-0.5 bottom-0.5 w-[var(--vtg-scrollbar-thumb-width)]";
|
|
1326
|
-
readonly trackHorizontal: "bottom-0.5 left-0.5 right-0.5 h-[var(--vtg-scrollbar-thumb-width)]";
|
|
1327
|
-
readonly thumb: string;
|
|
1328
|
-
};
|
|
1329
|
-
readonly defaultVariants: {};
|
|
1330
|
-
};
|
|
1331
|
-
|
|
1332
|
-
export declare type ScrollbarThemeConfig = typeof scrollbarTheme;
|
|
1333
|
-
|
|
1334
|
-
declare type ScrollTo = (arg?: number | VirtualScrollConfig | null) => void;
|
|
1335
|
-
|
|
1336
|
-
export declare const SELECTION_ALL: "SELECT_ALL";
|
|
1337
|
-
|
|
1338
|
-
export declare const SELECTION_INVERT: "SELECT_INVERT";
|
|
1339
|
-
|
|
1340
|
-
export declare const SELECTION_NONE: "SELECT_NONE";
|
|
1341
|
-
|
|
1342
|
-
export declare interface SelectionItem {
|
|
1343
|
-
key: string;
|
|
1344
|
-
text: string | VNodeChild;
|
|
1345
|
-
onSelect?: (changeableRowKeys: Key[]) => void;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
export declare type SelectionSentinel = typeof SELECTION_ALL | typeof SELECTION_INVERT | typeof SELECTION_NONE;
|
|
1349
|
-
|
|
1350
|
-
export declare interface SelectionState {
|
|
1351
|
-
checked: boolean;
|
|
1352
|
-
indeterminate: boolean;
|
|
1353
|
-
disabled: boolean;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* 组件 `ui` prop 的类型:每个 slot 可传入自定义 class 字符串。
|
|
1358
|
-
*
|
|
1359
|
-
* ```vue
|
|
1360
|
-
* <VTable :ui="{ root: 'shadow-lg', th: 'bg-blue-50' }" />
|
|
1361
|
-
* ```
|
|
1362
|
-
*/
|
|
1363
|
-
export declare type SlotProps<T extends ThemeConfig> = Partial<Record<keyof T['slots'] & string, string>>;
|
|
1364
|
-
|
|
1365
|
-
/** 排序器:布尔值表示使用默认排序,函数表示自定义比较 */
|
|
1366
|
-
export declare type SorterFn<TRecord = Record<string, any>> = (a: TRecord, b: TRecord) => number;
|
|
1367
|
-
|
|
1368
|
-
export declare type SorterResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SorterResultLike<TRecord> | Array<SorterResultLike<TRecord>>;
|
|
1369
|
-
|
|
1370
|
-
declare interface SorterResultLike<TRecord extends object = Record<string, any>> {
|
|
1371
|
-
column: ColumnType<TRecord> | undefined;
|
|
1372
|
-
columnKey: Key | undefined;
|
|
1373
|
-
order: SortOrder;
|
|
1374
|
-
field: ColumnType<TRecord>['dataIndex'];
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
/** 排序方向 */
|
|
1378
|
-
export declare type SortOrder = 'ascend' | 'descend' | null;
|
|
1379
|
-
|
|
1380
|
-
export declare type SummaryFixed = boolean | 'top' | 'bottom';
|
|
1381
|
-
|
|
1382
|
-
export declare function syncDocumentPresetAttr(themePreset: VTableGuildContext['themePreset']): void;
|
|
1383
|
-
|
|
1384
|
-
/** 对齐类映射,由 cell 组件消费,同时确保类名进入 theme dist 被 Tailwind 扫描 */
|
|
1385
|
-
export declare const TABLE_ALIGN_CLASSES: {
|
|
1386
|
-
readonly left: "text-left";
|
|
1387
|
-
readonly center: "text-center";
|
|
1388
|
-
readonly right: "text-right";
|
|
1389
|
-
};
|
|
1390
|
-
|
|
1391
|
-
/**
|
|
1392
|
-
* bodyCell slot 的参数类型。
|
|
1393
|
-
*/
|
|
1394
|
-
export declare interface TableBodyCellSlotProps<TRecord extends object = Record<string, any>> {
|
|
1395
|
-
text: unknown;
|
|
1396
|
-
record: TRecord;
|
|
1397
|
-
index: number;
|
|
1398
|
-
column: ColumnType<TRecord>;
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
/** change 事件中的 extra 参数 */
|
|
1402
|
-
export declare interface TableChangeExtra<TRecord extends object = Record<string, any>> {
|
|
1403
|
-
/** 触发变化的来源 */
|
|
1404
|
-
action: 'sort' | 'filter' | 'select';
|
|
1405
|
-
/** 当前显示的数据(经排序/筛选后) */
|
|
1406
|
-
currentDataSource: TRecord[];
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
/**
|
|
1410
|
-
* title / footer slot 的参数类型。
|
|
1411
|
-
*/
|
|
1412
|
-
export declare interface TableDataSlotProps<TRecord extends object = Record<string, any>> {
|
|
1413
|
-
data: TRecord[];
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
/** change 事件中的 filters 参数 */
|
|
1417
|
-
export declare type TableFiltersInfo = Record<string, (string | number | boolean)[] | null>;
|
|
1418
|
-
|
|
1419
|
-
/**
|
|
1420
|
-
* headerCell slot 的参数类型。
|
|
1421
|
-
*/
|
|
1422
|
-
export declare interface TableHeaderCellSlotProps<TRecord extends object = Record<string, any>> {
|
|
1423
|
-
title: VNodeChild | undefined;
|
|
1424
|
-
column: ColumnType<TRecord> | ColumnGroupType<TRecord>;
|
|
1425
|
-
index: number;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
declare type TableLayout = 'auto' | 'fixed';
|
|
1429
|
-
|
|
1430
|
-
/**
|
|
1431
|
-
* Table 组件 Props。
|
|
1432
|
-
*/
|
|
1433
|
-
export declare interface TableProps<TRecord extends object = Record<string, any>> {
|
|
1434
|
-
/** 数据源 */
|
|
1435
|
-
dataSource: TRecord[];
|
|
1436
|
-
/** 列配置 */
|
|
1437
|
-
columns: ColumnsType<TRecord>;
|
|
1438
|
-
/** 行唯一标识 */
|
|
1439
|
-
rowKey?: string | ((record: TRecord) => Key);
|
|
1440
|
-
/** 加载状态 */
|
|
1441
|
-
loading?: boolean;
|
|
1442
|
-
/** 尺寸:lg(默认) / md / sm */
|
|
1443
|
-
size?: 'sm' | 'md' | 'lg';
|
|
1444
|
-
/** 显示边框 */
|
|
1445
|
-
bordered?: boolean;
|
|
1446
|
-
/** 斑马纹 */
|
|
1447
|
-
striped?: boolean;
|
|
1448
|
-
/** 行 hover 高亮 */
|
|
1449
|
-
hoverable?: boolean;
|
|
1450
|
-
/** slot 级别样式覆盖 */
|
|
1451
|
-
ui?: SlotProps<{
|
|
1452
|
-
slots: Record<TableSlots, string>;
|
|
1453
|
-
}>;
|
|
1454
|
-
/** 根元素自定义 class */
|
|
1455
|
-
class?: string;
|
|
1456
|
-
/** 表格布局模式 */
|
|
1457
|
-
tableLayout?: TableLayout;
|
|
1458
|
-
/** 是否显示表头 */
|
|
1459
|
-
showHeader?: boolean;
|
|
1460
|
-
/** 行 class */
|
|
1461
|
-
rowClassName?: string | RowClassName<TRecord>;
|
|
1462
|
-
/** 自定义行 props */
|
|
1463
|
-
customRow?: GetComponentProps<TRecord>;
|
|
1464
|
-
/** 自定义表头行 props */
|
|
1465
|
-
customHeaderRow?: (columns: Array<ColumnType<TRecord> | ColumnGroupType<TRecord>>, index?: number) => CellAdditionalProps;
|
|
1466
|
-
/**
|
|
1467
|
-
* 表级别控制是否显示排序 tooltip,默认 true。
|
|
1468
|
-
* 可被列级别 showSorterTooltip 覆盖。
|
|
1469
|
-
*/
|
|
1470
|
-
showSorterTooltip?: boolean;
|
|
1471
|
-
/** 表级排序方向列表 */
|
|
1472
|
-
sortDirections?: SortOrder[];
|
|
1473
|
-
/** 当前激活语言标识,默认继承 provider/plugin,否则为 'zh-CN'。 */
|
|
1474
|
-
locale?: LocaleName;
|
|
1475
|
-
/** 当前实例注册的语言包映射。 */
|
|
1476
|
-
locales?: LocaleRegistry;
|
|
1477
|
-
/** 表级 locale 局部覆写,优先级高于全局 provider / plugin。 */
|
|
1478
|
-
localeOverrides?: DeepPartial<VTableGuildTableLocale>;
|
|
1479
|
-
/** 粘性表头/滚动条 */
|
|
1480
|
-
sticky?: boolean | TableSticky;
|
|
1481
|
-
/** 下拉层挂载容器 */
|
|
1482
|
-
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
1483
|
-
/** 单元格文本转换 */
|
|
1484
|
-
transformCellText?: TransformCellText<TRecord>;
|
|
1485
|
-
/** 行选择配置 */
|
|
1486
|
-
rowSelection?: RowSelection<TRecord>;
|
|
1487
|
-
/** 展开行配置 */
|
|
1488
|
-
expandable?: Expandable<TRecord>;
|
|
1489
|
-
/** 表格标题渲染函数 */
|
|
1490
|
-
title?: (data: TRecord[]) => VNodeChild;
|
|
1491
|
-
/** 表格页脚渲染函数 */
|
|
1492
|
-
footer?: (data: TRecord[]) => VNodeChild;
|
|
1493
|
-
/** 滚动配置。x 为横向滚动宽度,y 为纵向滚动高度(启用固定表头)。 */
|
|
1494
|
-
scroll?: {
|
|
1495
|
-
x?: number | string;
|
|
1496
|
-
y?: number | string;
|
|
1497
|
-
};
|
|
1498
|
-
/** 是否开启虚拟滚动(需同时设置 scroll.y) */
|
|
1499
|
-
virtual?: boolean;
|
|
1500
|
-
/** 树形数据子节点字段名,默认 'children' */
|
|
1501
|
-
childrenColumnName?: string;
|
|
1502
|
-
/** 树形数据缩进宽度(px),默认 15 */
|
|
1503
|
-
indentSize?: number;
|
|
1504
|
-
/** 树形数据受控展开 key 列表 */
|
|
1505
|
-
expandedRowKeys?: Key[];
|
|
1506
|
-
/** 树形数据非受控默认展开 key 列表 */
|
|
1507
|
-
defaultExpandedRowKeys?: Key[];
|
|
1508
|
-
/** 树形数据默认展开所有节点 */
|
|
1509
|
-
defaultExpandAllRows?: boolean;
|
|
1510
|
-
/** 树形数据展开/折叠回调 */
|
|
1511
|
-
onExpand?: (expanded: boolean, record: TRecord) => void;
|
|
1512
|
-
/** 树形数据展开 key 变化回调 */
|
|
1513
|
-
onExpandedRowsChange?: (expandedKeys: Key[]) => void;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
export declare type TableSlots = keyof typeof tableTheme.slots;
|
|
1517
|
-
|
|
1518
|
-
/**
|
|
1519
|
-
* Table 组件 slots 声明。
|
|
1520
|
-
*/
|
|
1521
|
-
export declare interface TableSlotsDecl<TRecord extends object = Record<string, any>> {
|
|
1522
|
-
bodyCell?: (props: TableBodyCellSlotProps<TRecord>) => VNodeChild;
|
|
1523
|
-
headerCell?: (props: TableHeaderCellSlotProps<TRecord>) => VNodeChild;
|
|
1524
|
-
empty?: () => VNodeChild;
|
|
1525
|
-
loading?: () => VNodeChild;
|
|
1526
|
-
customFilterDropdown?: (props: CustomFilterDropdownSlotProps<TRecord>) => VNodeChild;
|
|
1527
|
-
customFilterIcon?: (props: {
|
|
1528
|
-
column: ColumnType<TRecord>;
|
|
1529
|
-
filtered: boolean;
|
|
1530
|
-
}) => VNodeChild;
|
|
1531
|
-
title?: (props: TableDataSlotProps<TRecord>) => VNodeChild;
|
|
1532
|
-
footer?: (props: TableDataSlotProps<TRecord>) => VNodeChild;
|
|
1533
|
-
summary?: () => VNodeChild;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
declare interface TableSticky {
|
|
1537
|
-
offsetHeader?: number;
|
|
1538
|
-
offsetSummary?: number;
|
|
1539
|
-
offsetScroll?: number;
|
|
1540
|
-
getContainer?: () => Window | HTMLElement;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
export declare const tableTheme: {
|
|
1544
|
-
readonly slots: {
|
|
1545
|
-
readonly root: string;
|
|
1546
|
-
readonly wrapper: "w-full overflow-auto";
|
|
1547
|
-
readonly table: string;
|
|
1548
|
-
readonly thead: "";
|
|
1549
|
-
readonly tbody: "";
|
|
1550
|
-
readonly tr: "group/row transition-colors";
|
|
1551
|
-
readonly groupedHeaderTable: "";
|
|
1552
|
-
readonly groupedHeaderTh: "";
|
|
1553
|
-
readonly groupedHeaderTd: "";
|
|
1554
|
-
readonly th: string;
|
|
1555
|
-
readonly td: string;
|
|
1556
|
-
readonly empty: "text-center text-[color:var(--color-text-disabled)]";
|
|
1557
|
-
readonly loading: string;
|
|
1558
|
-
readonly headerCellInner: "flex items-center";
|
|
1559
|
-
readonly bodyCellEllipsis: "block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap";
|
|
1560
|
-
readonly thSortable: "cursor-pointer select-none hover:bg-[var(--vtg-table-header-sort-hover-bg)]";
|
|
1561
|
-
readonly sortButton: "inline-flex flex-col items-center justify-center text-xs leading-none ml-1";
|
|
1562
|
-
readonly sortIconDown: "-mt-[0.225em]";
|
|
1563
|
-
readonly sortAreaOuter: "flex flex-auto min-w-0";
|
|
1564
|
-
readonly sortAreaWrapper: "flex flex-auto items-center justify-between min-w-0";
|
|
1565
|
-
readonly sortAreaTitle: "flex-1 min-w-0";
|
|
1566
|
-
readonly filterIconWrapper: "shrink-0 ml-1 self-stretch -my-1 -me-2 flex items-center";
|
|
1567
|
-
readonly filterIcon: "inline-flex items-center justify-center cursor-pointer transition-colors text-xs px-1 self-stretch rounded-md hover:bg-black/6";
|
|
1568
|
-
readonly filterDropdown: string;
|
|
1569
|
-
readonly filterDropdownList: "p-1 m-0 list-none min-w-[120px]";
|
|
1570
|
-
readonly filterDropdownItem: "flex items-center cursor-pointer";
|
|
1571
|
-
readonly filterDropdownItemSelected: "bg-[color:var(--color-control-item-active-bg)] hover:bg-[color:var(--color-control-item-active-hover-bg)]";
|
|
1572
|
-
readonly filterDropdownItemHover: "hover:bg-[color:var(--color-control-item-hover-bg)]";
|
|
1573
|
-
readonly filterDropdownSwitcher: "inline-flex items-center justify-center w-6 h-6 cursor-pointer text-[10px] text-[color:var(--color-on-surface)] transition-transform duration-200";
|
|
1574
|
-
readonly filterDropdownSwitcherExpanded: "rotate-0";
|
|
1575
|
-
readonly filterDropdownSwitcherCollapsed: "-rotate-90";
|
|
1576
|
-
readonly filterDropdownSwitcherNoop: "cursor-default invisible";
|
|
1577
|
-
readonly filterDropdownContentWrapper: "flex items-center gap-2 px-3 py-[5px] rounded-sm flex-1 min-w-0";
|
|
1578
|
-
readonly filterDropdownTreeWrapper: "pt-2 px-2 pb-0";
|
|
1579
|
-
readonly filterDropdownTreeList: "m-0 p-0 list-none [--vtg-table-filter-tree-indent-size:24px]";
|
|
1580
|
-
readonly filterDropdownTreeItem: "flex items-start cursor-pointer pb-1";
|
|
1581
|
-
readonly filterDropdownTreeContentWrapper: "flex min-h-6 flex-1 min-w-0 items-center gap-2 rounded-[6px] px-1 py-0";
|
|
1582
|
-
readonly filterDropdownTreeItemSelected: "bg-[color:var(--color-control-item-active-bg)] hover:bg-[color:var(--color-control-item-active-bg)]";
|
|
1583
|
-
readonly filterDropdownTreeCheckAll: "flex items-center w-full mb-1 ms-1";
|
|
1584
|
-
readonly filterDropdownActions: "flex items-center justify-between gap-2 px-2 py-2 border-t border-[color:var(--color-default)]";
|
|
1585
|
-
readonly filterDropdownSearch: "p-2 border-b border-[color:var(--color-default)]";
|
|
1586
|
-
readonly filterDropdownSearchField: string;
|
|
1587
|
-
readonly filterDropdownSearchIcon: "inline-flex shrink-0 items-center justify-center text-[14px] text-black/25";
|
|
1588
|
-
readonly filterDropdownSearchInput: string;
|
|
1589
|
-
readonly filterDropdownListEmpty: "px-3 py-2 text-center text-[length:12px] leading-5 text-black/25 select-none cursor-default";
|
|
1590
|
-
readonly emptyWrapper: "my-[var(--vtg-table-empty-margin-block)] flex flex-col items-center justify-center text-center";
|
|
1591
|
-
readonly emptyIcon: string;
|
|
1592
|
-
readonly emptyText: "m-0 text-[length:var(--vtg-table-font-size)] leading-[var(--vtg-table-line-height)] text-[color:var(--color-text-disabled)]";
|
|
1593
|
-
readonly loadingSpinner: "inline-flex items-center justify-center text-[length:20px] leading-none text-[color:var(--color-primary)]";
|
|
1594
|
-
readonly tdSelected: "bg-[var(--vtg-table-row-selected-bg)]";
|
|
1595
|
-
readonly tdSelectedHover: "group-hover/row:bg-[var(--vtg-table-row-selected-hover-bg)]";
|
|
1596
|
-
readonly selectionDropdown: string;
|
|
1597
|
-
readonly selectionDropdownItem: "flex items-center cursor-pointer px-3 py-[5px] rounded-sm hover:bg-[color:var(--color-control-item-hover-bg)]";
|
|
1598
|
-
readonly selectionExtra: "inline-flex items-center justify-center cursor-pointer ml-0.5 text-[10px] text-[color:var(--color-sorter-icon)] hover:text-[color:var(--color-primary)] transition-colors";
|
|
1599
|
-
readonly title: string;
|
|
1600
|
-
readonly footer: string;
|
|
1601
|
-
readonly summary: "";
|
|
1602
|
-
readonly summaryRow: "bg-[var(--vtg-table-header-bg)]";
|
|
1603
|
-
readonly summaryCell: string;
|
|
1604
|
-
readonly headerWrapper: "overflow-hidden";
|
|
1605
|
-
readonly bodyWrapper: "overflow-auto";
|
|
1606
|
-
readonly fixedCell: "sticky z-[2] bg-inherit";
|
|
1607
|
-
readonly fixedDividerLeft: "";
|
|
1608
|
-
readonly fixedDividerRight: string;
|
|
1609
|
-
readonly fixedShadowLeft: string;
|
|
1610
|
-
readonly fixedShadowRight: string;
|
|
1611
|
-
readonly fixedShadowLeftHidden: "after:shadow-none";
|
|
1612
|
-
readonly fixedShadowRightHidden: "after:shadow-none";
|
|
1613
|
-
readonly expandIcon: string;
|
|
1614
|
-
readonly expandIconExpanded: "after:scale-y-0";
|
|
1615
|
-
readonly expandIconCollapsed: "after:scale-y-100";
|
|
1616
|
-
readonly expandIconSpaced: "cursor-default border-transparent bg-transparent before:hidden after:hidden invisible";
|
|
1617
|
-
readonly expandIconDisabled: "cursor-default border-transparent bg-transparent before:hidden after:hidden invisible";
|
|
1618
|
-
readonly expandIconSymbol: "hidden";
|
|
1619
|
-
readonly expandIconSymbolExpanded: "";
|
|
1620
|
-
readonly expandIconSymbolCollapsed: "";
|
|
1621
|
-
readonly treeExpandIcon: string;
|
|
1622
|
-
readonly treeExpandIconExpanded: "after:scale-y-0";
|
|
1623
|
-
readonly treeExpandIconCollapsed: "after:scale-y-100";
|
|
1624
|
-
readonly treeExpandIconSpaced: "me-2 cursor-default border-transparent bg-transparent before:hidden after:hidden invisible";
|
|
1625
|
-
readonly treeExpandIconDisabled: "me-2 cursor-default border-transparent bg-transparent before:hidden after:hidden invisible";
|
|
1626
|
-
readonly treeExpandIconSymbol: "hidden";
|
|
1627
|
-
readonly treeExpandIconSymbolExpanded: "";
|
|
1628
|
-
readonly treeExpandIconSymbolCollapsed: "";
|
|
1629
|
-
readonly expandedRow: "";
|
|
1630
|
-
readonly expandedRowCell: "bg-[var(--vtg-table-expanded-row-bg,#fafafa)]";
|
|
1631
|
-
readonly resizeHandle: "";
|
|
1632
|
-
};
|
|
1633
|
-
readonly variants: {
|
|
1634
|
-
readonly size: {
|
|
1635
|
-
readonly lg: {};
|
|
1636
|
-
readonly md: {};
|
|
1637
|
-
readonly sm: {};
|
|
1638
|
-
};
|
|
1639
|
-
readonly bordered: {
|
|
1640
|
-
readonly true: {
|
|
1641
|
-
readonly root: "border border-[var(--vtg-table-border-color)] rounded-[8px] overflow-hidden";
|
|
1642
|
-
readonly table: "";
|
|
1643
|
-
readonly th: "border-r border-[var(--vtg-table-border-color)] last:border-r-0 before:hidden";
|
|
1644
|
-
readonly td: "border-r border-[var(--vtg-table-border-color)] last:border-r-0";
|
|
1645
|
-
readonly tbody: "[&>tr:last-child>td]:border-b-0";
|
|
1646
|
-
readonly title: "border-b border-[var(--vtg-table-border-color)]";
|
|
1647
|
-
readonly footer: "border-t border-[var(--vtg-table-border-color)]";
|
|
1648
|
-
readonly summaryCell: "border-r border-[var(--vtg-table-border-color)] last:border-r-0";
|
|
1649
|
-
};
|
|
1650
|
-
};
|
|
1651
|
-
readonly striped: {
|
|
1652
|
-
readonly true: {
|
|
1653
|
-
readonly td: "group-even/row:bg-[rgba(0,0,0,0.02)]";
|
|
1654
|
-
};
|
|
1655
|
-
};
|
|
1656
|
-
readonly hoverable: {
|
|
1657
|
-
readonly true: {
|
|
1658
|
-
readonly td: "group-hover/row:bg-[var(--vtg-table-row-hover-bg)]";
|
|
1659
|
-
};
|
|
1660
|
-
};
|
|
1661
|
-
readonly loading: {
|
|
1662
|
-
readonly true: {
|
|
1663
|
-
readonly table: "opacity-50 pointer-events-none select-none";
|
|
1664
|
-
};
|
|
1665
|
-
};
|
|
1666
|
-
};
|
|
1667
|
-
readonly compoundSlots: [{
|
|
1668
|
-
readonly slots: readonly ["th", "td", "title", "footer", "summaryCell"];
|
|
1669
|
-
readonly size: "lg";
|
|
1670
|
-
readonly class: "px-[var(--vtg-table-cell-padding-inline-lg)] py-[var(--vtg-table-cell-padding-block-lg)]";
|
|
1671
|
-
}, {
|
|
1672
|
-
readonly slots: readonly ["th", "td", "title", "footer", "summaryCell"];
|
|
1673
|
-
readonly size: "md";
|
|
1674
|
-
readonly class: "px-[var(--vtg-table-cell-padding-inline-md)] py-[var(--vtg-table-cell-padding-block-md)]";
|
|
1675
|
-
}, {
|
|
1676
|
-
readonly slots: readonly ["th", "td", "title", "footer", "summaryCell"];
|
|
1677
|
-
readonly size: "sm";
|
|
1678
|
-
readonly class: "px-[var(--vtg-table-cell-padding-inline-sm)] py-[var(--vtg-table-cell-padding-block-sm)]";
|
|
1679
|
-
}];
|
|
1680
|
-
readonly defaultVariants: {
|
|
1681
|
-
readonly size: "lg";
|
|
1682
|
-
readonly bordered: false;
|
|
1683
|
-
readonly striped: false;
|
|
1684
|
-
readonly hoverable: true;
|
|
1685
|
-
};
|
|
1686
|
-
};
|
|
1687
|
-
|
|
1688
|
-
/** 窄类型:保留 `as const` 的字面量 slot key,供 resolver 返回。 */
|
|
1689
|
-
export declare type TableThemeConfig = typeof tableTheme;
|
|
1690
|
-
|
|
1691
|
-
export declare type TableVariantProps = {
|
|
1692
|
-
size?: 'lg' | 'md' | 'sm';
|
|
1693
|
-
bordered?: boolean;
|
|
1694
|
-
striped?: boolean;
|
|
1695
|
-
hoverable?: boolean;
|
|
1696
|
-
};
|
|
1697
|
-
|
|
1698
|
-
declare type ThemeCompoundRuleOverride<T, TSlotKey extends string> = T extends string ? string : T extends boolean ? boolean : T extends readonly (infer U)[] ? Array<U extends string ? Extract<U, TSlotKey> : ThemeCompoundRuleOverride<U, TSlotKey>> : T extends object ? {
|
|
1699
|
-
[K in keyof T]?: K extends 'class' ? string : K extends 'slots' ? T[K] extends readonly (infer U)[] ? Array<Extract<U, TSlotKey>> : ThemeCompoundRuleOverride<T[K], TSlotKey> : ThemeCompoundRuleOverride<T[K], TSlotKey>;
|
|
1700
|
-
} : T;
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* 组件主题的原始配置对象(传给 tv() 之前的形态)。
|
|
1704
|
-
*
|
|
1705
|
-
* 这是 @vtable-guild/theme 中每个文件导出的结构:
|
|
1706
|
-
* ```ts
|
|
1707
|
-
* export const tableTheme = {
|
|
1708
|
-
* slots: { root: '...', table: '...' },
|
|
1709
|
-
* variants: { size: { sm: {...}, md: {...} } },
|
|
1710
|
-
* defaultVariants: { size: 'md' },
|
|
1711
|
-
* } as const satisfies ThemeConfig
|
|
1712
|
-
* ```
|
|
1713
|
-
*/
|
|
1714
|
-
export declare interface ThemeConfig {
|
|
1715
|
-
/** slot 名 → 默认 class 字符串 */
|
|
1716
|
-
slots: Record<string, string>;
|
|
1717
|
-
/** variant 名 → 值 → slot class 覆盖 */
|
|
1718
|
-
variants?: Record<string, Record<string, Record<string, string> | string>>;
|
|
1719
|
-
/** 默认 variant 值 */
|
|
1720
|
-
defaultVariants?: Record<string, string | boolean>;
|
|
1721
|
-
/** 复合 variant 规则(当多个 variant 同时匹配时应用) */
|
|
1722
|
-
compoundVariants?: Array<Record<string, unknown>>;
|
|
1723
|
-
/** 批量 slot 样式规则(多个 slot 共享相同条件下的样式) */
|
|
1724
|
-
compoundSlots?: Array<Record<string, unknown>>;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
declare type ThemeDefaultVariantOverrides<T extends ThemeConfig> = {
|
|
1728
|
-
[TVariant in keyof NonNullable<T['defaultVariants']>]?: NonNullable<T['defaultVariants']>[TVariant] extends boolean ? boolean : string;
|
|
1729
|
-
};
|
|
1730
|
-
|
|
1731
|
-
/**
|
|
1732
|
-
* Theme override type used by `createVTableGuild({ theme })` and nested config providers.
|
|
1733
|
-
*
|
|
1734
|
-
* It preserves slot / variant keys for completion while widening override values back to
|
|
1735
|
-
* writable types such as `string`.
|
|
1736
|
-
*/
|
|
1737
|
-
export declare type ThemeOverrideConfig<T extends ThemeConfig> = {
|
|
1738
|
-
slots?: Partial<Record<ThemeSlotKeys<T>, string>>;
|
|
1739
|
-
variants?: ThemeVariantOverrides<T>;
|
|
1740
|
-
defaultVariants?: ThemeDefaultVariantOverrides<T>;
|
|
1741
|
-
compoundVariants?: T extends {
|
|
1742
|
-
compoundVariants?: readonly (infer U)[];
|
|
1743
|
-
} ? Array<ThemeCompoundRuleOverride<U, ThemeSlotKeys<T>>> : never;
|
|
1744
|
-
compoundSlots?: T extends {
|
|
1745
|
-
compoundSlots?: readonly (infer U)[];
|
|
1746
|
-
} ? Array<ThemeCompoundRuleOverride<U, ThemeSlotKeys<T>>> : never;
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
* 主题预设接口。
|
|
1751
|
-
*
|
|
1752
|
-
* 每个 preset 导出一个 ThemePreset 对象,包含各组件的主题配置。
|
|
1753
|
-
* 当前仅 table。
|
|
1754
|
-
*/
|
|
1755
|
-
declare interface ThemePreset {
|
|
1756
|
-
table: ThemeConfig;
|
|
1757
|
-
button?: ThemeConfig;
|
|
1758
|
-
checkbox?: ThemeConfig;
|
|
1759
|
-
radio?: ThemeConfig;
|
|
1760
|
-
input?: ThemeConfig;
|
|
1761
|
-
tooltip?: ThemeConfig;
|
|
1762
|
-
scrollbar?: ThemeConfig;
|
|
1763
|
-
tableLocale: VTableGuildTableLocale;
|
|
1764
|
-
locales: Record<BuiltInLocaleName, VTableGuildLocale>;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* 可选的主题预设名称。
|
|
1769
|
-
*
|
|
1770
|
-
* - 'antdv':默认预设,视觉对齐 ant-design-vue
|
|
1771
|
-
* - 'element-plus':预留扩展,阶段三未实现时 fallback 到 antdv
|
|
1772
|
-
*/
|
|
1773
|
-
export declare type ThemePresetName = 'antdv' | 'element-plus';
|
|
1774
|
-
|
|
1775
|
-
declare type ThemeSlotKeys<T extends ThemeConfig> = keyof T['slots'] & string;
|
|
1776
|
-
|
|
1777
|
-
declare type ThemeVariantOverrides<T extends ThemeConfig> = {
|
|
1778
|
-
[TVariant in keyof NonNullable<T['variants']>]?: NonNullable<T['variants']>[TVariant] extends Record<string, unknown> ? {
|
|
1779
|
-
[TValue in keyof NonNullable<T['variants']>[TVariant]]?: NonNullable<T['variants']>[TVariant][TValue] extends string ? string : Partial<Record<ThemeSlotKeys<T>, string>>;
|
|
1780
|
-
} : never;
|
|
1781
|
-
};
|
|
1782
|
-
|
|
1783
|
-
export declare const Tooltip: DefineComponent<ExtractPropTypes< {
|
|
1784
|
-
title: {
|
|
1785
|
-
type: PropType<string | VNodeChild>;
|
|
1786
|
-
default: undefined;
|
|
1787
|
-
};
|
|
1788
|
-
placement: {
|
|
1789
|
-
type: PropType<"top" | "bottom" | "left" | "right">;
|
|
1790
|
-
default: string;
|
|
1791
|
-
};
|
|
1792
|
-
open: {
|
|
1793
|
-
type: PropType<boolean | undefined>;
|
|
1794
|
-
default: undefined;
|
|
1795
|
-
};
|
|
1796
|
-
mouseEnterDelay: {
|
|
1797
|
-
type: NumberConstructor;
|
|
1798
|
-
default: number;
|
|
1799
|
-
};
|
|
1800
|
-
mouseLeaveDelay: {
|
|
1801
|
-
type: NumberConstructor;
|
|
1802
|
-
default: number;
|
|
1803
|
-
};
|
|
1804
|
-
color: {
|
|
1805
|
-
type: StringConstructor;
|
|
1806
|
-
default: undefined;
|
|
1807
|
-
};
|
|
1808
|
-
arrow: {
|
|
1809
|
-
type: BooleanConstructor;
|
|
1810
|
-
default: boolean;
|
|
1811
|
-
};
|
|
1812
|
-
destroyOnHide: {
|
|
1813
|
-
type: BooleanConstructor;
|
|
1814
|
-
default: boolean;
|
|
1815
|
-
};
|
|
1816
|
-
block: {
|
|
1817
|
-
type: BooleanConstructor;
|
|
1818
|
-
default: boolean;
|
|
1819
|
-
};
|
|
1820
|
-
ui: {
|
|
1821
|
-
type: PropType<SlotProps<{
|
|
1822
|
-
slots: Record<TooltipSlots_2, string>;
|
|
1823
|
-
}>>;
|
|
1824
|
-
default: undefined;
|
|
1825
|
-
};
|
|
1826
|
-
class: {
|
|
1827
|
-
type: StringConstructor;
|
|
1828
|
-
default: undefined;
|
|
1829
|
-
};
|
|
1830
|
-
}>, () => VNode<RendererNode, RendererElement, {
|
|
1831
|
-
[key: string]: any;
|
|
1832
|
-
}>[] | JSX.Element | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1833
|
-
title: {
|
|
1834
|
-
type: PropType<string | VNodeChild>;
|
|
1835
|
-
default: undefined;
|
|
1836
|
-
};
|
|
1837
|
-
placement: {
|
|
1838
|
-
type: PropType<"top" | "bottom" | "left" | "right">;
|
|
1839
|
-
default: string;
|
|
1840
|
-
};
|
|
1841
|
-
open: {
|
|
1842
|
-
type: PropType<boolean | undefined>;
|
|
1843
|
-
default: undefined;
|
|
1844
|
-
};
|
|
1845
|
-
mouseEnterDelay: {
|
|
1846
|
-
type: NumberConstructor;
|
|
1847
|
-
default: number;
|
|
1848
|
-
};
|
|
1849
|
-
mouseLeaveDelay: {
|
|
1850
|
-
type: NumberConstructor;
|
|
1851
|
-
default: number;
|
|
1852
|
-
};
|
|
1853
|
-
color: {
|
|
1854
|
-
type: StringConstructor;
|
|
1855
|
-
default: undefined;
|
|
1856
|
-
};
|
|
1857
|
-
arrow: {
|
|
1858
|
-
type: BooleanConstructor;
|
|
1859
|
-
default: boolean;
|
|
1860
|
-
};
|
|
1861
|
-
destroyOnHide: {
|
|
1862
|
-
type: BooleanConstructor;
|
|
1863
|
-
default: boolean;
|
|
1864
|
-
};
|
|
1865
|
-
block: {
|
|
1866
|
-
type: BooleanConstructor;
|
|
1867
|
-
default: boolean;
|
|
1868
|
-
};
|
|
1869
|
-
ui: {
|
|
1870
|
-
type: PropType<SlotProps<{
|
|
1871
|
-
slots: Record<TooltipSlots_2, string>;
|
|
1872
|
-
}>>;
|
|
1873
|
-
default: undefined;
|
|
1874
|
-
};
|
|
1875
|
-
class: {
|
|
1876
|
-
type: StringConstructor;
|
|
1877
|
-
default: undefined;
|
|
1878
|
-
};
|
|
1879
|
-
}>> & Readonly<{}>, {
|
|
1880
|
-
color: string;
|
|
1881
|
-
title: VNodeChild;
|
|
1882
|
-
class: string;
|
|
1883
|
-
arrow: boolean;
|
|
1884
|
-
ui: Partial<Record<"content" | "arrow" | "arrowOuter" | "arrowInner", string>>;
|
|
1885
|
-
placement: "bottom" | "left" | "right" | "top";
|
|
1886
|
-
open: boolean | undefined;
|
|
1887
|
-
mouseEnterDelay: number;
|
|
1888
|
-
mouseLeaveDelay: number;
|
|
1889
|
-
destroyOnHide: boolean;
|
|
1890
|
-
block: boolean;
|
|
1891
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1892
|
-
|
|
1893
|
-
export declare type TooltipSlots = keyof typeof tooltipTheme.slots;
|
|
1894
|
-
|
|
1895
|
-
declare type TooltipSlots_2 = keyof typeof defaultTooltipTheme.slots;
|
|
1896
|
-
|
|
1897
|
-
/**
|
|
1898
|
-
* Ant Design Vue Tooltip 主题。
|
|
1899
|
-
*
|
|
1900
|
-
* 精确对齐 antdv Tooltip 组件样式:
|
|
1901
|
-
* - bg: rgba(0,0,0,0.85)
|
|
1902
|
-
* - border-radius: 6px
|
|
1903
|
-
* - padding: 6px 8px
|
|
1904
|
-
* - font-size: 14px
|
|
1905
|
-
* - 三层阴影
|
|
1906
|
-
*
|
|
1907
|
-
* 注意:定位相关的 inline style(position、top、left、z-index)保留在组件内,
|
|
1908
|
-
* 仅视觉样式(bg、padding、shadow、border-radius、color)迁入 theme slots。
|
|
1909
|
-
*/
|
|
1910
|
-
export declare const tooltipTheme: {
|
|
1911
|
-
readonly slots: {
|
|
1912
|
-
readonly content: string;
|
|
1913
|
-
readonly arrow: "absolute block overflow-visible pointer-events-none";
|
|
1914
|
-
readonly arrowOuter: "absolute inset-0 w-0 h-0";
|
|
1915
|
-
readonly arrowInner: "absolute inset-0 w-0 h-0";
|
|
1916
|
-
};
|
|
1917
|
-
readonly defaultVariants: {};
|
|
1918
|
-
};
|
|
1919
|
-
|
|
1920
|
-
export declare type TooltipThemeConfig = typeof tooltipTheme;
|
|
1921
|
-
|
|
1922
|
-
declare type TransformCellText<TRecord extends object = Record<string, any>> = (opt: {
|
|
1923
|
-
text: unknown;
|
|
1924
|
-
column: ColumnType<TRecord>;
|
|
1925
|
-
record: TRecord;
|
|
1926
|
-
index: number;
|
|
1927
|
-
}) => unknown;
|
|
1928
|
-
|
|
1929
|
-
/**
|
|
1930
|
-
* 项目统一的 tv() 实例。
|
|
1931
|
-
*
|
|
1932
|
-
* 通过 createTV 预配置 tailwind-merge,所有组件共用一份 merge 规则。
|
|
1933
|
-
* 所有组件的主题定义都应通过此函数创建,而非直接使用 tailwind-variants 的 tv()。
|
|
1934
|
-
*
|
|
1935
|
-
* @example
|
|
1936
|
-
* ```ts
|
|
1937
|
-
* const table = tv({
|
|
1938
|
-
* slots: {
|
|
1939
|
-
* root: 'w-full',
|
|
1940
|
-
* cell: 'px-4 py-3',
|
|
1941
|
-
* },
|
|
1942
|
-
* variants: {
|
|
1943
|
-
* size: {
|
|
1944
|
-
* sm: { cell: 'px-2 py-1.5 text-xs' },
|
|
1945
|
-
* md: { cell: 'px-4 py-3 text-sm' },
|
|
1946
|
-
* },
|
|
1947
|
-
* },
|
|
1948
|
-
* })
|
|
1949
|
-
* ```
|
|
1950
|
-
*/
|
|
1951
|
-
export declare const tv: TV;
|
|
1952
|
-
|
|
1953
|
-
/**
|
|
1954
|
-
* 列解析 composable。
|
|
1955
|
-
*
|
|
1956
|
-
* @param columns - 响应式列配置 getter
|
|
1957
|
-
* @returns { leafColumns, headerRows }
|
|
1958
|
-
*/
|
|
1959
|
-
export declare function useColumns<TRecord extends Record<string, unknown>>(columns: () => ColumnsType<TRecord>): {
|
|
1960
|
-
leafColumns: ComputedRef<ColumnType<TRecord>[]>;
|
|
1961
|
-
headerRows: ComputedRef<HeaderRowMeta<TRecord>[]>;
|
|
1962
|
-
};
|
|
1963
|
-
|
|
1964
|
-
/**
|
|
1965
|
-
* 三层主题合并 composable。
|
|
1966
|
-
*
|
|
1967
|
-
* 将默认主题 → 全局配置 → 实例级 props 合并为最终的 slot class 函数。
|
|
1968
|
-
*
|
|
1969
|
-
* @param componentName - 组件名(如 'table'),用于查找全局配置中对应的主题
|
|
1970
|
-
* @param defaultTheme - 来自 @vtable-guild/theme 的默认主题配置
|
|
1971
|
-
* @param props - 组件 props,必须是响应式对象(defineComponent 的 props 参数)
|
|
1972
|
-
*
|
|
1973
|
-
* @returns `{ slots }` — slots 是普通对象(非 ComputedRef),每个 key 是 slot 名,
|
|
1974
|
-
* 值是返回 class 字符串的函数。函数引用在 setup 阶段创建后不变,
|
|
1975
|
-
* 内部通过闭包懒读取 computed,保证响应性。
|
|
1976
|
-
*
|
|
1977
|
-
* @example
|
|
1978
|
-
* ```vue
|
|
1979
|
-
* <script setup lang="ts">
|
|
1980
|
-
* import { useTheme } from '@vtable-guild/core'
|
|
1981
|
-
* import { tableTheme } from '@vtable-guild/theme'
|
|
1982
|
-
*
|
|
1983
|
-
* const props = defineProps<{
|
|
1984
|
-
* size?: 'sm' | 'md' | 'lg'
|
|
1985
|
-
* bordered?: boolean
|
|
1986
|
-
* ui?: Partial<Record<string, string>>
|
|
1987
|
-
* class?: string
|
|
1988
|
-
* }>()
|
|
1989
|
-
*
|
|
1990
|
-
* const { slots } = useTheme('table', tableTheme, props)
|
|
1991
|
-
* </script>
|
|
1992
|
-
*
|
|
1993
|
-
* <template>
|
|
1994
|
-
* <div :class="slots.root()">
|
|
1995
|
-
* <table :class="slots.table()">...</table>
|
|
1996
|
-
* </div>
|
|
1997
|
-
* </template>
|
|
1998
|
-
* ```
|
|
1999
|
-
*/
|
|
2000
|
-
export declare function useTheme<T extends ThemeConfig>(componentName: string, defaultTheme: MaybeRef<T>, props: Record<string, unknown>): {
|
|
2001
|
-
slots: Record<keyof T["slots"] & string, () => string>;
|
|
2002
|
-
};
|
|
2003
|
-
|
|
2004
|
-
export declare const VirtualList: DefineComponent<ExtractPropTypes< {
|
|
2005
|
-
prefixCls: {
|
|
2006
|
-
type: StringConstructor;
|
|
2007
|
-
default: string;
|
|
2008
|
-
};
|
|
2009
|
-
data: {
|
|
2010
|
-
type: PropType<any[]>;
|
|
2011
|
-
};
|
|
2012
|
-
height: NumberConstructor;
|
|
2013
|
-
itemHeight: NumberConstructor;
|
|
2014
|
-
fullHeight: {
|
|
2015
|
-
type: BooleanConstructor;
|
|
2016
|
-
default: boolean;
|
|
2017
|
-
};
|
|
2018
|
-
itemKey: {
|
|
2019
|
-
type: PropType<Key_2 | ((item: any) => Key_2)>;
|
|
2020
|
-
required: true;
|
|
2021
|
-
};
|
|
2022
|
-
component: {
|
|
2023
|
-
type: StringConstructor;
|
|
2024
|
-
default: string;
|
|
2025
|
-
};
|
|
2026
|
-
direction: {
|
|
2027
|
-
type: PropType<ScrollBarDirectionType>;
|
|
2028
|
-
};
|
|
2029
|
-
scrollWidth: NumberConstructor;
|
|
2030
|
-
styles: PropType<ListProps["styles"]>;
|
|
2031
|
-
showScrollBar: {
|
|
2032
|
-
type: PropType<boolean | "optional" | "hover">;
|
|
2033
|
-
default: string;
|
|
2034
|
-
};
|
|
2035
|
-
virtual: {
|
|
2036
|
-
type: BooleanConstructor;
|
|
2037
|
-
default: boolean;
|
|
2038
|
-
};
|
|
2039
|
-
onScroll: PropType<(e: Event) => void>;
|
|
2040
|
-
onVirtualScroll: PropType<(info: VirtualScrollInfo) => void>;
|
|
2041
|
-
onVisibleChange: PropType<(visibleList: any[], fullList: any[]) => void>;
|
|
2042
|
-
innerProps: PropType<InnerProps>;
|
|
2043
|
-
extraRender: PropType<(info: ExtraRenderInfo) => VNode>;
|
|
2044
|
-
}>, () => VNode<RendererNode, RendererElement, {
|
|
2045
|
-
[key: string]: any;
|
|
2046
|
-
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2047
|
-
prefixCls: {
|
|
2048
|
-
type: StringConstructor;
|
|
2049
|
-
default: string;
|
|
2050
|
-
};
|
|
2051
|
-
data: {
|
|
2052
|
-
type: PropType<any[]>;
|
|
2053
|
-
};
|
|
2054
|
-
height: NumberConstructor;
|
|
2055
|
-
itemHeight: NumberConstructor;
|
|
2056
|
-
fullHeight: {
|
|
2057
|
-
type: BooleanConstructor;
|
|
2058
|
-
default: boolean;
|
|
2059
|
-
};
|
|
2060
|
-
itemKey: {
|
|
2061
|
-
type: PropType<Key_2 | ((item: any) => Key_2)>;
|
|
2062
|
-
required: true;
|
|
2063
|
-
};
|
|
2064
|
-
component: {
|
|
2065
|
-
type: StringConstructor;
|
|
2066
|
-
default: string;
|
|
2067
|
-
};
|
|
2068
|
-
direction: {
|
|
2069
|
-
type: PropType<ScrollBarDirectionType>;
|
|
2070
|
-
};
|
|
2071
|
-
scrollWidth: NumberConstructor;
|
|
2072
|
-
styles: PropType<ListProps["styles"]>;
|
|
2073
|
-
showScrollBar: {
|
|
2074
|
-
type: PropType<boolean | "optional" | "hover">;
|
|
2075
|
-
default: string;
|
|
2076
|
-
};
|
|
2077
|
-
virtual: {
|
|
2078
|
-
type: BooleanConstructor;
|
|
2079
|
-
default: boolean;
|
|
2080
|
-
};
|
|
2081
|
-
onScroll: PropType<(e: Event) => void>;
|
|
2082
|
-
onVirtualScroll: PropType<(info: VirtualScrollInfo) => void>;
|
|
2083
|
-
onVisibleChange: PropType<(visibleList: any[], fullList: any[]) => void>;
|
|
2084
|
-
innerProps: PropType<InnerProps>;
|
|
2085
|
-
extraRender: PropType<(info: ExtraRenderInfo) => VNode>;
|
|
2086
|
-
}>> & Readonly<{}>, {
|
|
2087
|
-
prefixCls: string;
|
|
2088
|
-
showScrollBar: boolean | "optional" | "hover";
|
|
2089
|
-
fullHeight: boolean;
|
|
2090
|
-
component: string;
|
|
2091
|
-
virtual: boolean;
|
|
2092
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2093
|
-
|
|
2094
|
-
export declare interface VirtualScrollConfig {
|
|
2095
|
-
index?: number;
|
|
2096
|
-
key?: Key_2;
|
|
2097
|
-
align?: 'top' | 'bottom' | 'auto';
|
|
2098
|
-
offset?: number;
|
|
2099
|
-
left?: number;
|
|
2100
|
-
top?: number;
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
export declare interface VirtualScrollInfo {
|
|
2104
|
-
x: number;
|
|
2105
|
-
y: number;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
export declare const VTable: (<TRecord extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
2109
|
-
slots: Readonly<TableSlotsDecl<TRecord>> & TableSlotsDecl<TRecord>;
|
|
2110
|
-
attrs: any;
|
|
2111
|
-
emit: ((evt: "change", filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => void) & ((evt: "resizeColumn", column: ColumnType<TRecord>, width: number) => void);
|
|
2112
|
-
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2113
|
-
props: {
|
|
2114
|
-
readonly onChange?: ((filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => any) | undefined;
|
|
2115
|
-
readonly onResizeColumn?: ((column: ColumnType<TRecord>, width: number) => any) | undefined;
|
|
2116
|
-
dataSource: TRecord[];
|
|
2117
|
-
columns: ColumnsType<TRecord>;
|
|
2118
|
-
rowKey?: string | ((record: TRecord) => Key) | undefined;
|
|
2119
|
-
loading?: boolean | undefined;
|
|
2120
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
2121
|
-
bordered?: boolean | undefined;
|
|
2122
|
-
striped?: boolean | undefined;
|
|
2123
|
-
hoverable?: boolean | undefined;
|
|
2124
|
-
ui?: SlotProps< {
|
|
2125
|
-
slots: Record<TableSlots, string>;
|
|
2126
|
-
}> | undefined;
|
|
2127
|
-
class?: string | undefined;
|
|
2128
|
-
tableLayout?: TableLayout | undefined;
|
|
2129
|
-
showHeader?: boolean | undefined;
|
|
2130
|
-
rowClassName?: string | RowClassName<TRecord> | undefined;
|
|
2131
|
-
customRow?: GetComponentProps<TRecord> | undefined;
|
|
2132
|
-
customHeaderRow?: ((columns: (ColumnType<TRecord> | ColumnGroupType<TRecord>)[], index?: number) => CellAdditionalProps) | undefined;
|
|
2133
|
-
showSorterTooltip?: boolean | undefined;
|
|
2134
|
-
sortDirections?: SortOrder[] | undefined;
|
|
2135
|
-
locale?: LocaleName | undefined;
|
|
2136
|
-
locales?: LocaleRegistry | undefined;
|
|
2137
|
-
localeOverrides?: DeepPartial<VTableGuildTableLocale> | undefined;
|
|
2138
|
-
sticky?: (boolean | TableSticky) | undefined;
|
|
2139
|
-
getPopupContainer?: ((triggerNode: HTMLElement) => HTMLElement) | undefined;
|
|
2140
|
-
transformCellText?: TransformCellText<TRecord> | undefined;
|
|
2141
|
-
rowSelection?: RowSelection<TRecord> | undefined;
|
|
2142
|
-
expandable?: Expandable<TRecord> | undefined;
|
|
2143
|
-
title?: ((data: TRecord[]) => VNodeChild) | undefined;
|
|
2144
|
-
footer?: ((data: TRecord[]) => VNodeChild) | undefined;
|
|
2145
|
-
scroll?: {
|
|
2146
|
-
x?: number | string;
|
|
2147
|
-
y?: number | string;
|
|
2148
|
-
} | undefined;
|
|
2149
|
-
virtual?: boolean | undefined;
|
|
2150
|
-
childrenColumnName?: string | undefined;
|
|
2151
|
-
indentSize?: number | undefined;
|
|
2152
|
-
expandedRowKeys?: Key[] | undefined;
|
|
2153
|
-
defaultExpandedRowKeys?: Key[] | undefined;
|
|
2154
|
-
defaultExpandAllRows?: boolean | undefined;
|
|
2155
|
-
onExpand?: ((expanded: boolean, record: TRecord) => void) | undefined;
|
|
2156
|
-
onExpandedRowsChange?: ((expandedKeys: Key[]) => void) | undefined;
|
|
2157
|
-
} & PublicProps;
|
|
2158
|
-
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
2159
|
-
attrs: any;
|
|
2160
|
-
slots: Readonly<TableSlotsDecl<TRecord>> & TableSlotsDecl<TRecord>;
|
|
2161
|
-
emit: ((evt: "change", filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => void) & ((evt: "resizeColumn", column: ColumnType<TRecord>, width: number) => void);
|
|
2162
|
-
}>) => VNode & {
|
|
2163
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
2164
|
-
}) & {
|
|
2165
|
-
readonly SELECTION_ALL: "SELECT_ALL";
|
|
2166
|
-
readonly SELECTION_INVERT: "SELECT_INVERT";
|
|
2167
|
-
readonly SELECTION_NONE: "SELECT_NONE";
|
|
2168
|
-
};
|
|
2169
|
-
|
|
2170
|
-
/**
|
|
2171
|
-
* 全局配置的 injection key。
|
|
2172
|
-
*
|
|
2173
|
-
* 使用 Symbol 确保唯一性,避免多实例冲突。
|
|
2174
|
-
* 导出供 useTheme 中 inject 使用。
|
|
2175
|
-
*/
|
|
2176
|
-
export declare const VTABLE_GUILD_INJECTION_KEY: InjectionKey<VTableGuildContext>;
|
|
2177
|
-
|
|
2178
|
-
export declare type VTableComponent = typeof VTableGeneric;
|
|
2179
|
-
|
|
2180
|
-
export declare interface VTableEventProps<TRecord extends object = Record<string, any>> {
|
|
2181
|
-
onChange?: (filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => void;
|
|
2182
|
-
onResizeColumn?: (column: ColumnType<TRecord>, width: number) => void;
|
|
2183
|
-
}
|
|
2184
|
-
|
|
2185
|
-
declare class VTableGeneric<TRecord extends object = Record<string, any>> {
|
|
2186
|
-
readonly $props: VTablePublicProps<TRecord> & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
2187
|
-
readonly $slots: TableSlotsDecl<TRecord>;
|
|
2188
|
-
$emit(event: 'change', filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>): void;
|
|
2189
|
-
$emit(event: 'resizeColumn', column: ColumnType<TRecord>, width: number): void;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
export declare const VTableGuildConfigProvider: DefineComponent<ExtractPropTypes< {
|
|
2193
|
-
theme: {
|
|
2194
|
-
type: PropType<VTableGuildThemeOverrides>;
|
|
2195
|
-
default: undefined;
|
|
2196
|
-
};
|
|
2197
|
-
locale: {
|
|
2198
|
-
type: PropType<LocaleName>;
|
|
2199
|
-
default: undefined;
|
|
2200
|
-
};
|
|
2201
|
-
locales: {
|
|
2202
|
-
type: PropType<LocaleRegistry>;
|
|
2203
|
-
default: undefined;
|
|
2204
|
-
};
|
|
2205
|
-
localeOverrides: {
|
|
2206
|
-
type: PropType<DeepPartial<VTableGuildLocale>>;
|
|
2207
|
-
default: undefined;
|
|
2208
|
-
};
|
|
2209
|
-
}>, () => VNode<RendererNode, RendererElement, {
|
|
2210
|
-
[key: string]: any;
|
|
2211
|
-
}>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2212
|
-
theme: {
|
|
2213
|
-
type: PropType<VTableGuildThemeOverrides>;
|
|
2214
|
-
default: undefined;
|
|
2215
|
-
};
|
|
2216
|
-
locale: {
|
|
2217
|
-
type: PropType<LocaleName>;
|
|
2218
|
-
default: undefined;
|
|
2219
|
-
};
|
|
2220
|
-
locales: {
|
|
2221
|
-
type: PropType<LocaleRegistry>;
|
|
2222
|
-
default: undefined;
|
|
2223
|
-
};
|
|
2224
|
-
localeOverrides: {
|
|
2225
|
-
type: PropType<DeepPartial<VTableGuildLocale>>;
|
|
2226
|
-
default: undefined;
|
|
2227
|
-
};
|
|
2228
|
-
}>> & Readonly<{}>, {
|
|
2229
|
-
theme: VTableGuildThemeOverrides;
|
|
2230
|
-
locale: string;
|
|
2231
|
-
locales: LocaleRegistry;
|
|
2232
|
-
localeOverrides: DeepPartial<VTableGuildLocale>;
|
|
2233
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2234
|
-
|
|
2235
|
-
export declare interface VTableGuildContext {
|
|
2236
|
-
themePreset: ThemePresetName;
|
|
2237
|
-
theme: VTableGuildThemeOverrides;
|
|
2238
|
-
locale: LocaleName;
|
|
2239
|
-
locales: LocaleRegistry;
|
|
2240
|
-
localeOverrides: DeepPartial<VTableGuildLocale>;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
export declare interface VTableGuildLocale {
|
|
2244
|
-
table: VTableGuildTableLocale;
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
export declare interface VTableGuildOptions {
|
|
2248
|
-
themePreset?: ThemePresetName;
|
|
2249
|
-
theme?: VTableGuildThemeOverrides;
|
|
2250
|
-
locale?: LocaleName;
|
|
2251
|
-
locales?: LocaleRegistry;
|
|
2252
|
-
localeOverrides?: DeepPartial<VTableGuildLocale>;
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
export declare interface VTableGuildTableEmptyLocale {
|
|
2256
|
-
text: string;
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
export declare interface VTableGuildTableFilterDropdownLocale {
|
|
2260
|
-
searchPlaceholder: string;
|
|
2261
|
-
emptyText: string;
|
|
2262
|
-
resetText: string;
|
|
2263
|
-
confirmText: string;
|
|
2264
|
-
selectAllText: string;
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
export declare interface VTableGuildTableHeaderLocale {
|
|
2268
|
-
sortTriggerAsc: string;
|
|
2269
|
-
sortTriggerDesc: string;
|
|
2270
|
-
cancelSort: string;
|
|
2271
|
-
filterTriggerAriaLabel: string;
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
export declare interface VTableGuildTableLoadingLocale {
|
|
2275
|
-
text: string;
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
export declare interface VTableGuildTableLocale {
|
|
2279
|
-
header: VTableGuildTableHeaderLocale;
|
|
2280
|
-
filterDropdown: VTableGuildTableFilterDropdownLocale;
|
|
2281
|
-
empty: VTableGuildTableEmptyLocale;
|
|
2282
|
-
loading: VTableGuildTableLoadingLocale;
|
|
2283
|
-
selection: VTableGuildTableSelectionLocale;
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
export declare interface VTableGuildTableSelectionLocale {
|
|
2287
|
-
selectAll: string;
|
|
2288
|
-
selectInvert: string;
|
|
2289
|
-
selectNone: string;
|
|
2290
|
-
}
|
|
2291
|
-
|
|
2292
|
-
export declare type VTableGuildThemeOverrides = {
|
|
2293
|
-
[K in keyof VTableGuildThemeOverridesMap]?: VTableGuildThemeOverridesMap[K];
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
export declare interface VTableGuildThemeOverridesMap {
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
export declare type VTablePublicProps<TRecord extends object = Record<string, any>> = TableProps<TRecord> & VTableEventProps<TRecord>;
|
|
2300
|
-
|
|
2301
|
-
export declare type VTableSorterResult<TRecord extends object = Record<string, any>> = SorterResultLike<TRecord> | Array<SorterResultLike<TRecord>>;
|
|
2302
|
-
|
|
2303
|
-
export declare const VTableSummary: {
|
|
2304
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
2305
|
-
fixed: {
|
|
2306
|
-
type: PropType<SummaryFixed>;
|
|
2307
|
-
default: undefined;
|
|
2308
|
-
};
|
|
2309
|
-
}>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
|
|
2310
|
-
[key: string]: any;
|
|
2311
|
-
}>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
2312
|
-
fixed: SummaryFixed;
|
|
2313
|
-
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
2314
|
-
P: {};
|
|
2315
|
-
B: {};
|
|
2316
|
-
D: {};
|
|
2317
|
-
C: {};
|
|
2318
|
-
M: {};
|
|
2319
|
-
Defaults: {};
|
|
2320
|
-
}, Readonly<ExtractPropTypes< {
|
|
2321
|
-
fixed: {
|
|
2322
|
-
type: PropType<SummaryFixed>;
|
|
2323
|
-
default: undefined;
|
|
2324
|
-
};
|
|
2325
|
-
}>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
|
|
2326
|
-
[key: string]: any;
|
|
2327
|
-
}>[] | undefined, {}, {}, {}, {
|
|
2328
|
-
fixed: SummaryFixed;
|
|
2329
|
-
}>;
|
|
2330
|
-
__isFragment?: never;
|
|
2331
|
-
__isTeleport?: never;
|
|
2332
|
-
__isSuspense?: never;
|
|
2333
|
-
} & ComponentOptionsBase<Readonly<ExtractPropTypes< {
|
|
2334
|
-
fixed: {
|
|
2335
|
-
type: PropType<SummaryFixed>;
|
|
2336
|
-
default: undefined;
|
|
2337
|
-
};
|
|
2338
|
-
}>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
|
|
2339
|
-
[key: string]: any;
|
|
2340
|
-
}>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
2341
|
-
fixed: SummaryFixed;
|
|
2342
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
|
|
2343
|
-
Row: DefineComponent< {}, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2344
|
-
Cell: DefineComponent<ExtractPropTypes< {
|
|
2345
|
-
index: {
|
|
2346
|
-
type: NumberConstructor;
|
|
2347
|
-
required: true;
|
|
2348
|
-
};
|
|
2349
|
-
colSpan: {
|
|
2350
|
-
type: NumberConstructor;
|
|
2351
|
-
default: number;
|
|
2352
|
-
};
|
|
2353
|
-
rowSpan: {
|
|
2354
|
-
type: NumberConstructor;
|
|
2355
|
-
default: undefined;
|
|
2356
|
-
};
|
|
2357
|
-
align: {
|
|
2358
|
-
type: PropType<AlignType>;
|
|
2359
|
-
default: undefined;
|
|
2360
|
-
};
|
|
2361
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2362
|
-
index: {
|
|
2363
|
-
type: NumberConstructor;
|
|
2364
|
-
required: true;
|
|
2365
|
-
};
|
|
2366
|
-
colSpan: {
|
|
2367
|
-
type: NumberConstructor;
|
|
2368
|
-
default: number;
|
|
2369
|
-
};
|
|
2370
|
-
rowSpan: {
|
|
2371
|
-
type: NumberConstructor;
|
|
2372
|
-
default: undefined;
|
|
2373
|
-
};
|
|
2374
|
-
align: {
|
|
2375
|
-
type: PropType<AlignType>;
|
|
2376
|
-
default: undefined;
|
|
2377
|
-
};
|
|
2378
|
-
}>> & Readonly<{}>, {
|
|
2379
|
-
align: AlignType;
|
|
2380
|
-
colSpan: number;
|
|
2381
|
-
rowSpan: number;
|
|
2382
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2383
|
-
};
|
|
2384
|
-
|
|
2385
|
-
export declare const VTableSummaryCell: DefineComponent<ExtractPropTypes< {
|
|
2386
|
-
index: {
|
|
2387
|
-
type: NumberConstructor;
|
|
2388
|
-
required: true;
|
|
2389
|
-
};
|
|
2390
|
-
colSpan: {
|
|
2391
|
-
type: NumberConstructor;
|
|
2392
|
-
default: number;
|
|
2393
|
-
};
|
|
2394
|
-
rowSpan: {
|
|
2395
|
-
type: NumberConstructor;
|
|
2396
|
-
default: undefined;
|
|
2397
|
-
};
|
|
2398
|
-
align: {
|
|
2399
|
-
type: PropType<AlignType>;
|
|
2400
|
-
default: undefined;
|
|
2401
|
-
};
|
|
2402
|
-
}>, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2403
|
-
index: {
|
|
2404
|
-
type: NumberConstructor;
|
|
2405
|
-
required: true;
|
|
2406
|
-
};
|
|
2407
|
-
colSpan: {
|
|
2408
|
-
type: NumberConstructor;
|
|
2409
|
-
default: number;
|
|
2410
|
-
};
|
|
2411
|
-
rowSpan: {
|
|
2412
|
-
type: NumberConstructor;
|
|
2413
|
-
default: undefined;
|
|
2414
|
-
};
|
|
2415
|
-
align: {
|
|
2416
|
-
type: PropType<AlignType>;
|
|
2417
|
-
default: undefined;
|
|
2418
|
-
};
|
|
2419
|
-
}>> & Readonly<{}>, {
|
|
2420
|
-
align: AlignType;
|
|
2421
|
-
colSpan: number;
|
|
2422
|
-
rowSpan: number;
|
|
2423
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2424
|
-
|
|
2425
|
-
export declare const VTableSummaryRow: DefineComponent< {}, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2426
|
-
|
|
2427
|
-
export { }
|
|
1
|
+
export * from './vtable-guild/src/index'
|
|
2
|
+
export {}
|
|
3
|
+
|
|
4
|
+
// Module augmentation for @vtable-guild/core
|
|
5
|
+
// This file ensures type hints work correctly when importing from @vtable-guild/vtable-guild
|
|
6
|
+
|
|
7
|
+
import type { ThemeOverrideConfig } from '@vtable-guild/core'
|
|
8
|
+
import type {
|
|
9
|
+
TableThemeConfig,
|
|
10
|
+
ButtonThemeConfig,
|
|
11
|
+
CheckboxThemeConfig,
|
|
12
|
+
RadioThemeConfig,
|
|
13
|
+
InputThemeConfig,
|
|
14
|
+
TooltipThemeConfig,
|
|
15
|
+
ScrollbarThemeConfig,
|
|
16
|
+
} from '@vtable-guild/theme'
|
|
17
|
+
|
|
18
|
+
declare module '@vtable-guild/core' {
|
|
19
|
+
interface VTableGuildThemeOverridesMap {
|
|
20
|
+
table: ThemeOverrideConfig<TableThemeConfig>
|
|
21
|
+
button: ThemeOverrideConfig<ButtonThemeConfig>
|
|
22
|
+
checkbox: ThemeOverrideConfig<CheckboxThemeConfig>
|
|
23
|
+
radio: ThemeOverrideConfig<RadioThemeConfig>
|
|
24
|
+
input: ThemeOverrideConfig<InputThemeConfig>
|
|
25
|
+
tooltip: ThemeOverrideConfig<TooltipThemeConfig>
|
|
26
|
+
scrollbar: ThemeOverrideConfig<ScrollbarThemeConfig>
|
|
27
|
+
}
|
|
28
|
+
}
|