@wx-design/components 0.1.10 → 0.2.0
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/es/core/Table/components/CellEditors/Input.d.ts +2 -5
- package/es/core/Table/components/CellEditors/InputNumber.d.ts +4 -5
- package/es/core/Table/configs/column.d.ts +2 -1
- package/es/core/Table/index.vue.d.ts +4 -1
- package/es/index.mjs +1054 -267
- package/es/style.css +1 -1
- package/lib/core/Table/components/CellEditors/Input.d.ts +2 -5
- package/lib/core/Table/components/CellEditors/InputNumber.d.ts +4 -5
- package/lib/core/Table/configs/column.d.ts +2 -1
- package/lib/core/Table/index.vue.d.ts +4 -1
- package/lib/index.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/types/table/column.d.ts +21 -1
- package/types/table/table.d.ts +5 -1
- package/es/demos/table/mock.d.ts +0 -76
- package/lib/demos/table/mock.d.ts +0 -76
package/package.json
CHANGED
package/types/table/column.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export interface SabColumnSlots<D = VxeTableDataRow> {
|
|
|
52
52
|
* @deprecated
|
|
53
53
|
*/
|
|
54
54
|
icon: (params: VxeColumnSlotTypes.IconSlotParams<D>) => any;
|
|
55
|
+
/**
|
|
56
|
+
* TODO: 单元格弹出
|
|
57
|
+
*/
|
|
58
|
+
popover: (params: VxeColumnSlotTypes.DefaultSlotParams<D>) => any | string;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
// 单选框属性
|
|
@@ -78,6 +82,18 @@ export type SabCellEditorParams =
|
|
|
78
82
|
| Partial<DatePickerProps>
|
|
79
83
|
| Partial<SabCellSelectProps>
|
|
80
84
|
|
|
85
|
+
// 弹出层配置
|
|
86
|
+
export type SabPopoverParams = {
|
|
87
|
+
// 触发弹出的元素,默认icon
|
|
88
|
+
trigger?: "cell" | 'icon',
|
|
89
|
+
// 触发事件,默认 click
|
|
90
|
+
triggerEvent?: "click" | "hover" | "focus" | "contextmenu",
|
|
91
|
+
// 弹出类型
|
|
92
|
+
popType?: 'popover' | 'dialog',
|
|
93
|
+
// 是否展示弹出按钮
|
|
94
|
+
showButton?: boolean
|
|
95
|
+
}
|
|
96
|
+
|
|
81
97
|
// 表格列设置
|
|
82
98
|
export type SabColumnProps<D = VxeTableDataRow> = VxeColumnProps<D> & {
|
|
83
99
|
// 单元格类型
|
|
@@ -92,7 +108,11 @@ export type SabColumnProps<D = VxeTableDataRow> = VxeColumnProps<D> & {
|
|
|
92
108
|
hidden?: boolean;
|
|
93
109
|
// 筛选控制
|
|
94
110
|
sabFilter?: {
|
|
95
|
-
// 是否自动收集筛选条件
|
|
111
|
+
// TODO: 是否自动收集筛选条件
|
|
96
112
|
autoCollectFilterOptions?: boolean;
|
|
97
113
|
};
|
|
114
|
+
// 启用弹出层
|
|
115
|
+
enablePopover?: boolean;
|
|
116
|
+
// 弹出层配置
|
|
117
|
+
popoverConfig?: SabPopoverParams
|
|
98
118
|
};
|
package/types/table/table.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { VxeTableProps, VxeTableDataRow } from "vxe-table";
|
|
2
|
-
import { SabColumnProps } from "./";
|
|
2
|
+
import { SabColumnProps, SabPopoverParams } from "./";
|
|
3
3
|
|
|
4
4
|
export type SabTableProps<D = VxeTableDataRow> = VxeTableProps<D> & {
|
|
5
5
|
// 表格 css 类名
|
|
6
6
|
class?: any;
|
|
7
|
+
// 外部容器 css 类名
|
|
8
|
+
wrapClassName?: any;
|
|
7
9
|
// 列配置
|
|
8
10
|
columns?: Partial<SabColumnProps<D>>[];
|
|
9
11
|
// 表格可编辑
|
|
@@ -16,4 +18,6 @@ export type SabTableProps<D = VxeTableDataRow> = VxeTableProps<D> & {
|
|
|
16
18
|
showToolbar?: boolean;
|
|
17
19
|
// 点击未选中行的单元格自动取消选择选中行
|
|
18
20
|
autoClearSelected?: boolean;
|
|
21
|
+
// 单元格弹出层配置
|
|
22
|
+
popoverConfig?: SabPopoverParams;
|
|
19
23
|
}
|
package/es/demos/table/mock.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
export declare const mockData: ({
|
|
2
|
-
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
nickname: string;
|
|
5
|
-
role: string;
|
|
6
|
-
sex: string;
|
|
7
|
-
sex2: string[];
|
|
8
|
-
num1: number;
|
|
9
|
-
age: number;
|
|
10
|
-
address: string;
|
|
11
|
-
date12: string;
|
|
12
|
-
date13: string;
|
|
13
|
-
avater: string;
|
|
14
|
-
color: string;
|
|
15
|
-
isok: boolean;
|
|
16
|
-
} | {
|
|
17
|
-
id: number;
|
|
18
|
-
name: string;
|
|
19
|
-
nickname: string;
|
|
20
|
-
role: string;
|
|
21
|
-
sex: string;
|
|
22
|
-
sex2: string[];
|
|
23
|
-
num1: number;
|
|
24
|
-
age: number;
|
|
25
|
-
address: string;
|
|
26
|
-
date12: string;
|
|
27
|
-
date13: string;
|
|
28
|
-
color: string;
|
|
29
|
-
isok: boolean;
|
|
30
|
-
avater?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
id: number;
|
|
33
|
-
name: string;
|
|
34
|
-
nickname: string;
|
|
35
|
-
role: string;
|
|
36
|
-
sex: string;
|
|
37
|
-
sex2: string[];
|
|
38
|
-
num1: number;
|
|
39
|
-
age: number;
|
|
40
|
-
address: string;
|
|
41
|
-
date12: string;
|
|
42
|
-
date13: string;
|
|
43
|
-
color: string;
|
|
44
|
-
avater?: undefined;
|
|
45
|
-
isok?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
id: number;
|
|
48
|
-
name: string;
|
|
49
|
-
nickname: string;
|
|
50
|
-
role: string;
|
|
51
|
-
sex: string;
|
|
52
|
-
sex2: string[];
|
|
53
|
-
num1: number;
|
|
54
|
-
age: number;
|
|
55
|
-
address: string;
|
|
56
|
-
date12: string;
|
|
57
|
-
date13: string;
|
|
58
|
-
avater?: undefined;
|
|
59
|
-
color?: undefined;
|
|
60
|
-
isok?: undefined;
|
|
61
|
-
} | {
|
|
62
|
-
id: number;
|
|
63
|
-
name: string;
|
|
64
|
-
nickname: string;
|
|
65
|
-
role: string;
|
|
66
|
-
sex: string;
|
|
67
|
-
sex2: string[];
|
|
68
|
-
num1: number;
|
|
69
|
-
age: number;
|
|
70
|
-
address: string;
|
|
71
|
-
date12: string;
|
|
72
|
-
date13: string;
|
|
73
|
-
avater: string;
|
|
74
|
-
color?: undefined;
|
|
75
|
-
isok?: undefined;
|
|
76
|
-
})[];
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
export declare const mockData: ({
|
|
2
|
-
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
nickname: string;
|
|
5
|
-
role: string;
|
|
6
|
-
sex: string;
|
|
7
|
-
sex2: string[];
|
|
8
|
-
num1: number;
|
|
9
|
-
age: number;
|
|
10
|
-
address: string;
|
|
11
|
-
date12: string;
|
|
12
|
-
date13: string;
|
|
13
|
-
avater: string;
|
|
14
|
-
color: string;
|
|
15
|
-
isok: boolean;
|
|
16
|
-
} | {
|
|
17
|
-
id: number;
|
|
18
|
-
name: string;
|
|
19
|
-
nickname: string;
|
|
20
|
-
role: string;
|
|
21
|
-
sex: string;
|
|
22
|
-
sex2: string[];
|
|
23
|
-
num1: number;
|
|
24
|
-
age: number;
|
|
25
|
-
address: string;
|
|
26
|
-
date12: string;
|
|
27
|
-
date13: string;
|
|
28
|
-
color: string;
|
|
29
|
-
isok: boolean;
|
|
30
|
-
avater?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
id: number;
|
|
33
|
-
name: string;
|
|
34
|
-
nickname: string;
|
|
35
|
-
role: string;
|
|
36
|
-
sex: string;
|
|
37
|
-
sex2: string[];
|
|
38
|
-
num1: number;
|
|
39
|
-
age: number;
|
|
40
|
-
address: string;
|
|
41
|
-
date12: string;
|
|
42
|
-
date13: string;
|
|
43
|
-
color: string;
|
|
44
|
-
avater?: undefined;
|
|
45
|
-
isok?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
id: number;
|
|
48
|
-
name: string;
|
|
49
|
-
nickname: string;
|
|
50
|
-
role: string;
|
|
51
|
-
sex: string;
|
|
52
|
-
sex2: string[];
|
|
53
|
-
num1: number;
|
|
54
|
-
age: number;
|
|
55
|
-
address: string;
|
|
56
|
-
date12: string;
|
|
57
|
-
date13: string;
|
|
58
|
-
avater?: undefined;
|
|
59
|
-
color?: undefined;
|
|
60
|
-
isok?: undefined;
|
|
61
|
-
} | {
|
|
62
|
-
id: number;
|
|
63
|
-
name: string;
|
|
64
|
-
nickname: string;
|
|
65
|
-
role: string;
|
|
66
|
-
sex: string;
|
|
67
|
-
sex2: string[];
|
|
68
|
-
num1: number;
|
|
69
|
-
age: number;
|
|
70
|
-
address: string;
|
|
71
|
-
date12: string;
|
|
72
|
-
date13: string;
|
|
73
|
-
avater: string;
|
|
74
|
-
color?: undefined;
|
|
75
|
-
isok?: undefined;
|
|
76
|
-
})[];
|