@bscjc/webui 1.2.4 → 1.4.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/README.md +5 -2
- package/dist/components/JcCascader/index.d.ts +150 -50
- package/dist/components/JcColumnConfig/constants.d.ts +9 -0
- package/dist/components/JcColumnConfig/index.d.ts +190 -0
- package/dist/components/JcColumnConfig/index.vue.d.ts +95 -0
- package/dist/components/JcColumnConfig/storage.d.ts +28 -0
- package/dist/components/JcColumnConfig/types.d.ts +99 -0
- package/dist/components/JcColumnConfig/useColumnConfig.d.ts +88 -0
- package/dist/components/JcDatePicker/index.d.ts +98 -33
- package/dist/components/JcImportButton/index.d.ts +62 -0
- package/dist/components/JcImportButton/index.vue.d.ts +29 -0
- package/dist/components/JcImportDialog/index.d.ts +101 -0
- package/dist/components/JcImportDialog/index.vue.d.ts +53 -0
- package/dist/components/JcInputComplex/index.d.ts +86 -28
- package/dist/components/JcInputSwitch/index.d.ts +86 -28
- package/dist/components/JcListLayout/index.d.ts +2 -4
- package/dist/components/JcMoreQueryContain/index.d.ts +2 -4
- package/dist/components/JcSelectQuery/index.d.ts +2 -4
- package/dist/components/JcTagQuery/index.d.ts +29 -10
- package/dist/components/index.d.ts +3 -0
- package/dist/es/index.mjs +2311 -2506
- package/dist/index.css +2 -2
- package/dist/lib/index.cjs +8 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/components/JcCascader/index.d.ts +152 -52
- package/dist/types/components/JcColumnConfig/constants.d.ts +9 -0
- package/dist/types/components/JcColumnConfig/index.d.ts +190 -0
- package/dist/types/components/JcColumnConfig/index.vue.d.ts +95 -0
- package/dist/types/components/JcColumnConfig/storage.d.ts +25 -0
- package/dist/types/components/JcColumnConfig/types.d.ts +96 -0
- package/dist/types/components/JcColumnConfig/useColumnConfig.d.ts +85 -0
- package/dist/types/components/JcDatePicker/index.d.ts +100 -35
- package/dist/types/components/JcImportButton/index.d.ts +64 -0
- package/dist/types/components/JcImportButton/index.vue.d.ts +31 -0
- package/dist/types/components/JcImportDialog/index.d.ts +103 -0
- package/dist/types/components/JcImportDialog/index.vue.d.ts +55 -0
- package/dist/types/components/JcInputComplex/index.d.ts +1213 -1155
- package/dist/types/components/JcInputSwitch/index.d.ts +423 -365
- package/dist/types/components/JcListLayout/index.d.ts +2 -4
- package/dist/types/components/JcMoreQueryContain/index.d.ts +2 -4
- package/dist/types/components/JcSelectQuery/index.d.ts +2 -4
- package/dist/types/components/JcTagQuery/index.d.ts +29 -10
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components.d.ts +3 -0
- package/dist/types/utils/install.d.ts +4 -0
- package/dist/utils/install.d.ts +4 -0
- package/package.json +7 -4
|
@@ -1,58 +1,158 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export declare const JcCascader: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
field: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
options: {
|
|
9
|
+
type: import('vue').PropType<Array<{
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
children?: Array<{
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}>;
|
|
16
|
+
}>> | never[];
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
keyField: {
|
|
20
|
+
type: any;
|
|
21
|
+
default: () => string[];
|
|
22
|
+
};
|
|
23
|
+
width: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
type: import('vue').PropType<"small" | "default" | "large">;
|
|
29
|
+
default: string;
|
|
30
|
+
validator: (value: string) => boolean;
|
|
31
|
+
};
|
|
32
|
+
footerBtnName: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
isNeedFooter: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
isNeedHeader: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
isNeedOnlySelect: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
injectionKey: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
}>> & Readonly<{}>, {
|
|
53
|
+
[x: string]: any;
|
|
54
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
55
|
+
size: "small" | "default" | "large";
|
|
56
|
+
injectionKey: string;
|
|
57
|
+
field: string;
|
|
58
|
+
options: {
|
|
11
59
|
label: string;
|
|
12
60
|
value: string;
|
|
13
61
|
children?: Array<{
|
|
14
62
|
label: string;
|
|
15
63
|
value: string;
|
|
16
64
|
}>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
}[];
|
|
66
|
+
keyField: any;
|
|
67
|
+
width: string;
|
|
68
|
+
footerBtnName: string;
|
|
69
|
+
isNeedFooter: boolean;
|
|
70
|
+
isNeedOnlySelect: boolean;
|
|
71
|
+
isNeedHeader: boolean;
|
|
72
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
73
|
+
cascaderRef: unknown;
|
|
74
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
75
|
+
P: {};
|
|
76
|
+
B: {};
|
|
77
|
+
D: {};
|
|
78
|
+
C: {};
|
|
79
|
+
M: {};
|
|
80
|
+
Defaults: {};
|
|
81
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
82
|
+
field: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
required: true;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
options: {
|
|
88
|
+
type: import('vue').PropType<Array<{
|
|
89
|
+
label: string;
|
|
90
|
+
value: string;
|
|
91
|
+
children?: Array<{
|
|
92
|
+
label: string;
|
|
93
|
+
value: string;
|
|
94
|
+
}>;
|
|
95
|
+
}>> | never[];
|
|
96
|
+
default: () => never[];
|
|
97
|
+
};
|
|
98
|
+
keyField: {
|
|
99
|
+
type: any;
|
|
100
|
+
default: () => string[];
|
|
101
|
+
};
|
|
102
|
+
width: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
size: {
|
|
107
|
+
type: import('vue').PropType<"small" | "default" | "large">;
|
|
108
|
+
default: string;
|
|
109
|
+
validator: (value: string) => boolean;
|
|
110
|
+
};
|
|
111
|
+
footerBtnName: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
isNeedFooter: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
isNeedHeader: {
|
|
120
|
+
type: BooleanConstructor;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
isNeedOnlySelect: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
injectionKey: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
default: string;
|
|
130
|
+
};
|
|
131
|
+
}>> & Readonly<{}>, {
|
|
132
|
+
[x: string]: any;
|
|
133
|
+
}, {}, {}, {}, {
|
|
134
|
+
size: "small" | "default" | "large";
|
|
135
|
+
injectionKey: string;
|
|
136
|
+
field: string;
|
|
137
|
+
options: {
|
|
138
|
+
label: string;
|
|
139
|
+
value: string;
|
|
140
|
+
children?: Array<{
|
|
141
|
+
label: string;
|
|
142
|
+
value: string;
|
|
143
|
+
}>;
|
|
144
|
+
}[];
|
|
145
|
+
keyField: any;
|
|
146
|
+
width: string;
|
|
147
|
+
footerBtnName: string;
|
|
148
|
+
isNeedFooter: boolean;
|
|
149
|
+
isNeedOnlySelect: boolean;
|
|
150
|
+
isNeedHeader: boolean;
|
|
151
|
+
}>;
|
|
152
|
+
__isFragment?: never;
|
|
153
|
+
__isTeleport?: never;
|
|
154
|
+
__isSuspense?: never;
|
|
155
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
56
156
|
field: {
|
|
57
157
|
type: StringConstructor;
|
|
58
158
|
required: true;
|
|
@@ -103,6 +203,8 @@ export declare const JcCascader: SFCWithInstall<import('vue').DefineComponent<im
|
|
|
103
203
|
default: string;
|
|
104
204
|
};
|
|
105
205
|
}>> & Readonly<{}>, {
|
|
206
|
+
[x: string]: any;
|
|
207
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
106
208
|
size: "small" | "default" | "large";
|
|
107
209
|
injectionKey: string;
|
|
108
210
|
field: string;
|
|
@@ -120,7 +222,5 @@ export declare const JcCascader: SFCWithInstall<import('vue').DefineComponent<im
|
|
|
120
222
|
isNeedFooter: boolean;
|
|
121
223
|
isNeedOnlySelect: boolean;
|
|
122
224
|
isNeedHeader: boolean;
|
|
123
|
-
}, {},
|
|
124
|
-
cascaderRef: unknown;
|
|
125
|
-
}, any>>;
|
|
225
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
126
226
|
export default JcCascader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToolbarColumnConfigV2 常量定义
|
|
3
|
+
*/
|
|
4
|
+
/** 存储键前缀 */
|
|
5
|
+
export declare const STORAGE_PREFIX = "VXE_TABLE_CUSTOM_COLUMN_";
|
|
6
|
+
/** 存储版本号 */
|
|
7
|
+
export declare const STORAGE_VERSION = 1;
|
|
8
|
+
/** 特殊列类型(不参与配置) */
|
|
9
|
+
export declare const SPECIAL_COLUMN_TYPES: readonly ["checkbox", "seq", "radio", "expand"];
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export declare const JcColumnConfig: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
table: {
|
|
4
|
+
type: import('vue').PropType<import('vxe-table').VxeTableInstance>;
|
|
5
|
+
default: null;
|
|
6
|
+
};
|
|
7
|
+
itemWidth: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
drawerWidth: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
maxFixedCount: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
lockFieldList: {
|
|
20
|
+
type: import('vue').PropType<string[]>;
|
|
21
|
+
default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
storagePrefix: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
columnGroups: {
|
|
28
|
+
type: import('vue').PropType<import('./types').ColumnGroupConfig[]>;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
onChange?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
33
|
+
onReset?: (() => any) | undefined;
|
|
34
|
+
onSaved?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
35
|
+
"onWidth-change"?: ((params: {
|
|
36
|
+
field: string;
|
|
37
|
+
width: number;
|
|
38
|
+
}) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
openDrawer: () => void;
|
|
41
|
+
closeDrawer: () => void;
|
|
42
|
+
loadStoredConfig: () => Promise<void>;
|
|
43
|
+
resetToDefault: () => Promise<void>;
|
|
44
|
+
saveAndApply: () => Promise<void>;
|
|
45
|
+
onResizableChange: (params: import("vxe-table").VxeTableDefines.ResizableChangeEventParams) => void;
|
|
46
|
+
hasStoredConfig: () => boolean;
|
|
47
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
48
|
+
change: (config: import('./types').ColumnConfig[]) => any;
|
|
49
|
+
reset: () => any;
|
|
50
|
+
saved: (config: import('./types').ColumnConfig[]) => any;
|
|
51
|
+
"width-change": (params: {
|
|
52
|
+
field: string;
|
|
53
|
+
width: number;
|
|
54
|
+
}) => any;
|
|
55
|
+
}, import('vue').PublicProps, {
|
|
56
|
+
table: import('vxe-table').VxeTableInstance;
|
|
57
|
+
lockFieldList: string[];
|
|
58
|
+
maxFixedCount: number;
|
|
59
|
+
storagePrefix: string;
|
|
60
|
+
itemWidth: number;
|
|
61
|
+
drawerWidth: string;
|
|
62
|
+
columnGroups: import('./types').ColumnGroupConfig[];
|
|
63
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
64
|
+
P: {};
|
|
65
|
+
B: {};
|
|
66
|
+
D: {};
|
|
67
|
+
C: {};
|
|
68
|
+
M: {};
|
|
69
|
+
Defaults: {};
|
|
70
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
71
|
+
table: {
|
|
72
|
+
type: import('vue').PropType<import('vxe-table').VxeTableInstance>;
|
|
73
|
+
default: null;
|
|
74
|
+
};
|
|
75
|
+
itemWidth: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
drawerWidth: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
maxFixedCount: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
default: number;
|
|
86
|
+
};
|
|
87
|
+
lockFieldList: {
|
|
88
|
+
type: import('vue').PropType<string[]>;
|
|
89
|
+
default: () => never[];
|
|
90
|
+
};
|
|
91
|
+
storagePrefix: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
columnGroups: {
|
|
96
|
+
type: import('vue').PropType<import('./types').ColumnGroupConfig[]>;
|
|
97
|
+
default: () => never[];
|
|
98
|
+
};
|
|
99
|
+
}>> & Readonly<{
|
|
100
|
+
onChange?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
101
|
+
onReset?: (() => any) | undefined;
|
|
102
|
+
onSaved?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
103
|
+
"onWidth-change"?: ((params: {
|
|
104
|
+
field: string;
|
|
105
|
+
width: number;
|
|
106
|
+
}) => any) | undefined;
|
|
107
|
+
}>, {
|
|
108
|
+
openDrawer: () => void;
|
|
109
|
+
closeDrawer: () => void;
|
|
110
|
+
loadStoredConfig: () => Promise<void>;
|
|
111
|
+
resetToDefault: () => Promise<void>;
|
|
112
|
+
saveAndApply: () => Promise<void>;
|
|
113
|
+
onResizableChange: (params: import("vxe-table").VxeTableDefines.ResizableChangeEventParams) => void;
|
|
114
|
+
hasStoredConfig: () => boolean;
|
|
115
|
+
}, {}, {}, {}, {
|
|
116
|
+
table: import('vxe-table').VxeTableInstance;
|
|
117
|
+
lockFieldList: string[];
|
|
118
|
+
maxFixedCount: number;
|
|
119
|
+
storagePrefix: string;
|
|
120
|
+
itemWidth: number;
|
|
121
|
+
drawerWidth: string;
|
|
122
|
+
columnGroups: import('./types').ColumnGroupConfig[];
|
|
123
|
+
}>;
|
|
124
|
+
__isFragment?: never;
|
|
125
|
+
__isTeleport?: never;
|
|
126
|
+
__isSuspense?: never;
|
|
127
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
128
|
+
table: {
|
|
129
|
+
type: import('vue').PropType<import('vxe-table').VxeTableInstance>;
|
|
130
|
+
default: null;
|
|
131
|
+
};
|
|
132
|
+
itemWidth: {
|
|
133
|
+
type: NumberConstructor;
|
|
134
|
+
default: number;
|
|
135
|
+
};
|
|
136
|
+
drawerWidth: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
140
|
+
maxFixedCount: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: number;
|
|
143
|
+
};
|
|
144
|
+
lockFieldList: {
|
|
145
|
+
type: import('vue').PropType<string[]>;
|
|
146
|
+
default: () => never[];
|
|
147
|
+
};
|
|
148
|
+
storagePrefix: {
|
|
149
|
+
type: StringConstructor;
|
|
150
|
+
default: string;
|
|
151
|
+
};
|
|
152
|
+
columnGroups: {
|
|
153
|
+
type: import('vue').PropType<import('./types').ColumnGroupConfig[]>;
|
|
154
|
+
default: () => never[];
|
|
155
|
+
};
|
|
156
|
+
}>> & Readonly<{
|
|
157
|
+
onChange?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
158
|
+
onReset?: (() => any) | undefined;
|
|
159
|
+
onSaved?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
160
|
+
"onWidth-change"?: ((params: {
|
|
161
|
+
field: string;
|
|
162
|
+
width: number;
|
|
163
|
+
}) => any) | undefined;
|
|
164
|
+
}>, {
|
|
165
|
+
openDrawer: () => void;
|
|
166
|
+
closeDrawer: () => void;
|
|
167
|
+
loadStoredConfig: () => Promise<void>;
|
|
168
|
+
resetToDefault: () => Promise<void>;
|
|
169
|
+
saveAndApply: () => Promise<void>;
|
|
170
|
+
onResizableChange: (params: import("vxe-table").VxeTableDefines.ResizableChangeEventParams) => void;
|
|
171
|
+
hasStoredConfig: () => boolean;
|
|
172
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
173
|
+
change: (config: import('./types').ColumnConfig[]) => any;
|
|
174
|
+
reset: () => any;
|
|
175
|
+
saved: (config: import('./types').ColumnConfig[]) => any;
|
|
176
|
+
"width-change": (params: {
|
|
177
|
+
field: string;
|
|
178
|
+
width: number;
|
|
179
|
+
}) => any;
|
|
180
|
+
}, string, {
|
|
181
|
+
table: import('vxe-table').VxeTableInstance;
|
|
182
|
+
lockFieldList: string[];
|
|
183
|
+
maxFixedCount: number;
|
|
184
|
+
storagePrefix: string;
|
|
185
|
+
itemWidth: number;
|
|
186
|
+
drawerWidth: string;
|
|
187
|
+
columnGroups: import('./types').ColumnGroupConfig[];
|
|
188
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
189
|
+
export default JcColumnConfig;
|
|
190
|
+
export type { ColumnGroupConfig } from './types';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { VxeTableInstance, VxeTableDefines } from 'vxe-table';
|
|
3
|
+
import { ColumnConfig, ColumnGroupConfig } from './types';
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
table: {
|
|
6
|
+
type: PropType<VxeTableInstance>;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
itemWidth: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
drawerWidth: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
maxFixedCount: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
lockFieldList: {
|
|
22
|
+
type: PropType<string[]>;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
storagePrefix: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
columnGroups: {
|
|
30
|
+
type: PropType<ColumnGroupConfig[]>;
|
|
31
|
+
default: () => never[];
|
|
32
|
+
};
|
|
33
|
+
}>, {
|
|
34
|
+
openDrawer: () => void;
|
|
35
|
+
closeDrawer: () => void;
|
|
36
|
+
loadStoredConfig: () => Promise<void>;
|
|
37
|
+
resetToDefault: () => Promise<void>;
|
|
38
|
+
saveAndApply: () => Promise<void>;
|
|
39
|
+
onResizableChange: (params: VxeTableDefines.ResizableChangeEventParams) => void;
|
|
40
|
+
hasStoredConfig: () => boolean;
|
|
41
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
42
|
+
change: (config: ColumnConfig[]) => any;
|
|
43
|
+
reset: () => any;
|
|
44
|
+
saved: (config: ColumnConfig[]) => any;
|
|
45
|
+
"width-change": (params: {
|
|
46
|
+
field: string;
|
|
47
|
+
width: number;
|
|
48
|
+
}) => any;
|
|
49
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
50
|
+
table: {
|
|
51
|
+
type: PropType<VxeTableInstance>;
|
|
52
|
+
default: null;
|
|
53
|
+
};
|
|
54
|
+
itemWidth: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
default: number;
|
|
57
|
+
};
|
|
58
|
+
drawerWidth: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
maxFixedCount: {
|
|
63
|
+
type: NumberConstructor;
|
|
64
|
+
default: number;
|
|
65
|
+
};
|
|
66
|
+
lockFieldList: {
|
|
67
|
+
type: PropType<string[]>;
|
|
68
|
+
default: () => never[];
|
|
69
|
+
};
|
|
70
|
+
storagePrefix: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
columnGroups: {
|
|
75
|
+
type: PropType<ColumnGroupConfig[]>;
|
|
76
|
+
default: () => never[];
|
|
77
|
+
};
|
|
78
|
+
}>> & Readonly<{
|
|
79
|
+
onChange?: ((config: ColumnConfig[]) => any) | undefined;
|
|
80
|
+
onReset?: (() => any) | undefined;
|
|
81
|
+
onSaved?: ((config: ColumnConfig[]) => any) | undefined;
|
|
82
|
+
"onWidth-change"?: ((params: {
|
|
83
|
+
field: string;
|
|
84
|
+
width: number;
|
|
85
|
+
}) => any) | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
table: VxeTableInstance;
|
|
88
|
+
lockFieldList: string[];
|
|
89
|
+
maxFixedCount: number;
|
|
90
|
+
storagePrefix: string;
|
|
91
|
+
itemWidth: number;
|
|
92
|
+
drawerWidth: string;
|
|
93
|
+
columnGroups: ColumnGroupConfig[];
|
|
94
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
95
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StoredColumnConfig, TableColumnStorage } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 获取存储键
|
|
4
|
+
*/
|
|
5
|
+
export declare const getStorageKey: (tableId: string, prefix: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* 读取存储
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStorage: (tableId: string, prefix: string) => TableColumnStorage | null;
|
|
10
|
+
/**
|
|
11
|
+
* 保存存储
|
|
12
|
+
*/
|
|
13
|
+
export declare const setStorage: (tableId: string, prefix: string, columns: StoredColumnConfig[]) => void;
|
|
14
|
+
/**
|
|
15
|
+
* 删除存储
|
|
16
|
+
*/
|
|
17
|
+
export declare const removeStorage: (tableId: string, prefix: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* 更新单列宽度(增量更新)
|
|
20
|
+
*/
|
|
21
|
+
export declare const updateColumnWidth: (tableId: string, prefix: string, field: string, width: number, allColumnsForFallback?: StoredColumnConfig[]) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 检查是否有存储配置
|
|
24
|
+
*/
|
|
25
|
+
export declare const hasStorage: (tableId: string, prefix: string) => boolean;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { VxeTableInstance, VxeTableDefines } from 'vxe-table';
|
|
2
|
+
/**
|
|
3
|
+
* 外部传入的列分组配置(简化版)
|
|
4
|
+
*/
|
|
5
|
+
export interface ColumnGroupConfig {
|
|
6
|
+
/** 分组标题 */
|
|
7
|
+
title: string;
|
|
8
|
+
/** 分组下的字段列表 */
|
|
9
|
+
fields: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 内部使用的列分组(带 id)
|
|
13
|
+
*/
|
|
14
|
+
export interface ColumnGroup extends ColumnGroupConfig {
|
|
15
|
+
/** 分组唯一标识(自动生成) */
|
|
16
|
+
id: string;
|
|
17
|
+
/** 是否为默认分组([基础信息]) */
|
|
18
|
+
isDefault?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 存储的列配置(持久化到 localStorage)
|
|
22
|
+
*/
|
|
23
|
+
export interface StoredColumnConfig {
|
|
24
|
+
/** 列字段名(唯一标识) */
|
|
25
|
+
field: string;
|
|
26
|
+
/** 是否可见 */
|
|
27
|
+
visible: boolean;
|
|
28
|
+
/** 固定方向 */
|
|
29
|
+
fixed?: 'left' | 'right';
|
|
30
|
+
/** 列宽(像素) */
|
|
31
|
+
width?: number;
|
|
32
|
+
/** 排序序号 */
|
|
33
|
+
sortNumber: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 完整存储结构
|
|
37
|
+
*/
|
|
38
|
+
export interface TableColumnStorage {
|
|
39
|
+
/** 存储版本(用于兼容性升级) */
|
|
40
|
+
version: number;
|
|
41
|
+
/** 最后更新时间戳 */
|
|
42
|
+
timestamp: number;
|
|
43
|
+
/** 列配置数组 */
|
|
44
|
+
columns: StoredColumnConfig[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 组件内部使用的列配置(扩展自 StoredColumnConfig)
|
|
48
|
+
*/
|
|
49
|
+
export interface ColumnConfig extends StoredColumnConfig {
|
|
50
|
+
/** 列标题 */
|
|
51
|
+
title: string;
|
|
52
|
+
/** 是否锁定可见性(由 lockFieldList 决定) */
|
|
53
|
+
visibleLocked: boolean;
|
|
54
|
+
/** 原始索引(用于判断顺序是否变化) */
|
|
55
|
+
originalIndex: number;
|
|
56
|
+
/** 所属分组ID */
|
|
57
|
+
groupId?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 组件 Props 类型
|
|
61
|
+
*/
|
|
62
|
+
export interface ToolbarColumnConfigV2Props {
|
|
63
|
+
/** 表格实例(必需) */
|
|
64
|
+
table: VxeTableInstance | null;
|
|
65
|
+
/** 锁定不能隐藏的字段列表 */
|
|
66
|
+
lockFieldList?: string[];
|
|
67
|
+
/** 最大固定列数(左右合计) */
|
|
68
|
+
maxFixedCount?: number;
|
|
69
|
+
/** 每个字段项的宽度 */
|
|
70
|
+
itemWidth?: number;
|
|
71
|
+
/** 抽屉宽度 */
|
|
72
|
+
drawerWidth?: string;
|
|
73
|
+
/** 存储键前缀 */
|
|
74
|
+
storagePrefix?: string;
|
|
75
|
+
/** 列分组配置(可选) */
|
|
76
|
+
columnGroups?: ColumnGroupConfig[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 组件暴露的方法
|
|
80
|
+
*/
|
|
81
|
+
export interface ToolbarColumnConfigV2Expose {
|
|
82
|
+
/** 加载存储配置并应用到表格 */
|
|
83
|
+
loadStoredConfig: () => Promise<void>;
|
|
84
|
+
/** 恢复默认配置 */
|
|
85
|
+
resetToDefault: () => Promise<void>;
|
|
86
|
+
/** 保存并应用配置 */
|
|
87
|
+
saveAndApply: () => Promise<void>;
|
|
88
|
+
/** 打开配置抽屉 */
|
|
89
|
+
openDrawer: () => void;
|
|
90
|
+
/** 关闭配置抽屉 */
|
|
91
|
+
closeDrawer: () => void;
|
|
92
|
+
/** 处理列宽变化事件 */
|
|
93
|
+
onResizableChange: (params: VxeTableDefines.ResizableChangeEventParams) => void;
|
|
94
|
+
/** 检查是否有存储配置 */
|
|
95
|
+
hasStoredConfig: () => boolean;
|
|
96
|
+
}
|