vft 0.0.294 → 0.0.296
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/button/index.d.ts +9 -9
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/menu/menu-item.vue2.js +38 -38
- package/es/components/menu/menu.vue2.js +1 -1
- package/es/components/menu/sub-menu.vue2.js +43 -43
- package/es/components/menu/types.d.ts +1 -0
- package/es/components/modal/index.d.ts +15 -15
- package/es/components/modal/modal.vue.d.ts +1 -1
- package/es/components/super-form/use/use-form-events.js +15 -14
- package/es/components/super-form/use/use-form-values.js +7 -6
- package/es/components/table/field.d.ts +4 -4
- package/es/components/table/field.js +41 -40
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/ns-cover.js +13 -13
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/menu/types.d.ts +1 -0
- package/lib/components/modal/index.d.ts +15 -15
- package/lib/components/modal/modal.vue.d.ts +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/super-form/use/use-form-values.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/field.d.ts +4 -4
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/ns-cover.cjs +1 -1
- package/package.json +5 -5
- package/web-types.json +1 -1
|
@@ -30,9 +30,6 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
30
30
|
dark: {
|
|
31
31
|
type: import("vue").PropType<boolean>;
|
|
32
32
|
};
|
|
33
|
-
bg: {
|
|
34
|
-
type: import("vue").PropType<boolean>;
|
|
35
|
-
};
|
|
36
33
|
loading: {
|
|
37
34
|
type: import("vue").PropType<boolean>;
|
|
38
35
|
};
|
|
@@ -56,6 +53,9 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
56
53
|
loadingIcon: {
|
|
57
54
|
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
58
55
|
};
|
|
56
|
+
bg: {
|
|
57
|
+
type: import("vue").PropType<boolean>;
|
|
58
|
+
};
|
|
59
59
|
autoInsertSpace: {
|
|
60
60
|
type: import("vue").PropType<boolean>;
|
|
61
61
|
};
|
|
@@ -120,9 +120,6 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
120
120
|
dark: {
|
|
121
121
|
type: import("vue").PropType<boolean>;
|
|
122
122
|
};
|
|
123
|
-
bg: {
|
|
124
|
-
type: import("vue").PropType<boolean>;
|
|
125
|
-
};
|
|
126
123
|
loading: {
|
|
127
124
|
type: import("vue").PropType<boolean>;
|
|
128
125
|
};
|
|
@@ -146,6 +143,9 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
146
143
|
loadingIcon: {
|
|
147
144
|
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
148
145
|
};
|
|
146
|
+
bg: {
|
|
147
|
+
type: import("vue").PropType<boolean>;
|
|
148
|
+
};
|
|
149
149
|
autoInsertSpace: {
|
|
150
150
|
type: import("vue").PropType<boolean>;
|
|
151
151
|
};
|
|
@@ -205,9 +205,6 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
205
205
|
dark: {
|
|
206
206
|
type: import("vue").PropType<boolean>;
|
|
207
207
|
};
|
|
208
|
-
bg: {
|
|
209
|
-
type: import("vue").PropType<boolean>;
|
|
210
|
-
};
|
|
211
208
|
loading: {
|
|
212
209
|
type: import("vue").PropType<boolean>;
|
|
213
210
|
};
|
|
@@ -231,6 +228,9 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
231
228
|
loadingIcon: {
|
|
232
229
|
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
233
230
|
};
|
|
231
|
+
bg: {
|
|
232
|
+
type: import("vue").PropType<boolean>;
|
|
233
|
+
};
|
|
234
234
|
autoInsertSpace: {
|
|
235
235
|
type: import("vue").PropType<boolean>;
|
|
236
236
|
};
|
|
@@ -53,8 +53,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
53
53
|
effect: "light" | "dark";
|
|
54
54
|
tabindex: number | string;
|
|
55
55
|
trigger: import("vft/es/components/tooltip").TooltipTriggerType;
|
|
56
|
-
loop: boolean;
|
|
57
56
|
teleported: boolean;
|
|
57
|
+
loop: boolean;
|
|
58
58
|
popperClass: string;
|
|
59
59
|
showTimeout: number;
|
|
60
60
|
hideTimeout: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, getCurrentInstance as F, useAttrs as O, inject as N, computed as a, reactive as q, onMounted as G, onBeforeUnmount as H, createElementBlock as
|
|
1
|
+
import { defineComponent as E, getCurrentInstance as F, useAttrs as O, inject as N, computed as a, reactive as q, onMounted as G, onBeforeUnmount as H, createElementBlock as p, openBlock as o, Fragment as k, createBlock as l, createCommentVNode as m, createElementVNode as b, unref as e, normalizeClass as M, withCtx as $, renderSlot as y, normalizeProps as I, mergeProps as V, createVNode as J } from "vue";
|
|
2
2
|
import { singleAttrToObj as K, renderTNode as L, VNode as Q } from "@vft/utils";
|
|
3
3
|
import { VftIcon as h } from "../icon/index.js";
|
|
4
4
|
import { VftDivider as j } from "../divider/index.js";
|
|
@@ -30,41 +30,41 @@ const X = ["title"], Y = E({
|
|
|
30
30
|
reverse: { type: Boolean }
|
|
31
31
|
},
|
|
32
32
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
33
|
-
setup(
|
|
34
|
-
const d = A("menu-item"), c = S, g = F(), T = O(), w = A("menu"), f = A("menu-item"), i =
|
|
35
|
-
!i && !
|
|
33
|
+
setup(t, { emit: S }) {
|
|
34
|
+
const d = A("menu-item"), c = S, g = F(), T = O(), w = A("menu"), f = A("menu-item"), i = t.isAloneUse ? null : N("rootMenu");
|
|
35
|
+
!i && !t.isAloneUse && P(d.b(), "can not inject root menu");
|
|
36
36
|
const { parentMenu: U, indexPath: B } = W(
|
|
37
37
|
g,
|
|
38
|
-
a(() =>
|
|
39
|
-
), v =
|
|
40
|
-
!v && !
|
|
41
|
-
const C = a(() =>
|
|
42
|
-
index:
|
|
38
|
+
a(() => t.index)
|
|
39
|
+
), v = t.isAloneUse ? null : N(`subMenu:${U.value.uid}`);
|
|
40
|
+
!v && !t.isAloneUse && P(d.b(), "can not inject sub menu");
|
|
41
|
+
const C = a(() => t.index === i?.activeIndex), s = q({
|
|
42
|
+
index: t.index,
|
|
43
43
|
indexPath: B,
|
|
44
44
|
active: C
|
|
45
45
|
}), x = () => {
|
|
46
|
-
|
|
46
|
+
t.disabled || (i?.handleMenuItemClick({
|
|
47
47
|
...T,
|
|
48
|
-
index:
|
|
48
|
+
index: t.index,
|
|
49
49
|
indexPath: B.value,
|
|
50
|
-
route:
|
|
51
|
-
}), c("click",
|
|
52
|
-
}, r = a(() => K(
|
|
50
|
+
route: t.route
|
|
51
|
+
}), c("click", s));
|
|
52
|
+
}, r = a(() => K(t.icon, "icon")), z = a(() => L(g, "title"));
|
|
53
53
|
return G(() => {
|
|
54
|
-
|
|
54
|
+
t.isAloneUse || (v?.addSubMenu(s), i?.addMenuItem(s));
|
|
55
55
|
}), H(() => {
|
|
56
|
-
|
|
57
|
-
}), (
|
|
58
|
-
|
|
56
|
+
t.isAloneUse || (v?.removeSubMenu(s), i?.removeMenuItem(s));
|
|
57
|
+
}), (n, u) => (o(), p(k, null, [
|
|
58
|
+
n.reverse && n.divider ? (o(), l(e(j), {
|
|
59
59
|
key: 0,
|
|
60
60
|
"margin-y": "0"
|
|
61
61
|
})) : m("", !0),
|
|
62
|
-
|
|
62
|
+
b("li", {
|
|
63
63
|
class: M([
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
n.className,
|
|
65
|
+
e(f).b(),
|
|
66
|
+
e(f).is("active", n.isAloneUse ? !1 : C.value),
|
|
67
|
+
e(f).is("disabled", n.disabled)
|
|
68
68
|
]),
|
|
69
69
|
onMouseenter: u[0] || (u[0] = (D) => c("mouseenter")),
|
|
70
70
|
onMouseleave: u[1] || (u[1] = (D) => c("mouseleave")),
|
|
@@ -72,37 +72,37 @@ const X = ["title"], Y = E({
|
|
|
72
72
|
tabindex: "-1",
|
|
73
73
|
onClick: x
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
e(U)?.type?.name === "vft-menu" && e(i)?.props.collapse && n.$slots.title ? (o(), l(e(R), {
|
|
76
76
|
key: 0,
|
|
77
77
|
placement: "right",
|
|
78
78
|
"fallback-placements": ["left"],
|
|
79
|
-
persistent:
|
|
79
|
+
persistent: e(i).props.persistent
|
|
80
80
|
}, {
|
|
81
81
|
content: $(() => [
|
|
82
|
-
y(
|
|
82
|
+
y(n.$slots, "title")
|
|
83
83
|
]),
|
|
84
84
|
default: $(() => [
|
|
85
|
-
|
|
86
|
-
class: M(
|
|
85
|
+
b("div", {
|
|
86
|
+
class: M(e(w).be("tooltip", "trigger"))
|
|
87
87
|
}, [
|
|
88
|
-
r.value?.icon ? (o(),
|
|
89
|
-
y(
|
|
88
|
+
r.value?.icon ? (o(), l(e(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
|
|
89
|
+
y(n.$slots, "default")
|
|
90
90
|
], 2)
|
|
91
91
|
]),
|
|
92
92
|
_: 3
|
|
93
|
-
})) : (o(), k
|
|
94
|
-
|
|
95
|
-
r.value?.icon ? (o(),
|
|
96
|
-
|
|
97
|
-
class: M(
|
|
98
|
-
title:
|
|
93
|
+
}, 8, ["persistent"])) : (o(), p(k, { key: 1 }, [
|
|
94
|
+
n.$slots?.default ? y(n.$slots, "default", { key: 0 }) : (o(), p(k, { key: 1 }, [
|
|
95
|
+
r.value?.icon ? (o(), l(e(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
|
|
96
|
+
b("span", {
|
|
97
|
+
class: M(e(d).e("text")),
|
|
98
|
+
title: n.title
|
|
99
99
|
}, [
|
|
100
|
-
J(
|
|
100
|
+
J(e(Q), { content: z.value }, null, 8, ["content"])
|
|
101
101
|
], 10, X)
|
|
102
102
|
], 64))
|
|
103
103
|
], 64))
|
|
104
104
|
], 34),
|
|
105
|
-
!
|
|
105
|
+
!n.reverse && n.divider ? (o(), l(e(j), {
|
|
106
106
|
key: 1,
|
|
107
107
|
"margin-y": "0"
|
|
108
108
|
})) : m("", !0)
|
|
@@ -28,7 +28,7 @@ const de = A({
|
|
|
28
28
|
collapseTransition: { type: Boolean, default: !0 },
|
|
29
29
|
ellipsis: { type: Boolean, default: !0 },
|
|
30
30
|
horizontalMenuProps: {},
|
|
31
|
-
persistent: { type: Boolean }
|
|
31
|
+
persistent: { type: Boolean, default: !0 }
|
|
32
32
|
},
|
|
33
33
|
emits: ["update:collapse", "sub-menu-click", "select", "close", "open"],
|
|
34
34
|
setup(n, { expose: E, emit: W }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as Z, getCurrentInstance as
|
|
2
|
-
import { singleAttrToObj as g, renderTNode as
|
|
3
|
-
import { VftTooltip as
|
|
1
|
+
import { defineComponent as Z, getCurrentInstance as le, computed as l, inject as D, ref as C, reactive as ue, watch as ae, provide as se, onMounted as re, onBeforeUnmount as ie, useSlots as ce, h as s, Fragment as pe, withDirectives as de, vShow as me } from "vue";
|
|
2
|
+
import { singleAttrToObj as g, renderTNode as ve, isMobile as fe } from "@vft/utils";
|
|
3
|
+
import { VftTooltip as Me } from "../tooltip/index.js";
|
|
4
4
|
import { VftIcon as L } from "../icon/index.js";
|
|
5
|
-
import { VftCollapseTransition as
|
|
5
|
+
import { VftCollapseTransition as be } from "../collapse-transition/index.js";
|
|
6
6
|
import { useTimeoutFn as H } from "@vueuse/core";
|
|
7
7
|
import { throwError as U } from "../../utils/error.js";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
@@ -11,13 +11,13 @@ import { useNamespace as w } from "../../hooks/use-namespace/index.js";
|
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import
|
|
15
|
-
import { useMenuCssVar as
|
|
16
|
-
const
|
|
14
|
+
import he from "./use-menu.js";
|
|
15
|
+
import { useMenuCssVar as Te } from "./use-menu-css-var.js";
|
|
16
|
+
const Ce = Z({
|
|
17
17
|
name: "vft-sub-menu",
|
|
18
18
|
inheritAttrs: !1
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
19
|
+
}), Oe = /* @__PURE__ */ Z({
|
|
20
|
+
...Ce,
|
|
21
21
|
props: {
|
|
22
22
|
index: {},
|
|
23
23
|
showTimeout: {
|
|
@@ -56,39 +56,39 @@ const Te = Z({
|
|
|
56
56
|
expose: q,
|
|
57
57
|
emit: G
|
|
58
58
|
}) {
|
|
59
|
-
const y = w("sub-menu"), I = G,
|
|
59
|
+
const y = w("sub-menu"), I = G, d = le(), {
|
|
60
60
|
indexPath: f,
|
|
61
61
|
parentMenu: k
|
|
62
|
-
} =
|
|
62
|
+
} = he(d, l(() => o.index)), i = w("menu"), u = w("sub-menu"), e = D("rootMenu");
|
|
63
63
|
e || U(y.b(), "can not inject root menu");
|
|
64
64
|
const r = D(`subMenu:${k.value.uid}`);
|
|
65
65
|
r || U(y.b(), "can not inject sub menu");
|
|
66
66
|
const S = C({});
|
|
67
67
|
let M;
|
|
68
|
-
const z = C(!1), J = C(), E = C(null), A = l(() =>
|
|
68
|
+
const z = C(!1), J = C(), E = C(null), A = l(() => p.value === "horizontal" && b.value ? "bottom-start" : "right-start"), b = l(() => r.level === 0), x = l(() => o.teleported === void 0 ? b.value : o.teleported), K = l(() => e.props.collapse ? `${i.namespace.value}-zoom-in-left` : `${i.namespace.value}-zoom-in-top`), Q = l(() => p.value === "horizontal" && b.value ? ["bottom-start", "bottom-end", "top-start", "top-end", "right-start", "left-start"] : ["right-start", "left-start", "bottom-start", "bottom-end", "top-start", "top-end"]), c = l(() => e.openedMenus.includes(o.index)), m = l(() => {
|
|
69
69
|
let t = !1;
|
|
70
70
|
return Object.values(S.value).forEach((a) => {
|
|
71
71
|
a.active && (t = !0);
|
|
72
72
|
}), o.index === e.activeIndex && (t = !0), t;
|
|
73
|
-
}), B = l(() => e.props.backgroundColor || ""), P = l(() => e.props.activeTextColor || ""), F = l(() => e.props.textColor || ""),
|
|
73
|
+
}), B = l(() => e.props.backgroundColor || ""), P = l(() => e.props.activeTextColor || ""), F = l(() => e.props.textColor || ""), p = l(() => e.props.mode), W = l(() => e.props.persistent), h = ue({
|
|
74
74
|
index: o.index,
|
|
75
75
|
indexPath: f,
|
|
76
|
-
active:
|
|
77
|
-
}), j =
|
|
76
|
+
active: m
|
|
77
|
+
}), j = Te(e.props, r.level + 1), $ = l(() => p.value !== "horizontal" ? {
|
|
78
78
|
color: F.value
|
|
79
79
|
} : {
|
|
80
|
-
borderBottomColor:
|
|
81
|
-
color:
|
|
82
|
-
}),
|
|
83
|
-
t ||
|
|
80
|
+
borderBottomColor: m.value ? e.props.activeTextColor ? P.value : "" : "transparent",
|
|
81
|
+
color: m.value ? P.value : F.value
|
|
82
|
+
}), X = () => E.value?.popperRef?.popperInstanceRef?.destroy(), Y = (t) => {
|
|
83
|
+
t || X();
|
|
84
84
|
}, O = (t) => {
|
|
85
85
|
const a = {
|
|
86
86
|
e: t,
|
|
87
87
|
index: o.index,
|
|
88
88
|
indexPath: f.value,
|
|
89
|
-
active:
|
|
89
|
+
active: m.value
|
|
90
90
|
};
|
|
91
|
-
if (e.props.menuTrigger === "hover" && e.props.mode === "horizontal" && !
|
|
91
|
+
if (e.props.menuTrigger === "hover" && e.props.mode === "horizontal" && !fe() || e.props.collapse && e.props.mode === "vertical" || o.disabled) {
|
|
92
92
|
e.handleSubMenuClick({
|
|
93
93
|
...a,
|
|
94
94
|
isFirstLevel: !0
|
|
@@ -102,11 +102,11 @@ const Te = Z({
|
|
|
102
102
|
} = H(() => {
|
|
103
103
|
e.openMenu(o.index, f.value);
|
|
104
104
|
}, a), x.value && k.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")), I("mouseenter", t)));
|
|
105
|
-
},
|
|
105
|
+
}, _ = () => {
|
|
106
106
|
e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseEnterTimer = setTimeout(() => {
|
|
107
107
|
e.inSubMenu = !0;
|
|
108
108
|
}, o.showTimeout + 10);
|
|
109
|
-
},
|
|
109
|
+
}, ee = () => {
|
|
110
110
|
e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseleaveTimer = setTimeout(() => {
|
|
111
111
|
e.inSubMenu = !1;
|
|
112
112
|
}, o.hideTimeout - 10);
|
|
@@ -115,16 +115,16 @@ const Te = Z({
|
|
|
115
115
|
stop: M
|
|
116
116
|
} = H(() => {
|
|
117
117
|
!z.value && e.closeMenu(o.index, f.value);
|
|
118
|
-
}, o.hideTimeout), x.value && a &&
|
|
118
|
+
}, o.hideTimeout), x.value && a && d.parent?.type.name === "vft-sub-menu" && r.handleMouseleave?.(t, !0), I("mouseleave", t));
|
|
119
119
|
};
|
|
120
|
-
|
|
120
|
+
ae(() => e.props.collapse, (t) => Y(!!t));
|
|
121
121
|
{
|
|
122
122
|
const t = (n) => {
|
|
123
123
|
S.value[n.index] = n;
|
|
124
124
|
}, a = (n) => {
|
|
125
125
|
delete S.value[n.index];
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
se(`subMenu:${d.uid}`, {
|
|
128
128
|
addSubMenu: t,
|
|
129
129
|
removeSubMenu: a,
|
|
130
130
|
handleMouseleave: T,
|
|
@@ -134,40 +134,40 @@ const Te = Z({
|
|
|
134
134
|
}
|
|
135
135
|
q({
|
|
136
136
|
opened: c
|
|
137
|
-
}), se(() => {
|
|
138
|
-
e.addSubMenu(h), r.addSubMenu(h);
|
|
139
137
|
}), re(() => {
|
|
138
|
+
e.addSubMenu(h), r.addSubMenu(h);
|
|
139
|
+
}), ie(() => {
|
|
140
140
|
r.removeSubMenu(h), e.removeSubMenu(h);
|
|
141
141
|
});
|
|
142
|
-
const V =
|
|
142
|
+
const V = ce(), N = l(() => g(o.icon, "icon")), oe = l(() => g(o.expandIcon, "icon")), te = l(() => g(o.collapseIcon, "icon")), ne = l(() => p.value === "horizontal" && b.value || p.value === "vertical" && !e.props.collapse ? {
|
|
143
143
|
icon: "icon-arrow-down",
|
|
144
144
|
size: 20,
|
|
145
|
-
...
|
|
145
|
+
...oe.value
|
|
146
146
|
} : {
|
|
147
147
|
icon: "icon-arrow-right",
|
|
148
148
|
size: 18,
|
|
149
|
-
...
|
|
150
|
-
}), R = l(() =>
|
|
149
|
+
...te.value
|
|
150
|
+
}), R = l(() => ve(d, "title"));
|
|
151
151
|
return () => {
|
|
152
152
|
const t = [N.value?.icon ? s(L, {
|
|
153
153
|
...N.value
|
|
154
154
|
}) : null, s("span", {
|
|
155
155
|
class: [u.e("text"), u.is("arrow", o.showArrow)],
|
|
156
|
-
title:
|
|
156
|
+
title: d.props.title
|
|
157
157
|
}, R.value), o.showArrow ? s(L, {
|
|
158
158
|
class: u.e("icon-arrow"),
|
|
159
|
-
...
|
|
159
|
+
...ne.value,
|
|
160
160
|
style: {
|
|
161
161
|
transform: c.value ? "rotateZ(180deg)" : "none"
|
|
162
162
|
}
|
|
163
|
-
}) : !1], a = e.isMenuPopup ? s(
|
|
163
|
+
}) : !1], a = e.isMenuPopup ? s(Me, {
|
|
164
164
|
ref: E,
|
|
165
165
|
visible: c.value,
|
|
166
166
|
effect: "light",
|
|
167
167
|
pure: !0,
|
|
168
168
|
offset: o.popperOffset,
|
|
169
169
|
showArrow: !1,
|
|
170
|
-
persistent:
|
|
170
|
+
persistent: W.value,
|
|
171
171
|
popperClass: o.popperClass,
|
|
172
172
|
placement: A.value,
|
|
173
173
|
teleported: x.value,
|
|
@@ -177,7 +177,7 @@ const Te = Z({
|
|
|
177
177
|
...o.toolTipCfg
|
|
178
178
|
}, {
|
|
179
179
|
content: () => s("div", {
|
|
180
|
-
class: [i.m(
|
|
180
|
+
class: [i.m(p.value), i.m("popup-container"), o.popperClass],
|
|
181
181
|
onMouseenter: (n) => v(n, 100),
|
|
182
182
|
onMouseleave: (n) => T(n, !0),
|
|
183
183
|
onFocus: (n) => v(n, 100)
|
|
@@ -196,14 +196,14 @@ const Te = Z({
|
|
|
196
196
|
}, t)
|
|
197
197
|
}) : (
|
|
198
198
|
// 以下是无需 tooltip 渲染的组件,通常是侧边栏没有折叠的时候
|
|
199
|
-
s(
|
|
199
|
+
s(pe, {}, [R.value ? s("div", {
|
|
200
200
|
class: u.e("title"),
|
|
201
201
|
style: [$.value, {
|
|
202
202
|
backgroundColor: B.value
|
|
203
203
|
}],
|
|
204
204
|
ref: J,
|
|
205
205
|
onClick: O
|
|
206
|
-
}, t) : null, s(
|
|
206
|
+
}, t) : null, s(be, {}, {
|
|
207
207
|
default: () => de(s("ul", {
|
|
208
208
|
role: "menu",
|
|
209
209
|
class: [i.b(), i.m("inline")],
|
|
@@ -212,17 +212,17 @@ const Te = Z({
|
|
|
212
212
|
})])
|
|
213
213
|
);
|
|
214
214
|
return s("li", {
|
|
215
|
-
class: [u.b(), u.is("active",
|
|
215
|
+
class: [u.b(), u.is("active", m.value), u.e(String(r.level)), u.is("in-popup", r.level !== 0), u.is("opened", c.value), u.is("arrow", !0), u.is("disabled", o.disabled)],
|
|
216
216
|
role: "menuitem",
|
|
217
217
|
ariaHaspopup: !0,
|
|
218
218
|
ariaExpanded: c.value,
|
|
219
|
-
onMouseenter: [
|
|
220
|
-
onMouseleave: [
|
|
219
|
+
onMouseenter: [_, (n) => v(n)],
|
|
220
|
+
onMouseleave: [ee, (n) => T(n, !0)],
|
|
221
221
|
onFocus: v
|
|
222
222
|
}, [a]);
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
export {
|
|
227
|
-
|
|
227
|
+
Oe as default
|
|
228
228
|
};
|
|
@@ -30,10 +30,6 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
30
30
|
type: import("vue").PropType<boolean>;
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
|
-
trapFocus: {
|
|
34
|
-
type: import("vue").PropType<boolean>;
|
|
35
|
-
default: boolean;
|
|
36
|
-
};
|
|
37
33
|
closeOnPressEscape: {
|
|
38
34
|
type: import("vue").PropType<boolean>;
|
|
39
35
|
default: boolean;
|
|
@@ -90,6 +86,10 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
90
86
|
modalClass: {
|
|
91
87
|
type: import("vue").PropType<string>;
|
|
92
88
|
};
|
|
89
|
+
trapFocus: {
|
|
90
|
+
type: import("vue").PropType<boolean>;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
93
|
showSubmitButton: {
|
|
94
94
|
type: import("vue").PropType<boolean>;
|
|
95
95
|
default: boolean;
|
|
@@ -119,7 +119,6 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
119
119
|
fullscreen: boolean;
|
|
120
120
|
draggable: boolean;
|
|
121
121
|
modelValue: boolean;
|
|
122
|
-
trapFocus: boolean;
|
|
123
122
|
closeOnPressEscape: boolean;
|
|
124
123
|
showClose: boolean;
|
|
125
124
|
customClass: string;
|
|
@@ -131,6 +130,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
131
130
|
modal: boolean;
|
|
132
131
|
openDelay: number;
|
|
133
132
|
closeDelay: number;
|
|
133
|
+
trapFocus: boolean;
|
|
134
134
|
showSubmitButton: boolean;
|
|
135
135
|
showActionButtonGroup: boolean;
|
|
136
136
|
showCancelButton: boolean;
|
|
@@ -171,10 +171,6 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
171
171
|
type: import("vue").PropType<boolean>;
|
|
172
172
|
default: boolean;
|
|
173
173
|
};
|
|
174
|
-
trapFocus: {
|
|
175
|
-
type: import("vue").PropType<boolean>;
|
|
176
|
-
default: boolean;
|
|
177
|
-
};
|
|
178
174
|
closeOnPressEscape: {
|
|
179
175
|
type: import("vue").PropType<boolean>;
|
|
180
176
|
default: boolean;
|
|
@@ -231,6 +227,10 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
231
227
|
modalClass: {
|
|
232
228
|
type: import("vue").PropType<string>;
|
|
233
229
|
};
|
|
230
|
+
trapFocus: {
|
|
231
|
+
type: import("vue").PropType<boolean>;
|
|
232
|
+
default: boolean;
|
|
233
|
+
};
|
|
234
234
|
showSubmitButton: {
|
|
235
235
|
type: import("vue").PropType<boolean>;
|
|
236
236
|
default: boolean;
|
|
@@ -260,7 +260,6 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
260
260
|
fullscreen: boolean;
|
|
261
261
|
draggable: boolean;
|
|
262
262
|
modelValue: boolean;
|
|
263
|
-
trapFocus: boolean;
|
|
264
263
|
closeOnPressEscape: boolean;
|
|
265
264
|
showClose: boolean;
|
|
266
265
|
customClass: string;
|
|
@@ -272,6 +271,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
272
271
|
modal: boolean;
|
|
273
272
|
openDelay: number;
|
|
274
273
|
closeDelay: number;
|
|
274
|
+
trapFocus: boolean;
|
|
275
275
|
showSubmitButton: boolean;
|
|
276
276
|
showActionButtonGroup: boolean;
|
|
277
277
|
showCancelButton: boolean;
|
|
@@ -309,10 +309,6 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
309
309
|
type: import("vue").PropType<boolean>;
|
|
310
310
|
default: boolean;
|
|
311
311
|
};
|
|
312
|
-
trapFocus: {
|
|
313
|
-
type: import("vue").PropType<boolean>;
|
|
314
|
-
default: boolean;
|
|
315
|
-
};
|
|
316
312
|
closeOnPressEscape: {
|
|
317
313
|
type: import("vue").PropType<boolean>;
|
|
318
314
|
default: boolean;
|
|
@@ -369,6 +365,10 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
369
365
|
modalClass: {
|
|
370
366
|
type: import("vue").PropType<string>;
|
|
371
367
|
};
|
|
368
|
+
trapFocus: {
|
|
369
|
+
type: import("vue").PropType<boolean>;
|
|
370
|
+
default: boolean;
|
|
371
|
+
};
|
|
372
372
|
showSubmitButton: {
|
|
373
373
|
type: import("vue").PropType<boolean>;
|
|
374
374
|
default: boolean;
|
|
@@ -398,7 +398,6 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
398
398
|
fullscreen: boolean;
|
|
399
399
|
draggable: boolean;
|
|
400
400
|
modelValue: boolean;
|
|
401
|
-
trapFocus: boolean;
|
|
402
401
|
closeOnPressEscape: boolean;
|
|
403
402
|
showClose: boolean;
|
|
404
403
|
customClass: string;
|
|
@@ -410,6 +409,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
410
409
|
modal: boolean;
|
|
411
410
|
openDelay: number;
|
|
412
411
|
closeDelay: number;
|
|
412
|
+
trapFocus: boolean;
|
|
413
413
|
showSubmitButton: boolean;
|
|
414
414
|
showActionButtonGroup: boolean;
|
|
415
415
|
showCancelButton: boolean;
|
|
@@ -57,7 +57,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
57
57
|
fullscreen: boolean;
|
|
58
58
|
draggable: boolean;
|
|
59
59
|
modelValue: boolean;
|
|
60
|
-
trapFocus: boolean;
|
|
61
60
|
closeOnPressEscape: boolean;
|
|
62
61
|
showClose: boolean;
|
|
63
62
|
customClass: string;
|
|
@@ -69,6 +68,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
69
68
|
modal: boolean;
|
|
70
69
|
openDelay: number;
|
|
71
70
|
closeDelay: number;
|
|
71
|
+
trapFocus: boolean;
|
|
72
72
|
showSubmitButton: boolean;
|
|
73
73
|
showActionButtonGroup: boolean;
|
|
74
74
|
showCancelButton: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isDef as U, isFunction as j, isString as A, isObject as w, isArray as V, deepMerge as tt, findDifferentValuesForObj as et, isNullOrUndefined as z, isEmpty as nt, isEmptyObject as it } from "@vft/utils";
|
|
2
|
+
import { formatToDate as G } from "@vft/utils/date";
|
|
2
3
|
import { get as rt, cloneDeep as I, uniqBy as st, isEqual as ct, set as J } from "lodash-es";
|
|
3
4
|
import { unref as r, toRaw as B, nextTick as H } from "vue";
|
|
4
5
|
import { isInput as at, FormCompEnum as x, isDatePicker as ot } from "../component-map.js";
|
|
@@ -33,7 +34,7 @@ function ft(p, v = {}) {
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function Dt({
|
|
37
38
|
emit: p,
|
|
38
39
|
getProps: v,
|
|
39
40
|
formModel: a,
|
|
@@ -75,21 +76,21 @@ function Ft({
|
|
|
75
76
|
if (R(e))
|
|
76
77
|
if (Array.isArray(f)) {
|
|
77
78
|
const F = [];
|
|
78
|
-
for (const
|
|
79
|
-
F.push(
|
|
79
|
+
for (const m of f)
|
|
80
|
+
F.push(m ? G(m) : null);
|
|
80
81
|
r(a)[e] = F;
|
|
81
82
|
} else
|
|
82
|
-
r(a)[e] = f ? D?.valueFormat ? f :
|
|
83
|
+
r(a)[e] = f ? D?.valueFormat ? f : G(f) : null;
|
|
83
84
|
else
|
|
84
85
|
r(a)[e] = f;
|
|
85
86
|
D?.onChange && D?.onChange(f), s.push(e);
|
|
86
87
|
} else
|
|
87
88
|
i.forEach((f) => {
|
|
88
89
|
try {
|
|
89
|
-
const F = f.split(".").reduce((
|
|
90
|
-
|
|
90
|
+
const F = f.split(".").reduce((m, M) => m[M], t);
|
|
91
|
+
U(F) && (r(a)[f] = r(F), s.push(f));
|
|
91
92
|
} catch {
|
|
92
|
-
|
|
93
|
+
U(y.value[f]) && (r(a)[f] = I(
|
|
93
94
|
r(y.value[f])
|
|
94
95
|
));
|
|
95
96
|
}
|
|
@@ -116,7 +117,7 @@ function Ft({
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
async function X(t, n, c = !1) {
|
|
119
|
-
const i = I(r(d)), s = i.findIndex((o) => o.field === n), e =
|
|
120
|
+
const i = I(r(d)), s = i.findIndex((o) => o.field === n), e = w(t) ? [t] : t;
|
|
120
121
|
if (!n || s === -1 || c) {
|
|
121
122
|
c ? i.unshift(...e) : i.push(...e), h.value = i, g(t);
|
|
122
123
|
return;
|
|
@@ -125,7 +126,7 @@ function Ft({
|
|
|
125
126
|
}
|
|
126
127
|
async function Y(t) {
|
|
127
128
|
let n = [];
|
|
128
|
-
if (
|
|
129
|
+
if (w(t) && n.push(t), V(t) && (n = [...t]), !n.every(
|
|
129
130
|
(i) => i.type === x.DIVIDER || Reflect.has(i, "field") && i.field
|
|
130
131
|
)) {
|
|
131
132
|
console.error(
|
|
@@ -137,7 +138,7 @@ function Ft({
|
|
|
137
138
|
}
|
|
138
139
|
async function Z(t) {
|
|
139
140
|
let n = [];
|
|
140
|
-
if (
|
|
141
|
+
if (w(t) && n.push(t), V(t) && (n = [...t]), !n.every(
|
|
141
142
|
(e) => e.type === x.DIVIDER || Reflect.has(e, "field") && e.field
|
|
142
143
|
)) {
|
|
143
144
|
console.error(
|
|
@@ -161,10 +162,10 @@ function Ft({
|
|
|
161
162
|
if (V(n) && n?.length === 0)
|
|
162
163
|
return;
|
|
163
164
|
let c = [];
|
|
164
|
-
|
|
165
|
+
w(t) && c.push(t), V(t) && (c = [...t]);
|
|
165
166
|
const i = {}, s = T();
|
|
166
167
|
c.forEach((e) => {
|
|
167
|
-
e.type !== x.DIVIDER && Reflect.has(e, "field") && e.field && !
|
|
168
|
+
e.type !== x.DIVIDER && Reflect.has(e, "field") && e.field && !z(e.defaultValue) && (!(e.field in s) || z(s[e.field]) || nt(s[e.field])) && (i[e.field] = e.defaultValue);
|
|
168
169
|
}), it(i) || _(i);
|
|
169
170
|
}
|
|
170
171
|
function T() {
|
|
@@ -227,5 +228,5 @@ function Ft({
|
|
|
227
228
|
};
|
|
228
229
|
}
|
|
229
230
|
export {
|
|
230
|
-
|
|
231
|
+
Dt as useFormEvents
|
|
231
232
|
};
|