@dt-frames/ui 2.0.11 → 2.0.13

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.
Files changed (46) hide show
  1. package/es/components/container/index.d.ts +2 -93
  2. package/es/components/curd/src/components/Curd.d.ts +6 -2
  3. package/es/components/curd/src/props.d.ts +3 -1
  4. package/es/components/drawer/index.d.ts +1 -1
  5. package/es/components/drawer/index.js +4 -4
  6. package/es/components/drawer/src/index.d.ts +1 -1
  7. package/es/components/drawer/src/types/index.type.d.ts +1 -1
  8. package/es/components/form/index.js +32 -13
  9. package/es/components/form/src/components/FormItem.d.ts +3 -1
  10. package/es/components/form/src/components/formIcon.d.ts +0 -8
  11. package/es/components/form/src/props.d.ts +7 -5
  12. package/es/components/form/src/types/form.type.d.ts +1 -0
  13. package/es/components/form/src/types/items.type.d.ts +6 -4
  14. package/es/components/icons/index.d.ts +497 -497
  15. package/es/components/iframe/index.d.ts +2 -0
  16. package/es/components/iframe/index.js +72 -0
  17. package/es/components/iframe/index.less +29 -0
  18. package/es/components/iframe/src/index.d.ts +38 -0
  19. package/es/components/modal/index.js +11 -6
  20. package/es/components/modal/src/index.d.ts +4 -2
  21. package/es/components/table/index.js +79 -18
  22. package/es/components/table/src/enums/table.enum.d.ts +5 -0
  23. package/es/components/table/src/index.d.ts +10 -10
  24. package/es/components/table/src/props.d.ts +3 -3
  25. package/es/components/tree/index.js +39 -29
  26. package/es/components/upload/index.js +414 -11
  27. package/es/components/upload/index.less +37 -0
  28. package/es/components/upload/src/basicProps.d.ts +89 -0
  29. package/es/components/upload/src/components/PdfView.d.ts +9 -0
  30. package/es/components/upload/src/hooks/useFile.d.ts +15 -0
  31. package/es/components/upload/src/index.d.ts +236 -2
  32. package/es/components/upload/src/type/file.d.ts +10 -0
  33. package/es/components/upload/src/utils/upload.d.ts +2 -0
  34. package/es/theme/index.js +3 -1
  35. package/es/theme/index.less +5 -1
  36. package/es/theme/src/components/content/index.d.ts +2 -0
  37. package/es/theme/src/components/header/index.d.ts +809 -809
  38. package/es/theme/src/components/header/multiple-header.d.ts +918 -918
  39. package/es/theme/src/index.d.ts +2059 -2057
  40. package/index.d.ts +3 -1
  41. package/index.js +3 -1
  42. package/manualContentPath.js +14 -0
  43. package/package.json +4 -2
  44. package/vite.config.ts +3 -0
  45. package/vite.config.ts.timestamp-1678694558071.mjs +0 -59
  46. package/vite.config.ts.timestamp-1678700851971.mjs +0 -61
@@ -0,0 +1,89 @@
1
+ import { PropType, Ref, ComputedRef } from "vue";
2
+ import { UploadFile } from "./type/file";
3
+ import { UploadRequestOption } from "ant-design-vue/es/vc-upload/interface";
4
+ import { Recordable } from "@dt-frames/core";
5
+ export declare const basicProps: {
6
+ uploadUrl: {
7
+ type: StringConstructor;
8
+ default: any;
9
+ };
10
+ downloadUrl: {
11
+ type: StringConstructor;
12
+ default: any;
13
+ };
14
+ buttonText: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ preIcon: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ data: {
23
+ type: PropType<object | ((file: UploadFile) => object)>;
24
+ default: {};
25
+ };
26
+ filename: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ accept: {
31
+ type: PropType<string[]>;
32
+ default: () => any[];
33
+ };
34
+ beforeUpload: {
35
+ type: PropType<(<T = any>(file: UploadFile, fileList: UploadFile[]) => boolean | Promise<T>)>;
36
+ };
37
+ customRequest: {
38
+ type: PropType<(params: UploadRequestOption) => void>;
39
+ };
40
+ disabled: {
41
+ type: PropType<Boolean | Ref<Boolean> | ComputedRef<Boolean>>;
42
+ default: boolean;
43
+ };
44
+ defaultFiles: {
45
+ type: PropType<UploadFile[]>;
46
+ default: () => any[];
47
+ };
48
+ headers: {
49
+ type: ObjectConstructor;
50
+ };
51
+ listType: {
52
+ type: PropType<"text" | "picture-card">;
53
+ default: string;
54
+ };
55
+ maxCount: {
56
+ type: NumberConstructor;
57
+ };
58
+ maxSize: {
59
+ type: NumberConstructor;
60
+ default: number;
61
+ };
62
+ helpText: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ multiple: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ onChange: {
71
+ type: PropType<(ids: string[] | number[], files: UploadFile[]) => void>;
72
+ };
73
+ extraParams: {
74
+ type: PropType<Recordable<any>>;
75
+ default: () => {};
76
+ };
77
+ showView: {
78
+ type: BooleanConstructor;
79
+ default: boolean;
80
+ };
81
+ showDownload: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ showDelete: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
89
+ };
@@ -0,0 +1,9 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {
2
+ exeReduce: import("vue").Ref<number>;
3
+ pdfUrlRef: import("vue").Ref<any>;
4
+ register: import("../../../modal/src/types/modal.type").RegisterFn;
5
+ toggleFullscreen: (isFullscreen: boolean) => void;
6
+ readonly DtModal: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
7
+ readonly DtIframe: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
9
+ export default _sfc_main;
@@ -0,0 +1,15 @@
1
+ import { Ref } from "vue";
2
+ import { UploadFile } from "../type/file";
3
+ export declare function useFile({ fileListRef, acceptRef, helpTextRef, maxCountRef, maxSizeRef, }: {
4
+ fileListRef: Ref<UploadFile[]>;
5
+ acceptRef: Ref<string[]>;
6
+ helpTextRef: Ref<string>;
7
+ maxCountRef: Ref<number>;
8
+ maxSizeRef: Ref<number>;
9
+ }): {
10
+ getAccept: import("vue").ComputedRef<string[]>;
11
+ getStringAccept: import("vue").ComputedRef<string>;
12
+ getHelpText: import("vue").ComputedRef<string>;
13
+ getFileList: () => UploadFile[];
14
+ beforeUpload: (file: File) => void;
15
+ };
@@ -1,2 +1,236 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
1
+ import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
2
+ import type { UploadFile } from './type/file';
3
+ declare const _sfc_main: import("vue").DefineComponent<{
4
+ uploadUrl: {
5
+ type: StringConstructor;
6
+ default: any;
7
+ };
8
+ downloadUrl: {
9
+ type: StringConstructor;
10
+ default: any;
11
+ };
12
+ buttonText: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ preIcon: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ data: {
21
+ type: import("vue").PropType<object | ((file: UploadFile) => object)>;
22
+ default: {};
23
+ };
24
+ filename: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ accept: {
29
+ type: import("vue").PropType<string[]>;
30
+ default: () => any[];
31
+ };
32
+ beforeUpload: {
33
+ type: import("vue").PropType<(<T = any>(file: UploadFile, fileList: UploadFile[]) => boolean | Promise<T>)>;
34
+ };
35
+ customRequest: {
36
+ type: import("vue").PropType<(params: UploadRequestOption<any>) => void>;
37
+ };
38
+ disabled: {
39
+ type: import("vue").PropType<Boolean | import("vue").Ref<Boolean> | import("vue").ComputedRef<Boolean>>;
40
+ default: boolean;
41
+ };
42
+ defaultFiles: {
43
+ type: import("vue").PropType<UploadFile[]>;
44
+ default: () => any[];
45
+ };
46
+ headers: {
47
+ type: ObjectConstructor;
48
+ };
49
+ listType: {
50
+ type: import("vue").PropType<"text" | "picture-card">;
51
+ default: string;
52
+ };
53
+ maxCount: {
54
+ type: NumberConstructor;
55
+ };
56
+ maxSize: {
57
+ type: NumberConstructor;
58
+ default: number;
59
+ };
60
+ helpText: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ multiple: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ onChange: {
69
+ type: import("vue").PropType<(ids: string[] | number[], files: UploadFile[]) => void>;
70
+ };
71
+ extraParams: {
72
+ type: import("vue").PropType<import("@dt-frames/core").Recordable<any>>;
73
+ default: () => {};
74
+ };
75
+ showView: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ showDownload: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ showDelete: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ }, {
88
+ registerPdf: import("../../modal/src/types/modal.type").RegisterFn;
89
+ openPdfModal: <T_1 = any, U = any>(params?: T_1, afterClose?: (res: U) => void) => void;
90
+ message: import("ant-design-vue/es/message").MessageApi;
91
+ props: any;
92
+ fileListRef: import("vue").Ref<UploadFile[]>;
93
+ acceptRef: import("vue").Ref<string[]>;
94
+ helpTextRef: import("vue").Ref<string>;
95
+ maxCountRef: import("vue").Ref<number>;
96
+ maxSizeRef: import("vue").Ref<number>;
97
+ getStringAccept: import("vue").ComputedRef<string>;
98
+ getHelpText: import("vue").ComputedRef<string>;
99
+ getFileList: () => UploadFile[];
100
+ beforeUpload: (file: File) => void;
101
+ btns: ({
102
+ class: string;
103
+ show: (file: UploadFile) => boolean;
104
+ click: (file: UploadFile) => Promise<void>;
105
+ } | {
106
+ class: string;
107
+ show: () => boolean;
108
+ click: (file: UploadFile) => void;
109
+ })[];
110
+ getBind: import("vue").ComputedRef<any>;
111
+ imgVisable: import("vue").Ref<boolean>;
112
+ imgSrcRef: import("vue").Ref<any>;
113
+ bindImg: import("vue").ComputedRef<{
114
+ preview: {
115
+ width: number;
116
+ visible: boolean;
117
+ onVisibleChange: (v: any) => any;
118
+ };
119
+ src: any;
120
+ }>;
121
+ uploadFile: ({ file, onSuccess, onError, onProgress }: UploadRequestOption) => Promise<void>;
122
+ fileView: (file: UploadFile) => Promise<void>;
123
+ download: () => void;
124
+ readonly getFileThumb: (filename: string) => string;
125
+ PdfView: import("vue").DefineComponent<{}, {
126
+ exeReduce: import("vue").Ref<number>;
127
+ pdfUrlRef: import("vue").Ref<any>;
128
+ register: import("../../modal/src/types/modal.type").RegisterFn;
129
+ toggleFullscreen: (isFullscreen: boolean) => void;
130
+ readonly DtModal: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
131
+ readonly DtIframe: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
132
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
133
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
134
+ uploadUrl: {
135
+ type: StringConstructor;
136
+ default: any;
137
+ };
138
+ downloadUrl: {
139
+ type: StringConstructor;
140
+ default: any;
141
+ };
142
+ buttonText: {
143
+ type: StringConstructor;
144
+ default: string;
145
+ };
146
+ preIcon: {
147
+ type: StringConstructor;
148
+ default: string;
149
+ };
150
+ data: {
151
+ type: import("vue").PropType<object | ((file: UploadFile) => object)>;
152
+ default: {};
153
+ };
154
+ filename: {
155
+ type: StringConstructor;
156
+ default: string;
157
+ };
158
+ accept: {
159
+ type: import("vue").PropType<string[]>;
160
+ default: () => any[];
161
+ };
162
+ beforeUpload: {
163
+ type: import("vue").PropType<(<T = any>(file: UploadFile, fileList: UploadFile[]) => boolean | Promise<T>)>;
164
+ };
165
+ customRequest: {
166
+ type: import("vue").PropType<(params: UploadRequestOption<any>) => void>;
167
+ };
168
+ disabled: {
169
+ type: import("vue").PropType<Boolean | import("vue").Ref<Boolean> | import("vue").ComputedRef<Boolean>>;
170
+ default: boolean;
171
+ };
172
+ defaultFiles: {
173
+ type: import("vue").PropType<UploadFile[]>;
174
+ default: () => any[];
175
+ };
176
+ headers: {
177
+ type: ObjectConstructor;
178
+ };
179
+ listType: {
180
+ type: import("vue").PropType<"text" | "picture-card">;
181
+ default: string;
182
+ };
183
+ maxCount: {
184
+ type: NumberConstructor;
185
+ };
186
+ maxSize: {
187
+ type: NumberConstructor;
188
+ default: number;
189
+ };
190
+ helpText: {
191
+ type: StringConstructor;
192
+ default: string;
193
+ };
194
+ multiple: {
195
+ type: BooleanConstructor;
196
+ default: boolean;
197
+ };
198
+ onChange: {
199
+ type: import("vue").PropType<(ids: string[] | number[], files: UploadFile[]) => void>;
200
+ };
201
+ extraParams: {
202
+ type: import("vue").PropType<import("@dt-frames/core").Recordable<any>>;
203
+ default: () => {};
204
+ };
205
+ showView: {
206
+ type: BooleanConstructor;
207
+ default: boolean;
208
+ };
209
+ showDownload: {
210
+ type: BooleanConstructor;
211
+ default: boolean;
212
+ };
213
+ showDelete: {
214
+ type: BooleanConstructor;
215
+ default: boolean;
216
+ };
217
+ }>>, {
218
+ filename: string;
219
+ data: object | ((file: UploadFile) => object);
220
+ uploadUrl: string;
221
+ downloadUrl: string;
222
+ buttonText: string;
223
+ preIcon: string;
224
+ accept: string[];
225
+ disabled: Boolean | import("vue").Ref<Boolean> | import("vue").ComputedRef<Boolean>;
226
+ defaultFiles: UploadFile[];
227
+ listType: "text" | "picture-card";
228
+ maxSize: number;
229
+ helpText: string;
230
+ multiple: boolean;
231
+ extraParams: {};
232
+ showView: boolean;
233
+ showDownload: boolean;
234
+ showDelete: boolean;
235
+ }>;
236
+ export default _sfc_main;
@@ -0,0 +1,10 @@
1
+ export declare type UploadFile = {
2
+ name?: string;
3
+ percent?: number;
4
+ status?: 'error' | 'success' | 'done' | 'uploading' | 'removed';
5
+ thumbUrl?: string;
6
+ uid?: string;
7
+ url?: string;
8
+ fileId?: string;
9
+ [key: string]: any;
10
+ };
@@ -0,0 +1,2 @@
1
+ export declare const getFileType: (type: string) => any;
2
+ export declare const getFileThumb: (filename: string) => string;
package/es/theme/index.js CHANGED
@@ -3248,6 +3248,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3248
3248
  const { getLayoutContentMode, getPageLoading, getOpenPageLoading } = useTheme();
3249
3249
  const { getCanCache } = useMultipleTab();
3250
3250
  const tabStore = useRouteReuseStore();
3251
+ const { currentRoute } = useRouter();
3252
+ const contentMode = computed(() => unref$1(currentRoute).meta.contentMode || unref$1(getLayoutContentMode));
3251
3253
  function getTransitionName(route) {
3252
3254
  return route.meta.transitionName || unref$1(getTransitionMode);
3253
3255
  }
@@ -3259,7 +3261,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3259
3261
  const _component_ALayoutContent = LayoutContent;
3260
3262
  return openBlock(), createElementBlock("div", {
3261
3263
  id: "dt-layout-content",
3262
- class: normalizeClass([["dt-layout-content", unref$1(getLayoutContentMode)], "relative flex-auto overflow-x-hidden min-h-0 flex"]),
3264
+ class: normalizeClass([["dt-layout-content", unref$1(contentMode)], "relative flex-auto overflow-x-hidden min-h-0 flex"]),
3263
3265
  loading: unref$1(getPageLoading) && unref$1(getOpenPageLoading)
3264
3266
  }, [
3265
3267
  createVNode(_component_ALayoutContent, null, {
@@ -67,7 +67,7 @@
67
67
  }
68
68
 
69
69
  .dt-theme{
70
- .ant-input-sm{
70
+ .ant-input-sm:not(textarea){
71
71
  height: 30px;
72
72
  font-size: 12px;
73
73
  }
@@ -776,6 +776,10 @@
776
776
 
777
777
  .dt-message-icon{
778
778
  font-size: 24px;
779
+ float: left;
780
+ height: 24px;
781
+ line-height: 24px;
782
+ padding-right: 10px;
779
783
  &.warning{
780
784
  color: #faad14;
781
785
  }
@@ -23,6 +23,8 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
23
23
  sortTabs(oldIndex: number, newIndex: number): void;
24
24
  resetState(): void;
25
25
  }>;
26
+ currentRoute: import("vue").Ref<import("vue-router").RouteLocationNormalizedLoaded>;
27
+ contentMode: import("vue").ComputedRef<unknown>;
26
28
  getTransitionName: (route: RouteRecordRaw) => string | undefined;
27
29
  getCaches: import("vue").ComputedRef<string[]>;
28
30
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;