vft 0.0.135 → 0.0.136
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/backtop/backtop.vue2.js +3 -2
- package/es/components/button/use-button.js +3 -3
- package/es/components/context-menu/context-menu.vue2.js +3 -2
- package/es/components/footer-layout/footer-layout.vue2.js +3 -2
- package/es/components/header-layout/header-layout.vue2.js +3 -2
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +164 -162
- package/es/components/infinite-scroll/index.d.ts +26 -0
- package/es/components/infinite-scroll/index.js +10 -0
- package/es/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/es/components/infinite-scroll/infinite-scroll.js +92 -0
- package/es/components/infinite-scroll/style/css.d.ts +0 -0
- package/es/components/infinite-scroll/style/css.js +2 -0
- package/es/components/infinite-scroll/style/index.d.ts +0 -0
- package/es/components/infinite-scroll/style/index.js +2 -0
- package/es/components/md-container/md-container.vue2.js +3 -2
- package/es/components/menu/menu-item.vue2.js +21 -20
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/modal/modal-footer-action.vue2.js +3 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +3 -2
- package/es/components/result/result.vue2.js +3 -2
- package/es/components/side-menu/side-menu.vue2.js +3 -2
- package/es/components/super-form/component-map.js +11 -10
- package/es/components/super-form/super-form-action.vue2.js +3 -2
- package/es/components/super-form/super-form-item.vue2.js +35 -34
- package/es/components/super-form/super-form.vue2.js +14 -13
- package/es/components/table/field.js +19 -18
- package/es/components/tabs/tab-nav.vue2.js +3 -2
- package/es/index.js +279 -277
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/infinite-scroll/index.cjs +1 -0
- package/lib/components/infinite-scroll/index.d.ts +26 -0
- package/lib/components/infinite-scroll/infinite-scroll.cjs +1 -0
- package/lib/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/lib/components/infinite-scroll/style/css.cjs +1 -0
- package/lib/components/infinite-scroll/style/css.d.ts +0 -0
- package/lib/components/infinite-scroll/style/index.cjs +1 -0
- package/lib/components/infinite-scroll/style/index.d.ts +0 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +3 -3
- package/web-types.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { nextTick as p } from "vue";
|
|
2
|
+
import { isFunction as H } from "@vft/utils";
|
|
3
|
+
import { throttle as v } from "lodash";
|
|
4
|
+
import { getOffsetTopDistance as L } from "../../utils/dom/position.js";
|
|
5
|
+
import { getScrollContainer as N } from "../../utils/dom/scroll.js";
|
|
6
|
+
import { throwError as w } from "../../utils/error.js";
|
|
7
|
+
import "../../utils/ns-cover.js";
|
|
8
|
+
import "@vueuse/core";
|
|
9
|
+
const i = "VftInfiniteScroll", A = 50, O = 200, C = 0, D = {
|
|
10
|
+
delay: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: O
|
|
13
|
+
},
|
|
14
|
+
distance: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: C
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
immediate: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
}
|
|
26
|
+
}, b = (t, e) => Object.entries(D).reduce((n, [o, c]) => {
|
|
27
|
+
const { type: a, default: s } = c, l = t.getAttribute(`infinite-scroll-${o}`);
|
|
28
|
+
let r = e[l] ?? l ?? s;
|
|
29
|
+
return r = r === "false" ? !1 : r, r = a(r), n[o] = Number.isNaN(r) ? s : r, n;
|
|
30
|
+
}, {}), g = (t) => {
|
|
31
|
+
const { observer: e } = t[i];
|
|
32
|
+
e && (e.disconnect(), delete t[i].observer);
|
|
33
|
+
}, F = (t, e) => {
|
|
34
|
+
const { container: n, containerEl: o, instance: c, observer: a, lastScrollTop: s } = t[i], { disabled: l, distance: r } = b(t, c), { clientHeight: u, scrollHeight: h, scrollTop: d } = o, E = d - s;
|
|
35
|
+
if (t[i].lastScrollTop = d, a || l || E < 0)
|
|
36
|
+
return;
|
|
37
|
+
let f = !1;
|
|
38
|
+
if (n === t)
|
|
39
|
+
f = h - (u + d) <= r;
|
|
40
|
+
else {
|
|
41
|
+
const { clientTop: T, scrollHeight: S } = t, y = L(t, o);
|
|
42
|
+
f = d + u >= y + T + S - r;
|
|
43
|
+
}
|
|
44
|
+
f && e.call(c);
|
|
45
|
+
};
|
|
46
|
+
function m(t, e) {
|
|
47
|
+
const { containerEl: n, instance: o } = t[i], { disabled: c } = b(t, o);
|
|
48
|
+
c || n.clientHeight === 0 || (n.scrollHeight <= n.clientHeight ? e.call(o) : g(t));
|
|
49
|
+
}
|
|
50
|
+
const K = {
|
|
51
|
+
async mounted(t, e) {
|
|
52
|
+
const { instance: n, value: o } = e;
|
|
53
|
+
H(o) || w(i, "'v-infinite-scroll' binding value must be a function"), await p();
|
|
54
|
+
const { delay: c, immediate: a } = b(t, n), s = N(t, !0), l = s === window ? document.documentElement : s, r = v(F.bind(null, t, o), c);
|
|
55
|
+
if (s) {
|
|
56
|
+
if (t[i] = {
|
|
57
|
+
instance: n,
|
|
58
|
+
container: s,
|
|
59
|
+
containerEl: l,
|
|
60
|
+
delay: c,
|
|
61
|
+
cb: o,
|
|
62
|
+
onScroll: r,
|
|
63
|
+
lastScrollTop: l.scrollTop
|
|
64
|
+
}, a) {
|
|
65
|
+
const u = new MutationObserver(
|
|
66
|
+
v(m.bind(null, t, o), A)
|
|
67
|
+
);
|
|
68
|
+
t[i].observer = u, u.observe(t, { childList: !0, subtree: !0 }), m(t, o);
|
|
69
|
+
}
|
|
70
|
+
s.addEventListener("scroll", r);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
unmounted(t) {
|
|
74
|
+
const { container: e, onScroll: n } = t[i];
|
|
75
|
+
e == null || e.removeEventListener("scroll", n), g(t);
|
|
76
|
+
},
|
|
77
|
+
async updated(t) {
|
|
78
|
+
if (!t[i])
|
|
79
|
+
await p();
|
|
80
|
+
else {
|
|
81
|
+
const { containerEl: e, cb: n, observer: o } = t[i];
|
|
82
|
+
e.clientHeight && o && m(t, n);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
A as CHECK_INTERVAL,
|
|
88
|
+
O as DEFAULT_DELAY,
|
|
89
|
+
C as DEFAULT_DISTANCE,
|
|
90
|
+
i as SCOPE,
|
|
91
|
+
K as default
|
|
92
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -93,6 +93,7 @@ import { useNamespace as tt } from "../../hooks/use-namespace/index.js";
|
|
|
93
93
|
import "@popperjs/core";
|
|
94
94
|
import "../../hooks/use-z-index/index.js";
|
|
95
95
|
import "../message/index.js";
|
|
96
|
+
import "../infinite-scroll/index.js";
|
|
96
97
|
import ot from "./toc.js";
|
|
97
98
|
import { useCopyCode as et } from "./use/useCopyCode.js";
|
|
98
99
|
import { useActiveHeaderLinks as it } from "./use/useActiveHeaderLinks.js";
|
|
@@ -108,7 +109,7 @@ const mt = { class: "info-container" }, pt = {
|
|
|
108
109
|
tt("md-container")
|
|
109
110
|
), ct = D({
|
|
110
111
|
name: "vft-md-container"
|
|
111
|
-
}),
|
|
112
|
+
}), pe = /* @__PURE__ */ D({
|
|
112
113
|
...ct,
|
|
113
114
|
setup(lt, { expose: w }) {
|
|
114
115
|
const u = $(), { initPhotoSwipe: E } = J(`.${p.e("content")} img`);
|
|
@@ -207,5 +208,5 @@ const mt = { class: "info-container" }, pt = {
|
|
|
207
208
|
}
|
|
208
209
|
});
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
pe as default
|
|
211
212
|
};
|
|
@@ -92,15 +92,16 @@ import { useNamespace as U } from "../../hooks/use-namespace/index.js";
|
|
|
92
92
|
import "@popperjs/core";
|
|
93
93
|
import "../../hooks/use-z-index/index.js";
|
|
94
94
|
import "../message/index.js";
|
|
95
|
+
import "../infinite-scroll/index.js";
|
|
95
96
|
import _ from "./use-menu.js";
|
|
96
|
-
const
|
|
97
|
+
const tt = ["title"], g = (
|
|
97
98
|
/* hoist-static*/
|
|
98
99
|
U("menu-item")
|
|
99
|
-
),
|
|
100
|
+
), et = Y({
|
|
100
101
|
name: "vft-menu-item",
|
|
101
102
|
inheritAttrs: !1
|
|
102
|
-
}),
|
|
103
|
-
...
|
|
103
|
+
}), He = /* @__PURE__ */ Y({
|
|
104
|
+
...et,
|
|
104
105
|
props: {
|
|
105
106
|
index: {},
|
|
106
107
|
route: {},
|
|
@@ -113,27 +114,27 @@ const ee = ["title"], g = (
|
|
|
113
114
|
reverse: { type: Boolean }
|
|
114
115
|
},
|
|
115
116
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
116
|
-
setup(
|
|
117
|
-
const B = G(), D = H(), F = U("menu"), f = U("menu-item"),
|
|
118
|
-
!
|
|
119
|
-
const { parentMenu: C, indexPath: N } = _(B, u(() =>
|
|
120
|
-
!m && !
|
|
121
|
-
const $ = u(() =>
|
|
122
|
-
index:
|
|
117
|
+
setup(e, { emit: c }) {
|
|
118
|
+
const B = G(), D = H(), F = U("menu"), f = U("menu-item"), t = e.isAloneUse ? null : P("rootMenu");
|
|
119
|
+
!t && !e.isAloneUse && z(g.b(), "can not inject root menu");
|
|
120
|
+
const { parentMenu: C, indexPath: N } = _(B, u(() => e.index)), m = e.isAloneUse ? null : P(`subMenu:${C.value.uid}`);
|
|
121
|
+
!m && !e.isAloneUse && z(g.b(), "can not inject sub menu");
|
|
122
|
+
const $ = u(() => e.index === (t == null ? void 0 : t.activeIndex)), n = J({
|
|
123
|
+
index: e.index,
|
|
123
124
|
indexPath: N,
|
|
124
125
|
active: $
|
|
125
126
|
}), O = () => {
|
|
126
|
-
|
|
127
|
+
e.disabled || (t == null || t.handleMenuItemClick({
|
|
127
128
|
...D,
|
|
128
|
-
index:
|
|
129
|
+
index: e.index,
|
|
129
130
|
indexPath: N.value,
|
|
130
|
-
route:
|
|
131
|
+
route: e.route
|
|
131
132
|
}), c("click", n));
|
|
132
|
-
}, l = u(() => R(
|
|
133
|
+
}, l = u(() => R(e.icon, "icon")), q = u(() => W(B, "title"));
|
|
133
134
|
return K(() => {
|
|
134
|
-
|
|
135
|
+
e.isAloneUse || (m == null || m.addSubMenu(n), t == null || t.addMenuItem(n));
|
|
135
136
|
}), L(() => {
|
|
136
|
-
|
|
137
|
+
e.isAloneUse || (m == null || m.removeSubMenu(n), t == null || t.removeMenuItem(n));
|
|
137
138
|
}), (i, s) => {
|
|
138
139
|
var I, V, h, j, M;
|
|
139
140
|
return r(), v(k, null, [
|
|
@@ -154,7 +155,7 @@ const ee = ["title"], g = (
|
|
|
154
155
|
tabindex: "-1",
|
|
155
156
|
onClick: O
|
|
156
157
|
}, [
|
|
157
|
-
((V = (I = o(C)) == null ? void 0 : I.type) == null ? void 0 : V.name) === "vft-menu" && ((h = o(
|
|
158
|
+
((V = (I = o(C)) == null ? void 0 : I.type) == null ? void 0 : V.name) === "vft-menu" && ((h = o(t)) != null && h.props.collapse) && i.$slots.title ? (r(), p(o(Z), {
|
|
158
159
|
key: 0,
|
|
159
160
|
placement: "right",
|
|
160
161
|
"fallback-placements": ["left"],
|
|
@@ -183,7 +184,7 @@ const ee = ["title"], g = (
|
|
|
183
184
|
title: i.title
|
|
184
185
|
}, [
|
|
185
186
|
Q(o(X), { content: q.value }, null, 8, ["content"])
|
|
186
|
-
], 10,
|
|
187
|
+
], 10, tt)
|
|
187
188
|
], 64))
|
|
188
189
|
], 64))
|
|
189
190
|
], 34),
|
|
@@ -196,5 +197,5 @@ const ee = ["title"], g = (
|
|
|
196
197
|
}
|
|
197
198
|
});
|
|
198
199
|
export {
|
|
199
|
-
|
|
200
|
+
He as default
|
|
200
201
|
};
|
|
@@ -92,6 +92,7 @@ import { useNamespace as k } from "../../hooks/use-namespace/index.js";
|
|
|
92
92
|
import "@popperjs/core";
|
|
93
93
|
import "../../hooks/use-z-index/index.js";
|
|
94
94
|
import "../message/index.js";
|
|
95
|
+
import "../infinite-scroll/index.js";
|
|
95
96
|
import he from "./use-menu.js";
|
|
96
97
|
import { useMenuCssVar as Te } from "./use-menu-css-var.js";
|
|
97
98
|
const q = (
|
|
@@ -100,7 +101,7 @@ const q = (
|
|
|
100
101
|
), Ce = G({
|
|
101
102
|
name: "vft-sub-menu",
|
|
102
103
|
inheritAttrs: !1
|
|
103
|
-
}),
|
|
104
|
+
}), mt = /* @__PURE__ */ G({
|
|
104
105
|
...Ce,
|
|
105
106
|
props: {
|
|
106
107
|
index: {},
|
|
@@ -315,5 +316,5 @@ const q = (
|
|
|
315
316
|
}
|
|
316
317
|
});
|
|
317
318
|
export {
|
|
318
|
-
|
|
319
|
+
mt as default
|
|
319
320
|
};
|
|
@@ -91,7 +91,8 @@ import { useNamespace as h } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
-
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
95
|
+
const ao = /* @__PURE__ */ O({
|
|
95
96
|
__name: "modal-footer-action",
|
|
96
97
|
props: {
|
|
97
98
|
showSubmitButton: { type: Boolean },
|
|
@@ -133,5 +134,5 @@ const so = /* @__PURE__ */ O({
|
|
|
133
134
|
}
|
|
134
135
|
});
|
|
135
136
|
export {
|
|
136
|
-
|
|
137
|
+
ao as default
|
|
137
138
|
};
|
|
@@ -94,6 +94,7 @@ import { useNamespace as Q } from "../../hooks/use-namespace/index.js";
|
|
|
94
94
|
import "@popperjs/core";
|
|
95
95
|
import "../../hooks/use-z-index/index.js";
|
|
96
96
|
import "../message/index.js";
|
|
97
|
+
import "../infinite-scroll/index.js";
|
|
97
98
|
import X from "hotkeys-js";
|
|
98
99
|
import { onBeforeRouteLeave as Y } from "vue-router";
|
|
99
100
|
import Z from "./tab-content.vue2.js";
|
|
@@ -103,7 +104,7 @@ const ot = (
|
|
|
103
104
|
Q("multiple-tabs")
|
|
104
105
|
), rt = P({
|
|
105
106
|
name: "vft-multiple-tabs"
|
|
106
|
-
}),
|
|
107
|
+
}), Ye = /* @__PURE__ */ P({
|
|
107
108
|
...rt,
|
|
108
109
|
props: {
|
|
109
110
|
tabsStyle: {},
|
|
@@ -224,5 +225,5 @@ const ot = (
|
|
|
224
225
|
}
|
|
225
226
|
});
|
|
226
227
|
export {
|
|
227
|
-
|
|
228
|
+
Ye as default
|
|
228
229
|
};
|
|
@@ -91,12 +91,13 @@ import { useNamespace as C } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
const i = (
|
|
95
96
|
/* hoist-static*/
|
|
96
97
|
C("result")
|
|
97
98
|
), I = c({
|
|
98
99
|
name: "vft-result"
|
|
99
|
-
}),
|
|
100
|
+
}), no = /* @__PURE__ */ c({
|
|
100
101
|
...I,
|
|
101
102
|
props: {
|
|
102
103
|
title: {},
|
|
@@ -135,5 +136,5 @@ const i = (
|
|
|
135
136
|
}
|
|
136
137
|
});
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
+
no as default
|
|
139
140
|
};
|
|
@@ -93,6 +93,7 @@ import { useNamespace as be } from "../../hooks/use-namespace/index.js";
|
|
|
93
93
|
import "@popperjs/core";
|
|
94
94
|
import "../../hooks/use-z-index/index.js";
|
|
95
95
|
import "../message/index.js";
|
|
96
|
+
import "../infinite-scroll/index.js";
|
|
96
97
|
import { useDragLine as ye } from "./use-drag-line.js";
|
|
97
98
|
const u = (
|
|
98
99
|
/* hoist-static*/
|
|
@@ -103,7 +104,7 @@ function Ce(b) {
|
|
|
103
104
|
}
|
|
104
105
|
const Me = I({
|
|
105
106
|
name: "vft-side-menu"
|
|
106
|
-
}),
|
|
107
|
+
}), mo = /* @__PURE__ */ I({
|
|
107
108
|
...Me,
|
|
108
109
|
props: {
|
|
109
110
|
isFixedLeft: {
|
|
@@ -361,5 +362,5 @@ const Me = I({
|
|
|
361
362
|
}
|
|
362
363
|
});
|
|
363
364
|
export {
|
|
364
|
-
|
|
365
|
+
mo as default
|
|
365
366
|
};
|
|
@@ -91,6 +91,7 @@ import "../config-provider/hooks/use-global-config.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
var T = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.INPUT_NUMBER = "input-number", t.INPUT_NUMBER_STEP = "input-number-step", t.PASSWORD = "password", t.TEXTAREA = "textarea", t.DIVIDER = "divider", t.SELECT = "select", t.SEARCH = "search", t.RADIO = "radio", t.RADIO_SINGLE = "radio_single", t.RADIO_BUTTON = "radio-button", t.CHECKBOX = "checkbox", t.CHECKBOX_SINGLE = "checkbox_single", t.CHECKBOX_BUTTON = "checkbox-button", t.SWITCH = "switch", t.TIME_PICKER = "time-picker", t.YEAR_PICKER = "year", t.MONTH_PICKER = "month", t.DATE_PICKER = "date", t.DATES_PICKER = "dates", t.DATETIME_PICKER = "datetime", t.WEEK_PICKER = "week", t.DATETIMERANGE_PICKER = "datetimerange", t.DATERANGE_PICKER = "daterange", t.MONTHRANGE_PICKER = "monthrange", t))(T || {});
|
|
95
96
|
const i = /* @__PURE__ */ new Map();
|
|
96
97
|
i.set("input", e);
|
|
@@ -118,25 +119,25 @@ i.set("week", r);
|
|
|
118
119
|
i.set("datetimerange", r);
|
|
119
120
|
i.set("daterange", r);
|
|
120
121
|
i.set("monthrange", r);
|
|
121
|
-
function
|
|
122
|
+
function ri(t, a) {
|
|
122
123
|
i.set(t, a);
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function ei(t) {
|
|
125
126
|
i.delete(t);
|
|
126
127
|
}
|
|
127
|
-
const
|
|
128
|
+
const oi = (t) => [
|
|
128
129
|
"datetimerange",
|
|
129
130
|
"daterange",
|
|
130
131
|
"monthrange"
|
|
131
132
|
/* MONTHRANGE_PICKER */
|
|
132
|
-
].includes(t),
|
|
133
|
+
].includes(t), pi = (t) => [
|
|
133
134
|
"input",
|
|
134
135
|
"input-number",
|
|
135
136
|
"password",
|
|
136
137
|
"textarea",
|
|
137
138
|
"search"
|
|
138
139
|
/* SEARCH */
|
|
139
|
-
].includes(t),
|
|
140
|
+
].includes(t), ai = (t) => [
|
|
140
141
|
"year",
|
|
141
142
|
"month",
|
|
142
143
|
"date",
|
|
@@ -150,10 +151,10 @@ const ei = (t) => [
|
|
|
150
151
|
].includes(t);
|
|
151
152
|
export {
|
|
152
153
|
T as FormCompEnum,
|
|
153
|
-
|
|
154
|
+
ri as add,
|
|
154
155
|
i as componentMap,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
ei as del,
|
|
157
|
+
ai as isDatePicker,
|
|
158
|
+
pi as isInput,
|
|
159
|
+
oi as isRangePicker
|
|
159
160
|
};
|
|
@@ -91,8 +91,9 @@ import { useNamespace as V } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
import { useFormContext as x } from "./use/use-form-context.js";
|
|
95
|
-
const
|
|
96
|
+
const wo = /* @__PURE__ */ k({
|
|
96
97
|
__name: "super-form-action",
|
|
97
98
|
props: {
|
|
98
99
|
showResetButton: { type: Boolean },
|
|
@@ -159,5 +160,5 @@ const Oo = /* @__PURE__ */ k({
|
|
|
159
160
|
}
|
|
160
161
|
});
|
|
161
162
|
export {
|
|
162
|
-
|
|
163
|
+
wo as default
|
|
163
164
|
};
|
|
@@ -91,14 +91,15 @@ import { useNamespace as ne } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
-
import
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
95
|
+
import { FormCompEnum as s, componentMap as B, isInput as se, isDatePicker as me, isRangePicker as le } from "./component-map.js";
|
|
95
96
|
import { createPlaceholderMessage as U } from "./use/helper.js";
|
|
96
97
|
function q(r) {
|
|
97
98
|
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Q(r);
|
|
98
99
|
}
|
|
99
100
|
const ae = H({
|
|
100
101
|
inheritAttrs: !1
|
|
101
|
-
}),
|
|
102
|
+
}), Zt = /* @__PURE__ */ H({
|
|
102
103
|
...ae,
|
|
103
104
|
__name: "super-form-item",
|
|
104
105
|
props: {
|
|
@@ -180,8 +181,8 @@ const ae = H({
|
|
|
180
181
|
} = r.schema, {
|
|
181
182
|
disabled: a = !1
|
|
182
183
|
} = u(x);
|
|
183
|
-
let
|
|
184
|
-
return w(t) && (
|
|
184
|
+
let m = !!e || a;
|
|
185
|
+
return w(t) && (m = t), P(t) && (m = t(u(E))), m;
|
|
185
186
|
});
|
|
186
187
|
function O() {
|
|
187
188
|
const {
|
|
@@ -189,10 +190,10 @@ const ae = H({
|
|
|
189
190
|
ifShow: t
|
|
190
191
|
} = r.schema, {
|
|
191
192
|
showAdvancedButton: a
|
|
192
|
-
} = r.formProps,
|
|
193
|
-
let
|
|
194
|
-
return w(e) && (
|
|
195
|
-
isShow:
|
|
193
|
+
} = r.formProps, m = a && w(r.isAdvanced) ? r.isAdvanced : !0;
|
|
194
|
+
let l = !0, c = !0;
|
|
195
|
+
return w(e) && (l = e), w(t) && (c = t), P(e) && (l = e(u(E))), P(t) && (c = t(u(E))), l = l && m, {
|
|
196
|
+
isShow: l,
|
|
196
197
|
isIfShow: c
|
|
197
198
|
};
|
|
198
199
|
}
|
|
@@ -201,12 +202,12 @@ const ae = H({
|
|
|
201
202
|
rules: e = [],
|
|
202
203
|
type: t = s.INPUT,
|
|
203
204
|
rulesMessageJoinLabel: a,
|
|
204
|
-
label:
|
|
205
|
-
title:
|
|
205
|
+
label: m,
|
|
206
|
+
title: l,
|
|
206
207
|
dynamicRule: c,
|
|
207
208
|
required: R,
|
|
208
209
|
dynamicRuleAdd: C = !0
|
|
209
|
-
} = r.schema, p =
|
|
210
|
+
} = r.schema, p = m || l;
|
|
210
211
|
if (P(c) && !C)
|
|
211
212
|
return c(u(E));
|
|
212
213
|
let o = _(e);
|
|
@@ -247,14 +248,14 @@ const ae = H({
|
|
|
247
248
|
renderComponentContent: e,
|
|
248
249
|
type: t = s.INPUT,
|
|
249
250
|
field: a,
|
|
250
|
-
changeEvent:
|
|
251
|
-
valueField:
|
|
251
|
+
changeEvent: m = "change",
|
|
252
|
+
valueField: l,
|
|
252
253
|
label: c,
|
|
253
254
|
title: R,
|
|
254
255
|
placeholderJoinLabel: C = !0
|
|
255
256
|
} = r.schema;
|
|
256
|
-
let p =
|
|
257
|
-
se(t) ? p = "input" : (
|
|
257
|
+
let p = m;
|
|
258
|
+
se(t) ? p = "input" : (me(t) || t === s.TIME_PICKER) && (p = "update:modelValue");
|
|
258
259
|
const o = `on${re(p)}`, b = {
|
|
259
260
|
[o]: (...n) => {
|
|
260
261
|
const [i] = n;
|
|
@@ -271,9 +272,9 @@ const ae = H({
|
|
|
271
272
|
...u(x),
|
|
272
273
|
disabled: u(G)
|
|
273
274
|
};
|
|
274
|
-
!d.disabled && y && !
|
|
275
|
+
!d.disabled && y && !le(t) && t && (d.placeholder = ((S = u(x)) == null ? void 0 : S.placeholder) || U(t, C ? c || R : ""));
|
|
275
276
|
const f = {
|
|
276
|
-
[
|
|
277
|
+
[l || "model-value"]: r.formModel[a]
|
|
277
278
|
}, g = {
|
|
278
279
|
...b,
|
|
279
280
|
...d,
|
|
@@ -295,9 +296,9 @@ const ae = H({
|
|
|
295
296
|
showLabel: e = !0,
|
|
296
297
|
label: t,
|
|
297
298
|
title: a,
|
|
298
|
-
subLabel:
|
|
299
|
-
} = r.schema,
|
|
300
|
-
return e &&
|
|
299
|
+
subLabel: m
|
|
300
|
+
} = r.schema, l = t || a;
|
|
301
|
+
return e && l ? m ? h("span", null, [l, Z(" "), h("span", null, [m])]) : l : void 0;
|
|
301
302
|
}
|
|
302
303
|
const k = z();
|
|
303
304
|
function v(e, t = "default", a) {
|
|
@@ -305,32 +306,32 @@ const ae = H({
|
|
|
305
306
|
return null;
|
|
306
307
|
if (!P(e[t]))
|
|
307
308
|
return console.error(`${t} is not a function!`), null;
|
|
308
|
-
const
|
|
309
|
-
return
|
|
309
|
+
const m = e[t];
|
|
310
|
+
return m ? m(a) : null;
|
|
310
311
|
}
|
|
311
312
|
function $() {
|
|
312
313
|
const {
|
|
313
314
|
itemProps: e,
|
|
314
315
|
slot: t,
|
|
315
316
|
render: a,
|
|
316
|
-
field:
|
|
317
|
-
suffix:
|
|
317
|
+
field: m,
|
|
318
|
+
suffix: l,
|
|
318
319
|
prefix: c,
|
|
319
320
|
prefixParentStyle: R
|
|
320
321
|
} = r.schema, {
|
|
321
322
|
autoCleanErrorMessage: C,
|
|
322
323
|
compFullWidth: p
|
|
323
|
-
} = r.formProps, o = () => t ? v(k, t, u(E)) : a ? a(u(E)) : W(), b = !!
|
|
324
|
+
} = r.formProps, o = () => t ? v(k, t, u(E)) : a ? a(u(E)) : W(), b = !!l, A = !!c, y = P(l) ? l(u(E)) : l, T = P(c) ? c(u(E)) : c, d = () => {
|
|
324
325
|
r.updateSchema([{
|
|
325
|
-
field:
|
|
326
|
+
field: m,
|
|
326
327
|
itemProps: {
|
|
327
328
|
error: ""
|
|
328
329
|
}
|
|
329
330
|
}]);
|
|
330
331
|
}, M = () => h(ie, F({
|
|
331
|
-
prop:
|
|
332
|
+
prop: m,
|
|
332
333
|
class: [{
|
|
333
|
-
[D.is(
|
|
334
|
+
[D.is(l)]: b
|
|
334
335
|
}, {
|
|
335
336
|
[D.is("comp-full-width")]: p
|
|
336
337
|
}, D.e("item")]
|
|
@@ -359,12 +360,12 @@ const ae = H({
|
|
|
359
360
|
const {
|
|
360
361
|
colProps: t = {},
|
|
361
362
|
colSlot: a,
|
|
362
|
-
renderColContent:
|
|
363
|
-
type:
|
|
363
|
+
renderColContent: m,
|
|
364
|
+
type: l = s.INPUT,
|
|
364
365
|
render: c,
|
|
365
366
|
quickColSpan: R
|
|
366
367
|
} = r.schema;
|
|
367
|
-
if (!B.has(
|
|
368
|
+
if (!B.has(l) && !m && !c)
|
|
368
369
|
return null;
|
|
369
370
|
const {
|
|
370
371
|
baseColProps: C = {},
|
|
@@ -381,8 +382,8 @@ const ae = H({
|
|
|
381
382
|
}, {
|
|
382
383
|
isIfShow: y,
|
|
383
384
|
isShow: T
|
|
384
|
-
} = O(), d = u(E), M = () => a ? v(k, a, d) :
|
|
385
|
-
if (
|
|
385
|
+
} = O(), d = u(E), M = () => a ? v(k, a, d) : m ? m(d) : $();
|
|
386
|
+
if (l === s.DIVIDER) {
|
|
386
387
|
let f;
|
|
387
388
|
return h(L, F({
|
|
388
389
|
span: 24
|
|
@@ -399,5 +400,5 @@ const ae = H({
|
|
|
399
400
|
}
|
|
400
401
|
});
|
|
401
402
|
export {
|
|
402
|
-
|
|
403
|
+
Zt as default
|
|
403
404
|
};
|