@moubing/bing-ui 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bing-ui.css +1 -1
- package/dist/bing-ui.es.js +9011 -8486
- package/dist/bing-ui.umd.js +28 -28
- package/dist/components/BingCursor/BingCursor.controller.d.ts +1 -1
- package/dist/components/BingCursor/BingCursor.styleSource.d.ts +2 -1
- package/dist/components/BingDialog/BingDialog.types.d.ts +6 -0
- package/dist/components/BingDialog/BingDialog.vue.d.ts +8 -3
- package/dist/components/BingSlider/BingSlider.types.d.ts +28 -0
- package/dist/components/BingSlider/BingSlider.vue.d.ts +28 -0
- package/dist/components/BingSlider/index.d.ts +2 -0
- package/dist/components/BingSplitPane/BingSplitPane.types.d.ts +34 -0
- package/dist/components/BingSplitPane/BingSplitPane.vue.d.ts +39 -0
- package/dist/components/BingSplitPane/index.d.ts +2 -0
- package/dist/components/BingTable/BingTable.types.d.ts +2 -0
- package/dist/components/BingTable/BingTable.vue.d.ts +29 -31
- package/dist/components/BingTable/useTableColumns.d.ts +32 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.types.d.ts +19 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +44 -0
- package/dist/components/BingTableColumnControls/index.d.ts +2 -0
- package/dist/components/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** 将原 cursor 声明映射到私有变量,让浏览器继续处理选择器、优先级和继承。 */
|
|
2
2
|
export declare function createCursorStyleSource(doc: Document): {
|
|
3
|
-
|
|
3
|
+
palette(property: string, render: (value: string) => string): () => void;
|
|
4
|
+
read(target: Element, scanRules?: boolean, editableRoot?: Element | null): string;
|
|
4
5
|
destroy(): void;
|
|
5
6
|
};
|
|
@@ -18,6 +18,12 @@ export interface BingDialogProps extends BingGlassEffectProps {
|
|
|
18
18
|
modelValue?: boolean;
|
|
19
19
|
title?: string;
|
|
20
20
|
width?: string | number;
|
|
21
|
+
/** 显式宽度仍受视口限制;默认最大宽度为 720px。 */
|
|
22
|
+
maxWidth?: string | number;
|
|
23
|
+
/** 固定弹窗高度,内容在头部和底部之间滚动。 */
|
|
24
|
+
height?: string | number;
|
|
25
|
+
/** 显式最大高度,始终限制在可用视口内。 */
|
|
26
|
+
maxHeight?: string | number;
|
|
21
27
|
zIndex?: number;
|
|
22
28
|
lockScroll?: boolean;
|
|
23
29
|
smoothScroll?: SmoothScrollValue;
|
|
@@ -2,7 +2,7 @@ import { BingDialogCloseReason, BingDialogOverlayOrb, BingDialogProps } from './
|
|
|
2
2
|
declare function closeDialog(reason: BingDialogCloseReason): void;
|
|
3
3
|
declare function handleCancel(): void;
|
|
4
4
|
declare function handleConfirm(): void;
|
|
5
|
-
declare var __VLS_7: {},
|
|
5
|
+
declare var __VLS_7: {}, __VLS_28: {}, __VLS_38: {}, __VLS_40: {
|
|
6
6
|
close: typeof closeDialog;
|
|
7
7
|
cancel: typeof handleCancel;
|
|
8
8
|
confirm: typeof handleConfirm;
|
|
@@ -10,9 +10,11 @@ declare var __VLS_7: {}, __VLS_36: {}, __VLS_38: {
|
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
11
11
|
title?: (props: typeof __VLS_7) => any;
|
|
12
12
|
} & {
|
|
13
|
-
|
|
13
|
+
'header-addon'?: (props: typeof __VLS_28) => any;
|
|
14
14
|
} & {
|
|
15
|
-
|
|
15
|
+
default?: (props: typeof __VLS_38) => any;
|
|
16
|
+
} & {
|
|
17
|
+
footer?: (props: typeof __VLS_40) => any;
|
|
16
18
|
};
|
|
17
19
|
declare const __VLS_base: import('vue').DefineComponent<BingDialogProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
20
|
cancel: () => any;
|
|
@@ -25,6 +27,9 @@ declare const __VLS_base: import('vue').DefineComponent<BingDialogProps, {}, {},
|
|
|
25
27
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
26
28
|
onConfirm?: (() => any) | undefined;
|
|
27
29
|
}>, {
|
|
30
|
+
height: string | number;
|
|
31
|
+
maxHeight: string | number;
|
|
32
|
+
maxWidth: string | number;
|
|
28
33
|
width: string | number;
|
|
29
34
|
zIndex: number;
|
|
30
35
|
title: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BingControlStatus } from '../BingForm/BingForm.types';
|
|
2
|
+
export interface BingSliderProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
modelValue?: number;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
status?: BingControlStatus;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
ariaLabelledby?: string;
|
|
14
|
+
ariaDescribedby?: string;
|
|
15
|
+
formatValueText?: (value: number) => string;
|
|
16
|
+
}
|
|
17
|
+
export interface BingSliderEmits {
|
|
18
|
+
'update:modelValue': [value: number];
|
|
19
|
+
/** 指针松开、键盘调整结束或失焦时提交。 */
|
|
20
|
+
change: [value: number];
|
|
21
|
+
focus: [event: FocusEvent];
|
|
22
|
+
blur: [event: FocusEvent];
|
|
23
|
+
}
|
|
24
|
+
export interface BingSliderExpose {
|
|
25
|
+
input: HTMLInputElement | null;
|
|
26
|
+
focus: () => void;
|
|
27
|
+
blur: () => void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BingSliderProps, BingSliderExpose } from './BingSlider.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<BingSliderProps, BingSliderExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
change: (value: number) => any;
|
|
4
|
+
blur: (event: FocusEvent) => any;
|
|
5
|
+
focus: (event: FocusEvent) => any;
|
|
6
|
+
"update:modelValue": (value: number) => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<BingSliderProps> & Readonly<{
|
|
8
|
+
onChange?: ((value: number) => any) | undefined;
|
|
9
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
10
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
id: string;
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
modelValue: number;
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
step: number;
|
|
20
|
+
ariaDescribedby: string;
|
|
21
|
+
status: import('..').BingControlStatus;
|
|
22
|
+
name: string;
|
|
23
|
+
defaultValue: number;
|
|
24
|
+
ariaLabelledby: string;
|
|
25
|
+
formatValueText: (value: number) => string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type BingSplitPaneResizeSource = 'pointer' | 'keyboard' | 'reset';
|
|
2
|
+
export type BingSplitPaneCancelReason = 'escape' | 'pointercancel' | 'capture-lost' | 'blur' | 'container' | 'props' | 'unmount';
|
|
3
|
+
export interface BingSplitPaneProps {
|
|
4
|
+
/** 右侧栏的持久偏好宽度;容器不足时临时压缩显示,不改写此值。 */
|
|
5
|
+
sideSize?: number;
|
|
6
|
+
defaultSideSize?: number;
|
|
7
|
+
minSideSize?: number;
|
|
8
|
+
maxSideSize?: number;
|
|
9
|
+
minMainSize?: number;
|
|
10
|
+
keyboardStep?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BingSplitPaneResizePayload {
|
|
15
|
+
/** 当前容器中的实际侧栏宽度,单位 px。 */
|
|
16
|
+
size: number;
|
|
17
|
+
/** 已提交的偏好;resize-end 中为本次请求提交的偏好。 */
|
|
18
|
+
preferredSize: number;
|
|
19
|
+
source: BingSplitPaneResizeSource;
|
|
20
|
+
}
|
|
21
|
+
export interface BingSplitPaneCancelPayload extends BingSplitPaneResizePayload {
|
|
22
|
+
reason: BingSplitPaneCancelReason;
|
|
23
|
+
}
|
|
24
|
+
export interface BingSplitPaneEmits {
|
|
25
|
+
/** 只在松手、键盘操作或重置时提交;取消和容器压缩不发送。 */
|
|
26
|
+
'update:sideSize': [size: number];
|
|
27
|
+
'resize-start': [payload: BingSplitPaneResizePayload];
|
|
28
|
+
resize: [payload: BingSplitPaneResizePayload];
|
|
29
|
+
'resize-end': [payload: BingSplitPaneResizePayload];
|
|
30
|
+
'resize-cancel': [payload: BingSplitPaneCancelPayload];
|
|
31
|
+
}
|
|
32
|
+
export interface BingSplitPaneExpose {
|
|
33
|
+
reset: () => void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BingSplitPaneProps, BingSplitPaneExpose } from './BingSplitPane.types';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {
|
|
3
|
+
size: number;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
} & {
|
|
8
|
+
side?: (props: typeof __VLS_3) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<BingSplitPaneProps, BingSplitPaneExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
resize: (payload: import('./BingSplitPane.types').BingSplitPaneResizePayload) => any;
|
|
12
|
+
"resize-start": (payload: import('./BingSplitPane.types').BingSplitPaneResizePayload) => any;
|
|
13
|
+
"resize-end": (payload: import('./BingSplitPane.types').BingSplitPaneResizePayload) => any;
|
|
14
|
+
"update:sideSize": (size: number) => any;
|
|
15
|
+
"resize-cancel": (payload: import('./BingSplitPane.types').BingSplitPaneCancelPayload) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<BingSplitPaneProps> & Readonly<{
|
|
17
|
+
onResize?: ((payload: import('./BingSplitPane.types').BingSplitPaneResizePayload) => any) | undefined;
|
|
18
|
+
"onResize-start"?: ((payload: import('./BingSplitPane.types').BingSplitPaneResizePayload) => any) | undefined;
|
|
19
|
+
"onResize-end"?: ((payload: import('./BingSplitPane.types').BingSplitPaneResizePayload) => any) | undefined;
|
|
20
|
+
"onUpdate:sideSize"?: ((size: number) => any) | undefined;
|
|
21
|
+
"onResize-cancel"?: ((payload: import('./BingSplitPane.types').BingSplitPaneCancelPayload) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
ariaLabel: string;
|
|
25
|
+
keyboardStep: number;
|
|
26
|
+
sideSize: number;
|
|
27
|
+
defaultSideSize: number;
|
|
28
|
+
minSideSize: number;
|
|
29
|
+
maxSideSize: number;
|
|
30
|
+
minMainSize: number;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -113,6 +113,8 @@ export interface BingTableProps {
|
|
|
113
113
|
virtualOverscan?: number;
|
|
114
114
|
pagination?: boolean;
|
|
115
115
|
remotePagination?: boolean;
|
|
116
|
+
/** 只维护排序状态并发送事件,保持服务端传入的数据顺序。与远程分页独立。 */
|
|
117
|
+
remoteSort?: boolean;
|
|
116
118
|
preservePageHeight?: boolean;
|
|
117
119
|
page?: number;
|
|
118
120
|
defaultPage?: number;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { BingTableColumn, BingTableExpose,
|
|
2
|
-
interface BingTableResolvedColumn extends BingTableColumn {
|
|
3
|
-
dataKey: string;
|
|
4
|
-
}
|
|
1
|
+
import { BingTableColumn, BingTableExpose, BingTableKey, BingTableProps, BingTableRow, BingTableSortOrder } from './BingTable.types';
|
|
5
2
|
declare var __VLS_1: {
|
|
6
3
|
selectedRowKeys: BingTableKey[];
|
|
7
|
-
visibleColumns: BingTableResolvedColumn[];
|
|
4
|
+
visibleColumns: import('./useTableColumns').BingTableResolvedColumn[];
|
|
8
5
|
}, __VLS_47: `header-${string}`, __VLS_48: {
|
|
9
|
-
column: BingTableResolvedColumn;
|
|
6
|
+
column: import('./useTableColumns').BingTableResolvedColumn;
|
|
10
7
|
}, __VLS_78: `cell-${string}`, __VLS_79: {
|
|
11
8
|
row: BingTableRow;
|
|
12
|
-
column: BingTableResolvedColumn;
|
|
9
|
+
column: import('./useTableColumns').BingTableResolvedColumn;
|
|
13
10
|
value: unknown;
|
|
14
11
|
rowIndex: number;
|
|
15
12
|
level: number;
|
|
16
13
|
}, __VLS_81: {
|
|
17
14
|
row: BingTableRow;
|
|
18
|
-
column: BingTableResolvedColumn;
|
|
15
|
+
column: import('./useTableColumns').BingTableResolvedColumn;
|
|
19
16
|
value: unknown;
|
|
20
17
|
rowIndex: number;
|
|
21
18
|
level: number;
|
|
@@ -35,18 +32,18 @@ type __VLS_Slots = {} & {
|
|
|
35
32
|
};
|
|
36
33
|
declare const __VLS_base: import('vue').DefineComponent<BingTableProps, BingTableExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
34
|
scroll: (event: Event) => any;
|
|
38
|
-
"update:selectedRowKeys": (keys: BingTableKey[]) => any;
|
|
39
|
-
"selection-change": (payload: import('./BingTable.types').BingTableSelectionPayload) => any;
|
|
40
|
-
"update:expandedRowKeys": (keys: BingTableKey[]) => any;
|
|
41
|
-
"expand-change": (payload: import('./BingTable.types').BingTableExpandPayload) => any;
|
|
42
35
|
"update:columnWidths": (widths: Record<string, number>) => any;
|
|
43
|
-
"column-resize": (payload: import('./BingTable.types').BingTableColumnResizePayload) => any;
|
|
44
36
|
"update:columnOrder": (order: string[]) => any;
|
|
45
|
-
"column-reorder": (payload: import('./BingTable.types').BingTableColumnReorderPayload) => any;
|
|
46
37
|
"update:hiddenColumnKeys": (keys: string[]) => any;
|
|
38
|
+
"update:columnFixed": (columnFixed: Record<string, import('./BingTable.types').BingTableFixed | null>) => any;
|
|
39
|
+
"column-reorder": (payload: import('./BingTable.types').BingTableColumnReorderPayload) => any;
|
|
47
40
|
"column-visibility-change": (payload: import('./BingTable.types').BingTableColumnVisibilityPayload) => any;
|
|
48
|
-
"update:columnFixed": (columnFixed: Record<string, BingTableFixed | null>) => any;
|
|
49
41
|
"column-fixed-change": (payload: import('./BingTable.types').BingTableColumnFixedPayload) => any;
|
|
42
|
+
"update:selectedRowKeys": (keys: BingTableKey[]) => any;
|
|
43
|
+
"selection-change": (payload: import('./BingTable.types').BingTableSelectionPayload) => any;
|
|
44
|
+
"update:expandedRowKeys": (keys: BingTableKey[]) => any;
|
|
45
|
+
"expand-change": (payload: import('./BingTable.types').BingTableExpandPayload) => any;
|
|
46
|
+
"column-resize": (payload: import('./BingTable.types').BingTableColumnResizePayload) => any;
|
|
50
47
|
"update:page": (page: number) => any;
|
|
51
48
|
"update:pageSize": (pageSize: number) => any;
|
|
52
49
|
"page-change": (payload: import('./BingTable.types').BingTablePageChangePayload) => any;
|
|
@@ -56,18 +53,18 @@ declare const __VLS_base: import('vue').DefineComponent<BingTableProps, BingTabl
|
|
|
56
53
|
"row-click": (row: BingTableRow, event: MouseEvent) => any;
|
|
57
54
|
}, string, import('vue').PublicProps, Readonly<BingTableProps> & Readonly<{
|
|
58
55
|
onScroll?: ((event: Event) => any) | undefined;
|
|
59
|
-
"onUpdate:selectedRowKeys"?: ((keys: BingTableKey[]) => any) | undefined;
|
|
60
|
-
"onSelection-change"?: ((payload: import('./BingTable.types').BingTableSelectionPayload) => any) | undefined;
|
|
61
|
-
"onUpdate:expandedRowKeys"?: ((keys: BingTableKey[]) => any) | undefined;
|
|
62
|
-
"onExpand-change"?: ((payload: import('./BingTable.types').BingTableExpandPayload) => any) | undefined;
|
|
63
56
|
"onUpdate:columnWidths"?: ((widths: Record<string, number>) => any) | undefined;
|
|
64
|
-
"onColumn-resize"?: ((payload: import('./BingTable.types').BingTableColumnResizePayload) => any) | undefined;
|
|
65
57
|
"onUpdate:columnOrder"?: ((order: string[]) => any) | undefined;
|
|
66
|
-
"onColumn-reorder"?: ((payload: import('./BingTable.types').BingTableColumnReorderPayload) => any) | undefined;
|
|
67
58
|
"onUpdate:hiddenColumnKeys"?: ((keys: string[]) => any) | undefined;
|
|
59
|
+
"onUpdate:columnFixed"?: ((columnFixed: Record<string, import('./BingTable.types').BingTableFixed | null>) => any) | undefined;
|
|
60
|
+
"onColumn-reorder"?: ((payload: import('./BingTable.types').BingTableColumnReorderPayload) => any) | undefined;
|
|
68
61
|
"onColumn-visibility-change"?: ((payload: import('./BingTable.types').BingTableColumnVisibilityPayload) => any) | undefined;
|
|
69
|
-
"onUpdate:columnFixed"?: ((columnFixed: Record<string, BingTableFixed | null>) => any) | undefined;
|
|
70
62
|
"onColumn-fixed-change"?: ((payload: import('./BingTable.types').BingTableColumnFixedPayload) => any) | undefined;
|
|
63
|
+
"onUpdate:selectedRowKeys"?: ((keys: BingTableKey[]) => any) | undefined;
|
|
64
|
+
"onSelection-change"?: ((payload: import('./BingTable.types').BingTableSelectionPayload) => any) | undefined;
|
|
65
|
+
"onUpdate:expandedRowKeys"?: ((keys: BingTableKey[]) => any) | undefined;
|
|
66
|
+
"onExpand-change"?: ((payload: import('./BingTable.types').BingTableExpandPayload) => any) | undefined;
|
|
67
|
+
"onColumn-resize"?: ((payload: import('./BingTable.types').BingTableColumnResizePayload) => any) | undefined;
|
|
71
68
|
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
72
69
|
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
73
70
|
"onPage-change"?: ((payload: import('./BingTable.types').BingTablePageChangePayload) => any) | undefined;
|
|
@@ -90,7 +87,14 @@ declare const __VLS_base: import('vue').DefineComponent<BingTableProps, BingTabl
|
|
|
90
87
|
virtualOverscan: number;
|
|
91
88
|
selectable: boolean;
|
|
92
89
|
page: number;
|
|
93
|
-
|
|
90
|
+
defaultColumnWidths: Record<string, number>;
|
|
91
|
+
defaultColumnOrder: string[];
|
|
92
|
+
defaultHiddenColumnKeys: string[];
|
|
93
|
+
defaultColumnFixed: Record<string, import('./BingTable.types').BingTableFixed | null>;
|
|
94
|
+
columnWidths: Record<string, number>;
|
|
95
|
+
columnOrder: string[];
|
|
96
|
+
hiddenColumnKeys: string[];
|
|
97
|
+
columnFixed: Record<string, import('./BingTable.types').BingTableFixed | null>;
|
|
94
98
|
rowKey: string | import('./BingTable.types').BingTableRowKeyGetter;
|
|
95
99
|
childrenKey: string;
|
|
96
100
|
bordered: boolean;
|
|
@@ -108,20 +112,13 @@ declare const __VLS_base: import('vue').DefineComponent<BingTableProps, BingTabl
|
|
|
108
112
|
defaultExpandAll: boolean;
|
|
109
113
|
treeColumnKey: string;
|
|
110
114
|
indentSize: number;
|
|
111
|
-
columnWidths: Record<string, number>;
|
|
112
|
-
defaultColumnWidths: Record<string, number>;
|
|
113
|
-
columnOrder: string[];
|
|
114
|
-
defaultColumnOrder: string[];
|
|
115
|
-
hiddenColumnKeys: string[];
|
|
116
|
-
defaultHiddenColumnKeys: string[];
|
|
117
|
-
columnFixed: Record<string, BingTableFixed | null>;
|
|
118
|
-
defaultColumnFixed: Record<string, BingTableFixed | null>;
|
|
119
115
|
resizableColumns: boolean;
|
|
120
116
|
reorderableColumns: boolean;
|
|
121
117
|
showColumnControls: boolean;
|
|
122
118
|
virtualRowHeight: number;
|
|
123
119
|
pagination: boolean;
|
|
124
120
|
remotePagination: boolean;
|
|
121
|
+
remoteSort: boolean;
|
|
125
122
|
preservePageHeight: boolean;
|
|
126
123
|
defaultPage: number;
|
|
127
124
|
pageSize: number;
|
|
@@ -130,6 +127,7 @@ declare const __VLS_base: import('vue').DefineComponent<BingTableProps, BingTabl
|
|
|
130
127
|
total: number;
|
|
131
128
|
sortKey: string | null;
|
|
132
129
|
defaultSortKey: string | null;
|
|
130
|
+
sortOrder: BingTableSortOrder;
|
|
133
131
|
defaultSortOrder: BingTableSortOrder;
|
|
134
132
|
rowClass: import('./BingTable.types').BingTableRowClass;
|
|
135
133
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EmitFn } from 'vue';
|
|
2
|
+
import { BingTableColumn, BingTableEmits, BingTableFixed, BingTableProps } from './BingTable.types';
|
|
3
|
+
type ColumnDefaults = 'columns' | 'defaultColumnWidths' | 'defaultColumnOrder' | 'defaultHiddenColumnKeys' | 'defaultColumnFixed';
|
|
4
|
+
type ColumnModels = 'columnWidths' | 'columnOrder' | 'hiddenColumnKeys' | 'columnFixed';
|
|
5
|
+
type ColumnStateProps = Required<Pick<BingTableProps, ColumnDefaults>> & Pick<BingTableProps, ColumnModels>;
|
|
6
|
+
type ColumnStateEmits = Pick<BingTableEmits, 'update:columnWidths' | 'update:columnOrder' | 'update:hiddenColumnKeys' | 'update:columnFixed' | 'column-reorder' | 'column-visibility-change' | 'column-fixed-change'>;
|
|
7
|
+
export interface BingTableResolvedColumn extends BingTableColumn {
|
|
8
|
+
dataKey: string;
|
|
9
|
+
}
|
|
10
|
+
/** 表头和独立列面板使用同一套列顺序、固定分组、可见性与重置规则。 */
|
|
11
|
+
export declare function useTableColumns(props: ColumnStateProps, emit: EmitFn<ColumnStateEmits>): {
|
|
12
|
+
localColumnWidths: import('vue').Ref<Record<string, number>, Record<string, number>>;
|
|
13
|
+
localColumnFixed: import('vue').Ref<Record<string, BingTableFixed | null>, Record<string, BingTableFixed | null>>;
|
|
14
|
+
allColumns: import('vue').ComputedRef<BingTableResolvedColumn[]>;
|
|
15
|
+
getColumnByKey: (key: string) => BingTableResolvedColumn | undefined;
|
|
16
|
+
effectiveColumnOrder: import('vue').ComputedRef<string[]>;
|
|
17
|
+
orderedColumns: import('vue').ComputedRef<BingTableResolvedColumn[]>;
|
|
18
|
+
effectiveHiddenColumnKeySet: import('vue').ComputedRef<Set<string>>;
|
|
19
|
+
visibleColumns: import('vue').ComputedRef<BingTableResolvedColumn[]>;
|
|
20
|
+
getColumnFixed: (column: BingTableColumn) => BingTableFixed | null;
|
|
21
|
+
isColumnHidden: (key: string) => boolean;
|
|
22
|
+
applyColumnFixed: (nextFixed: Record<string, BingTableFixed | null>) => void;
|
|
23
|
+
applyColumnOrderValue: (nextOrder: string[]) => void;
|
|
24
|
+
applyColumnWidthsValue: (widths: Record<string, number>) => void;
|
|
25
|
+
applyHiddenColumnKeys: (keys: string[]) => void;
|
|
26
|
+
reorderColumns: (fromKey: string, toKey: string) => void;
|
|
27
|
+
applyColumnOrder: (order: (string | number)[], movedKey: string | number, from: number, to: number) => void;
|
|
28
|
+
toggleColumnVisibility: (key: string, visible: boolean) => void;
|
|
29
|
+
setColumnFixed: (key: string, fixed: BingTableFixed | null) => void;
|
|
30
|
+
resetColumns: () => void;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BingTableEmits, BingTableProps } from '../BingTable/BingTable.types';
|
|
2
|
+
import { BingDropDownPlacement } from '../BingDropDown/BingDropDown.types';
|
|
3
|
+
import { BingSortableListDragPayload } from '../BingSortableList/BingSortableList.types';
|
|
4
|
+
/** 可与一个或多个 BingTable 绑定同一组列模型,不依赖任何表格实例。 */
|
|
5
|
+
export interface BingTableColumnControlsProps extends Pick<BingTableProps, 'columns' | 'columnWidths' | 'defaultColumnWidths' | 'columnOrder' | 'defaultColumnOrder' | 'hiddenColumnKeys' | 'defaultHiddenColumnKeys' | 'columnFixed' | 'defaultColumnFixed' | 'reorderableColumns' | 'smoothScroll'> {
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
placement?: BingDropDownPlacement;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BingTableColumnControlsEmits extends Pick<BingTableEmits, 'update:columnWidths' | 'update:columnOrder' | 'update:hiddenColumnKeys' | 'update:columnFixed' | 'column-reorder' | 'column-visibility-change' | 'column-fixed-change'> {
|
|
13
|
+
'update:open': [open: boolean];
|
|
14
|
+
'drag-start': [payload: BingSortableListDragPayload];
|
|
15
|
+
'drag-end': [payload: BingSortableListDragPayload];
|
|
16
|
+
}
|
|
17
|
+
export interface BingTableColumnControlsExpose {
|
|
18
|
+
resetColumns: () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BingSortableListDragPayload } from '../BingSortableList/BingSortableList.types';
|
|
2
|
+
import { BingTableColumnControlsProps, BingTableColumnControlsExpose } from './BingTableColumnControls.types';
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<BingTableColumnControlsProps, BingTableColumnControlsExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
"update:open": (open: boolean) => any;
|
|
5
|
+
"drag-start": (payload: BingSortableListDragPayload<Record<string, unknown>>) => any;
|
|
6
|
+
"drag-end": (payload: BingSortableListDragPayload<Record<string, unknown>>) => any;
|
|
7
|
+
"update:columnWidths": (widths: Record<string, number>) => any;
|
|
8
|
+
"update:columnOrder": (order: string[]) => any;
|
|
9
|
+
"update:hiddenColumnKeys": (keys: string[]) => any;
|
|
10
|
+
"update:columnFixed": (columnFixed: Record<string, import('..').BingTableFixed | null>) => any;
|
|
11
|
+
"column-reorder": (payload: import('..').BingTableColumnReorderPayload) => any;
|
|
12
|
+
"column-visibility-change": (payload: import('..').BingTableColumnVisibilityPayload) => any;
|
|
13
|
+
"column-fixed-change": (payload: import('..').BingTableColumnFixedPayload) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<BingTableColumnControlsProps> & Readonly<{
|
|
15
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
16
|
+
"onDrag-start"?: ((payload: BingSortableListDragPayload<Record<string, unknown>>) => any) | undefined;
|
|
17
|
+
"onDrag-end"?: ((payload: BingSortableListDragPayload<Record<string, unknown>>) => any) | undefined;
|
|
18
|
+
"onUpdate:columnWidths"?: ((widths: Record<string, number>) => any) | undefined;
|
|
19
|
+
"onUpdate:columnOrder"?: ((order: string[]) => any) | undefined;
|
|
20
|
+
"onUpdate:hiddenColumnKeys"?: ((keys: string[]) => any) | undefined;
|
|
21
|
+
"onUpdate:columnFixed"?: ((columnFixed: Record<string, import('..').BingTableFixed | null>) => any) | undefined;
|
|
22
|
+
"onColumn-reorder"?: ((payload: import('..').BingTableColumnReorderPayload) => any) | undefined;
|
|
23
|
+
"onColumn-visibility-change"?: ((payload: import('..').BingTableColumnVisibilityPayload) => any) | undefined;
|
|
24
|
+
"onColumn-fixed-change"?: ((payload: import('..').BingTableColumnFixedPayload) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
columns: import('..').BingTableColumn[];
|
|
28
|
+
placement: import('..').BingDropDownPlacement;
|
|
29
|
+
ariaLabel: string;
|
|
30
|
+
open: boolean;
|
|
31
|
+
smoothScroll: import('../..').SmoothScrollValue;
|
|
32
|
+
defaultColumnWidths: Record<string, number>;
|
|
33
|
+
defaultColumnOrder: string[];
|
|
34
|
+
defaultHiddenColumnKeys: string[];
|
|
35
|
+
defaultColumnFixed: Record<string, import('..').BingTableFixed | null>;
|
|
36
|
+
columnWidths: Record<string, number>;
|
|
37
|
+
columnOrder: string[];
|
|
38
|
+
hiddenColumnKeys: string[];
|
|
39
|
+
columnFixed: Record<string, import('..').BingTableFixed | null>;
|
|
40
|
+
reorderableColumns: boolean;
|
|
41
|
+
defaultOpen: boolean;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
@@ -32,4 +32,7 @@ export * from './BingTextarea';
|
|
|
32
32
|
export * from './BingToast';
|
|
33
33
|
export * from './BingTooltip';
|
|
34
34
|
export * from './BingTable';
|
|
35
|
+
export * from './BingTableColumnControls';
|
|
36
|
+
export * from './BingSplitPane';
|
|
37
|
+
export * from './BingSlider';
|
|
35
38
|
export * from './BingTreeSelect';
|