@dt-frames/ui 2.0.11 → 2.0.12
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 +2 -93
- package/es/components/curd/src/components/Curd.d.ts +6 -2
- package/es/components/curd/src/props.d.ts +3 -1
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/drawer/index.js +4 -4
- package/es/components/drawer/src/index.d.ts +1 -1
- package/es/components/drawer/src/types/index.type.d.ts +1 -1
- package/es/components/form/index.js +32 -13
- package/es/components/form/src/components/FormItem.d.ts +3 -1
- package/es/components/form/src/components/formIcon.d.ts +0 -8
- package/es/components/form/src/props.d.ts +3 -1
- package/es/components/form/src/types/form.type.d.ts +1 -0
- package/es/components/form/src/types/items.type.d.ts +6 -4
- package/es/components/icons/index.d.ts +497 -497
- package/es/components/iframe/index.d.ts +2 -0
- package/es/components/iframe/index.js +72 -0
- package/es/components/iframe/index.less +29 -0
- package/es/components/iframe/src/index.d.ts +38 -0
- package/es/components/modal/index.js +11 -6
- package/es/components/modal/src/index.d.ts +4 -2
- package/es/components/table/index.js +173 -94
- package/es/components/tree/index.js +39 -29
- package/es/components/upload/index.js +414 -11
- package/es/components/upload/index.less +37 -0
- package/es/components/upload/src/basicProps.d.ts +89 -0
- package/es/components/upload/src/components/PdfView.d.ts +9 -0
- package/es/components/upload/src/hooks/useFile.d.ts +15 -0
- package/es/components/upload/src/index.d.ts +236 -2
- package/es/components/upload/src/type/file.d.ts +10 -0
- package/es/components/upload/src/utils/upload.d.ts +2 -0
- package/es/theme/index.js +3 -1
- package/es/theme/index.less +5 -1
- package/es/theme/src/components/content/index.d.ts +2 -0
- package/es/theme/src/components/header/index.d.ts +809 -809
- package/es/theme/src/components/header/multiple-header.d.ts +918 -918
- package/es/theme/src/index.d.ts +2059 -2057
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/manualContentPath.js +14 -0
- package/package.json +4 -2
- package/vite.config.ts +3 -0
- package/vite.config.ts.timestamp-1678694558071.mjs +0 -59
- package/vite.config.ts.timestamp-1678700851971.mjs +0 -61
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Spin } from "ant-design-vue/es";
|
|
2
|
+
import "ant-design-vue/es/spin/style";
|
|
3
|
+
import { defineComponent, ref, unref, watch, openBlock, createElementBlock, createVNode, withCtx, createElementVNode } from "vue";
|
|
4
|
+
import { windowResizeFn, dispatchResize } from "@dt-frames/core";
|
|
5
|
+
const _hoisted_1 = { class: "iframe-page" };
|
|
6
|
+
const _hoisted_2 = ["src"];
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
showLoading: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true
|
|
13
|
+
},
|
|
14
|
+
src: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
exeReduce: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 78
|
|
20
|
+
},
|
|
21
|
+
postMsg: null
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const loading = ref(true);
|
|
26
|
+
const frameRef = ref();
|
|
27
|
+
windowResizeFn(calcHeight, 150, { immediate: true });
|
|
28
|
+
function calcHeight() {
|
|
29
|
+
const iframe = unref(frameRef);
|
|
30
|
+
if (!iframe) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const clientHeight = document.documentElement.clientHeight - props.exeReduce;
|
|
34
|
+
iframe.style.height = `${clientHeight}px`;
|
|
35
|
+
}
|
|
36
|
+
watch(
|
|
37
|
+
() => props.exeReduce,
|
|
38
|
+
(v) => {
|
|
39
|
+
calcHeight();
|
|
40
|
+
dispatchResize();
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
function afterLoaded() {
|
|
44
|
+
loading.value = false;
|
|
45
|
+
calcHeight();
|
|
46
|
+
dispatchResize();
|
|
47
|
+
}
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
const _component_ASpin = Spin;
|
|
50
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
51
|
+
createVNode(_component_ASpin, {
|
|
52
|
+
spinning: loading.value,
|
|
53
|
+
size: "large"
|
|
54
|
+
}, {
|
|
55
|
+
default: withCtx(() => [
|
|
56
|
+
createElementVNode("iframe", {
|
|
57
|
+
src: __props.src,
|
|
58
|
+
class: "iframe-page__main",
|
|
59
|
+
ref_key: "frameRef",
|
|
60
|
+
ref: frameRef,
|
|
61
|
+
onLoad: _cache[0] || (_cache[0] = ($event) => afterLoaded())
|
|
62
|
+
}, null, 40, _hoisted_2)
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["spinning"])
|
|
66
|
+
]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
_sfc_main as DtIframe
|
|
72
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.iframe-page{
|
|
2
|
+
height: 100%;
|
|
3
|
+
.ant-spin-nested-loading {
|
|
4
|
+
position: relative;
|
|
5
|
+
height: 100%;
|
|
6
|
+
|
|
7
|
+
.ant-spin-container {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__mask {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__main {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
background-color: #fff;
|
|
26
|
+
border: 0;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
showLoading: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
src: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
};
|
|
9
|
+
exeReduce: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
postMsg: any;
|
|
14
|
+
}, {
|
|
15
|
+
props: any;
|
|
16
|
+
loading: import("vue").Ref<boolean>;
|
|
17
|
+
frameRef: import("vue").Ref<any>;
|
|
18
|
+
calcHeight: () => void;
|
|
19
|
+
afterLoaded: () => void;
|
|
20
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
showLoading: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
src: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
exeReduce: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
32
|
+
postMsg: any;
|
|
33
|
+
}>>, {
|
|
34
|
+
showLoading: boolean;
|
|
35
|
+
exeReduce: number;
|
|
36
|
+
postMsg: any;
|
|
37
|
+
}>;
|
|
38
|
+
export default _sfc_main;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useApp, isFunction, isObject, error, useTimeoutFn, useSlots, useI18n, windowResizeFn, dispatchResize, isArray, deepMerge } from "@dt-frames/core";
|
|
1
|
+
import { useApp, isFunction, isObject, error, useTimeoutFn, useSlots, getPopupContainer, useI18n, windowResizeFn, dispatchResize, isArray, deepMerge } from "@dt-frames/core";
|
|
2
2
|
import { reactive, ref, getCurrentInstance, watchEffect, unref, nextTick, onUnmounted, toRaw, toRefs, useAttrs, createVNode, isVNode, defineComponent, computed, openBlock, createElementBlock, normalizeClass, Fragment, createBlock, withCtx, createElementVNode, createCommentVNode, onMounted, watch, normalizeStyle, renderSlot, mergeProps, createSlots, createTextVNode, toDisplayString, renderList, normalizeProps, guardReactiveProps } from "vue";
|
|
3
3
|
import { Tooltip, Spin } from "ant-design-vue/es";
|
|
4
4
|
import "ant-design-vue/es/spin/style";
|
|
@@ -98,7 +98,7 @@ function useModal(props, setModalData) {
|
|
|
98
98
|
if (!setModalData || !isFunction(setModalData))
|
|
99
99
|
return;
|
|
100
100
|
nextTick(() => {
|
|
101
|
-
setModalData(data);
|
|
101
|
+
setModalData(data ?? {});
|
|
102
102
|
if (!data)
|
|
103
103
|
return;
|
|
104
104
|
if (props?.title && isFunction(props?.title)) {
|
|
@@ -311,7 +311,8 @@ const _sfc_main$4 = {
|
|
|
311
311
|
...unref(attrs),
|
|
312
312
|
...props,
|
|
313
313
|
destroyOnClose: true,
|
|
314
|
-
onCancel
|
|
314
|
+
onCancel,
|
|
315
|
+
getContainer: getPopupContainer()
|
|
315
316
|
};
|
|
316
317
|
if (!propsData?.visible)
|
|
317
318
|
return null;
|
|
@@ -566,13 +567,17 @@ function useFullScreen(wrapClassName) {
|
|
|
566
567
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
567
568
|
__name: "index",
|
|
568
569
|
props: basicProps,
|
|
569
|
-
emits: ["visible-change", "height-change", "cancel", "save", "register", "update:visible"],
|
|
570
|
+
emits: ["visible-change", "height-change", "cancel", "save", "register", "toggle-fullscreen", "update:visible"],
|
|
570
571
|
setup(__props, { emit: emits }) {
|
|
571
572
|
const props = __props;
|
|
572
573
|
const visibleRef = ref(false);
|
|
573
574
|
const propsRef = ref();
|
|
574
575
|
const modalWrapperRef = ref(null);
|
|
575
576
|
const { getWrapClassName, toggleFullScreen, fullScreenRef } = useFullScreen(computed(() => unref(propsRef)?.wrapClassName));
|
|
577
|
+
function handleFullscreen(e) {
|
|
578
|
+
toggleFullScreen(e);
|
|
579
|
+
emits("toggle-fullscreen", unref(fullScreenRef));
|
|
580
|
+
}
|
|
576
581
|
const getMergeProps = computed(() => {
|
|
577
582
|
return {
|
|
578
583
|
...props,
|
|
@@ -698,8 +703,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
698
703
|
canFullscreen: unref(getBindValue).canFullscreen,
|
|
699
704
|
fullScreen: unref(fullScreenRef),
|
|
700
705
|
onCancel: handleCancel,
|
|
701
|
-
onFullscreen:
|
|
702
|
-
}, null, 8, ["canFullscreen", "fullScreen"
|
|
706
|
+
onFullscreen: handleFullscreen
|
|
707
|
+
}, null, 8, ["canFullscreen", "fullScreen"])
|
|
703
708
|
]),
|
|
704
709
|
key: "0"
|
|
705
710
|
} : void 0,
|
|
@@ -100,7 +100,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
100
100
|
afterClose: FunctionConstructor;
|
|
101
101
|
}, {
|
|
102
102
|
props: any;
|
|
103
|
-
emits: (event: "visible-change" | "height-change" | "cancel" | "save" | "register" | "update:visible", ...args: any[]) => void;
|
|
103
|
+
emits: (event: "visible-change" | "height-change" | "cancel" | "save" | "register" | "toggle-fullscreen" | "update:visible", ...args: any[]) => void;
|
|
104
104
|
visibleRef: import("vue").Ref<boolean>;
|
|
105
105
|
propsRef: import("vue").Ref<Partial<ExtractPropTypes<{
|
|
106
106
|
t: {
|
|
@@ -204,6 +204,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
204
204
|
getWrapClassName: import("vue").ComputedRef<string>;
|
|
205
205
|
toggleFullScreen: (e: Event) => void;
|
|
206
206
|
fullScreenRef: import("vue").Ref<boolean>;
|
|
207
|
+
handleFullscreen: (e: Event) => void;
|
|
207
208
|
getMergeProps: import("vue").ComputedRef<any>;
|
|
208
209
|
getBindValue: import("vue").ComputedRef<any>;
|
|
209
210
|
getWrapperHeight: import("vue").ComputedRef<any>;
|
|
@@ -492,7 +493,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
492
493
|
showSave: boolean;
|
|
493
494
|
showCancel: boolean;
|
|
494
495
|
}>;
|
|
495
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("visible-change" | "height-change" | "cancel" | "save" | "register" | "update:visible")[], "visible-change" | "height-change" | "cancel" | "save" | "register" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
496
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("visible-change" | "height-change" | "cancel" | "save" | "register" | "toggle-fullscreen" | "update:visible")[], "visible-change" | "height-change" | "cancel" | "save" | "register" | "toggle-fullscreen" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
496
497
|
t: {
|
|
497
498
|
type: StringConstructor;
|
|
498
499
|
};
|
|
@@ -595,6 +596,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
595
596
|
onCancel?: (...args: any[]) => any;
|
|
596
597
|
onSave?: (...args: any[]) => any;
|
|
597
598
|
onRegister?: (...args: any[]) => any;
|
|
599
|
+
"onToggle-fullscreen"?: (...args: any[]) => any;
|
|
598
600
|
"onUpdate:visible"?: (...args: any[]) => any;
|
|
599
601
|
}, {
|
|
600
602
|
visible: boolean;
|