@dt-frames/ui 2.0.12 → 2.0.14
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/es/components/container/index.d.ts +93 -2
- package/es/components/curd/index.js +6 -3
- package/es/components/curd/src/components/Curd.d.ts +12 -6
- package/es/components/curd/src/props.d.ts +6 -3
- package/es/components/form/index.js +15 -2
- package/es/components/form/index.less +2 -0
- package/es/components/form/src/components/FormButtons.d.ts +7 -0
- package/es/components/form/src/props.d.ts +4 -4
- package/es/components/form/src/types/form.type.d.ts +3 -3
- package/es/components/form/src/types/items.type.d.ts +25 -0
- package/es/components/modal/index.js +13 -3
- package/es/components/modal/src/components/ModalFooter.d.ts +6 -0
- package/es/components/modal/src/index.d.ts +6 -0
- package/es/components/source/hooks/useSource.d.ts +2 -0
- package/es/components/source/index.js +4 -1
- package/es/components/source/types/source.type.d.ts +1 -0
- package/es/components/table/index.js +124 -57
- package/es/components/table/index.less +11 -0
- package/es/components/table/src/components/TableAction.d.ts +7 -0
- package/es/components/table/src/enums/table.enum.d.ts +5 -0
- package/es/components/table/src/index.d.ts +17 -10
- package/es/components/table/src/props.d.ts +6 -3
- package/es/components/table/src/types/table.type.d.ts +1 -0
- package/es/components/upload/index.d.ts +2 -0
- package/es/components/upload/index.js +207 -76
- package/es/components/upload/index.less +31 -6
- package/es/components/upload/src/basicProps.d.ts +3 -5
- package/es/components/upload/src/components/WordView.d.ts +6 -0
- package/es/components/upload/src/hooks/useFile.d.ts +2 -1
- package/es/components/upload/src/index.d.ts +23 -18
- package/es/components/upload/src/utils/upload.d.ts +1 -1
- package/es/packages/ui/src/assets/locales/en.d.ts +103 -0
- package/es/packages/ui/src/assets/locales/index.d.ts +2 -0
- package/es/packages/ui/src/assets/locales/zh.d.ts +104 -0
- package/es/packages/ui/src/components/form/index.d.ts +7 -0
- package/es/packages/ui/src/components/form/src/components/FormButtons.d.ts +105 -0
- package/es/packages/ui/src/components/form/src/components/FormItem.d.ts +159 -0
- package/es/packages/ui/src/components/form/src/components/componentMap.d.ts +4 -0
- package/es/packages/ui/src/components/form/src/components/formIcon.d.ts +1223 -0
- package/es/packages/ui/src/components/form/src/components/formInputUseDialog.d.ts +911 -0
- package/es/packages/ui/src/components/form/src/components/index.d.ts +4 -0
- package/es/packages/ui/src/components/form/src/components/radioButton.d.ts +34 -0
- package/es/packages/ui/src/components/form/src/enums/index.d.ts +7 -0
- package/es/packages/ui/src/components/form/src/hooks/helper.d.ts +14 -0
- package/es/packages/ui/src/components/form/src/hooks/useForm.d.ts +6 -0
- package/es/packages/ui/src/components/form/src/hooks/useFormActions.d.ts +12 -0
- package/es/packages/ui/src/components/form/src/hooks/useFormEvent.d.ts +25 -0
- package/es/packages/ui/src/components/form/src/hooks/useFormValue.d.ts +3 -0
- package/es/packages/ui/src/components/form/src/hooks/useFormValues.d.ts +11 -0
- package/es/packages/ui/src/components/form/src/hooks/useLabelWidth.d.ts +6 -0
- package/es/packages/ui/src/components/form/src/props.d.ts +127 -0
- package/es/packages/ui/src/components/form/src/types/actions.type.d.ts +15 -0
- package/es/packages/ui/src/components/form/src/types/form.type.d.ts +79 -0
- package/es/packages/ui/src/components/form/src/types/items.type.d.ts +409 -0
- package/es/packages/ui/src/components/iframe/index.d.ts +2 -0
- package/es/packages/ui/src/components/modal/index.d.ts +4 -0
- package/es/packages/ui/src/components/modal/src/hooks/useModal.d.ts +5 -0
- package/es/packages/ui/src/components/modal/src/props.d.ts +101 -0
- package/es/packages/ui/src/components/modal/src/types/modal.type.d.ts +17 -0
- package/es/packages/ui/src/components/upload/index.d.ts +4 -0
- package/es/packages/ui/src/components/upload/src/basicProps.d.ts +87 -0
- package/es/packages/ui/src/components/upload/src/components/PdfView.d.ts +9 -0
- package/es/packages/ui/src/components/upload/src/components/WordView.d.ts +6 -0
- package/es/packages/ui/src/components/upload/src/hooks/useFile.d.ts +16 -0
- package/es/packages/ui/src/components/upload/src/index.d.ts +242 -0
- package/es/packages/ui/src/components/upload/src/type/file.d.ts +10 -0
- package/es/packages/ui/src/components/upload/src/utils/upload.d.ts +2 -0
- package/es/packages/ui/src/global.d.ts +7 -0
- package/es/packages/ui/src/theme/index.d.ts +12 -0
- package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +4 -0
- package/es/packages/ui/src/theme/src/enums/index.d.ts +1 -0
- package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +34 -0
- package/es/packages/ui/src/theme/src/hooks/index.d.ts +6 -0
- package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +2 -0
- package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +25 -0
- package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +29 -0
- package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +8 -0
- package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +7 -0
- package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +9 -0
- package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +2 -0
- package/es/packages/ui/src/theme/src/stores/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +25 -0
- package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +19 -0
- package/es/packages/ui/src/theme/src/types/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/types/menu.type.d.ts +15 -0
- package/es/packages/ui/src/theme/src/types/theme.type.d.ts +62 -0
- package/es/packages/ui/src/utils/withInstall.d.ts +4 -0
- package/es/theme/index.js +703 -264
- package/es/theme/index.less +162 -11
- package/es/theme/src/components/header/components/lock/Lockscreen.d.ts +54 -0
- package/es/theme/src/components/header/components/lock/Recharge.d.ts +32 -0
- package/es/theme/src/components/header/components/lock/index.d.ts +3 -0
- package/es/theme/src/components/header/components/lock/useBattery.d.ts +11 -0
- package/es/theme/src/components/header/components/logo.d.ts +1 -3
- package/es/theme/src/components/header/components/notify.d.ts +1 -3
- package/es/theme/src/components/header/components/user-info.d.ts +3 -3
- package/es/theme/src/components/header/index.d.ts +805 -809
- package/es/theme/src/components/header/multiple-header.d.ts +914 -918
- package/es/theme/src/components/sider/index.d.ts +1 -3
- package/es/theme/src/components/sider/mix-sider.d.ts +1 -3
- package/es/theme/src/hooks/useHeader.d.ts +1 -0
- package/es/theme/src/index.d.ts +2102 -2059
- package/manualContentPath.js +4 -0
- package/package.json +2 -1
- package/vite.config.ts +1 -0
|
@@ -1,3 +1,94 @@
|
|
|
1
|
-
declare const DtScrollContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
2
|
-
|
|
1
|
+
declare const DtScrollContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
2
|
+
scrollbarRef: any;
|
|
3
|
+
scrollTo: (to: number, duration?: number) => void;
|
|
4
|
+
getScrollWrap: () => any;
|
|
5
|
+
scrollBottom: () => void;
|
|
6
|
+
ScrollBar: import("vue").DefineComponent<{
|
|
7
|
+
wrapClass: {
|
|
8
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
wrapStyle: ArrayConstructor;
|
|
12
|
+
viewClass: {
|
|
13
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
viewStyle: {
|
|
17
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
noresize: BooleanConstructor;
|
|
21
|
+
tag: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
sizeWidth: import("vue").Ref<string>;
|
|
27
|
+
sizeHeight: import("vue").Ref<string>;
|
|
28
|
+
moveX: import("vue").Ref<number>;
|
|
29
|
+
moveY: import("vue").Ref<number>;
|
|
30
|
+
wrap: import("vue").Ref<any>;
|
|
31
|
+
resize: import("vue").Ref<any>;
|
|
32
|
+
props: any;
|
|
33
|
+
style: import("vue").ComputedRef<{}>;
|
|
34
|
+
handleScroll: () => void;
|
|
35
|
+
update: () => void;
|
|
36
|
+
readonly Bar: import("vue").DefineComponent<{
|
|
37
|
+
vertical: BooleanConstructor;
|
|
38
|
+
size: StringConstructor;
|
|
39
|
+
move: NumberConstructor;
|
|
40
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
vertical: BooleanConstructor;
|
|
44
|
+
size: StringConstructor;
|
|
45
|
+
move: NumberConstructor;
|
|
46
|
+
}>>, {
|
|
47
|
+
vertical: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
|
+
wrapClass: {
|
|
51
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
wrapStyle: ArrayConstructor;
|
|
55
|
+
viewClass: {
|
|
56
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
viewStyle: {
|
|
60
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
noresize: BooleanConstructor;
|
|
64
|
+
tag: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
}>>, {
|
|
69
|
+
wrapClass: string | unknown[];
|
|
70
|
+
viewClass: string | unknown[];
|
|
71
|
+
viewStyle: string | unknown[];
|
|
72
|
+
noresize: boolean;
|
|
73
|
+
tag: string;
|
|
74
|
+
}>;
|
|
75
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
76
|
+
declare const DtSlotContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{
|
|
77
|
+
template: {
|
|
78
|
+
type: FunctionConstructor;
|
|
79
|
+
};
|
|
80
|
+
data: {
|
|
81
|
+
type: ObjectConstructor;
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
props: any;
|
|
85
|
+
Container: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
86
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
|
+
template: {
|
|
88
|
+
type: FunctionConstructor;
|
|
89
|
+
};
|
|
90
|
+
data: {
|
|
91
|
+
type: ObjectConstructor;
|
|
92
|
+
};
|
|
93
|
+
}>>, {}>>;
|
|
3
94
|
export { DtScrollContainer, DtSlotContainer };
|
|
@@ -4,6 +4,9 @@ import { useModal, DtModal, useModalOut } from "../modal";
|
|
|
4
4
|
import { omit } from "lodash-es";
|
|
5
5
|
import { useMessage, useI18n, isFunction, dispatchResize, error } from "@dt-frames/core";
|
|
6
6
|
const basicProps = {
|
|
7
|
+
t: {
|
|
8
|
+
type: String
|
|
9
|
+
},
|
|
7
10
|
title: {
|
|
8
11
|
type: Object
|
|
9
12
|
},
|
|
@@ -19,6 +22,9 @@ const basicProps = {
|
|
|
19
22
|
type: Array,
|
|
20
23
|
default: void 0
|
|
21
24
|
},
|
|
25
|
+
authPrefix: {
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
22
28
|
showFullscreen: {
|
|
23
29
|
type: Boolean,
|
|
24
30
|
default: true
|
|
@@ -35,9 +41,6 @@ const basicProps = {
|
|
|
35
41
|
type: String,
|
|
36
42
|
default: "id"
|
|
37
43
|
},
|
|
38
|
-
actType: {
|
|
39
|
-
type: Object
|
|
40
|
-
},
|
|
41
44
|
onSave: {
|
|
42
45
|
type: Function,
|
|
43
46
|
default: () => ({})
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
t: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
2
5
|
title: {
|
|
3
6
|
type: import("vue").PropType<Function | String | import("vue").ComputedRef<any>>;
|
|
4
7
|
};
|
|
@@ -14,6 +17,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
14
17
|
type: import("vue").PropType<import("../../../form").ButtonProps[]>;
|
|
15
18
|
default: any;
|
|
16
19
|
};
|
|
20
|
+
authPrefix: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
};
|
|
17
23
|
showFullscreen: {
|
|
18
24
|
type: BooleanConstructor;
|
|
19
25
|
default: boolean;
|
|
@@ -152,9 +158,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
152
158
|
type: import("vue").PropType<String | Number>;
|
|
153
159
|
default: string;
|
|
154
160
|
};
|
|
155
|
-
actType: {
|
|
156
|
-
type: import("vue").PropType<import("vue").Ref<string>>;
|
|
157
|
-
};
|
|
158
161
|
onSave: {
|
|
159
162
|
type: import("vue").PropType<() => void>;
|
|
160
163
|
default: () => {};
|
|
@@ -179,6 +182,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
179
182
|
handleSave: () => void;
|
|
180
183
|
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<{}>>, {}>;
|
|
181
184
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
185
|
+
t: {
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
};
|
|
182
188
|
title: {
|
|
183
189
|
type: import("vue").PropType<Function | String | import("vue").ComputedRef<any>>;
|
|
184
190
|
};
|
|
@@ -194,6 +200,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
194
200
|
type: import("vue").PropType<import("../../../form").ButtonProps[]>;
|
|
195
201
|
default: any;
|
|
196
202
|
};
|
|
203
|
+
authPrefix: {
|
|
204
|
+
type: StringConstructor;
|
|
205
|
+
};
|
|
197
206
|
showFullscreen: {
|
|
198
207
|
type: BooleanConstructor;
|
|
199
208
|
default: boolean;
|
|
@@ -332,9 +341,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
332
341
|
type: import("vue").PropType<String | Number>;
|
|
333
342
|
default: string;
|
|
334
343
|
};
|
|
335
|
-
actType: {
|
|
336
|
-
type: import("vue").PropType<import("vue").Ref<string>>;
|
|
337
|
-
};
|
|
338
344
|
onSave: {
|
|
339
345
|
type: import("vue").PropType<() => void>;
|
|
340
346
|
default: () => {};
|
|
@@ -4,6 +4,9 @@ import { ComputedRef, PropType, Ref } from "vue";
|
|
|
4
4
|
import { CurdActionType } from "./types/curd.type";
|
|
5
5
|
import { RegisterFn } from '../../modal/src/types/modal.type';
|
|
6
6
|
export declare const basicProps: {
|
|
7
|
+
t: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
7
10
|
title: {
|
|
8
11
|
type: PropType<Function | String | ComputedRef<any>>;
|
|
9
12
|
};
|
|
@@ -19,6 +22,9 @@ export declare const basicProps: {
|
|
|
19
22
|
type: PropType<ButtonProps[]>;
|
|
20
23
|
default: any;
|
|
21
24
|
};
|
|
25
|
+
authPrefix: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
22
28
|
showFullscreen: {
|
|
23
29
|
type: BooleanConstructor;
|
|
24
30
|
default: boolean;
|
|
@@ -157,9 +163,6 @@ export declare const basicProps: {
|
|
|
157
163
|
type: PropType<String | Number>;
|
|
158
164
|
default: string;
|
|
159
165
|
};
|
|
160
|
-
actType: {
|
|
161
|
-
type: PropType<Ref<string>>;
|
|
162
|
-
};
|
|
163
166
|
onSave: {
|
|
164
167
|
type: PropType<() => void>;
|
|
165
168
|
default: () => {};
|
|
@@ -14,6 +14,7 @@ import "ant-design-vue/es/tree-select/style";
|
|
|
14
14
|
import "ant-design-vue/es/slider/style";
|
|
15
15
|
import "ant-design-vue/es/rate/style";
|
|
16
16
|
import "ant-design-vue/es/date-picker/style";
|
|
17
|
+
import { DtUpload } from "../../components/upload";
|
|
17
18
|
import "ant-design-vue/es/col/style";
|
|
18
19
|
import "ant-design-vue/es/button/style";
|
|
19
20
|
import dayjs from "dayjs";
|
|
@@ -232,7 +233,8 @@ const components = {
|
|
|
232
233
|
TimePicker,
|
|
233
234
|
Slider,
|
|
234
235
|
Rate,
|
|
235
|
-
Divider
|
|
236
|
+
Divider,
|
|
237
|
+
Upload: DtUpload
|
|
236
238
|
};
|
|
237
239
|
const componentMap = /* @__PURE__ */ new Map();
|
|
238
240
|
for (let item in components) {
|
|
@@ -670,6 +672,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
670
672
|
type: [Array],
|
|
671
673
|
default: []
|
|
672
674
|
},
|
|
675
|
+
authPrefix: {
|
|
676
|
+
type: String
|
|
677
|
+
},
|
|
673
678
|
isAdvanced: {
|
|
674
679
|
type: Boolean,
|
|
675
680
|
default: true
|
|
@@ -687,6 +692,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
687
692
|
const showAdvanceRef = computed(() => {
|
|
688
693
|
return props.mode === "search" ? props.showAdvancedButton : false;
|
|
689
694
|
});
|
|
695
|
+
const getAuth = (auth) => {
|
|
696
|
+
const { authPrefix } = props;
|
|
697
|
+
if (authPrefix && auth || !authPrefix && auth && auth.includes(":")) {
|
|
698
|
+
return authPrefix ? `${authPrefix}:${auth}` : auth;
|
|
699
|
+
} else {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
};
|
|
690
703
|
const colOpt = computed(() => {
|
|
691
704
|
let style = {
|
|
692
705
|
textAlign: "right"
|
|
@@ -780,7 +793,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
780
793
|
]),
|
|
781
794
|
_: 2
|
|
782
795
|
}, 1032, ["type", "class", "loading", "disabled", "onClick"])), [
|
|
783
|
-
[_directive_auth, button.auth]
|
|
796
|
+
[_directive_auth, getAuth(button.auth)]
|
|
784
797
|
]) : createCommentVNode("", true)
|
|
785
798
|
], 64);
|
|
786
799
|
}), 256)),
|
|
@@ -22,6 +22,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
22
22
|
type: PropType<ButtonProps[]>;
|
|
23
23
|
default: any[];
|
|
24
24
|
};
|
|
25
|
+
authPrefix: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
25
28
|
isAdvanced: {
|
|
26
29
|
type: BooleanConstructor;
|
|
27
30
|
default: boolean;
|
|
@@ -45,6 +48,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
45
48
|
}>;
|
|
46
49
|
key: number;
|
|
47
50
|
showAdvanceRef: import("vue").ComputedRef<boolean>;
|
|
51
|
+
getAuth: (auth: string) => string | null;
|
|
48
52
|
colOpt: import("vue").ComputedRef<{
|
|
49
53
|
style: Recordable<any>;
|
|
50
54
|
span?: undefined;
|
|
@@ -78,6 +82,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
78
82
|
type: PropType<ButtonProps[]>;
|
|
79
83
|
default: any[];
|
|
80
84
|
};
|
|
85
|
+
authPrefix: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
};
|
|
81
88
|
isAdvanced: {
|
|
82
89
|
type: BooleanConstructor;
|
|
83
90
|
default: boolean;
|
|
@@ -16,7 +16,7 @@ export declare const BasicProps: {
|
|
|
16
16
|
default: () => {};
|
|
17
17
|
};
|
|
18
18
|
layout: {
|
|
19
|
-
type: PropType<"
|
|
19
|
+
type: PropType<"vertical" | "inline" | "horizontal">;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
labelWidth: {
|
|
@@ -41,8 +41,8 @@ export declare const BasicProps: {
|
|
|
41
41
|
};
|
|
42
42
|
rowProps: {
|
|
43
43
|
type: PropType<Partial<import("vue").ExtractPropTypes<{
|
|
44
|
-
align: PropType<"
|
|
45
|
-
justify: PropType<"
|
|
44
|
+
align: PropType<"middle" | "top" | "bottom" | "stretch">;
|
|
45
|
+
justify: PropType<"center" | "space-around" | "space-between" | "end" | "start">;
|
|
46
46
|
prefixCls: StringConstructor;
|
|
47
47
|
gutter: {
|
|
48
48
|
type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
@@ -62,7 +62,7 @@ export declare const BasicProps: {
|
|
|
62
62
|
type: NumberConstructor;
|
|
63
63
|
};
|
|
64
64
|
size: {
|
|
65
|
-
type: PropType<"
|
|
65
|
+
type: PropType<"small" | "large" | "middle">;
|
|
66
66
|
};
|
|
67
67
|
disabled: {
|
|
68
68
|
type: BooleanConstructor;
|
|
@@ -3,13 +3,13 @@ import { ComputedRef, ExtractPropTypes, Ref, VNode } from "vue";
|
|
|
3
3
|
import { RuleObject } from 'ant-design-vue/es/form/interface';
|
|
4
4
|
import { TooltipProps } from "ant-design-vue/es/tooltip/Tooltip";
|
|
5
5
|
import { BasicProps } from "../props";
|
|
6
|
-
import type { Cascader, Checkbox, CheckboxGroup, DatePicker, Divider, Input, InputGroup, InputNumber, InputPassword, InputSearch, InputTextArea, InputWithDialog, Radio, RadioGroup, RangePicker, Rate, Select, Switch, TimePicker, TreeSelect } from "./items.type";
|
|
6
|
+
import type { Cascader, Checkbox, CheckboxGroup, DatePicker, Divider, Input, InputGroup, InputNumber, InputPassword, InputSearch, InputTextArea, InputWithDialog, Radio, RadioGroup, RangePicker, Rate, Select, Switch, TimePicker, TreeSelect, Upload } from "./items.type";
|
|
7
7
|
export declare type ButtonFlag = 'OK' | 'CANCEL';
|
|
8
8
|
export declare type Rule = RuleObject & {
|
|
9
9
|
trigger?: 'blur' | 'change' | ['change', 'blur'];
|
|
10
10
|
};
|
|
11
11
|
export declare type FormProps = Partial<ExtractPropTypes<typeof BasicProps>>;
|
|
12
|
-
export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'Slider' | 'Rate' | 'Divider';
|
|
12
|
+
export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'Slider' | 'Rate' | 'Divider' | 'Upload';
|
|
13
13
|
export declare type ColEx = {
|
|
14
14
|
style?: any;
|
|
15
15
|
span?: number | string;
|
|
@@ -60,7 +60,7 @@ declare type Schema<ComponentType, T> = {
|
|
|
60
60
|
export declare type FormSchema = Schema<'Input', Input> | Schema<'InputWithDialog', InputWithDialog> | Schema<'InputGroup', InputGroup> | Schema<'InputPassword', InputPassword> | Schema<'InputSearch', InputSearch> | Schema<'InputTextArea', InputTextArea> | Schema<'InputNumber', InputNumber> | Schema<'Select', Select> | Schema<'TreeSelect', TreeSelect> | Schema<'Radio', Radio> | Schema<'RadioButtonGroup', Radio> | Schema<'RadioGroup', RadioGroup> | Schema<'Checkbox', Checkbox> | Schema<'CheckboxGroup', CheckboxGroup> | Schema<'AutoComplete', Recordable> | Schema<'Cascader', Cascader> | Schema<'DatePicker', DatePicker> | Schema<'MonthPicker', DatePicker> | Schema<'RangePicker', RangePicker> | Schema<'WeekPicker', DatePicker> | Schema<'TimePicker', TimePicker> | Schema<'Switch', Switch> | Schema<'Slider', {
|
|
61
61
|
disabled?: boolean;
|
|
62
62
|
[key: string]: any;
|
|
63
|
-
}> | Schema<'Rate', Rate> | Schema<'Divider', Divider>;
|
|
63
|
+
}> | Schema<'Rate', Rate> | Schema<'Divider', Divider> | Schema<'Upload', Upload>;
|
|
64
64
|
export declare type ButtonProps = {
|
|
65
65
|
t?: string;
|
|
66
66
|
label: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { UploadFile } from '../../../upload';
|
|
1
2
|
import { DtEvent, Recordable, SelectOptions } from "@dt-frames/core";
|
|
3
|
+
import { UploadRequestOption } from "ant-design-vue/es/vc-upload/interface";
|
|
2
4
|
import dayjs from "dayjs";
|
|
3
5
|
import { Ref, Slot, VNode, CSSProperties, ComputedRef } from "vue";
|
|
4
6
|
declare type StrOrDynamicStr = string | Ref<string> | ComputedRef<string>;
|
|
@@ -381,4 +383,27 @@ export declare type Divider = {
|
|
|
381
383
|
export declare type InputWithDialog = Input & {
|
|
382
384
|
openDialog?: (model: Recordable) => void;
|
|
383
385
|
};
|
|
386
|
+
export declare type Upload = {
|
|
387
|
+
uploadUrl?: string;
|
|
388
|
+
downloadUrl?: string;
|
|
389
|
+
buttonText?: string;
|
|
390
|
+
preIcon?: string;
|
|
391
|
+
data?: object | ((file: UploadFile) => object);
|
|
392
|
+
filename?: string;
|
|
393
|
+
accept?: string[];
|
|
394
|
+
customRequest?: (params: UploadRequestOption) => void;
|
|
395
|
+
disabled?: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
396
|
+
defaultFiles?: UploadFile[];
|
|
397
|
+
headers?: object;
|
|
398
|
+
listType?: 'text' | 'picture-card';
|
|
399
|
+
maxCount?: number;
|
|
400
|
+
maxSize?: number;
|
|
401
|
+
helpText?: string;
|
|
402
|
+
multiple?: boolean;
|
|
403
|
+
onChange?: (ids: string[] | number[], files: UploadFile[]) => void;
|
|
404
|
+
extraParams?: Recordable;
|
|
405
|
+
showView?: boolean;
|
|
406
|
+
showDownload?: boolean;
|
|
407
|
+
showDelete?: boolean;
|
|
408
|
+
};
|
|
384
409
|
export {};
|
|
@@ -75,6 +75,7 @@ function useModal(props, setModalData) {
|
|
|
75
75
|
const modalInstanceRef = ref(null);
|
|
76
76
|
const currentInstance = getCurrentInstance();
|
|
77
77
|
const uidRef = ref(null);
|
|
78
|
+
const isFirstRegister = ref(true);
|
|
78
79
|
const { isProd } = useApp();
|
|
79
80
|
const getInstance = () => {
|
|
80
81
|
const instance = unref(modalInstanceRef);
|
|
@@ -94,10 +95,16 @@ function useModal(props, setModalData) {
|
|
|
94
95
|
modalInstance.setModalProps(props);
|
|
95
96
|
};
|
|
96
97
|
watchEffect(() => {
|
|
98
|
+
if (!unref(uidRef))
|
|
99
|
+
return;
|
|
97
100
|
const data = dataTransfer[unref(uidRef)];
|
|
98
101
|
if (!setModalData || !isFunction(setModalData))
|
|
99
102
|
return;
|
|
100
103
|
nextTick(() => {
|
|
104
|
+
if (unref(isFirstRegister)) {
|
|
105
|
+
isFirstRegister.value = false;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
101
108
|
setModalData(data ?? {});
|
|
102
109
|
if (!data)
|
|
103
110
|
return;
|
|
@@ -498,6 +505,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
498
505
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
499
506
|
__name: "ModalFooter",
|
|
500
507
|
props: {
|
|
508
|
+
authPrefix: { type: String },
|
|
501
509
|
buttons: Object,
|
|
502
510
|
showSave: { type: Boolean, default: true },
|
|
503
511
|
showCancel: { type: Boolean, default: true },
|
|
@@ -516,7 +524,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
516
524
|
return props.buttons;
|
|
517
525
|
let buttonActions = [
|
|
518
526
|
{ t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" },
|
|
519
|
-
{ t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" }
|
|
527
|
+
{ t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", auth: "edit", type: "primary", flag: "OK" }
|
|
520
528
|
];
|
|
521
529
|
if (!props.showSave)
|
|
522
530
|
buttonActions = buttonActions.filter((btn) => btn.flag !== "OK");
|
|
@@ -540,8 +548,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
540
548
|
createVNode(unref(DtFormButtons), {
|
|
541
549
|
mode: "dialog",
|
|
542
550
|
buttonList: unref(buttonList),
|
|
551
|
+
authPrefix: __props.authPrefix,
|
|
543
552
|
onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
|
|
544
|
-
}, null, 8, ["buttonList"])
|
|
553
|
+
}, null, 8, ["buttonList", "authPrefix"])
|
|
545
554
|
], 64);
|
|
546
555
|
};
|
|
547
556
|
}
|
|
@@ -719,6 +728,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
719
728
|
name: "footer",
|
|
720
729
|
fn: withCtx(() => [
|
|
721
730
|
createVNode(_sfc_main$1, {
|
|
731
|
+
authPrefix: unref(getBindValue).authPrefix,
|
|
722
732
|
buttons: propsRef.value?.footer,
|
|
723
733
|
showSave: unref(getBindValue).showOkBtn,
|
|
724
734
|
showCancel: unref(getBindValue).showCancelBtn,
|
|
@@ -735,7 +745,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
735
745
|
])
|
|
736
746
|
};
|
|
737
747
|
})
|
|
738
|
-
]), 1032, ["buttons", "showSave", "showCancel", "okText", "cancelText"])
|
|
748
|
+
]), 1032, ["authPrefix", "buttons", "showSave", "showCancel", "okText", "cancelText"])
|
|
739
749
|
]),
|
|
740
750
|
key: "2"
|
|
741
751
|
} : void 0,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ButtonProps } from '../../../form';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
authPrefix: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
4
7
|
buttons: PropType<ButtonProps[]>;
|
|
5
8
|
showSave: {
|
|
6
9
|
type: BooleanConstructor;
|
|
@@ -31,6 +34,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
31
34
|
handleMethod: (item: ButtonProps) => void;
|
|
32
35
|
readonly DtFormButtons: 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<{}>>, {}>;
|
|
33
36
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("handleSave" | "handleCancel")[], "handleSave" | "handleCancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
authPrefix: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
34
40
|
buttons: PropType<ButtonProps[]>;
|
|
35
41
|
showSave: {
|
|
36
42
|
type: BooleanConstructor;
|
|
@@ -441,6 +441,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
441
441
|
modalFooterHeight: number;
|
|
442
442
|
}>;
|
|
443
443
|
ModalFooter: import("vue").DefineComponent<{
|
|
444
|
+
authPrefix: {
|
|
445
|
+
type: StringConstructor;
|
|
446
|
+
};
|
|
444
447
|
buttons: import("vue").PropType<import("../../form").ButtonProps[]>;
|
|
445
448
|
showSave: {
|
|
446
449
|
type: BooleanConstructor;
|
|
@@ -471,6 +474,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
471
474
|
handleMethod: (item: import("../../form").ButtonProps) => void;
|
|
472
475
|
readonly DtFormButtons: 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<ExtractPropTypes<{}>>, {}>;
|
|
473
476
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("handleSave" | "handleCancel")[], "handleSave" | "handleCancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
477
|
+
authPrefix: {
|
|
478
|
+
type: StringConstructor;
|
|
479
|
+
};
|
|
474
480
|
buttons: import("vue").PropType<import("../../form").ButtonProps[]>;
|
|
475
481
|
showSave: {
|
|
476
482
|
type: BooleanConstructor;
|
|
@@ -15,6 +15,7 @@ export declare function useSource(props: SourceOption): {
|
|
|
15
15
|
registerInstance: (instance: FormActionType) => FormActionType;
|
|
16
16
|
};
|
|
17
17
|
table: {
|
|
18
|
+
authPrefix: string;
|
|
18
19
|
dataSource: import("vue").Ref<any[]>;
|
|
19
20
|
pagination: import("vue").Ref<{
|
|
20
21
|
current: number;
|
|
@@ -32,6 +33,7 @@ export declare function useSource(props: SourceOption): {
|
|
|
32
33
|
registerInstance: (instance: TableActionType) => TableActionType;
|
|
33
34
|
};
|
|
34
35
|
curd: {
|
|
36
|
+
authPrefix: string;
|
|
35
37
|
onSave: (params?: Recordable) => Promise<boolean>;
|
|
36
38
|
onDeletes: (ids: Key[]) => void;
|
|
37
39
|
onQueryById: (id: Key) => Promise<unknown>;
|
|
@@ -135,7 +135,7 @@ function useSource(props) {
|
|
|
135
135
|
const { t } = useI18n("UI");
|
|
136
136
|
const { confirm, message } = useMessage();
|
|
137
137
|
const { appConf } = useAppStore();
|
|
138
|
-
const { baseUrl, api: orgApi, exportName, queryAfterUpdate, beforeUpdate, afterUpdate } = props;
|
|
138
|
+
const { baseUrl, api: orgApi, exportName, queryAfterUpdate, beforeUpdate, afterUpdate, authPrefix } = props;
|
|
139
139
|
const pagination = ref({
|
|
140
140
|
current: appConf?.ui?.table?.defaultPageNo || 1,
|
|
141
141
|
pageSize: appConf?.ui?.table?.defaultPageSize || 20,
|
|
@@ -300,6 +300,7 @@ function useSource(props) {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
} catch (err) {
|
|
303
|
+
console.log("Err:" + err);
|
|
303
304
|
} finally {
|
|
304
305
|
}
|
|
305
306
|
}
|
|
@@ -364,6 +365,7 @@ function useSource(props) {
|
|
|
364
365
|
registerInstance: (instance) => formInstance = instance
|
|
365
366
|
};
|
|
366
367
|
const table = {
|
|
368
|
+
authPrefix,
|
|
367
369
|
dataSource,
|
|
368
370
|
pagination,
|
|
369
371
|
loading: loading.onQuerypage,
|
|
@@ -377,6 +379,7 @@ function useSource(props) {
|
|
|
377
379
|
registerInstance: (instance) => tableInstance = instance
|
|
378
380
|
};
|
|
379
381
|
const curd = {
|
|
382
|
+
authPrefix,
|
|
380
383
|
onSave,
|
|
381
384
|
onDeletes,
|
|
382
385
|
onQueryById,
|
|
@@ -12,6 +12,7 @@ export declare type ApiObjType = {
|
|
|
12
12
|
export declare type SourceOption = {
|
|
13
13
|
baseUrl?: string;
|
|
14
14
|
exportName?: string | ComputedRef;
|
|
15
|
+
authPrefix?: string;
|
|
15
16
|
queryAfterUpdate?: boolean;
|
|
16
17
|
beforeUpdate?: (model: Recordable) => boolean | Recordable | undefined;
|
|
17
18
|
afterUpdate?: (data: Recordable) => void;
|