c-admin-kit 1.0.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 +232 -0
- package/dist/c-admin-kit.css +1 -0
- package/dist/c-admin-kit.js +2482 -0
- package/dist/c-admin-kit.umd.cjs +10 -0
- package/dist/components/AsyncButton/index.vue.d.ts +48 -0
- package/dist/components/CollapsibleContainer/index.vue.d.ts +73 -0
- package/dist/components/CustomDrawer/index.vue.d.ts +149 -0
- package/dist/components/ImagePreview/index.vue.d.ts +34 -0
- package/dist/components/SearchBox/index.vue.d.ts +122 -0
- package/dist/components/SelectWithAll/index.vue.d.ts +169 -0
- package/dist/components/SelectWithPage/index.vue.d.ts +78 -0
- package/dist/components/SimpleTable/index.vue.d.ts +337 -0
- package/dist/components/SimpleTable/useTableColumnConfig.d.ts +5 -0
- package/dist/components/diff/index.vue.d.ts +33 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/composables/index.d.ts +6 -0
- package/dist/composables/useConfirmAction.d.ts +5 -0
- package/dist/composables/useConfirmSubmit.d.ts +5 -0
- package/dist/composables/useDialog.d.ts +5 -0
- package/dist/composables/useDownload.d.ts +5 -0
- package/dist/composables/useForm.d.ts +5 -0
- package/dist/composables/useListPage.d.ts +5 -0
- package/dist/index.d.ts +9 -0
- package/dist/types.d.ts +282 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/scroll-to.d.ts +7 -0
- package/dist/utils/searchFieldFactory.d.ts +34 -0
- package/dist/utils/treeManager.d.ts +64 -0
- package/dist/utils/validate.d.ts +30 -0
- package/package.json +86 -0
- package/src/components/AsyncButton/index.vue +58 -0
- package/src/components/CollapsibleContainer/index.vue +240 -0
- package/src/components/CustomDrawer/index.vue +167 -0
- package/src/components/ImagePreview/index.vue +88 -0
- package/src/components/SearchBox/index.vue +582 -0
- package/src/components/SelectWithAll/index.vue +281 -0
- package/src/components/SelectWithPage/index.vue +204 -0
- package/src/components/SimpleTable/index.vue +781 -0
- package/src/components/SimpleTable/useTableColumnConfig.ts +139 -0
- package/src/components/diff/index.vue +265 -0
- package/src/components/index.ts +35 -0
- package/src/composables/index.ts +6 -0
- package/src/composables/useConfirmAction.ts +62 -0
- package/src/composables/useConfirmSubmit.ts +68 -0
- package/src/composables/useDialog.ts +48 -0
- package/src/composables/useDownload.ts +83 -0
- package/src/composables/useForm.ts +114 -0
- package/src/composables/useListPage.ts +243 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +44 -0
- package/src/types.ts +344 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/scroll-to.ts +60 -0
- package/src/utils/searchFieldFactory.ts +302 -0
- package/src/utils/treeManager.ts +218 -0
- package/src/utils/validate.ts +64 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { AnyRecord } from '../../types';
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: PropType<any[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
options: {
|
|
9
|
+
type: PropType<AnyRecord[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
showSelectAll: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
selectAllLabel: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
placeholder: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
labelKey: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
valueKey: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
remote: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
remoteMethod: {
|
|
37
|
+
type: PropType<(params: AnyRecord) => Promise<any>>;
|
|
38
|
+
default: null;
|
|
39
|
+
};
|
|
40
|
+
remoteSearchKey: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
remoteParams: {
|
|
45
|
+
type: PropType<AnyRecord>;
|
|
46
|
+
default: () => {};
|
|
47
|
+
};
|
|
48
|
+
debounceDelay: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: number;
|
|
51
|
+
};
|
|
52
|
+
loadingText: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
emptyText: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
searchOnOpen: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
initialSearchKeyword: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
dataKey: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
73
|
+
"update:modelValue": (...args: any[]) => void;
|
|
74
|
+
change: (...args: any[]) => void;
|
|
75
|
+
"remote-search": (...args: any[]) => void;
|
|
76
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
77
|
+
modelValue: {
|
|
78
|
+
type: PropType<any[]>;
|
|
79
|
+
default: () => never[];
|
|
80
|
+
};
|
|
81
|
+
options: {
|
|
82
|
+
type: PropType<AnyRecord[]>;
|
|
83
|
+
default: () => never[];
|
|
84
|
+
};
|
|
85
|
+
showSelectAll: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
selectAllLabel: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
placeholder: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
97
|
+
labelKey: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
valueKey: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
remote: {
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: boolean;
|
|
108
|
+
};
|
|
109
|
+
remoteMethod: {
|
|
110
|
+
type: PropType<(params: AnyRecord) => Promise<any>>;
|
|
111
|
+
default: null;
|
|
112
|
+
};
|
|
113
|
+
remoteSearchKey: {
|
|
114
|
+
type: StringConstructor;
|
|
115
|
+
default: string;
|
|
116
|
+
};
|
|
117
|
+
remoteParams: {
|
|
118
|
+
type: PropType<AnyRecord>;
|
|
119
|
+
default: () => {};
|
|
120
|
+
};
|
|
121
|
+
debounceDelay: {
|
|
122
|
+
type: NumberConstructor;
|
|
123
|
+
default: number;
|
|
124
|
+
};
|
|
125
|
+
loadingText: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
emptyText: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: string;
|
|
132
|
+
};
|
|
133
|
+
searchOnOpen: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: boolean;
|
|
136
|
+
};
|
|
137
|
+
initialSearchKeyword: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
dataKey: {
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
145
|
+
}>> & Readonly<{
|
|
146
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
147
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
"onRemote-search"?: ((...args: any[]) => any) | undefined;
|
|
149
|
+
}>, {
|
|
150
|
+
placeholder: string;
|
|
151
|
+
options: AnyRecord[];
|
|
152
|
+
labelKey: string;
|
|
153
|
+
valueKey: string;
|
|
154
|
+
modelValue: any[];
|
|
155
|
+
showSelectAll: boolean;
|
|
156
|
+
selectAllLabel: string;
|
|
157
|
+
remote: boolean;
|
|
158
|
+
remoteMethod: (params: AnyRecord) => Promise<any>;
|
|
159
|
+
remoteSearchKey: string;
|
|
160
|
+
remoteParams: AnyRecord;
|
|
161
|
+
debounceDelay: number;
|
|
162
|
+
loadingText: string;
|
|
163
|
+
emptyText: string;
|
|
164
|
+
searchOnOpen: boolean;
|
|
165
|
+
initialSearchKeyword: string;
|
|
166
|
+
dataKey: string;
|
|
167
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
168
|
+
declare const _default: typeof __VLS_export;
|
|
169
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { AnyRecord } from '../../types';
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: PropType<string | number>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
placeholder: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
labelKey: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
valueKey: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
fetchApi: {
|
|
21
|
+
type: PropType<(params: AnyRecord) => Promise<any>>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
initialOptions: {
|
|
25
|
+
type: PropType<AnyRecord[]>;
|
|
26
|
+
default: () => never[];
|
|
27
|
+
};
|
|
28
|
+
debounceDelay: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
32
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (...args: any[]) => void;
|
|
34
|
+
clear: (...args: any[]) => void;
|
|
35
|
+
selectItem: (...args: any[]) => void;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: PropType<string | number>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
placeholder: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
labelKey: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
valueKey: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
fetchApi: {
|
|
54
|
+
type: PropType<(params: AnyRecord) => Promise<any>>;
|
|
55
|
+
required: true;
|
|
56
|
+
};
|
|
57
|
+
initialOptions: {
|
|
58
|
+
type: PropType<AnyRecord[]>;
|
|
59
|
+
default: () => never[];
|
|
60
|
+
};
|
|
61
|
+
debounceDelay: {
|
|
62
|
+
type: NumberConstructor;
|
|
63
|
+
default: number;
|
|
64
|
+
};
|
|
65
|
+
}>> & Readonly<{
|
|
66
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onSelectItem?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
}>, {
|
|
70
|
+
placeholder: string;
|
|
71
|
+
labelKey: string;
|
|
72
|
+
valueKey: string;
|
|
73
|
+
modelValue: string | number;
|
|
74
|
+
debounceDelay: number;
|
|
75
|
+
initialOptions: AnyRecord[];
|
|
76
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
77
|
+
declare const _default: typeof __VLS_export;
|
|
78
|
+
export default _default;
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { default as Sortable } from 'sortablejs';
|
|
3
|
+
import { TableInstance } from 'element-plus';
|
|
4
|
+
import { AnyRecord, TableColumn } from '../../types';
|
|
5
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_108: string, __VLS_109: any, __VLS_125: string, __VLS_126: any, __VLS_130: string, __VLS_131: any, __VLS_138: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
[K in NonNullable<typeof __VLS_108>]?: (props: typeof __VLS_109) => any;
|
|
8
|
+
} & {
|
|
9
|
+
[K in NonNullable<typeof __VLS_125>]?: (props: typeof __VLS_126) => any;
|
|
10
|
+
} & {
|
|
11
|
+
[K in NonNullable<typeof __VLS_130>]?: (props: typeof __VLS_131) => any;
|
|
12
|
+
} & {
|
|
13
|
+
headerLeft?: (props: typeof __VLS_1) => any;
|
|
14
|
+
} & {
|
|
15
|
+
headerRight?: (props: typeof __VLS_3) => any;
|
|
16
|
+
} & {
|
|
17
|
+
default?: (props: typeof __VLS_138) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
20
|
+
scrollY: {
|
|
21
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
autoHeight: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
bottomOffset: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
32
|
+
minHeight: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
default: number;
|
|
35
|
+
};
|
|
36
|
+
api: {
|
|
37
|
+
type: PropType<(params: AnyRecord) => Promise<any>>;
|
|
38
|
+
required: false;
|
|
39
|
+
};
|
|
40
|
+
columns: {
|
|
41
|
+
type: PropType<TableColumn[]>;
|
|
42
|
+
required: true;
|
|
43
|
+
default: () => never[];
|
|
44
|
+
};
|
|
45
|
+
emptyCellText: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
showPagination: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
pageSizes: {
|
|
54
|
+
type: PropType<number[]>;
|
|
55
|
+
default: () => number[];
|
|
56
|
+
};
|
|
57
|
+
layout: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
background: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
dataKey: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
totalKey: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
immediate: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
initialPage: {
|
|
78
|
+
type: NumberConstructor;
|
|
79
|
+
default: number;
|
|
80
|
+
};
|
|
81
|
+
initialPageSize: {
|
|
82
|
+
type: NumberConstructor;
|
|
83
|
+
default: number;
|
|
84
|
+
};
|
|
85
|
+
params: {
|
|
86
|
+
type: PropType<AnyRecord>;
|
|
87
|
+
default: () => {};
|
|
88
|
+
};
|
|
89
|
+
border: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
dataHandler: {
|
|
94
|
+
type: PropType<(data: any[]) => any[]>;
|
|
95
|
+
default: null;
|
|
96
|
+
};
|
|
97
|
+
selectable: {
|
|
98
|
+
type: PropType<(row: any, index: number) => boolean>;
|
|
99
|
+
default: null;
|
|
100
|
+
};
|
|
101
|
+
dragSort: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
105
|
+
dragOptions: {
|
|
106
|
+
type: PropType<Sortable.Options>;
|
|
107
|
+
default: () => {};
|
|
108
|
+
};
|
|
109
|
+
rowKey: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
keepSelection: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: boolean;
|
|
116
|
+
};
|
|
117
|
+
defaultStatusMap: {
|
|
118
|
+
type: PropType<Record<string | number, {
|
|
119
|
+
text: string;
|
|
120
|
+
type?: string;
|
|
121
|
+
}>>;
|
|
122
|
+
default: () => {
|
|
123
|
+
1: {
|
|
124
|
+
text: string;
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
0: {
|
|
128
|
+
text: string;
|
|
129
|
+
type: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
tableKey: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
default: string;
|
|
136
|
+
};
|
|
137
|
+
getColumnConfigApi: {
|
|
138
|
+
type: PropType<() => Promise<any>>;
|
|
139
|
+
default: null;
|
|
140
|
+
};
|
|
141
|
+
saveColumnConfigApi: {
|
|
142
|
+
type: PropType<(cols: string[]) => Promise<any>>;
|
|
143
|
+
default: null;
|
|
144
|
+
};
|
|
145
|
+
}>, {
|
|
146
|
+
refresh: () => void;
|
|
147
|
+
reset: () => void;
|
|
148
|
+
search: (params?: AnyRecord) => void;
|
|
149
|
+
fetchData: (extraParams?: AnyRecord) => Promise<void>;
|
|
150
|
+
clearSelection: () => void;
|
|
151
|
+
toggleRowSelection: (row: any, selected?: boolean) => void;
|
|
152
|
+
toggleAllSelection: () => void;
|
|
153
|
+
getSelectionRows: () => import('element-plus/es/components/table/src/table/defaults.mjs').DefaultRow[];
|
|
154
|
+
setSelectionByKeys: (keys?: any[]) => void;
|
|
155
|
+
tableData: import('vue').Ref<AnyRecord[], AnyRecord[]>;
|
|
156
|
+
tableRef: import('vue').Ref<TableInstance | null, TableInstance | null>;
|
|
157
|
+
recalculateHeight: () => void;
|
|
158
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
159
|
+
error: (...args: any[]) => void;
|
|
160
|
+
"selection-change": (...args: any[]) => void;
|
|
161
|
+
refresh: (...args: any[]) => void;
|
|
162
|
+
"drag-sort": (...args: any[]) => void;
|
|
163
|
+
"drag-start": (...args: any[]) => void;
|
|
164
|
+
"drag-end": (...args: any[]) => void;
|
|
165
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
166
|
+
scrollY: {
|
|
167
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
168
|
+
default: string;
|
|
169
|
+
};
|
|
170
|
+
autoHeight: {
|
|
171
|
+
type: BooleanConstructor;
|
|
172
|
+
default: boolean;
|
|
173
|
+
};
|
|
174
|
+
bottomOffset: {
|
|
175
|
+
type: NumberConstructor;
|
|
176
|
+
default: number;
|
|
177
|
+
};
|
|
178
|
+
minHeight: {
|
|
179
|
+
type: NumberConstructor;
|
|
180
|
+
default: number;
|
|
181
|
+
};
|
|
182
|
+
api: {
|
|
183
|
+
type: PropType<(params: AnyRecord) => Promise<any>>;
|
|
184
|
+
required: false;
|
|
185
|
+
};
|
|
186
|
+
columns: {
|
|
187
|
+
type: PropType<TableColumn[]>;
|
|
188
|
+
required: true;
|
|
189
|
+
default: () => never[];
|
|
190
|
+
};
|
|
191
|
+
emptyCellText: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
default: string;
|
|
194
|
+
};
|
|
195
|
+
showPagination: {
|
|
196
|
+
type: BooleanConstructor;
|
|
197
|
+
default: boolean;
|
|
198
|
+
};
|
|
199
|
+
pageSizes: {
|
|
200
|
+
type: PropType<number[]>;
|
|
201
|
+
default: () => number[];
|
|
202
|
+
};
|
|
203
|
+
layout: {
|
|
204
|
+
type: StringConstructor;
|
|
205
|
+
default: string;
|
|
206
|
+
};
|
|
207
|
+
background: {
|
|
208
|
+
type: BooleanConstructor;
|
|
209
|
+
default: boolean;
|
|
210
|
+
};
|
|
211
|
+
dataKey: {
|
|
212
|
+
type: StringConstructor;
|
|
213
|
+
default: string;
|
|
214
|
+
};
|
|
215
|
+
totalKey: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
default: string;
|
|
218
|
+
};
|
|
219
|
+
immediate: {
|
|
220
|
+
type: BooleanConstructor;
|
|
221
|
+
default: boolean;
|
|
222
|
+
};
|
|
223
|
+
initialPage: {
|
|
224
|
+
type: NumberConstructor;
|
|
225
|
+
default: number;
|
|
226
|
+
};
|
|
227
|
+
initialPageSize: {
|
|
228
|
+
type: NumberConstructor;
|
|
229
|
+
default: number;
|
|
230
|
+
};
|
|
231
|
+
params: {
|
|
232
|
+
type: PropType<AnyRecord>;
|
|
233
|
+
default: () => {};
|
|
234
|
+
};
|
|
235
|
+
border: {
|
|
236
|
+
type: BooleanConstructor;
|
|
237
|
+
default: boolean;
|
|
238
|
+
};
|
|
239
|
+
dataHandler: {
|
|
240
|
+
type: PropType<(data: any[]) => any[]>;
|
|
241
|
+
default: null;
|
|
242
|
+
};
|
|
243
|
+
selectable: {
|
|
244
|
+
type: PropType<(row: any, index: number) => boolean>;
|
|
245
|
+
default: null;
|
|
246
|
+
};
|
|
247
|
+
dragSort: {
|
|
248
|
+
type: BooleanConstructor;
|
|
249
|
+
default: boolean;
|
|
250
|
+
};
|
|
251
|
+
dragOptions: {
|
|
252
|
+
type: PropType<Sortable.Options>;
|
|
253
|
+
default: () => {};
|
|
254
|
+
};
|
|
255
|
+
rowKey: {
|
|
256
|
+
type: StringConstructor;
|
|
257
|
+
default: string;
|
|
258
|
+
};
|
|
259
|
+
keepSelection: {
|
|
260
|
+
type: BooleanConstructor;
|
|
261
|
+
default: boolean;
|
|
262
|
+
};
|
|
263
|
+
defaultStatusMap: {
|
|
264
|
+
type: PropType<Record<string | number, {
|
|
265
|
+
text: string;
|
|
266
|
+
type?: string;
|
|
267
|
+
}>>;
|
|
268
|
+
default: () => {
|
|
269
|
+
1: {
|
|
270
|
+
text: string;
|
|
271
|
+
type: string;
|
|
272
|
+
};
|
|
273
|
+
0: {
|
|
274
|
+
text: string;
|
|
275
|
+
type: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
tableKey: {
|
|
280
|
+
type: StringConstructor;
|
|
281
|
+
default: string;
|
|
282
|
+
};
|
|
283
|
+
getColumnConfigApi: {
|
|
284
|
+
type: PropType<() => Promise<any>>;
|
|
285
|
+
default: null;
|
|
286
|
+
};
|
|
287
|
+
saveColumnConfigApi: {
|
|
288
|
+
type: PropType<(cols: string[]) => Promise<any>>;
|
|
289
|
+
default: null;
|
|
290
|
+
};
|
|
291
|
+
}>> & Readonly<{
|
|
292
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
293
|
+
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
294
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
295
|
+
"onDrag-sort"?: ((...args: any[]) => any) | undefined;
|
|
296
|
+
"onDrag-start"?: ((...args: any[]) => any) | undefined;
|
|
297
|
+
"onDrag-end"?: ((...args: any[]) => any) | undefined;
|
|
298
|
+
}>, {
|
|
299
|
+
dataKey: string;
|
|
300
|
+
immediate: boolean;
|
|
301
|
+
tableKey: string;
|
|
302
|
+
scrollY: string | number;
|
|
303
|
+
autoHeight: boolean;
|
|
304
|
+
bottomOffset: number;
|
|
305
|
+
minHeight: number;
|
|
306
|
+
columns: TableColumn[];
|
|
307
|
+
emptyCellText: string;
|
|
308
|
+
showPagination: boolean;
|
|
309
|
+
pageSizes: number[];
|
|
310
|
+
layout: string;
|
|
311
|
+
background: boolean;
|
|
312
|
+
totalKey: string;
|
|
313
|
+
initialPage: number;
|
|
314
|
+
initialPageSize: number;
|
|
315
|
+
params: AnyRecord;
|
|
316
|
+
border: boolean;
|
|
317
|
+
dataHandler: (data: any[]) => any[];
|
|
318
|
+
selectable: (row: any, index: number) => boolean;
|
|
319
|
+
dragSort: boolean;
|
|
320
|
+
dragOptions: Sortable.Options;
|
|
321
|
+
rowKey: string;
|
|
322
|
+
keepSelection: boolean;
|
|
323
|
+
defaultStatusMap: Record<string | number, {
|
|
324
|
+
text: string;
|
|
325
|
+
type?: string;
|
|
326
|
+
}>;
|
|
327
|
+
getColumnConfigApi: () => Promise<any>;
|
|
328
|
+
saveColumnConfigApi: (cols: string[]) => Promise<any>;
|
|
329
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
330
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
331
|
+
declare const _default: typeof __VLS_export;
|
|
332
|
+
export default _default;
|
|
333
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
334
|
+
new (): {
|
|
335
|
+
$slots: S;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TableColumnConfigProps, UseTableColumnConfigReturn } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* 表格自定义列配置 Hook (解耦版,优先使用外部传入 API,未传则默认降级使用 LocalStorage)
|
|
4
|
+
*/
|
|
5
|
+
export declare function useTableColumnConfig(props: TableColumnConfigProps, calculateTableHeight?: () => void): UseTableColumnConfigReturn;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
oldText: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
newText: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
similarityThreshold: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
oldText: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
newText: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
similarityThreshold: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
}>> & Readonly<{}>, {
|
|
28
|
+
oldText: string;
|
|
29
|
+
newText: string;
|
|
30
|
+
similarityThreshold: number;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { default as CAsyncButton } from './AsyncButton/index.vue';
|
|
3
|
+
import { default as CSelectWithAll } from './SelectWithAll/index.vue';
|
|
4
|
+
import { default as CSelectWithPage } from './SelectWithPage/index.vue';
|
|
5
|
+
import { default as CSearchBox } from './SearchBox/index.vue';
|
|
6
|
+
import { default as CCollapsibleContainer } from './CollapsibleContainer/index.vue';
|
|
7
|
+
import { default as CCustomDrawer } from './CustomDrawer/index.vue';
|
|
8
|
+
import { default as CSimpleTable } from './SimpleTable/index.vue';
|
|
9
|
+
import { default as CDiff } from './diff/index.vue';
|
|
10
|
+
import { default as CImagePreview } from './ImagePreview/index.vue';
|
|
11
|
+
export { CAsyncButton, CSelectWithAll, CSelectWithPage, CSearchBox, CCollapsibleContainer, CCustomDrawer, CSimpleTable, CDiff, CImagePreview, };
|
|
12
|
+
export declare const components: Component[];
|
package/dist/index.d.ts
ADDED