vft 0.0.415 → 0.0.417
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +8 -8
- package/es/components/autocomplete/index.d.ts +24 -24
- package/es/components/button/button.vue.d.ts +1 -1
- package/es/components/button/index.d.ts +30 -30
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/color-picker/composables/use-alpha-slider.d.ts +2 -2
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +4 -3
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/dialog/constants.d.ts +1 -0
- package/es/components/dialog/constants.js +2 -1
- package/es/components/dialog/dialog-content.vue.d.ts +4 -1
- package/es/components/dialog/dialog-content.vue2.js +59 -48
- package/es/components/dialog/dialog.vue.d.ts +4 -19
- package/es/components/dialog/dialog.vue2.js +104 -89
- package/es/components/dialog/index.d.ts +70 -3
- package/es/components/dialog/index.js +5 -4
- package/es/components/dialog/types.d.ts +69 -0
- package/es/components/dialog/{hooks/use-dialog.d.ts → use-dialog.d.ts} +11 -2
- package/es/components/dialog/use-dialog.js +138 -0
- package/es/components/drawer/composables/useResizable.d.ts +7 -0
- package/es/components/drawer/composables/useResizable.js +53 -0
- package/es/components/drawer/drawer.vue.d.ts +3 -7
- package/es/components/drawer/drawer.vue2.js +122 -97
- package/es/components/drawer/index.d.ts +78 -0
- package/es/components/drawer/types.d.ts +13 -0
- package/es/components/drawer/types.js +1 -0
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +15 -15
- package/es/components/form/index.d.ts +6 -6
- package/es/components/index.js +172 -171
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/input-tag/input-tag.vue.d.ts +1 -1
- package/es/components/link/index.d.ts +3 -3
- package/es/components/md-code-demo/md-code-demo.js +10 -10
- package/es/components/modal/index.d.ts +87 -24
- package/es/components/modal/modal.vue.d.ts +1 -1
- package/es/components/modal/modal.vue2.js +24 -17
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +82 -79
- package/es/components/popover/index.d.ts +0 -9
- package/es/components/popover/popover.vue2.js +4 -5
- package/es/components/popover/types.d.ts +23 -1
- package/es/components/search/search.vue2.js +3 -3
- package/es/components/select/index.d.ts +20 -20
- package/es/components/select/select.vue.d.ts +20 -20
- package/es/components/select/useSelect.d.ts +17 -17
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/table/index.d.ts +9 -9
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tooltip/tooltip.vue2.js +1 -1
- package/es/components/tooltip/types.d.ts +81 -1
- package/es/hooks/use-draggable/index.d.ts +5 -1
- package/es/hooks/use-draggable/index.js +39 -34
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.js +2 -2
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/helper.d.ts +1 -1
- package/es/utils/ns-cover.d.ts +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +8 -8
- package/lib/components/autocomplete/index.d.ts +24 -24
- package/lib/components/button/button.vue.d.ts +1 -1
- package/lib/components/button/index.d.ts +30 -30
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/color-picker/composables/use-alpha-slider.d.ts +2 -2
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/dialog/constants.cjs +1 -1
- package/lib/components/dialog/constants.d.ts +1 -0
- package/lib/components/dialog/dialog-content.vue.d.ts +4 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +4 -19
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/dialog/index.cjs +1 -1
- package/lib/components/dialog/index.d.ts +70 -3
- package/lib/components/dialog/types.d.ts +69 -0
- package/lib/components/dialog/use-dialog.cjs +1 -0
- package/lib/components/dialog/{hooks/use-dialog.d.ts → use-dialog.d.ts} +11 -2
- package/lib/components/drawer/composables/useResizable.cjs +1 -0
- package/lib/components/drawer/composables/useResizable.d.ts +7 -0
- package/lib/components/drawer/drawer.vue.d.ts +3 -7
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/drawer/index.d.ts +78 -0
- package/lib/components/drawer/types.cjs +1 -0
- package/lib/components/drawer/types.d.ts +13 -0
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/index.d.ts +15 -15
- package/lib/components/form/index.d.ts +6 -6
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +1 -1
- package/lib/components/link/index.d.ts +3 -3
- package/lib/components/md-code-demo/md-code-demo.cjs +1 -1
- package/lib/components/modal/index.d.ts +87 -24
- package/lib/components/modal/modal.vue.d.ts +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popover/index.d.ts +0 -9
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popover/types.d.ts +23 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +20 -20
- package/lib/components/select/select.vue.d.ts +20 -20
- package/lib/components/select/useSelect.d.ts +17 -17
- package/lib/components/table/index.d.ts +9 -9
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/types.d.ts +81 -1
- package/lib/hooks/use-draggable/index.cjs +1 -1
- package/lib/hooks/use-draggable/index.d.ts +5 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/helper.d.ts +1 -1
- package/lib/utils/ns-cover.d.ts +1 -1
- package/package.json +3 -3
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/card.scss +4 -4
- package/theme-style/src/dialog.scss +36 -35
- package/theme-style/src/drawer.scss +109 -21
- package/theme-style/src/md-container.scss +1 -0
- package/theme-style/src/tag.scss +1 -1
- package/theme-style/vft-card.css +1 -1
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-drawer.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-tag.css +1 -1
- package/web-types.json +1 -1
- package/es/components/dialog/hooks/use-dialog.js +0 -106
- package/lib/components/dialog/hooks/use-dialog.cjs +0 -1
|
@@ -1,46 +1,51 @@
|
|
|
1
|
+
import { ref as P, onMounted as T, watchEffect as W, onBeforeUnmount as y } from "vue";
|
|
1
2
|
import "@vueuse/core";
|
|
2
3
|
import "@vft/utils";
|
|
3
|
-
import { addUnit as
|
|
4
|
-
import { onMounted as W, watchEffect as B, onBeforeUnmount as U } from "vue";
|
|
4
|
+
import { addUnit as E } from "../../utils/helper.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../components/form/index.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const k = (o, u, L, M) => {
|
|
8
|
+
const n = {
|
|
9
9
|
offsetX: 0,
|
|
10
10
|
offsetY: 0
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
21
|
-
m =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
f
|
|
26
|
-
)}, ${p(h)})`;
|
|
27
|
-
}, d = () => {
|
|
28
|
-
document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", d);
|
|
11
|
+
}, a = P(!1), p = (t, e) => {
|
|
12
|
+
if (o.value) {
|
|
13
|
+
const { offsetX: f, offsetY: m } = n, s = o.value.getBoundingClientRect(), i = s.left, c = s.top, l = s.width, r = s.height, v = document.documentElement.clientWidth, w = document.documentElement.clientHeight, x = -i + f, D = -c + m, b = v - i - l + f, H = w - c - (r < w ? r : 0) + m;
|
|
14
|
+
M?.value || (t = Math.min(Math.max(t, x), b), e = Math.min(Math.max(e, D), H)), n.offsetX = t, n.offsetY = e, o.value.style.transform = `translate(${E(t)}, ${E(
|
|
15
|
+
e
|
|
16
|
+
)})`;
|
|
17
|
+
}
|
|
18
|
+
}, h = (t) => {
|
|
19
|
+
const e = t.clientX, f = t.clientY, { offsetX: m, offsetY: s } = n, i = (l) => {
|
|
20
|
+
a.value || (a.value = !0);
|
|
21
|
+
const r = m + l.clientX - e, v = s + l.clientY - f;
|
|
22
|
+
p(r, v);
|
|
23
|
+
}, c = () => {
|
|
24
|
+
a.value = !1, document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", c);
|
|
29
25
|
};
|
|
30
|
-
document.addEventListener("mousemove",
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
26
|
+
document.addEventListener("mousemove", i), document.addEventListener("mouseup", c);
|
|
27
|
+
}, X = () => {
|
|
28
|
+
u.value && o.value && (u.value.addEventListener("mousedown", h), window.addEventListener("resize", d));
|
|
29
|
+
}, g = () => {
|
|
30
|
+
u.value && o.value && (u.value.removeEventListener("mousedown", h), window.removeEventListener("resize", d));
|
|
31
|
+
}, Y = () => {
|
|
32
|
+
n.offsetX = 0, n.offsetY = 0, o.value && (o.value.style.transform = "");
|
|
33
|
+
}, d = () => {
|
|
34
|
+
const { offsetX: t, offsetY: e } = n;
|
|
35
|
+
p(t, e);
|
|
35
36
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
return T(() => {
|
|
38
|
+
W(() => {
|
|
39
|
+
L.value ? X() : g();
|
|
39
40
|
});
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
})
|
|
41
|
+
}), y(() => {
|
|
42
|
+
g();
|
|
43
|
+
}), {
|
|
44
|
+
isDragging: a,
|
|
45
|
+
resetPosition: Y,
|
|
46
|
+
updatePosition: d
|
|
47
|
+
};
|
|
43
48
|
};
|
|
44
49
|
export {
|
|
45
|
-
|
|
50
|
+
k as useDraggable
|
|
46
51
|
};
|
|
@@ -2,14 +2,14 @@ import "@vueuse/core";
|
|
|
2
2
|
import { isNumber as m, isClient as p } from "@vft/utils";
|
|
3
3
|
import { debugWarn as l } from "../../utils/error.js";
|
|
4
4
|
import "../../components/config-provider/hooks/use-global-config.js";
|
|
5
|
-
import {
|
|
5
|
+
import { getCurrentInstance as i, inject as e, computed as c, unref as v, ref as Z } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../components/form/index.js";
|
|
8
8
|
const s = {
|
|
9
9
|
current: 0
|
|
10
|
-
}, u =
|
|
10
|
+
}, u = Z(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
|
|
11
11
|
const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
|
|
12
|
-
const r =
|
|
12
|
+
const r = v(x);
|
|
13
13
|
return m(r) ? r : f;
|
|
14
14
|
}), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
|
|
15
15
|
return !p && !e(d) && l(
|
package/es/index.js
CHANGED
|
@@ -161,8 +161,8 @@ export { configProviderContextKey, messageConfig } from "./components/config-pro
|
|
|
161
161
|
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from "./components/config-provider/hooks/use-global-config.js";
|
|
162
162
|
export { ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY } from "./components/date-picker/constants.js";
|
|
163
163
|
export { datePickerProps } from "./components/date-picker/props/date-picker.js";
|
|
164
|
-
export { dialogInjectionKey } from "./components/dialog/constants.js";
|
|
165
|
-
export { useDialog } from "./components/dialog/
|
|
164
|
+
export { DEFAULT_DIALOG_TRANSITION, dialogInjectionKey } from "./components/dialog/constants.js";
|
|
165
|
+
export { useDialog } from "./components/dialog/use-dialog.js";
|
|
166
166
|
export { DROPDOWN_INJECTION_KEY } from "./components/dropdown/tokens.js";
|
|
167
167
|
export { EmptyEnum } from "./components/empty/constants.js";
|
|
168
168
|
export { formContextKey, formItemContextKey } from "./components/form/constants.js";
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
package/es/utils/helper.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export declare const isValidComponentSize: (val: string) => val is ComponentSize
|
|
|
4
4
|
export declare const getComponentSize: (size?: ComponentSize) => 32 | 24 | 40;
|
|
5
5
|
export declare const castArray: (arr: any) => any[];
|
|
6
6
|
export declare const unique: <T>(arr: T[]) => T[];
|
|
7
|
-
export declare function addUnit(value: number | string): string
|
|
7
|
+
export declare function addUnit(value: number | string): string;
|
package/es/utils/ns-cover.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
export declare const cssVarValue: (prop:
|
|
2
|
+
export declare const cssVarValue: (prop: string, target?: HTMLElement | Ref<HTMLElement>, observe?: boolean) => import("vue").ShallowRef<string | undefined, string | undefined> | undefined;
|
|
3
3
|
export declare const primaryColor: () => import("vue").ShallowRef<string | undefined, string | undefined> | Ref<string, string> | undefined;
|
|
4
4
|
export declare function generateCssVars(vars: Record<string, string | number | undefined>, name: any): Record<string, string | number | undefined>;
|
|
5
5
|
/**
|
package/es/utils/vue/vnode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hasOwn as m, camelize as N, isArray as E } from "@vft/utils";
|
|
2
2
|
import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
|
|
3
3
|
import { debugWarn as O } from "../error.js";
|
|
4
4
|
const R = "utils/vue/vnode";
|
|
@@ -61,10 +61,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
61
61
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
62
62
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
63
63
|
readonly effect?: "light" | "dark" | undefined;
|
|
64
|
-
readonly
|
|
65
|
-
readonly visible?: boolean | undefined;
|
|
64
|
+
readonly visible?: boolean | null | undefined;
|
|
66
65
|
readonly teleported?: boolean | undefined;
|
|
67
66
|
readonly open?: boolean | undefined;
|
|
67
|
+
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
68
68
|
readonly arrowOffset?: number | undefined;
|
|
69
69
|
readonly gpuAcceleration?: boolean | undefined;
|
|
70
70
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -183,7 +183,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
183
183
|
type: import("vue").PropType<"light" | "dark">;
|
|
184
184
|
};
|
|
185
185
|
visible: {
|
|
186
|
-
type: import("vue").PropType<boolean>;
|
|
186
|
+
type: import("vue").PropType<boolean | null>;
|
|
187
187
|
};
|
|
188
188
|
enterable: {
|
|
189
189
|
type: import("vue").PropType<boolean>;
|
|
@@ -367,7 +367,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
367
367
|
type: import("vue").PropType<"light" | "dark">;
|
|
368
368
|
};
|
|
369
369
|
visible: {
|
|
370
|
-
type: import("vue").PropType<boolean>;
|
|
370
|
+
type: import("vue").PropType<boolean | null>;
|
|
371
371
|
};
|
|
372
372
|
enterable: {
|
|
373
373
|
type: import("vue").PropType<boolean>;
|
|
@@ -479,10 +479,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
479
479
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
480
480
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
481
481
|
readonly effect?: "light" | "dark" | undefined;
|
|
482
|
-
readonly
|
|
483
|
-
readonly visible?: boolean | undefined;
|
|
482
|
+
readonly visible?: boolean | null | undefined;
|
|
484
483
|
readonly teleported?: boolean | undefined;
|
|
485
484
|
readonly open?: boolean | undefined;
|
|
485
|
+
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
486
486
|
readonly arrowOffset?: number | undefined;
|
|
487
487
|
readonly gpuAcceleration?: boolean | undefined;
|
|
488
488
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -601,7 +601,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
601
601
|
type: import("vue").PropType<"light" | "dark">;
|
|
602
602
|
};
|
|
603
603
|
visible: {
|
|
604
|
-
type: import("vue").PropType<boolean>;
|
|
604
|
+
type: import("vue").PropType<boolean | null>;
|
|
605
605
|
};
|
|
606
606
|
enterable: {
|
|
607
607
|
type: import("vue").PropType<boolean>;
|
|
@@ -785,7 +785,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
785
785
|
type: import("vue").PropType<"light" | "dark">;
|
|
786
786
|
};
|
|
787
787
|
visible: {
|
|
788
|
-
type: import("vue").PropType<boolean>;
|
|
788
|
+
type: import("vue").PropType<boolean | null>;
|
|
789
789
|
};
|
|
790
790
|
enterable: {
|
|
791
791
|
type: import("vue").PropType<boolean>;
|
|
@@ -85,10 +85,10 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
85
85
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
86
86
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
87
87
|
readonly effect?: "light" | "dark" | undefined;
|
|
88
|
-
readonly
|
|
89
|
-
readonly visible?: boolean | undefined;
|
|
88
|
+
readonly visible?: boolean | null | undefined;
|
|
90
89
|
readonly teleported?: boolean | undefined;
|
|
91
90
|
readonly open?: boolean | undefined;
|
|
91
|
+
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
92
92
|
readonly arrowOffset?: number | undefined;
|
|
93
93
|
readonly gpuAcceleration?: boolean | undefined;
|
|
94
94
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -207,7 +207,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
207
207
|
type: import("vue").PropType<"light" | "dark">;
|
|
208
208
|
};
|
|
209
209
|
visible: {
|
|
210
|
-
type: import("vue").PropType<boolean>;
|
|
210
|
+
type: import("vue").PropType<boolean | null>;
|
|
211
211
|
};
|
|
212
212
|
enterable: {
|
|
213
213
|
type: import("vue").PropType<boolean>;
|
|
@@ -391,7 +391,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
391
391
|
type: import("vue").PropType<"light" | "dark">;
|
|
392
392
|
};
|
|
393
393
|
visible: {
|
|
394
|
-
type: import("vue").PropType<boolean>;
|
|
394
|
+
type: import("vue").PropType<boolean | null>;
|
|
395
395
|
};
|
|
396
396
|
enterable: {
|
|
397
397
|
type: import("vue").PropType<boolean>;
|
|
@@ -503,10 +503,10 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
503
503
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
504
504
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
505
505
|
readonly effect?: "light" | "dark" | undefined;
|
|
506
|
-
readonly
|
|
507
|
-
readonly visible?: boolean | undefined;
|
|
506
|
+
readonly visible?: boolean | null | undefined;
|
|
508
507
|
readonly teleported?: boolean | undefined;
|
|
509
508
|
readonly open?: boolean | undefined;
|
|
509
|
+
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
510
510
|
readonly arrowOffset?: number | undefined;
|
|
511
511
|
readonly gpuAcceleration?: boolean | undefined;
|
|
512
512
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -625,7 +625,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
625
625
|
type: import("vue").PropType<"light" | "dark">;
|
|
626
626
|
};
|
|
627
627
|
visible: {
|
|
628
|
-
type: import("vue").PropType<boolean>;
|
|
628
|
+
type: import("vue").PropType<boolean | null>;
|
|
629
629
|
};
|
|
630
630
|
enterable: {
|
|
631
631
|
type: import("vue").PropType<boolean>;
|
|
@@ -809,7 +809,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
809
809
|
type: import("vue").PropType<"light" | "dark">;
|
|
810
810
|
};
|
|
811
811
|
visible: {
|
|
812
|
-
type: import("vue").PropType<boolean>;
|
|
812
|
+
type: import("vue").PropType<boolean | null>;
|
|
813
813
|
};
|
|
814
814
|
enterable: {
|
|
815
815
|
type: import("vue").PropType<boolean>;
|
|
@@ -1006,10 +1006,10 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1006
1006
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1007
1007
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1008
1008
|
readonly effect?: "light" | "dark" | undefined;
|
|
1009
|
-
readonly
|
|
1010
|
-
readonly visible?: boolean | undefined;
|
|
1009
|
+
readonly visible?: boolean | null | undefined;
|
|
1011
1010
|
readonly teleported?: boolean | undefined;
|
|
1012
1011
|
readonly open?: boolean | undefined;
|
|
1012
|
+
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1013
1013
|
readonly arrowOffset?: number | undefined;
|
|
1014
1014
|
readonly gpuAcceleration?: boolean | undefined;
|
|
1015
1015
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -1128,7 +1128,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1128
1128
|
type: import("vue").PropType<"light" | "dark">;
|
|
1129
1129
|
};
|
|
1130
1130
|
visible: {
|
|
1131
|
-
type: import("vue").PropType<boolean>;
|
|
1131
|
+
type: import("vue").PropType<boolean | null>;
|
|
1132
1132
|
};
|
|
1133
1133
|
enterable: {
|
|
1134
1134
|
type: import("vue").PropType<boolean>;
|
|
@@ -1312,7 +1312,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1312
1312
|
type: import("vue").PropType<"light" | "dark">;
|
|
1313
1313
|
};
|
|
1314
1314
|
visible: {
|
|
1315
|
-
type: import("vue").PropType<boolean>;
|
|
1315
|
+
type: import("vue").PropType<boolean | null>;
|
|
1316
1316
|
};
|
|
1317
1317
|
enterable: {
|
|
1318
1318
|
type: import("vue").PropType<boolean>;
|
|
@@ -1424,10 +1424,10 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1424
1424
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1425
1425
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1426
1426
|
readonly effect?: "light" | "dark" | undefined;
|
|
1427
|
-
readonly
|
|
1428
|
-
readonly visible?: boolean | undefined;
|
|
1427
|
+
readonly visible?: boolean | null | undefined;
|
|
1429
1428
|
readonly teleported?: boolean | undefined;
|
|
1430
1429
|
readonly open?: boolean | undefined;
|
|
1430
|
+
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1431
1431
|
readonly arrowOffset?: number | undefined;
|
|
1432
1432
|
readonly gpuAcceleration?: boolean | undefined;
|
|
1433
1433
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -1546,7 +1546,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1546
1546
|
type: import("vue").PropType<"light" | "dark">;
|
|
1547
1547
|
};
|
|
1548
1548
|
visible: {
|
|
1549
|
-
type: import("vue").PropType<boolean>;
|
|
1549
|
+
type: import("vue").PropType<boolean | null>;
|
|
1550
1550
|
};
|
|
1551
1551
|
enterable: {
|
|
1552
1552
|
type: import("vue").PropType<boolean>;
|
|
@@ -1730,7 +1730,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1730
1730
|
type: import("vue").PropType<"light" | "dark">;
|
|
1731
1731
|
};
|
|
1732
1732
|
visible: {
|
|
1733
|
-
type: import("vue").PropType<boolean>;
|
|
1733
|
+
type: import("vue").PropType<boolean | null>;
|
|
1734
1734
|
};
|
|
1735
1735
|
enterable: {
|
|
1736
1736
|
type: import("vue").PropType<boolean>;
|
|
@@ -1916,10 +1916,10 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1916
1916
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1917
1917
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1918
1918
|
readonly effect?: "light" | "dark" | undefined;
|
|
1919
|
-
readonly
|
|
1920
|
-
readonly visible?: boolean | undefined;
|
|
1919
|
+
readonly visible?: boolean | null | undefined;
|
|
1921
1920
|
readonly teleported?: boolean | undefined;
|
|
1922
1921
|
readonly open?: boolean | undefined;
|
|
1922
|
+
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1923
1923
|
readonly arrowOffset?: number | undefined;
|
|
1924
1924
|
readonly gpuAcceleration?: boolean | undefined;
|
|
1925
1925
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -2038,7 +2038,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2038
2038
|
type: import("vue").PropType<"light" | "dark">;
|
|
2039
2039
|
};
|
|
2040
2040
|
visible: {
|
|
2041
|
-
type: import("vue").PropType<boolean>;
|
|
2041
|
+
type: import("vue").PropType<boolean | null>;
|
|
2042
2042
|
};
|
|
2043
2043
|
enterable: {
|
|
2044
2044
|
type: import("vue").PropType<boolean>;
|
|
@@ -2222,7 +2222,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2222
2222
|
type: import("vue").PropType<"light" | "dark">;
|
|
2223
2223
|
};
|
|
2224
2224
|
visible: {
|
|
2225
|
-
type: import("vue").PropType<boolean>;
|
|
2225
|
+
type: import("vue").PropType<boolean | null>;
|
|
2226
2226
|
};
|
|
2227
2227
|
enterable: {
|
|
2228
2228
|
type: import("vue").PropType<boolean>;
|
|
@@ -2334,10 +2334,10 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2334
2334
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
2335
2335
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
2336
2336
|
readonly effect?: "light" | "dark" | undefined;
|
|
2337
|
-
readonly
|
|
2338
|
-
readonly visible?: boolean | undefined;
|
|
2337
|
+
readonly visible?: boolean | null | undefined;
|
|
2339
2338
|
readonly teleported?: boolean | undefined;
|
|
2340
2339
|
readonly open?: boolean | undefined;
|
|
2340
|
+
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
2341
2341
|
readonly arrowOffset?: number | undefined;
|
|
2342
2342
|
readonly gpuAcceleration?: boolean | undefined;
|
|
2343
2343
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -2456,7 +2456,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2456
2456
|
type: import("vue").PropType<"light" | "dark">;
|
|
2457
2457
|
};
|
|
2458
2458
|
visible: {
|
|
2459
|
-
type: import("vue").PropType<boolean>;
|
|
2459
|
+
type: import("vue").PropType<boolean | null>;
|
|
2460
2460
|
};
|
|
2461
2461
|
enterable: {
|
|
2462
2462
|
type: import("vue").PropType<boolean>;
|
|
@@ -2640,7 +2640,7 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2640
2640
|
type: import("vue").PropType<"light" | "dark">;
|
|
2641
2641
|
};
|
|
2642
2642
|
visible: {
|
|
2643
|
-
type: import("vue").PropType<boolean>;
|
|
2643
|
+
type: import("vue").PropType<boolean | null>;
|
|
2644
2644
|
};
|
|
2645
2645
|
enterable: {
|
|
2646
2646
|
type: import("vue").PropType<boolean>;
|
|
@@ -11,7 +11,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
11
11
|
}>>, {
|
|
12
12
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
13
13
|
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
14
|
-
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "
|
|
14
|
+
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
15
15
|
disabled: import("vue").ComputedRef<boolean>;
|
|
16
16
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
17
17
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -37,15 +37,6 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
37
37
|
type: import("vue").PropType<string | import("vue").Component>;
|
|
38
38
|
default: string;
|
|
39
39
|
};
|
|
40
|
-
round: {
|
|
41
|
-
type: import("vue").PropType<boolean>;
|
|
42
|
-
};
|
|
43
|
-
block: {
|
|
44
|
-
type: import("vue").PropType<boolean>;
|
|
45
|
-
};
|
|
46
|
-
plain: {
|
|
47
|
-
type: import("vue").PropType<boolean>;
|
|
48
|
-
};
|
|
49
40
|
nativeType: {
|
|
50
41
|
type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
51
42
|
default: string;
|
|
@@ -53,12 +44,21 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
53
44
|
loadingIcon: {
|
|
54
45
|
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
55
46
|
};
|
|
47
|
+
plain: {
|
|
48
|
+
type: import("vue").PropType<boolean>;
|
|
49
|
+
};
|
|
56
50
|
bg: {
|
|
57
51
|
type: import("vue").PropType<boolean>;
|
|
58
52
|
};
|
|
53
|
+
round: {
|
|
54
|
+
type: import("vue").PropType<boolean>;
|
|
55
|
+
};
|
|
59
56
|
autoInsertSpace: {
|
|
60
57
|
type: import("vue").PropType<boolean>;
|
|
61
58
|
};
|
|
59
|
+
block: {
|
|
60
|
+
type: import("vue").PropType<boolean>;
|
|
61
|
+
};
|
|
62
62
|
useThrottle: {
|
|
63
63
|
type: import("vue").PropType<boolean>;
|
|
64
64
|
default: boolean;
|
|
@@ -72,7 +72,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
72
72
|
}>, {
|
|
73
73
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
74
74
|
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
75
|
-
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "
|
|
75
|
+
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
76
76
|
disabled: import("vue").ComputedRef<boolean>;
|
|
77
77
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
78
78
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -127,15 +127,6 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
127
127
|
type: import("vue").PropType<string | import("vue").Component>;
|
|
128
128
|
default: string;
|
|
129
129
|
};
|
|
130
|
-
round: {
|
|
131
|
-
type: import("vue").PropType<boolean>;
|
|
132
|
-
};
|
|
133
|
-
block: {
|
|
134
|
-
type: import("vue").PropType<boolean>;
|
|
135
|
-
};
|
|
136
|
-
plain: {
|
|
137
|
-
type: import("vue").PropType<boolean>;
|
|
138
|
-
};
|
|
139
130
|
nativeType: {
|
|
140
131
|
type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
141
132
|
default: string;
|
|
@@ -143,12 +134,21 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
143
134
|
loadingIcon: {
|
|
144
135
|
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
145
136
|
};
|
|
137
|
+
plain: {
|
|
138
|
+
type: import("vue").PropType<boolean>;
|
|
139
|
+
};
|
|
146
140
|
bg: {
|
|
147
141
|
type: import("vue").PropType<boolean>;
|
|
148
142
|
};
|
|
143
|
+
round: {
|
|
144
|
+
type: import("vue").PropType<boolean>;
|
|
145
|
+
};
|
|
149
146
|
autoInsertSpace: {
|
|
150
147
|
type: import("vue").PropType<boolean>;
|
|
151
148
|
};
|
|
149
|
+
block: {
|
|
150
|
+
type: import("vue").PropType<boolean>;
|
|
151
|
+
};
|
|
152
152
|
useThrottle: {
|
|
153
153
|
type: import("vue").PropType<boolean>;
|
|
154
154
|
default: boolean;
|
|
@@ -162,7 +162,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
162
162
|
}>, {
|
|
163
163
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
164
164
|
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
165
|
-
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "
|
|
165
|
+
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
166
166
|
disabled: import("vue").ComputedRef<boolean>;
|
|
167
167
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
168
168
|
}, {}, {}, {}, {
|
|
@@ -212,15 +212,6 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
212
212
|
type: import("vue").PropType<string | import("vue").Component>;
|
|
213
213
|
default: string;
|
|
214
214
|
};
|
|
215
|
-
round: {
|
|
216
|
-
type: import("vue").PropType<boolean>;
|
|
217
|
-
};
|
|
218
|
-
block: {
|
|
219
|
-
type: import("vue").PropType<boolean>;
|
|
220
|
-
};
|
|
221
|
-
plain: {
|
|
222
|
-
type: import("vue").PropType<boolean>;
|
|
223
|
-
};
|
|
224
215
|
nativeType: {
|
|
225
216
|
type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
226
217
|
default: string;
|
|
@@ -228,12 +219,21 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
228
219
|
loadingIcon: {
|
|
229
220
|
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
230
221
|
};
|
|
222
|
+
plain: {
|
|
223
|
+
type: import("vue").PropType<boolean>;
|
|
224
|
+
};
|
|
231
225
|
bg: {
|
|
232
226
|
type: import("vue").PropType<boolean>;
|
|
233
227
|
};
|
|
228
|
+
round: {
|
|
229
|
+
type: import("vue").PropType<boolean>;
|
|
230
|
+
};
|
|
234
231
|
autoInsertSpace: {
|
|
235
232
|
type: import("vue").PropType<boolean>;
|
|
236
233
|
};
|
|
234
|
+
block: {
|
|
235
|
+
type: import("vue").PropType<boolean>;
|
|
236
|
+
};
|
|
237
237
|
useThrottle: {
|
|
238
238
|
type: import("vue").PropType<boolean>;
|
|
239
239
|
default: boolean;
|
|
@@ -247,7 +247,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
247
247
|
}>, {
|
|
248
248
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
249
249
|
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
250
|
-
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "
|
|
250
|
+
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
251
251
|
disabled: import("vue").ComputedRef<boolean>;
|
|
252
252
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
253
253
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -13,7 +13,7 @@ export declare const useButton: (props: ButtonProps, emit: any) => {
|
|
|
13
13
|
}>;
|
|
14
14
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
15
15
|
_size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
16
|
-
_type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "
|
|
16
|
+
_type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
17
17
|
_ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
18
18
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
19
19
|
handleClick: (evt: MouseEvent) => void;
|
|
@@ -13,8 +13,8 @@ export declare const useAlphaSliderDOM: (props: AlphaSliderProps, { bar, thumb,
|
|
|
13
13
|
}>;
|
|
14
14
|
thumbKls: import("vue").ComputedRef<string>;
|
|
15
15
|
thumbStyle: import("vue").ComputedRef<{
|
|
16
|
-
left: string
|
|
17
|
-
top: string
|
|
16
|
+
left: string;
|
|
17
|
+
top: string;
|
|
18
18
|
}>;
|
|
19
19
|
update: () => void;
|
|
20
20
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DialogConfigContext } from 'vft/es/components';
|
|
1
2
|
import { type ButtonConfigContext } from 'vft/es/components/button';
|
|
2
3
|
import type { MessageConfigContext } from 'vft/es/components/message';
|
|
3
4
|
export interface ConfigProviderProps {
|
|
@@ -18,6 +19,7 @@ export interface ConfigProviderProps {
|
|
|
18
19
|
zIndex?: number;
|
|
19
20
|
/** Message 组件全局配置 */
|
|
20
21
|
message?: MessageConfigContext;
|
|
22
|
+
dialog?: DialogConfigContext;
|
|
21
23
|
projectCfg?: Record<string, any>;
|
|
22
24
|
button?: ButtonConfigContext;
|
|
23
25
|
baseUnit?: string | boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@vft/utils");require("../button/index.cjs");require("@vueuse/core");const d=require("./hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const f=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const r=require("./constants.cjs"),g=e.defineComponent({name:"vft-config-provider"}),h=e.defineComponent({...g,props:{theme:{default:"light"},themeVars:{},themeVarsDark:{},themeVarsLight:{},iconfontClass:{},iconifyPrefixClass:{default:"ico-"},namespace:{default:"vft"},zIndex:{},message:{},projectCfg:{},button:{},baseUnit:{type:[String,Boolean],default:!1},baseUnitSize:{default:1080}},setup(n){const c=f.useNamespace("config-provider");e.watch(()=>n.message,t=>{Object.keys(r.messageConfig).forEach(s=>{delete r.messageConfig[s]}),Object.assign(r.messageConfig,t??{})},{immediate:!0,deep:!0});const u=e.computed(()=>{const t=n.theme==="dark";return m({...n.themeVars,...t?n.themeVarsDark:n.themeVarsLight})});if(o.inBrowser){const t=()=>{document.documentElement.classList.add(n.theme)},s=(a=n.theme)=>{document.documentElement.classList.remove(a)};e.watch(()=>n.theme,(a,i)=>{i&&s(i),t()},{immediate:!0}),e.onActivated(t),e.onDeactivated(s),e.onBeforeUnmount(s)}function m(t){const s={};return Object.keys(t).forEach(a=>{s[`--${n.namespace}-${o.kebabCase(a)}`]=t[a]}),s}const l=e.getCurrentInstance();return d.provideGlobalConfig(l.props),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(c).b()),style:e.normalizeStyle(u.value)},[e.renderSlot(t.$slots,"default")],6))}});exports.default=h;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@vft/utils");require("../button/index.cjs");require("@vueuse/core");const d=require("./hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const f=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const r=require("./constants.cjs"),g=e.defineComponent({name:"vft-config-provider"}),h=e.defineComponent({...g,props:{theme:{default:"light"},themeVars:{},themeVarsDark:{},themeVarsLight:{},iconfontClass:{},iconifyPrefixClass:{default:"ico-"},namespace:{default:"vft"},zIndex:{},message:{},dialog:{},projectCfg:{},button:{},baseUnit:{type:[String,Boolean],default:!1},baseUnitSize:{default:1080}},setup(n){const c=f.useNamespace("config-provider");e.watch(()=>n.message,t=>{Object.keys(r.messageConfig).forEach(s=>{delete r.messageConfig[s]}),Object.assign(r.messageConfig,t??{})},{immediate:!0,deep:!0});const u=e.computed(()=>{const t=n.theme==="dark";return m({...n.themeVars,...t?n.themeVarsDark:n.themeVarsLight})});if(o.inBrowser){const t=()=>{document.documentElement.classList.add(n.theme)},s=(a=n.theme)=>{document.documentElement.classList.remove(a)};e.watch(()=>n.theme,(a,i)=>{i&&s(i),t()},{immediate:!0}),e.onActivated(t),e.onDeactivated(s),e.onBeforeUnmount(s)}function m(t){const s={};return Object.keys(t).forEach(a=>{s[`--${n.namespace}-${o.kebabCase(a)}`]=t[a]}),s}const l=e.getCurrentInstance();return d.provideGlobalConfig(l.props),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(c).b()),style:e.normalizeStyle(u.value)},[e.renderSlot(t.$slots,"default")],6))}});exports.default=h;
|
|
@@ -27,6 +27,9 @@ export declare const VftConfigProvider: import("vft/es/utils").SFCWithInstall<{
|
|
|
27
27
|
message: {
|
|
28
28
|
type: import("vue").PropType<import("vft/es/vft").MessageConfigContext>;
|
|
29
29
|
};
|
|
30
|
+
dialog: {
|
|
31
|
+
type: import("vue").PropType<import("vft/es/vft").DialogConfigContext>;
|
|
32
|
+
};
|
|
30
33
|
projectCfg: {
|
|
31
34
|
type: import("vue").PropType<Record<string, any>>;
|
|
32
35
|
};
|
|
@@ -74,6 +77,9 @@ export declare const VftConfigProvider: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
77
|
message: {
|
|
75
78
|
type: import("vue").PropType<import("vft/es/vft").MessageConfigContext>;
|
|
76
79
|
};
|
|
80
|
+
dialog: {
|
|
81
|
+
type: import("vue").PropType<import("vft/es/vft").DialogConfigContext>;
|
|
82
|
+
};
|
|
77
83
|
projectCfg: {
|
|
78
84
|
type: import("vue").PropType<Record<string, any>>;
|
|
79
85
|
};
|
|
@@ -118,6 +124,9 @@ export declare const VftConfigProvider: import("vft/es/utils").SFCWithInstall<{
|
|
|
118
124
|
message: {
|
|
119
125
|
type: import("vue").PropType<import("vft/es/vft").MessageConfigContext>;
|
|
120
126
|
};
|
|
127
|
+
dialog: {
|
|
128
|
+
type: import("vue").PropType<import("vft/es/vft").DialogConfigContext>;
|
|
129
|
+
};
|
|
121
130
|
projectCfg: {
|
|
122
131
|
type: import("vue").PropType<Record<string, any>>;
|
|
123
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("dialogInjectionKey");exports.dialogInjectionKey=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("dialogInjectionKey"),o="dialog-fade";exports.DEFAULT_DIALOG_TRANSITION=o;exports.dialogInjectionKey=e;
|