antd-vue-dbthor 1.0.39 → 1.0.41
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 -10
- package/dist/components/table/table.vue.d.ts +4 -1
- package/dist/components/table/useColumns.d.ts +3 -0
- package/dist/components/table/useDownloadTemplate.d.ts +5 -0
- package/dist/components/table/useExport.d.ts +14 -6
- package/dist/components/table/useParams.d.ts +1 -0
- package/dist/components/table/useQueryForm.d.ts +1 -0
- package/dist/lib/index.es.js +1479 -1425
- package/dist/lib/index.es.js.gz +0 -0
- package/dist/lib/index.umd.js +20 -20
- package/dist/lib/index.umd.js.gz +0 -0
- package/package.json +1 -1
|
@@ -11,12 +11,18 @@ import { TableQueryFormInstance, TableQueryFormItemProps, TableQueryFormProps }
|
|
|
11
11
|
import { JSX } from 'vue/jsx-runtime';
|
|
12
12
|
import { TableUseExportProps } from './useExport';
|
|
13
13
|
import { TableUseImportProps } from './useImport';
|
|
14
|
+
import { DropdownProps } from 'ant-design-vue/es/dropdown';
|
|
14
15
|
|
|
15
16
|
type TableFieldNames = string | string[];
|
|
16
17
|
export interface OwnBtnProps extends ButtonProps {
|
|
17
18
|
children?: string | VNode | JSX.Element;
|
|
18
19
|
}
|
|
19
|
-
export
|
|
20
|
+
export interface OwnDropProps extends DropdownProps {
|
|
21
|
+
children?: string | VNode | JSX.Element;
|
|
22
|
+
buttonProps?: ButtonProps;
|
|
23
|
+
}
|
|
24
|
+
export type ownBtnProps = false | OwnBtnProps;
|
|
25
|
+
export type ownDropDownProps = false | OwnDropProps;
|
|
20
26
|
export type TablePropsApi = (params?: AxiosRequestConfig['params'], config?: AxiosRequestConfig) => Promise<any>;
|
|
21
27
|
export type RequestParams = {
|
|
22
28
|
[key: string]: any;
|
|
@@ -112,9 +118,7 @@ export interface TableProps extends Omit<ATableProps, 'columns' | 'loading' | 's
|
|
|
112
118
|
requestParamsFormatter?: null | RequestParamsFormatter;
|
|
113
119
|
onSourceSuccess?: null | TableUseDataSourceProps['onSourceSuccess'];
|
|
114
120
|
onSourceError?: null | TableUseDataSourceProps['onSourceError'];
|
|
115
|
-
onGetRowDetail?: null |
|
|
116
|
-
[key: string]: any;
|
|
117
|
-
}>);
|
|
121
|
+
onGetRowDetail?: null | TableUseColumnsProps['onGetRowDetail'];
|
|
118
122
|
onBeforeCuFormSubmit?: null | ParamsFormatter;
|
|
119
123
|
onBeforeRowEditBackFill?: null | TableUseColumnsProps['onBeforeRowEditBackFill'];
|
|
120
124
|
onCuFormSubmitSuccess?: null | CRUDRequestFinish;
|
|
@@ -164,6 +168,7 @@ export interface TableProps extends Omit<ATableProps, 'columns' | 'loading' | 's
|
|
|
164
168
|
[key: string]: any;
|
|
165
169
|
};
|
|
166
170
|
queryFormSubmitWithReset?: TableQueryFormProps['queryFormSubmitWithReset'];
|
|
171
|
+
queryFormTimeFormat?: TableQueryFormProps['queryFormTimeFormat'];
|
|
167
172
|
/**
|
|
168
173
|
* 新增 编辑表单配置
|
|
169
174
|
*/
|
|
@@ -199,11 +204,11 @@ export interface TableProps extends Omit<ATableProps, 'columns' | 'loading' | 's
|
|
|
199
204
|
};
|
|
200
205
|
ciesBtns?: boolean;
|
|
201
206
|
ciesBtnsInQueryForm?: boolean;
|
|
202
|
-
createBtn?: TableUseCUFormProps['createBtn'];
|
|
203
|
-
importBtn?:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
createBtn?: false | TableUseCUFormProps['createBtn'];
|
|
208
|
+
importBtn?: TableUseImportProps['importBtn'];
|
|
209
|
+
exportDropdown?: TableUseExportProps['exportDropdown'];
|
|
210
|
+
exportCurrentPageBtn?: TableUseExportProps['exportCurrentPageBtn'];
|
|
211
|
+
exportAllBtn?: TableUseExportProps['exportAllBtn'];
|
|
207
212
|
exportFileByParams?: TableUseExportProps['exportFileByParams'];
|
|
208
213
|
exportFileParamsFormat?: null | TableUseExportProps['exportFileParamsFormat'];
|
|
209
214
|
exportFileName?: TableUseExportProps['exportFileName'];
|
|
@@ -246,7 +251,9 @@ export type TableSlots = {
|
|
|
246
251
|
customCiesBtns?: (orgNode: {
|
|
247
252
|
CreateBtn: VNode;
|
|
248
253
|
ImportBtn: VNode;
|
|
249
|
-
|
|
254
|
+
ExportDropDown: VNode;
|
|
255
|
+
ExportCurrentPageBtn: VNode;
|
|
256
|
+
ExportAllBtn: VNode;
|
|
250
257
|
}) => VNode | JSX.Element;
|
|
251
258
|
};
|
|
252
259
|
export declare const ATableSlotsWhiteList: string[];
|
|
@@ -2,6 +2,7 @@ import { TableProps, TableSlots } from './index.type';
|
|
|
2
2
|
import { DefineComponent, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { TableQueryFormInstance } from './useQueryForm';
|
|
4
4
|
import { ToRawRefs } from '@vue-macros/reactivity-transform/macros';
|
|
5
|
+
import { ButtonProps } from 'ant-design-vue';
|
|
5
6
|
|
|
6
7
|
declare function __VLS_template(): Readonly<TableSlots> & TableSlots;
|
|
7
8
|
declare const __VLS_component: DefineComponent<TableProps, {
|
|
@@ -18,7 +19,9 @@ declare const __VLS_component: DefineComponent<TableProps, {
|
|
|
18
19
|
}>;
|
|
19
20
|
CreateBtn: Ref<() => import("vue/jsx-runtime").JSX.Element, () => import("vue/jsx-runtime").JSX.Element>;
|
|
20
21
|
ImportBtn: Ref<() => import("vue/jsx-runtime").JSX.Element, () => import("vue/jsx-runtime").JSX.Element>;
|
|
21
|
-
|
|
22
|
+
ExportDropDown: Ref<() => import("vue/jsx-runtime").JSX.Element, () => import("vue/jsx-runtime").JSX.Element>;
|
|
23
|
+
ExportCurrentPageBtn: Ref<(props?: ButtonProps) => import("vue/jsx-runtime").JSX.Element, (props?: ButtonProps) => import("vue/jsx-runtime").JSX.Element>;
|
|
24
|
+
ExportAllBtn: Ref<(props?: ButtonProps) => import("vue/jsx-runtime").JSX.Element, (props?: ButtonProps) => import("vue/jsx-runtime").JSX.Element>;
|
|
22
25
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
23
26
|
cuFormModelChange: (currentModel: any, prevModel: any) => void;
|
|
24
27
|
cuFormEditStatusChange: (cuFormEditStatus: boolean) => void;
|
|
@@ -78,6 +78,9 @@ export interface TableUseColumnsProps {
|
|
|
78
78
|
detailModalLoading?: Ref<boolean> | Reactive<boolean>;
|
|
79
79
|
detailBackFillByGetDetail?: boolean;
|
|
80
80
|
tableTextConfig?: TableTextConfig;
|
|
81
|
+
onGetRowDetail?: (res: AxiosResponse) => Promise<{
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
}>;
|
|
81
84
|
[key: string]: any;
|
|
82
85
|
}
|
|
83
86
|
declare const _default: (props: TableUseColumnsProps) => {
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ButtonProps } from 'ant-design-vue';
|
|
2
2
|
import { AxiosResponse } from 'axios';
|
|
3
3
|
import { OptionalParams } from 'js-file-downloader';
|
|
4
|
+
import { ownBtnProps, ownDropDownProps, TableProps } from './index.type';
|
|
4
5
|
|
|
5
6
|
export type ExportResponse = {
|
|
6
7
|
thumbUrl: string;
|
|
7
8
|
filename?: string;
|
|
8
9
|
config?: OptionalParams;
|
|
9
10
|
};
|
|
11
|
+
export type ExportDataType = 'currentPage' | 'allPage';
|
|
10
12
|
export interface TableUseExportProps {
|
|
11
13
|
apis?: TableProps['apis'];
|
|
14
|
+
fieldsNames?: TableProps['fieldsNames'];
|
|
12
15
|
resultParams?: any;
|
|
13
16
|
exportFileByParams?: boolean;
|
|
14
17
|
exportFileName?: string;
|
|
15
|
-
exportFileParamsFormat?: null | ((vals
|
|
16
|
-
|
|
18
|
+
exportFileParamsFormat?: null | ((vals?: any, type?: ExportDataType) => Promise<any>);
|
|
19
|
+
exportDropdown?: ownDropDownProps;
|
|
20
|
+
exportCurrentPageBtn?: ownBtnProps;
|
|
21
|
+
exportAllBtn?: ownBtnProps;
|
|
17
22
|
onExportRequestSuccess?: null | ((res: AxiosResponse) => Promise<ExportResponse | false>);
|
|
18
|
-
|
|
23
|
+
onExportSuccess?: null | ((res: any) => Promise<false | void>);
|
|
24
|
+
onExportError?: null | ((error: Error) => Promise<false | void>);
|
|
19
25
|
[key: string]: any;
|
|
20
26
|
}
|
|
21
27
|
declare const _default: (props: TableUseExportProps) => {
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
ExportDropDown: () => import("vue/jsx-runtime").JSX.Element;
|
|
29
|
+
ExportCurrentPageBtn: (props?: ButtonProps) => import("vue/jsx-runtime").JSX.Element;
|
|
30
|
+
ExportAllBtn: (props?: ButtonProps) => import("vue/jsx-runtime").JSX.Element;
|
|
31
|
+
exportFile: (type?: "currentPage" | "allPage") => Promise<void>;
|
|
24
32
|
};
|
|
25
33
|
export default _default;
|
|
@@ -53,6 +53,7 @@ export interface TableQueryFormProps {
|
|
|
53
53
|
queryFormRowProps?: RowProps;
|
|
54
54
|
queryFormColProps?: ColProps;
|
|
55
55
|
queryFormFlexProps?: FlexProps;
|
|
56
|
+
queryFormTimeFormat?: string;
|
|
56
57
|
queryFormSubmitBtn?: boolean | ((form: TableQueryFormInstance) => VNode);
|
|
57
58
|
queryFormSubmitBtnProps?: OwnBtnProps;
|
|
58
59
|
queryFormResetBtn?: boolean | ((form: TableQueryFormInstance) => VNode);
|