antd-vue-dbthor 1.0.21 → 1.0.29
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/components/table/index.type.d.ts +17 -3
- package/dist/components/table/useExport.d.ts +22 -1
- package/dist/components/table/useImport.d.ts +19 -1
- package/dist/lib/index.es.js +2889 -1808
- package/dist/lib/index.es.js.gz +0 -0
- package/dist/lib/index.umd.js +81 -18
- package/dist/lib/index.umd.js.gz +0 -0
- package/package.json +85 -79
|
@@ -9,6 +9,8 @@ import { TableUseDataSourceProps } from './useDataSource';
|
|
|
9
9
|
import { TableUseDetailProps } from './useDetail';
|
|
10
10
|
import { TableQueryFormInstance, TableQueryFormItemProps, TableQueryFormProps } from './useQueryForm';
|
|
11
11
|
import { JSX } from 'vue/jsx-runtime';
|
|
12
|
+
import { TableUseExportProps } from './useExport';
|
|
13
|
+
import { TableUseImportProps } from './useImport';
|
|
12
14
|
|
|
13
15
|
type TableFieldNames = string | string[];
|
|
14
16
|
export interface OwnBtnProps extends ButtonProps {
|
|
@@ -39,6 +41,11 @@ export type TableTextConfig = Partial<{
|
|
|
39
41
|
updateError: string;
|
|
40
42
|
deleteSuccess: string;
|
|
41
43
|
deleteError: string;
|
|
44
|
+
exportSuccess: string;
|
|
45
|
+
exportError: string;
|
|
46
|
+
importSuccess: string;
|
|
47
|
+
importError: string;
|
|
48
|
+
[key: string]: any;
|
|
42
49
|
};
|
|
43
50
|
}>;
|
|
44
51
|
export type ciesBtnsVNode = Ref<Partial<{
|
|
@@ -116,6 +123,7 @@ export interface TableProps extends Omit<ATableProps, 'columns' | 'loading'> {
|
|
|
116
123
|
list: TableFieldNames;
|
|
117
124
|
total: TableFieldNames;
|
|
118
125
|
detail: TableFieldNames;
|
|
126
|
+
export: TableFieldNames;
|
|
119
127
|
}>;
|
|
120
128
|
/**
|
|
121
129
|
* 分页配置
|
|
@@ -189,9 +197,15 @@ export interface TableProps extends Omit<ATableProps, 'columns' | 'loading'> {
|
|
|
189
197
|
importBtn?: false | (ButtonProps & {
|
|
190
198
|
children?: string | VNode;
|
|
191
199
|
});
|
|
192
|
-
exportBtn?:
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
exportBtn?: TableUseExportProps['exportBtn'];
|
|
201
|
+
exportFileByParams?: TableUseExportProps['exportFileByParams'];
|
|
202
|
+
exportFileParamsFormat?: null | TableUseExportProps['exportFileParamsFormat'];
|
|
203
|
+
exportFileName?: TableUseExportProps['exportFileName'];
|
|
204
|
+
onExportRequestSuccess?: null | TableUseExportProps['onExportRequestSuccess'];
|
|
205
|
+
onExportSuccess?: null | TableUseExportProps['onExportSuccess'];
|
|
206
|
+
onExportError?: null | TableUseExportProps['onExportError'];
|
|
207
|
+
importUploadProps?: TableUseImportProps['importUploadProps'];
|
|
208
|
+
importFileParamsFormat?: null | TableUseImportProps['importFileParamsFormat'];
|
|
195
209
|
}
|
|
196
210
|
export type TableSlots = {
|
|
197
211
|
emptyText?: any;
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { ownBtnProps, TableProps } from './index.type';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
import { OptionalParams } from 'js-file-downloader';
|
|
4
|
+
|
|
5
|
+
export type ExportResponse = {
|
|
6
|
+
thumbUrl: string;
|
|
7
|
+
filename?: string;
|
|
8
|
+
config?: OptionalParams;
|
|
9
|
+
};
|
|
10
|
+
export interface TableUseExportProps {
|
|
11
|
+
apis?: TableProps['apis'];
|
|
12
|
+
resultParams?: any;
|
|
13
|
+
exportFileByParams?: boolean;
|
|
14
|
+
exportFileName?: string;
|
|
15
|
+
exportFileParamsFormat?: null | ((vals: any) => Promise<any>);
|
|
16
|
+
exportBtn?: ownBtnProps;
|
|
17
|
+
onExportRequestSuccess?: null | ((res: AxiosResponse) => Promise<ExportResponse | false>);
|
|
18
|
+
fieldsNames?: TableProps['fieldsNames'];
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: (props: TableUseExportProps) => {
|
|
2
22
|
ExportBtn: () => import("vue/jsx-runtime").JSX.Element;
|
|
23
|
+
exportFile: () => Promise<void>;
|
|
3
24
|
};
|
|
4
25
|
export default _default;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { UploadProps } from 'ant-design-vue';
|
|
2
|
+
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
|
3
|
+
import { ownBtnProps, TableProps } from './index.type';
|
|
4
|
+
import { AxiosResponse } from 'axios';
|
|
5
|
+
|
|
6
|
+
export interface ImportFileParmas {
|
|
7
|
+
file: File;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface TableUseImportProps {
|
|
11
|
+
apis?: TableProps['apis'];
|
|
12
|
+
onImportSuccess?: (res: AxiosResponse) => Promise<any>;
|
|
13
|
+
onImportError?: (error: Error) => Promise<any>;
|
|
14
|
+
importBtn?: ownBtnProps;
|
|
15
|
+
importUploadProps?: UploadProps;
|
|
16
|
+
importFileParamsFormat?: null | ((options: UploadRequestOption) => Promise<any>);
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: (props: TableUseImportProps) => {
|
|
2
20
|
ImportBtn: () => import("vue/jsx-runtime").JSX.Element;
|
|
3
21
|
};
|
|
4
22
|
export default _default;
|