@dazhicheng/ui 1.6.23 → 1.6.25
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/tt-api-component/index.d.ts +24 -35
- package/dist/components/tt-area/TtArea.d.ts +3 -0
- package/dist/components/tt-area/index.d.ts +1 -1
- package/dist/components/tt-button/components/AddButton.d.ts +3 -0
- package/dist/components/tt-button/index.d.ts +260 -589
- package/dist/components/tt-checkbox/index.d.ts +26 -35
- package/dist/components/tt-drawer/index.d.ts +306 -299
- package/dist/components/tt-drawer/src/{RenderDrawer.vue.d.ts → RenderDrawer.d.ts} +149 -146
- package/dist/components/tt-drawer/src/components/{DrawerFooter.vue.d.ts → DrawerFooter.d.ts} +18 -16
- package/dist/components/tt-drawer/src/components/{DrawerHeader.vue.d.ts → DrawerHeader.d.ts} +4 -3
- package/dist/components/tt-drawer/src/hooks/useDrawerRender.d.ts +2 -2
- package/dist/components/tt-drawer/src/hooks/useResizable.d.ts +2 -2
- package/dist/components/tt-drawer/src/utils/drawer-api.d.ts +4 -2
- package/dist/components/tt-empty/index.d.ts +10 -8
- package/dist/components/tt-form/src/components/{ExpandableArrow.vue.d.ts → ExpandableArrow.d.ts} +5 -4
- package/dist/components/tt-form/src/components/{FormActions.vue.d.ts → FormActions.d.ts} +6 -5
- package/dist/components/tt-form/src/components/{FormElInput.vue.d.ts → FormElInput.d.ts} +105 -101
- package/dist/components/tt-form/src/components/Slot.d.ts +4 -4
- package/dist/components/tt-form/src/form/{FormControl.vue.d.ts → FormControl.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{FormDescription.vue.d.ts → FormDescription.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{FormItem.vue.d.ts → FormItem.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{FormLabel.vue.d.ts → FormLabel.d.ts} +2 -1
- package/dist/components/tt-form/src/form/FormMessage.d.ts +3 -0
- package/dist/components/tt-form/src/form/FormMessageToolTip.d.ts +9 -0
- package/dist/components/tt-form/src/form/{FormWarnMessage.vue.d.ts → FormWarnMessage.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{RenderContent.vue.d.ts → RenderContent.d.ts} +4 -4
- package/dist/components/tt-form/src/form/index.d.ts +8 -8
- package/dist/components/tt-form/src/form/useFormField.d.ts +6 -5
- package/dist/components/tt-form/src/form-render/{FormField.vue.d.ts → FormField.d.ts} +2 -1
- package/dist/components/tt-form/src/form-render/FormFieldContact.d.ts +6 -6
- package/dist/components/tt-form/src/form-render/{FormLabel.vue.d.ts → FormLabel.d.ts} +3 -2
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +14 -11
- package/dist/components/tt-form/src/form-render/context.d.ts +5 -4
- package/dist/components/tt-form/src/form-render/dependencies.d.ts +7 -6
- package/dist/components/tt-form/src/form-render/expandable.d.ts +4 -3
- package/dist/components/tt-form/src/form-render/{form.vue.d.ts → form.d.ts} +9 -8
- package/dist/components/tt-form/src/form-render/index.d.ts +3 -3
- package/dist/components/tt-form/src/formApi.d.ts +3 -3
- package/dist/components/tt-form/src/group-form/{GroupForm.vue.d.ts → GroupForm.d.ts} +7 -5
- package/dist/components/tt-form/src/group-form/{GroupSection.vue.d.ts → GroupSection.d.ts} +7 -5
- package/dist/components/tt-form/src/group-form/{LazyFormField.vue.d.ts → LazyFormField.d.ts} +5 -3
- package/dist/components/tt-form/src/group-form/groupFormApi.d.ts +7 -5
- package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts +3 -2
- package/dist/components/tt-form/src/hooks/useForwardProps.d.ts +2 -2
- package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts +2 -2
- package/dist/components/tt-form/src/index.d.ts +217 -0
- package/dist/components/tt-form/src/useForm.d.ts +2 -1
- package/dist/components/tt-form/src/useFormContext.d.ts +2 -1
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +61 -337
- package/dist/components/tt-icon/components/AddIcon.d.ts +8 -0
- package/dist/components/tt-icon/components/SubIcon.d.ts +8 -0
- package/dist/components/tt-icon/index.d.ts +24 -115
- package/dist/components/tt-image/index.d.ts +45 -41
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +30 -26
- package/dist/components/tt-image/tt-image.d.ts +36 -34
- package/dist/components/tt-loading/index.d.ts +5 -2
- package/dist/components/tt-loading/src/loading.d.ts +13 -0
- package/dist/components/tt-log/index.d.ts +7 -6
- package/dist/components/tt-modal/index.d.ts +371 -364
- package/dist/components/tt-modal/src/{RenderModal.vue.d.ts → RenderModal.d.ts} +118 -115
- package/dist/components/tt-modal/src/components/{ModalFooter.vue.d.ts → ModalFooter.d.ts} +26 -23
- package/dist/components/tt-modal/src/components/{ModalHeader.vue.d.ts → ModalHeader.d.ts} +4 -3
- package/dist/components/tt-modal/src/components/{ModalWrapper.vue.d.ts → ModalWrapper.d.ts} +27 -24
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +32 -29
- package/dist/components/tt-modal/src/typing.d.ts +2 -2
- package/dist/components/tt-modal/src/utils/modal-api.d.ts +2 -1
- package/dist/components/tt-modal-form/hooks/useModalFormSlot.d.ts +3 -2
- package/dist/components/tt-modal-form/index.d.ts +46 -2
- package/dist/components/tt-modal-form/useModalForm.d.ts +4 -3
- package/dist/components/tt-nav-anchor/index.d.ts +15 -12
- package/dist/components/tt-nav-anchor/src/{TtNavAnchor.vue.d.ts → TtNavAnchor.d.ts} +4 -4
- package/dist/components/tt-panel-select/index.d.ts +1 -1
- package/dist/components/tt-panel-select/src/components/{PanelLeft.vue.d.ts → PanelLeft.d.ts} +4 -3
- package/dist/components/tt-panel-select/src/components/{PanelMiddle.vue.d.ts → PanelMiddle.d.ts} +83 -80
- package/dist/components/tt-panel-select/src/components/{PanelRight.vue.d.ts → PanelRight.d.ts} +34 -32
- package/dist/components/tt-panel-select/src/hooks/usePanelData.d.ts +7 -6
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.d.ts +5 -5
- package/dist/components/tt-panel-select/src/{index.vue.d.ts → index.d.ts} +84 -80
- package/dist/components/tt-radio-group/index.d.ts +31 -50
- package/dist/components/tt-select/index.d.ts +1 -1
- package/dist/components/tt-select/src/{Select.vue.d.ts → Select.d.ts} +146 -141
- package/dist/components/tt-select/src/components/{SelectTable.vue.d.ts → SelectTable.d.ts} +40 -36
- package/dist/components/tt-select/src/components/{Table.vue.d.ts → Table.d.ts} +41 -38
- package/dist/components/tt-select/src/hooks/useGrid.d.ts +2 -2
- package/dist/components/tt-select/src/hooks/usePagination.d.ts +4 -3
- package/dist/components/tt-select/src/hooks/useSelect.d.ts +2 -2
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
- package/dist/components/tt-table/index.d.ts +287 -279
- package/dist/components/tt-table/src/{Table.vue.d.ts → Table.d.ts} +209 -204
- package/dist/components/tt-table/src/{TableForm.vue.d.ts → TableForm.d.ts} +83 -80
- package/dist/components/tt-table/src/components/RowContext.d.ts +5 -5
- package/dist/components/tt-table/src/components/{TableAction.vue.d.ts → TableAction.d.ts} +4 -4
- package/dist/components/tt-table/src/components/TableButtons.d.ts +5 -5
- package/dist/components/tt-table/src/components/{TableColumnModal.vue.d.ts → TableColumnModal.d.ts} +5 -4
- package/dist/components/tt-table/src/components/{TableToolbarTools.vue.d.ts → TableToolbarTools.d.ts} +7 -6
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +45 -44
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +33 -33
- package/dist/components/tt-table/src/hooks/useQuery.d.ts +2 -2
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +2 -2
- package/dist/components/tt-table/src/hooks/useSideSlot.d.ts +112 -110
- package/dist/components/tt-table/src/hooks/useTableData.d.ts +2 -2
- package/dist/components/tt-table/src/props.d.ts +19 -17
- package/dist/components/tt-table/src/utils/table-api.d.ts +4 -4
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +2 -1
- package/dist/components/tt-text/index.d.ts +34 -59
- package/dist/components/tt-upload/index.d.ts +317 -311
- package/dist/components/tt-upload/src/TtUpload.d.ts +519 -0
- package/dist/components/tt-upload/src/typing.d.ts +49 -47
- package/dist/hooks/useDataPermissionOptions.js +76 -72
- package/dist/hooks/useLoading.d.ts +2 -2
- package/dist/hooks/useScreenshotOss.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/package.json +2 -2
- package/dist/components/tt-api-component/index.vue.d.ts +0 -34
- package/dist/components/tt-area/TtArea.vue.d.ts +0 -2
- package/dist/components/tt-button/components/AddButton.vue.d.ts +0 -2
- package/dist/components/tt-button/index.vue.d.ts +0 -466
- package/dist/components/tt-checkbox/index.vue.d.ts +0 -28
- package/dist/components/tt-form/src/form/FormMessage.vue.d.ts +0 -2
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.d.ts +0 -8
- package/dist/components/tt-form/src/index.vue.d.ts +0 -216
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +0 -298
- package/dist/components/tt-icon/components/AddIcon.vue.d.ts +0 -7
- package/dist/components/tt-icon/components/SubIcon.vue.d.ts +0 -7
- package/dist/components/tt-icon/index.vue.d.ts +0 -32
- package/dist/components/tt-loading/src/loading.vue.d.ts +0 -12
- package/dist/components/tt-log/index.vue.d.ts +0 -5
- package/dist/components/tt-modal-form/index.vue.d.ts +0 -45
- package/dist/components/tt-radio-group/index.vue.d.ts +0 -33
- package/dist/components/tt-text/index.vue.d.ts +0 -50
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +0 -517
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import { UploadRawFile } from 'element-plus';
|
|
2
|
+
import { UploadRawFile, UploadFile, UploadFiles, UploadProgressEvent, UploadUserFile, UploadData, UploadRequestHandler } from 'element-plus';
|
|
3
|
+
import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
|
|
4
|
+
import { Awaitable, Mutable } from 'element-plus/es/utils/typescript.mjs';
|
|
3
5
|
export interface OssSignatureResult {
|
|
4
6
|
/** HMAC-SHA256 签名 */
|
|
5
7
|
signature: string;
|
|
@@ -55,12 +57,12 @@ export declare const ttUploadProps: {
|
|
|
55
57
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
56
58
|
};
|
|
57
59
|
/** 上传前的钩子;在内置类型/大小/数量校验通过后调用,返回 false 可阻止上传 */
|
|
58
|
-
readonly beforeUpload:
|
|
59
|
-
(): (rawFile: UploadRawFile) =>
|
|
60
|
+
readonly beforeUpload: EpPropFinalized<(new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
61
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
60
62
|
new (): any;
|
|
61
63
|
readonly prototype: any;
|
|
62
|
-
} | ((new (...args: any[]) => (rawFile: UploadRawFile) =>
|
|
63
|
-
(): (rawFile: UploadRawFile) =>
|
|
64
|
+
} | ((new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
65
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
64
66
|
new (): any;
|
|
65
67
|
readonly prototype: any;
|
|
66
68
|
} | null)[], unknown, unknown, () => void, boolean>;
|
|
@@ -169,102 +171,102 @@ export declare const ttUploadProps: {
|
|
|
169
171
|
readonly default: false;
|
|
170
172
|
};
|
|
171
173
|
readonly beforeRemove: {
|
|
172
|
-
readonly type: PropType<(uploadFile:
|
|
174
|
+
readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
|
|
173
175
|
readonly required: false;
|
|
174
176
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
175
177
|
__epPropKey: true;
|
|
176
178
|
};
|
|
177
|
-
readonly onRemove:
|
|
178
|
-
(): (uploadFile:
|
|
179
|
+
readonly onRemove: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
180
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
179
181
|
new (): any;
|
|
180
182
|
readonly prototype: any;
|
|
181
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
182
|
-
(): (uploadFile:
|
|
183
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
184
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
183
185
|
new (): any;
|
|
184
186
|
readonly prototype: any;
|
|
185
187
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
186
|
-
readonly onChange:
|
|
187
|
-
(): (uploadFile:
|
|
188
|
+
readonly onChange: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
189
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
188
190
|
new (): any;
|
|
189
191
|
readonly prototype: any;
|
|
190
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
191
|
-
(): (uploadFile:
|
|
192
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
193
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
192
194
|
new (): any;
|
|
193
195
|
readonly prototype: any;
|
|
194
196
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
195
|
-
readonly onPreview:
|
|
196
|
-
(): (uploadFile:
|
|
197
|
+
readonly onPreview: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
198
|
+
(): (uploadFile: UploadFile) => void;
|
|
197
199
|
new (): any;
|
|
198
200
|
readonly prototype: any;
|
|
199
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
200
|
-
(): (uploadFile:
|
|
201
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
202
|
+
(): (uploadFile: UploadFile) => void;
|
|
201
203
|
new (): any;
|
|
202
204
|
readonly prototype: any;
|
|
203
205
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
204
|
-
readonly onSuccess:
|
|
205
|
-
(): (response: any, uploadFile:
|
|
206
|
+
readonly onSuccess: EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
207
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
206
208
|
new (): any;
|
|
207
209
|
readonly prototype: any;
|
|
208
|
-
} | (((new (...args: any[]) => (response: any, uploadFile:
|
|
209
|
-
(): (response: any, uploadFile:
|
|
210
|
+
} | (((new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
211
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
210
212
|
new (): any;
|
|
211
213
|
readonly prototype: any;
|
|
212
214
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
213
|
-
readonly onProgress:
|
|
214
|
-
(): (evt:
|
|
215
|
+
readonly onProgress: EpPropFinalized<(new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
216
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
215
217
|
new (): any;
|
|
216
218
|
readonly prototype: any;
|
|
217
|
-
} | (((new (...args: any[]) => (evt:
|
|
218
|
-
(): (evt:
|
|
219
|
+
} | (((new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
220
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
219
221
|
new (): any;
|
|
220
222
|
readonly prototype: any;
|
|
221
223
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
222
|
-
readonly onError:
|
|
223
|
-
(): (error: Error, uploadFile:
|
|
224
|
+
readonly onError: EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
225
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
224
226
|
new (): any;
|
|
225
227
|
readonly prototype: any;
|
|
226
|
-
} | (((new (...args: any[]) => (error: Error, uploadFile:
|
|
227
|
-
(): (error: Error, uploadFile:
|
|
228
|
+
} | (((new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
229
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
228
230
|
new (): any;
|
|
229
231
|
readonly prototype: any;
|
|
230
232
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
231
|
-
readonly onExceed:
|
|
232
|
-
(): (files: File[], uploadFiles:
|
|
233
|
+
readonly onExceed: EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
234
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
233
235
|
new (): any;
|
|
234
236
|
readonly prototype: any;
|
|
235
|
-
} | (((new (...args: any[]) => (files: File[], uploadFiles:
|
|
236
|
-
(): (files: File[], uploadFiles:
|
|
237
|
+
} | (((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
238
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
237
239
|
new (): any;
|
|
238
240
|
readonly prototype: any;
|
|
239
241
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
240
242
|
readonly crossorigin: {
|
|
241
|
-
readonly type: PropType<
|
|
243
|
+
readonly type: PropType< EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | (((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials")) | null)[], unknown, unknown>>;
|
|
242
244
|
readonly required: false;
|
|
243
245
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
244
246
|
__epPropKey: true;
|
|
245
247
|
};
|
|
246
248
|
readonly headers: {
|
|
247
|
-
readonly type: PropType<
|
|
249
|
+
readonly type: PropType< EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | (((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers)) | null)[], unknown, unknown>>;
|
|
248
250
|
readonly required: false;
|
|
249
251
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
250
252
|
__epPropKey: true;
|
|
251
253
|
};
|
|
252
|
-
readonly method:
|
|
253
|
-
readonly data:
|
|
254
|
-
readonly name:
|
|
254
|
+
readonly method: EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
255
|
+
readonly data: EpPropFinalized<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>))) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
|
256
|
+
readonly name: EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
255
257
|
readonly withCredentials: BooleanConstructor;
|
|
256
|
-
readonly fileList:
|
|
257
|
-
readonly autoUpload:
|
|
258
|
-
readonly listType:
|
|
259
|
-
readonly httpRequest:
|
|
260
|
-
():
|
|
258
|
+
readonly fileList: EpPropFinalized<(new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[]) | (((new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
259
|
+
readonly autoUpload: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
260
|
+
readonly listType: EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
261
|
+
readonly httpRequest: EpPropFinalized<(new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
262
|
+
(): UploadRequestHandler;
|
|
261
263
|
new (): any;
|
|
262
264
|
readonly prototype: any;
|
|
263
|
-
} | (((new (...args: any[]) =>
|
|
264
|
-
():
|
|
265
|
+
} | (((new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
266
|
+
(): UploadRequestHandler;
|
|
265
267
|
new (): any;
|
|
266
268
|
readonly prototype: any;
|
|
267
|
-
}) | null)[], unknown, unknown,
|
|
269
|
+
}) | null)[], unknown, unknown, UploadRequestHandler, boolean>;
|
|
268
270
|
readonly limit: NumberConstructor;
|
|
269
271
|
readonly directory: BooleanConstructor;
|
|
270
272
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { queryDataPermissionDetailDataTypeContext as
|
|
2
|
-
import { fetchUserListOnce as
|
|
3
|
-
import { ref as
|
|
4
|
-
import { useOwnerRoutePath as
|
|
5
|
-
const u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(),
|
|
1
|
+
import { queryDataPermissionDetailDataTypeContext as j } from "../api/dataTypeContext.js";
|
|
2
|
+
import { fetchUserListOnce as k, clearUserListCache as B } from "./userListCache.js";
|
|
3
|
+
import { ref as F, watchEffect as W, unref as U, computed as G } from "vue";
|
|
4
|
+
import { useOwnerRoutePath as H } from "./useOwnerRoutePath.js";
|
|
5
|
+
const u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), J = "all", Q = { label: "全部", value: J }, b = /* @__PURE__ */ new WeakMap(), X = {
|
|
6
6
|
platformId: ["platformName", "platformId"],
|
|
7
7
|
shopId: ["shopName", "shopId"],
|
|
8
8
|
purchasePlaceId: ["purchasePlaceName", "purchasePlaceCode"],
|
|
@@ -10,115 +10,119 @@ const u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), y = /* @__PU
|
|
|
10
10
|
lockUserId: ["userName", "userId"],
|
|
11
11
|
userId: ["fullName", "id"]
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
const i =
|
|
15
|
-
if (
|
|
16
|
-
const [
|
|
17
|
-
const
|
|
13
|
+
function Y(n, a = []) {
|
|
14
|
+
const i = b.get(a) || /* @__PURE__ */ new Map(), o = i.get(n);
|
|
15
|
+
if (o) return o.slice();
|
|
16
|
+
const [y, S] = X[n], m = a.map((h) => {
|
|
17
|
+
const c = n === "purchasePlaceId" ? h.purchaseInfo || {} : h;
|
|
18
18
|
return {
|
|
19
|
-
...
|
|
20
|
-
label:
|
|
21
|
-
value:
|
|
19
|
+
...h,
|
|
20
|
+
label: c == null ? void 0 : c[y],
|
|
21
|
+
value: c == null ? void 0 : c[S]
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
|
-
return i.set(n,
|
|
24
|
+
return i.set(n, m), b.set(a, i), m.slice();
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const
|
|
28
|
-
function
|
|
26
|
+
function re(n) {
|
|
27
|
+
const a = H(), i = F({});
|
|
28
|
+
function o(t = {}) {
|
|
29
29
|
i.value = n.codes.reduce(
|
|
30
|
-
(e, r) => (e[r] =
|
|
30
|
+
(e, r) => (e[r] = Y(r, t[r]), e),
|
|
31
31
|
{}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function y(t) {
|
|
35
35
|
var e;
|
|
36
36
|
return typeof n.showAll == "boolean" ? n.showAll : ((e = n.showAll) == null ? void 0 : e[t]) ?? !1;
|
|
37
37
|
}
|
|
38
38
|
function S() {
|
|
39
|
-
|
|
39
|
+
p.clear(), f.clear(), u.clear(), d.clear(), I.clear(), B();
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
u.delete(t), d.delete(t),
|
|
41
|
+
function m(t) {
|
|
42
|
+
u.delete(t), d.delete(t), f.delete(t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function h(t) {
|
|
45
45
|
const e = d.get(t) || /* @__PURE__ */ new Set(), r = e.size;
|
|
46
|
-
n.codes.forEach((l) => e.add(l)), d.set(t, e), e.size !== r &&
|
|
46
|
+
n.codes.forEach((l) => e.add(l)), d.set(t, e), e.size !== r && A(t);
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
49
|
-
const e =
|
|
48
|
+
async function c(t = !1) {
|
|
49
|
+
const e = a, r = U(n.dataSource);
|
|
50
50
|
if (r) {
|
|
51
|
-
|
|
51
|
+
o({ ...u.get(e) || {}, ...r });
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const l = /* @__PURE__ */ new Set(), V = 32;
|
|
55
|
+
for (let L = 0; L < V; L++) {
|
|
56
|
+
const v = u.get(e) || {}, M = [...d.get(e) || n.codes], g = t ? M : M.filter((s) => !Object.prototype.hasOwnProperty.call(v, s));
|
|
57
|
+
if (t = !1, !g.length) {
|
|
58
|
+
o(v);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
await
|
|
61
|
+
const N = p.get(e);
|
|
62
|
+
if (N) {
|
|
63
|
+
await N;
|
|
63
64
|
continue;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
if (g.every((s) => l.has(s))) {
|
|
67
|
+
o(v);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
g.forEach((s) => l.add(s));
|
|
71
|
+
const x = g.filter((s) => s !== "userId"), _ = g.includes("userId"), D = Promise.allSettled([
|
|
72
|
+
x.length ? j({ dataTypeName: x }).then(
|
|
73
|
+
(s) => s
|
|
68
74
|
) : Promise.resolve([]),
|
|
69
|
-
|
|
70
|
-
]).then(([
|
|
71
|
-
const
|
|
75
|
+
_ ? k() : Promise.resolve(void 0)
|
|
76
|
+
]).then(([s, q]) => {
|
|
77
|
+
const w = s.status === "fulfilled" ? s.value : [], C = q.status === "fulfilled" ? q.value : void 0;
|
|
72
78
|
return {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
...P.reduce((f, h) => {
|
|
78
|
-
const x = h == null ? void 0 : h.dataTypeCode;
|
|
79
|
-
return x && (f[x] = h.originalItems || []), f;
|
|
79
|
+
...C != null && C.length ? { userId: C } : {},
|
|
80
|
+
...w.reduce((O, P) => {
|
|
81
|
+
const T = P == null ? void 0 : P.dataTypeCode;
|
|
82
|
+
return T && (O[T] = P.originalItems || []), O;
|
|
80
83
|
}, {})
|
|
81
84
|
};
|
|
82
|
-
}),
|
|
83
|
-
|
|
85
|
+
}), R = (I.get(e) || 0) + 1;
|
|
86
|
+
I.set(e, R), p.set(e, D);
|
|
84
87
|
try {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
u.set(e,
|
|
88
|
+
const s = await D;
|
|
89
|
+
if (I.get(e) !== R) continue;
|
|
90
|
+
const w = { ...u.get(e) || {}, ...s };
|
|
91
|
+
u.set(e, w), o(w);
|
|
89
92
|
} finally {
|
|
90
|
-
|
|
93
|
+
p.get(e) === D && p.delete(e);
|
|
91
94
|
}
|
|
92
95
|
}
|
|
96
|
+
o(u.get(e) || {});
|
|
93
97
|
}
|
|
94
|
-
async function
|
|
95
|
-
const t =
|
|
96
|
-
S(),
|
|
98
|
+
async function E() {
|
|
99
|
+
const t = a, e = new Set(d.get(t) || n.codes);
|
|
100
|
+
S(), m(t), d.set(t, e), await c(!0);
|
|
97
101
|
}
|
|
98
|
-
function
|
|
99
|
-
const e =
|
|
102
|
+
function A(t) {
|
|
103
|
+
const e = f.get(t);
|
|
100
104
|
if (e) return e;
|
|
101
|
-
const r = Promise.resolve().then(() =>
|
|
102
|
-
return
|
|
103
|
-
|
|
105
|
+
const r = Promise.resolve().then(() => c());
|
|
106
|
+
return f.set(t, r), r.finally(() => {
|
|
107
|
+
f.get(t) === r && f.delete(t);
|
|
104
108
|
}), r;
|
|
105
109
|
}
|
|
106
|
-
|
|
107
|
-
const t =
|
|
108
|
-
t &&
|
|
110
|
+
W(() => {
|
|
111
|
+
const t = U(n.dataSource);
|
|
112
|
+
t && o({ ...u.get(a) || {}, ...t });
|
|
109
113
|
});
|
|
110
|
-
function
|
|
111
|
-
|
|
114
|
+
function z(t) {
|
|
115
|
+
o(u.get(t));
|
|
112
116
|
}
|
|
113
|
-
return
|
|
117
|
+
return h(a), A(a).then(() => z(a)), {
|
|
114
118
|
/**
|
|
115
119
|
* 数据源
|
|
116
120
|
*/
|
|
117
|
-
dataSource:
|
|
121
|
+
dataSource: G(() => {
|
|
118
122
|
const t = n.codes.reduce(
|
|
119
123
|
(e, r) => {
|
|
120
124
|
const l = i.value[r] || [];
|
|
121
|
-
return e[r] =
|
|
125
|
+
return e[r] = y(r) ? [Q, ...l] : l, e;
|
|
122
126
|
},
|
|
123
127
|
{}
|
|
124
128
|
);
|
|
@@ -134,9 +138,9 @@ function K(n) {
|
|
|
134
138
|
/**
|
|
135
139
|
* @description 清空所有缓存,重新请求
|
|
136
140
|
*/
|
|
137
|
-
reload:
|
|
141
|
+
reload: E
|
|
138
142
|
};
|
|
139
143
|
}
|
|
140
144
|
export {
|
|
141
|
-
|
|
145
|
+
re as useDataPermissionOptions
|
|
142
146
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue';
|
|
1
|
+
import { MaybeRef, ComputedRef } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* 用于处理加载状态的钩子函数
|
|
4
4
|
* @returns 包含获取加载状态和设置加载状态的函数的对象
|
|
5
5
|
*/
|
|
6
6
|
export declare function useLoading(loading?: MaybeRef<boolean>): {
|
|
7
|
-
getLoading:
|
|
7
|
+
getLoading: ComputedRef<boolean>;
|
|
8
8
|
setLoading: (loading: boolean) => void;
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, VNode, MaybeRefOrGetter } from 'vue';
|
|
1
|
+
import { Component, VNode, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
2
|
import { ComponentCaptureOptions, ElementScreenshotOptions, ScreenshotTarget } from '../../../hooks/src';
|
|
3
3
|
import { OssSignatureResult } from '../components/tt-upload/src/typing';
|
|
4
4
|
export interface ScreenshotOssOptions extends ElementScreenshotOptions {
|
|
@@ -33,5 +33,5 @@ export declare function useScreenshotOss(): {
|
|
|
33
33
|
output: "blob";
|
|
34
34
|
}): Promise<ScreenshotOssResult>;
|
|
35
35
|
};
|
|
36
|
-
isCapturing:
|
|
36
|
+
isCapturing: Ref<boolean, boolean>;
|
|
37
37
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App, Component } from 'vue';
|
|
2
2
|
import { BaseFormComponentType } from './components/tt-form';
|
|
3
3
|
import { setXHR } from './utils/xhr';
|
|
4
|
+
import { TtUiGlobalSetup } from './components/types';
|
|
4
5
|
export * from './components/tt-area';
|
|
5
6
|
export * from './components/tt-button';
|
|
6
7
|
export * from './components/tt-checkbox';
|
|
@@ -54,6 +55,6 @@ declare const _default: {
|
|
|
54
55
|
* @param options 全局参数
|
|
55
56
|
* @returns 合并后的全局参数
|
|
56
57
|
*/
|
|
57
|
-
setup:
|
|
58
|
+
setup: TtUiGlobalSetup;
|
|
58
59
|
};
|
|
59
60
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/ui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"axios": "^1.13.4",
|
|
66
66
|
"element-plus": "^2.13.7",
|
|
67
67
|
"lodash-es": "^4.17.23",
|
|
68
|
-
"vue": "
|
|
68
|
+
"vue": "3.5.34",
|
|
69
69
|
"vue-router": "^5.0.2",
|
|
70
70
|
"vxe-pc-ui": "^4.14.15",
|
|
71
71
|
"vxe-table": "^4.18.13",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { Props, OptionsItem } from './types';
|
|
3
|
-
declare const _default: <T extends Component>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
-
readonly onChange?: ((val: unknown, options: OptionsItem[], currentOption: OptionsItem | OptionsItem[] | undefined) => any) | undefined;
|
|
6
|
-
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7
|
-
readonly onOptionsChange?: ((args_0: OptionsItem[]) => any) | undefined;
|
|
8
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue" | "onOptionsChange"> & ({
|
|
9
|
-
modelValue?: any;
|
|
10
|
-
} & Props<T>) & Partial<{}>> & import('vue').PublicProps;
|
|
11
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
12
|
-
/** 获取options数据 */
|
|
13
|
-
getOptions: () => OptionsItem[];
|
|
14
|
-
/** 获取当前值 */
|
|
15
|
-
getValue: () => any;
|
|
16
|
-
/**
|
|
17
|
-
* 获取被包装组件的实例
|
|
18
|
-
*/
|
|
19
|
-
getComponentRef: () => any;
|
|
20
|
-
/** 更新Api参数 */
|
|
21
|
-
updateParam(newParams: Record<string, any>): void;
|
|
22
|
-
/** 手动请求数据 */
|
|
23
|
-
reload: () => Promise<void>;
|
|
24
|
-
}>): void;
|
|
25
|
-
attrs: any;
|
|
26
|
-
slots: Partial<Record<string, (_: any) => any>>;
|
|
27
|
-
emit: (((evt: "change", val: unknown, options: OptionsItem[], currentOption: OptionsItem | OptionsItem[] | undefined) => void) & ((evt: "optionsChange", args_0: OptionsItem[]) => void)) & ((evt: "update:modelValue", value: any) => void);
|
|
28
|
-
}>) => import('vue').VNode & {
|
|
29
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
30
|
-
};
|
|
31
|
-
export default _default;
|
|
32
|
-
type __VLS_PrettifyLocal<T> = {
|
|
33
|
-
[K in keyof T]: T[K];
|
|
34
|
-
} & {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|