fantasia-ui 0.2.3 → 0.2.4
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/dist/fantasia-ui.css +1 -1
- package/dist/fantasia-ui.es.js +867 -663
- package/dist/fantasia-ui.umd.js +1 -1
- package/dist/types/components/index.d.ts +29 -27
- package/dist/types/components/index.js +29 -27
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.js +6 -12
- package/dist/types/types/components/index.d.ts +3 -0
- package/dist/types/types/components/index.js +3 -0
- package/dist/types/types/components/modules/f-checkbox.d.ts +5 -0
- package/dist/types/types/components/modules/f-checkbox.js +1 -0
- package/dist/types/types/components/modules/f-form-item.d.ts +4 -0
- package/dist/types/types/components/modules/f-form-item.js +1 -0
- package/dist/types/types/components/modules/f-form.d.ts +21 -78
- package/dist/types/utils/general.d.ts +4 -0
- package/dist/types/utils/general.js +4 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/index.js +2 -0
- package/dist/types/utils/validator.d.ts +23 -0
- package/dist/types/utils/validator.js +181 -0
- package/package.json +4 -3
package/dist/fantasia-ui.es.js
CHANGED
|
@@ -1,78 +1,66 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
1
|
+
var ge = Object.defineProperty, be = Object.defineProperties;
|
|
2
|
+
var ye = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var le = Object.getOwnPropertySymbols;
|
|
4
|
+
var $e = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var re = (n, e, o) => e in n ? ge(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o, ie = (n, e) => {
|
|
6
|
+
for (var o in e || (e = {}))
|
|
7
|
+
$e.call(e, o) && re(n, o, e[o]);
|
|
8
|
+
if (le)
|
|
9
|
+
for (var o of le(e))
|
|
10
|
+
ke.call(e, o) && re(n, o, e[o]);
|
|
11
|
+
return n;
|
|
12
|
+
}, ce = (n, e) => be(n, ye(e));
|
|
13
|
+
var J = (n, e, o) => new Promise((t, s) => {
|
|
14
|
+
var i = (a) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
r(o.next(a));
|
|
17
|
+
} catch (f) {
|
|
18
|
+
s(f);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, u = (a) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
r(o.throw(a));
|
|
23
|
+
} catch (f) {
|
|
24
|
+
s(f);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, r = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(i, u);
|
|
27
|
+
r((o = o.apply(n, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { defineComponent as
|
|
30
|
-
import { Search as
|
|
31
|
-
import { useEventListener as
|
|
32
|
-
const
|
|
33
|
-
const s = r[e];
|
|
34
|
-
return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, c) => {
|
|
35
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
36
|
-
c.bind(
|
|
37
|
-
null,
|
|
38
|
-
new Error(
|
|
39
|
-
"Unknown variable dynamic import: " + e + (e.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
|
|
40
|
-
)
|
|
41
|
-
)
|
|
42
|
-
);
|
|
43
|
-
});
|
|
44
|
-
}, We = /* @__PURE__ */ y({
|
|
29
|
+
import { defineComponent as g, computed as h, createElementBlock as c, openBlock as l, normalizeStyle as T, unref as p, renderSlot as v, ref as R, watch as ee, resolveComponent as O, createVNode as S, withDirectives as te, Transition as K, withCtx as I, createCommentVNode as y, createElementVNode as z, vShow as ue, mergeModels as H, useModel as Q, normalizeClass as C, readonly as de, vModelDynamic as we, Fragment as P, renderList as G, toDisplayString as V, createBlock as W, nextTick as pe, onUnmounted as oe, Teleport as fe, withModifiers as se, resolveDynamicComponent as Y, createTextVNode as me, TransitionGroup as Fe, useSlots as ze, provide as _e, inject as Ce, onMounted as xe } from "vue";
|
|
30
|
+
import { Search as Se, StarOutline as Me, StarHalf as Ie, Star as Te, ChevronDownOutline as Be, ChevronBackOutline as Ve, EllipsisHorizontal as Re, ChevronForwardOutline as Ae, CloseCircle as Pe, Close as We, Person as je } from "@vicons/ionicons5";
|
|
31
|
+
import { useEventListener as De } from "@vueuse/core";
|
|
32
|
+
const Ee = /* @__PURE__ */ g({
|
|
45
33
|
__name: "FIcon",
|
|
46
34
|
props: {
|
|
47
35
|
color: {},
|
|
48
36
|
size: { default: "1em" }
|
|
49
37
|
},
|
|
50
|
-
setup(
|
|
51
|
-
const e =
|
|
38
|
+
setup(n) {
|
|
39
|
+
const e = n, o = h(() => ({
|
|
52
40
|
width: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
53
41
|
height: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
54
42
|
color: e.color
|
|
55
43
|
}));
|
|
56
|
-
return (
|
|
44
|
+
return (t, s) => (l(), c("span", {
|
|
57
45
|
role: "img",
|
|
58
46
|
class: "f-icon",
|
|
59
|
-
style:
|
|
47
|
+
style: T(p(o))
|
|
60
48
|
}, [
|
|
61
|
-
|
|
49
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
62
50
|
], 4));
|
|
63
51
|
}
|
|
64
|
-
}), b = (
|
|
65
|
-
const
|
|
66
|
-
for (const [
|
|
67
|
-
t
|
|
68
|
-
return
|
|
69
|
-
},
|
|
52
|
+
}), b = (n, e) => {
|
|
53
|
+
const o = n.__vccOpts || n;
|
|
54
|
+
for (const [t, s] of e)
|
|
55
|
+
o[t] = s;
|
|
56
|
+
return o;
|
|
57
|
+
}, Le = /* @__PURE__ */ b(Ee, [["__scopeId", "data-v-524b7dbb"]]), Oe = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780285609860'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12961'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M894.4%20281.504a39.36%2039.36%200%200%200-27.104-11.808l-293.888-10.976-22.016%2046.88%2030.592%2087.2-55.2%2099.008%2022.4%2079.904%2056%2068.48%2081.024-70.496c7.808-6.88%2020.288-6.496%2027.104%201.216l103.904%20106.4c7.296%207.296%206.88%2019.2-0.928%2026.112a18.944%2018.944%200%200%201-13.76%204.896l-284.8-10.624-14.24%2038.72%2015.52%2034.592%20327.488%2011.808c21.504%200.8%2039.616-15.104%2040.096-35.52l18.208-439.296a34.368%2034.368%200%200%200-10.4-26.496zM684.096%20483.2c-32.32-1.184-57.28-26.88-56-57.088%201.28-30.592%2028.416-54.208%2060.288-52.992%2031.904%201.184%2057.312%2026.88%2056%2057.088-1.184%2030.208-28.384%2054.304-60.288%2052.992z%20m-211.104%20253.6l9.92-40.8-231.424%2015.104c-10.784%200.8-19.776-6.496-20.672-16.704a17.856%2017.856%200%200%201%204.672-13.504l171.52-186.272a18.048%2018.048%200%200%201%2014.208-6.112c5.184%200%2010.272%201.984%2014.176%205.696l57.28%2056.704-24.576-60.32%2044-104.288L472%20302.72l16.384-48.096-315.392%2020.8c-21.504%201.184-37.504%2018.784-36.192%2039.072l31.904%20439.424c0.384%209.792%205.184%2018.688%2013.408%2024.896%207.776%206.496%2017.696%209.792%2028%208.992l281.792-18.304-18.88-32.704z'%20p-id='12962'%3e%3c/path%3e%3c/svg%3e", He = { class: "f-image" }, Ne = {
|
|
70
58
|
key: 0,
|
|
71
59
|
class: "f-image__placeholder"
|
|
72
|
-
},
|
|
60
|
+
}, qe = {
|
|
73
61
|
key: 0,
|
|
74
62
|
class: "f-image__error"
|
|
75
|
-
},
|
|
63
|
+
}, Ge = ["src", "loading"], Ue = /* @__PURE__ */ g({
|
|
76
64
|
__name: "FImage",
|
|
77
65
|
props: {
|
|
78
66
|
src: {},
|
|
@@ -80,54 +68,54 @@ const Pe = (r, e, t) => {
|
|
|
80
68
|
fit: { default: "cover" },
|
|
81
69
|
lazy: { type: Boolean, default: !0 }
|
|
82
70
|
},
|
|
83
|
-
setup(
|
|
84
|
-
const e =
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
setup(n) {
|
|
72
|
+
const e = n, o = R("loading");
|
|
73
|
+
ee(() => e.src, () => {
|
|
74
|
+
o.value = "loading";
|
|
87
75
|
}, { immediate: !1 });
|
|
88
|
-
const
|
|
89
|
-
return (
|
|
90
|
-
const
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
])) :
|
|
76
|
+
const t = () => o.value = "loaded", s = () => o.value = "error";
|
|
77
|
+
return (i, u) => {
|
|
78
|
+
const r = O("f-loading"), a = O("f-icon");
|
|
79
|
+
return l(), c("div", He, [
|
|
80
|
+
S(K, { name: "fade" }, {
|
|
81
|
+
default: I(() => [
|
|
82
|
+
p(o) === "loading" ? (l(), c("div", Ne, [
|
|
83
|
+
S(r, { type: "classic first" })
|
|
84
|
+
])) : y("", !0)
|
|
97
85
|
]),
|
|
98
86
|
_: 1
|
|
99
87
|
}),
|
|
100
|
-
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
default:
|
|
106
|
-
|
|
88
|
+
S(K, { name: "fade" }, {
|
|
89
|
+
default: I(() => [
|
|
90
|
+
p(o) === "error" ? (l(), c("div", qe, [
|
|
91
|
+
v(i.$slots, "error", {}, () => [
|
|
92
|
+
S(a, { size: "48px" }, {
|
|
93
|
+
default: I(() => [
|
|
94
|
+
S(p(Oe))
|
|
107
95
|
]),
|
|
108
96
|
_: 1
|
|
109
97
|
})
|
|
110
98
|
], !0)
|
|
111
|
-
])) :
|
|
99
|
+
])) : y("", !0)
|
|
112
100
|
]),
|
|
113
101
|
_: 3
|
|
114
102
|
}),
|
|
115
|
-
|
|
103
|
+
te(z("img", {
|
|
116
104
|
src: e.src,
|
|
117
|
-
loading:
|
|
118
|
-
style:
|
|
105
|
+
loading: i.lazy ? "lazy" : "eager",
|
|
106
|
+
style: T({ objectFit: e.fit }),
|
|
119
107
|
class: "f-image__img",
|
|
120
|
-
onLoad:
|
|
121
|
-
onError:
|
|
122
|
-
}, null, 44,
|
|
123
|
-
[
|
|
108
|
+
onLoad: t,
|
|
109
|
+
onError: s
|
|
110
|
+
}, null, 44, Ge), [
|
|
111
|
+
[ue, p(o) === "loaded"]
|
|
124
112
|
])
|
|
125
113
|
]);
|
|
126
114
|
};
|
|
127
115
|
}
|
|
128
|
-
}),
|
|
116
|
+
}), Xe = /* @__PURE__ */ b(Ue, [["__scopeId", "data-v-2948108d"]]), Ye = ["type", "placeholder", "disabled", "readonly", "name", "id"], Je = /* @__PURE__ */ g({
|
|
129
117
|
__name: "FInput",
|
|
130
|
-
props: /* @__PURE__ */
|
|
118
|
+
props: /* @__PURE__ */ H({
|
|
131
119
|
placeholder: { default: "输入..." },
|
|
132
120
|
type: { default: "text" },
|
|
133
121
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -138,85 +126,85 @@ const Pe = (r, e, t) => {
|
|
|
138
126
|
modelValue: { default: "" },
|
|
139
127
|
modelModifiers: {}
|
|
140
128
|
}),
|
|
141
|
-
emits: /* @__PURE__ */
|
|
142
|
-
setup(
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
|
|
129
|
+
emits: /* @__PURE__ */ H(["input", "change", "focus", "blur"], ["update:modelValue"]),
|
|
130
|
+
setup(n, { emit: e }) {
|
|
131
|
+
const o = Q(n, "modelValue"), t = e, s = (a) => {
|
|
132
|
+
const f = a.target.value;
|
|
133
|
+
t("input", f);
|
|
134
|
+
}, i = (a) => {
|
|
135
|
+
const f = a.target.value;
|
|
136
|
+
t("change", f);
|
|
137
|
+
}, u = (a) => {
|
|
138
|
+
t("focus", a);
|
|
139
|
+
}, r = (a) => {
|
|
140
|
+
t("blur", a);
|
|
153
141
|
};
|
|
154
|
-
return (a,
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
class: C(["f-input", { "is-disabled": a.disabled, "is-readonly": "readonly" in a ? a.readonly :
|
|
142
|
+
return (a, f) => {
|
|
143
|
+
const m = O("f-icon");
|
|
144
|
+
return l(), c("div", {
|
|
145
|
+
class: C(["f-input", { "is-disabled": a.disabled, "is-readonly": "readonly" in a ? a.readonly : p(de) }])
|
|
158
146
|
}, [
|
|
159
|
-
|
|
160
|
-
default:
|
|
161
|
-
|
|
147
|
+
S(m, { class: "f-input__icon" }, {
|
|
148
|
+
default: I(() => [
|
|
149
|
+
S(p(Se))
|
|
162
150
|
]),
|
|
163
151
|
_: 1
|
|
164
152
|
}),
|
|
165
|
-
|
|
153
|
+
te(z("input", {
|
|
166
154
|
class: "f-input__text",
|
|
167
|
-
"onUpdate:modelValue":
|
|
155
|
+
"onUpdate:modelValue": f[0] || (f[0] = (d) => o.value = d),
|
|
168
156
|
type: a.type,
|
|
169
157
|
placeholder: a.placeholder,
|
|
170
158
|
disabled: a.disabled,
|
|
171
|
-
readonly: "readonly" in a ? a.readonly :
|
|
159
|
+
readonly: "readonly" in a ? a.readonly : p(de),
|
|
172
160
|
name: a.name,
|
|
173
161
|
id: a.id,
|
|
174
|
-
onInput:
|
|
175
|
-
onChange:
|
|
176
|
-
onFocus:
|
|
177
|
-
onBlur:
|
|
178
|
-
}, null, 40,
|
|
179
|
-
[
|
|
162
|
+
onInput: s,
|
|
163
|
+
onChange: i,
|
|
164
|
+
onFocus: u,
|
|
165
|
+
onBlur: r
|
|
166
|
+
}, null, 40, Ye), [
|
|
167
|
+
[we, o.value]
|
|
180
168
|
])
|
|
181
169
|
], 2);
|
|
182
170
|
};
|
|
183
171
|
}
|
|
184
|
-
}),
|
|
172
|
+
}), Ke = /* @__PURE__ */ b(Je, [["__scopeId", "data-v-6c6d7c63"]]), Qe = {
|
|
185
173
|
key: 0,
|
|
186
174
|
class: "loop cubes"
|
|
187
|
-
},
|
|
175
|
+
}, Ze = {
|
|
188
176
|
key: 2,
|
|
189
177
|
class: "msg"
|
|
190
|
-
},
|
|
178
|
+
}, et = /* @__PURE__ */ g({
|
|
191
179
|
__name: "FLoading",
|
|
192
180
|
props: {
|
|
193
181
|
type: { default: "dots" },
|
|
194
182
|
text: {},
|
|
195
183
|
mask: { type: Boolean, default: !1 }
|
|
196
184
|
},
|
|
197
|
-
setup(
|
|
198
|
-
const e =
|
|
199
|
-
return (
|
|
200
|
-
class: C(["flex-center-col size-full loading-container", { "global-mask":
|
|
185
|
+
setup(n) {
|
|
186
|
+
const e = n;
|
|
187
|
+
return (o, t) => (l(), c("div", {
|
|
188
|
+
class: C(["flex-center-col size-full loading-container", { "global-mask": o.mask }])
|
|
201
189
|
}, [
|
|
202
|
-
|
|
203
|
-
(
|
|
190
|
+
o.type === "cubes" ? (l(), c("div", Qe, [
|
|
191
|
+
(l(), c(P, null, G(6, (s) => z("div", {
|
|
204
192
|
class: "item cubes",
|
|
205
|
-
key:
|
|
193
|
+
key: s
|
|
206
194
|
})), 64))
|
|
207
|
-
])) : (
|
|
195
|
+
])) : (l(), c("div", {
|
|
208
196
|
key: 1,
|
|
209
|
-
class: C(["loader",
|
|
197
|
+
class: C(["loader", o.type])
|
|
210
198
|
}, null, 2)),
|
|
211
|
-
e.text ? (
|
|
199
|
+
e.text ? (l(), c("p", Ze, V(e.text), 1)) : y("", !0)
|
|
212
200
|
], 2));
|
|
213
201
|
}
|
|
214
|
-
}),
|
|
202
|
+
}), tt = /* @__PURE__ */ b(et, [["__scopeId", "data-v-20f58a50"]]), ot = ["onMousemove"], st = {
|
|
215
203
|
key: 0,
|
|
216
204
|
class: "f-rate__score"
|
|
217
|
-
},
|
|
205
|
+
}, at = /* @__PURE__ */ g({
|
|
218
206
|
__name: "FRate",
|
|
219
|
-
props: /* @__PURE__ */
|
|
207
|
+
props: /* @__PURE__ */ H({
|
|
220
208
|
modelValue: {},
|
|
221
209
|
count: { default: 5 },
|
|
222
210
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -230,63 +218,63 @@ const Pe = (r, e, t) => {
|
|
|
230
218
|
modelValue: { default: 0 },
|
|
231
219
|
modelModifiers: {}
|
|
232
220
|
}),
|
|
233
|
-
emits: /* @__PURE__ */
|
|
234
|
-
setup(
|
|
235
|
-
const
|
|
236
|
-
var
|
|
237
|
-
return (
|
|
238
|
-
}),
|
|
239
|
-
() =>
|
|
240
|
-
), a =
|
|
241
|
-
() =>
|
|
242
|
-
),
|
|
243
|
-
const
|
|
244
|
-
return
|
|
245
|
-
},
|
|
246
|
-
if (!
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
|
|
221
|
+
emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
|
|
222
|
+
setup(n, { emit: e }) {
|
|
223
|
+
const o = Q(n, "modelValue"), t = n, s = e, i = R(null), u = h(() => {
|
|
224
|
+
var w;
|
|
225
|
+
return (w = i.value) != null ? w : o.value;
|
|
226
|
+
}), r = h(
|
|
227
|
+
() => t.scoreTemplate.replace("{value}", String(o.value))
|
|
228
|
+
), a = h(
|
|
229
|
+
() => t.size === "normal" ? 16 : t.size === "small" ? 12 : 20
|
|
230
|
+
), f = (w) => {
|
|
231
|
+
const B = u.value;
|
|
232
|
+
return B >= w ? "full" : t.allowHalf && B >= w - 0.5 ? "half" : "empty";
|
|
233
|
+
}, m = (w) => f(w) === "full" ? t.voidColor : t.color, d = (w, B) => {
|
|
234
|
+
if (!t.readonly)
|
|
235
|
+
if (t.allowHalf) {
|
|
236
|
+
const A = w.currentTarget, { left: M, width: E } = A.getBoundingClientRect();
|
|
237
|
+
i.value = (w.clientX - M) / E < 0.5 ? B - 0.5 : B;
|
|
250
238
|
} else
|
|
251
|
-
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
var
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
|
|
239
|
+
i.value = B;
|
|
240
|
+
}, k = () => {
|
|
241
|
+
t.readonly || (i.value = null);
|
|
242
|
+
}, x = () => {
|
|
243
|
+
var B;
|
|
244
|
+
if (t.readonly) return;
|
|
245
|
+
const w = (B = i.value) != null ? B : o.value;
|
|
246
|
+
o.value = w, s("change", w);
|
|
259
247
|
};
|
|
260
|
-
return (
|
|
261
|
-
const
|
|
262
|
-
return
|
|
263
|
-
class: C(["f-rate", { "f-rate--readonly":
|
|
264
|
-
onMouseleave:
|
|
248
|
+
return (w, B) => {
|
|
249
|
+
const A = O("f-icon");
|
|
250
|
+
return l(), c("div", {
|
|
251
|
+
class: C(["f-rate", { "f-rate--readonly": t.readonly }]),
|
|
252
|
+
onMouseleave: k
|
|
265
253
|
}, [
|
|
266
|
-
(
|
|
267
|
-
key:
|
|
254
|
+
(l(!0), c(P, null, G(t.count, (M) => (l(), c("span", {
|
|
255
|
+
key: M,
|
|
268
256
|
class: "f-rate__item",
|
|
269
|
-
onMousemove: (
|
|
270
|
-
onClick:
|
|
257
|
+
onMousemove: (E) => d(E, M),
|
|
258
|
+
onClick: x
|
|
271
259
|
}, [
|
|
272
|
-
|
|
273
|
-
color:
|
|
274
|
-
size:
|
|
260
|
+
S(A, {
|
|
261
|
+
color: m(M),
|
|
262
|
+
size: p(a)
|
|
275
263
|
}, {
|
|
276
|
-
default:
|
|
277
|
-
|
|
264
|
+
default: I(() => [
|
|
265
|
+
f(M) === "full" ? (l(), W(p(Me), { key: 0 })) : f(M) === "half" ? (l(), W(p(Ie), { key: 1 })) : (l(), W(p(Te), { key: 2 }))
|
|
278
266
|
]),
|
|
279
267
|
_: 2
|
|
280
268
|
}, 1032, ["color", "size"])
|
|
281
|
-
], 40,
|
|
282
|
-
|
|
269
|
+
], 40, ot))), 128)),
|
|
270
|
+
t.showText ? (l(), c("span", st, V(p(r)), 1)) : y("", !0)
|
|
283
271
|
], 34);
|
|
284
272
|
};
|
|
285
273
|
}
|
|
286
|
-
}),
|
|
274
|
+
}), nt = /* @__PURE__ */ b(at, [["__scopeId", "data-v-d68cd0e3"]]), lt = { class: "f-dropdown-wrapper" }, rt = { class: "f-dropdown-content" }, it = ["onClick"], ct = {
|
|
287
275
|
key: 0,
|
|
288
276
|
class: "opt-icon"
|
|
289
|
-
},
|
|
277
|
+
}, dt = { class: "opt-label" }, ut = /* @__PURE__ */ g({
|
|
290
278
|
__name: "FDropdown",
|
|
291
279
|
props: {
|
|
292
280
|
placement: { default: "right-start" },
|
|
@@ -296,136 +284,136 @@ const Pe = (r, e, t) => {
|
|
|
296
284
|
options: { default: () => [] }
|
|
297
285
|
},
|
|
298
286
|
emits: ["select"],
|
|
299
|
-
setup(
|
|
300
|
-
const
|
|
301
|
-
const [
|
|
302
|
-
return
|
|
303
|
-
}),
|
|
304
|
-
if (!
|
|
305
|
-
const
|
|
306
|
-
let
|
|
307
|
-
|
|
308
|
-
const
|
|
287
|
+
setup(n, { emit: e }) {
|
|
288
|
+
const o = n, t = e, s = R(!1), i = R(null), u = R(null), r = R(null), a = R(0), f = R(0), m = h(() => {
|
|
289
|
+
const [_] = o.placement.split("-"), $ = (Array.isArray(o.offset) ? o.offset[0] : o.offset) + 4, F = { position: "absolute" };
|
|
290
|
+
return _ === "right" ? (F.width = `${$}px`, F.left = `-${$}px`, F.top = 0, F.bottom = 0) : _ === "left" ? (F.width = `${$}px`, F.right = `-${$}px`, F.top = 0, F.bottom = 0) : _ === "bottom" ? (F.height = `${$}px`, F.top = `-${$}px`, F.left = 0, F.right = 0) : _ === "top" && (F.height = `${$}px`, F.bottom = `-${$}px`, F.left = 0, F.right = 0), F;
|
|
291
|
+
}), d = h(() => {
|
|
292
|
+
if (!i.value) return {};
|
|
293
|
+
const _ = i.value, { placement: N } = o, $ = Array.isArray(o.offset) ? o.offset[0] : o.offset, [F, q] = N.split("-"), ae = window.innerWidth, ne = window.innerHeight, U = f.value || 160, X = a.value || 200;
|
|
294
|
+
let j = 0, D = 0, L = F;
|
|
295
|
+
F === "right" ? (D = _.right + $, D + U > ae && (D = _.left - U - $, L = "left")) : F === "left" ? (D = _.left - U - $, D < 0 && (D = _.right + $, L = "right")) : F === "bottom" ? (j = _.bottom + $, j + X > ne && (j = _.top - X - $, L = "top")) : F === "top" && (j = _.top - X - $, j < 0 && (j = _.bottom + $, L = "bottom")), L === "top" || L === "bottom" ? (q === "start" ? D = _.left : q === "end" ? D = _.right - U : D = _.left + (_.width - U) / 2, D = Math.max(8, Math.min(D, ae - U - 8))) : (q === "start" ? j = _.top : q === "end" ? j = _.bottom - X : j = _.top + (_.height - X) / 2, j = Math.max(8, Math.min(j, ne - X - 8)));
|
|
296
|
+
const he = L === "right" ? "left" : L === "left" ? "right" : q === "start" ? "left" : q === "end" ? "right" : "center", ve = L === "bottom" ? "top" : L === "top" ? "bottom" : q === "start" ? "top" : q === "end" ? "bottom" : "center";
|
|
309
297
|
return {
|
|
310
|
-
top: `${
|
|
311
|
-
left: `${
|
|
312
|
-
transformOrigin: `${
|
|
298
|
+
top: `${j}px`,
|
|
299
|
+
left: `${D}px`,
|
|
300
|
+
transformOrigin: `${ve} ${he}`
|
|
313
301
|
};
|
|
314
302
|
});
|
|
315
|
-
let
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
|
|
303
|
+
let k = null, x = null;
|
|
304
|
+
const w = () => {
|
|
305
|
+
k && (clearTimeout(k), k = null);
|
|
306
|
+
}, B = (_) => {
|
|
307
|
+
o.trigger === "click" && (_.stopPropagation(), s.value ? s.value = !1 : (i.value = u.value.getBoundingClientRect(), s.value = !0));
|
|
308
|
+
}, A = () => {
|
|
309
|
+
o.trigger === "hover" && (w(), x = setTimeout(() => {
|
|
310
|
+
u.value && (i.value = u.value.getBoundingClientRect()), s.value = !0;
|
|
323
311
|
}, 400));
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
|
|
312
|
+
}, M = () => {
|
|
313
|
+
o.trigger === "hover" && (x && (clearTimeout(x), x = null), k = setTimeout(() => {
|
|
314
|
+
s.value = !1;
|
|
327
315
|
}, 400));
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
},
|
|
331
|
-
|
|
316
|
+
}, E = (_) => {
|
|
317
|
+
o.trigger !== "click" || !s.value || (s.value = !1);
|
|
318
|
+
}, Z = (_) => {
|
|
319
|
+
_.disabled || (t("select", _.key, _), _.children || (s.value = !1));
|
|
332
320
|
};
|
|
333
|
-
return
|
|
334
|
-
var
|
|
335
|
-
|
|
336
|
-
})),
|
|
337
|
-
|
|
338
|
-
}),
|
|
321
|
+
return ee(s, (_) => J(null, null, function* () {
|
|
322
|
+
var N, $;
|
|
323
|
+
_ ? (i.value = u.value.getBoundingClientRect(), yield pe(), a.value = ((N = r.value) == null ? void 0 : N.offsetHeight) || 200, f.value = (($ = r.value) == null ? void 0 : $.offsetWidth) || 160) : (a.value = 0, f.value = 0);
|
|
324
|
+
})), oe(() => {
|
|
325
|
+
w(), x && clearTimeout(x);
|
|
326
|
+
}), De(window, "click", E), (_, N) => (l(), c("div", lt, [
|
|
339
327
|
z("div", {
|
|
340
328
|
ref_key: "triggerRef",
|
|
341
|
-
ref:
|
|
329
|
+
ref: u,
|
|
342
330
|
class: "f-dropdown-trigger-wrapper",
|
|
343
|
-
onMouseenter:
|
|
344
|
-
onMouseleave:
|
|
345
|
-
onClick:
|
|
331
|
+
onMouseenter: A,
|
|
332
|
+
onMouseleave: M,
|
|
333
|
+
onClick: B
|
|
346
334
|
}, [
|
|
347
|
-
|
|
335
|
+
v(_.$slots, "default", {}, void 0, !0)
|
|
348
336
|
], 544),
|
|
349
|
-
(
|
|
350
|
-
|
|
351
|
-
default:
|
|
352
|
-
|
|
337
|
+
(l(), W(fe, { to: "body" }, [
|
|
338
|
+
S(K, { name: "f-dropdown-motion" }, {
|
|
339
|
+
default: I(() => [
|
|
340
|
+
p(s) ? (l(), c("div", {
|
|
353
341
|
key: 0,
|
|
354
342
|
ref_key: "dropdownRef",
|
|
355
|
-
ref:
|
|
343
|
+
ref: r,
|
|
356
344
|
class: "f-dropdown-item",
|
|
357
|
-
style:
|
|
358
|
-
onMouseenter:
|
|
359
|
-
onMouseleave:
|
|
360
|
-
onClick:
|
|
345
|
+
style: T([p(d), { zIndex: _.zIndex }]),
|
|
346
|
+
onMouseenter: w,
|
|
347
|
+
onMouseleave: M,
|
|
348
|
+
onClick: N[0] || (N[0] = se(() => {
|
|
361
349
|
}, ["stop"]))
|
|
362
350
|
}, [
|
|
363
|
-
|
|
351
|
+
_.trigger === "hover" ? (l(), c("div", {
|
|
364
352
|
key: 0,
|
|
365
353
|
class: "f-dropdown-bridge",
|
|
366
|
-
style:
|
|
367
|
-
}, null, 4)) :
|
|
368
|
-
z("div",
|
|
369
|
-
|
|
370
|
-
key:
|
|
371
|
-
class: C(["f-dropdown-option", { "is-disabled":
|
|
372
|
-
onClick: (
|
|
354
|
+
style: T(p(m))
|
|
355
|
+
}, null, 4)) : y("", !0),
|
|
356
|
+
z("div", rt, [
|
|
357
|
+
_.options && _.options.length > 0 ? (l(!0), c(P, { key: 0 }, G(_.options, ($) => (l(), c("div", {
|
|
358
|
+
key: $.key,
|
|
359
|
+
class: C(["f-dropdown-option", { "is-disabled": $.disabled }]),
|
|
360
|
+
onClick: (F) => Z($)
|
|
373
361
|
}, [
|
|
374
|
-
|
|
375
|
-
(
|
|
376
|
-
])) :
|
|
377
|
-
z("span",
|
|
378
|
-
], 10,
|
|
362
|
+
$.icon ? (l(), c("span", ct, [
|
|
363
|
+
(l(), W(Y($.icon)))
|
|
364
|
+
])) : y("", !0),
|
|
365
|
+
z("span", dt, V($.label), 1)
|
|
366
|
+
], 10, it))), 128)) : v(_.$slots, "content", { key: 1 }, void 0, !0)
|
|
379
367
|
])
|
|
380
|
-
], 36)) :
|
|
368
|
+
], 36)) : y("", !0)
|
|
381
369
|
]),
|
|
382
370
|
_: 3
|
|
383
371
|
})
|
|
384
372
|
]))
|
|
385
373
|
]));
|
|
386
374
|
}
|
|
387
|
-
}),
|
|
375
|
+
}), pt = /* @__PURE__ */ b(ut, [["__scopeId", "data-v-addb3a3b"]]), ft = /* @__PURE__ */ g({
|
|
388
376
|
__name: "FSelect",
|
|
389
|
-
props: /* @__PURE__ */
|
|
377
|
+
props: /* @__PURE__ */ H({
|
|
390
378
|
options: {},
|
|
391
379
|
placeholder: {}
|
|
392
380
|
}, {
|
|
393
381
|
modelValue: {},
|
|
394
382
|
modelModifiers: {}
|
|
395
383
|
}),
|
|
396
|
-
emits: /* @__PURE__ */
|
|
397
|
-
setup(
|
|
398
|
-
const
|
|
384
|
+
emits: /* @__PURE__ */ H(["select"], ["update:modelValue"]),
|
|
385
|
+
setup(n, { emit: e }) {
|
|
386
|
+
const o = n, t = e, s = Q(n, "modelValue"), i = R(!1), u = h(
|
|
399
387
|
() => {
|
|
400
|
-
var
|
|
401
|
-
return (
|
|
388
|
+
var m, d, k;
|
|
389
|
+
return (k = (m = o.options.find((x) => x.key === s.value)) == null ? void 0 : m.label) != null ? k : (d = o.placeholder) != null ? d : "请选择";
|
|
402
390
|
}
|
|
403
|
-
),
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
|
|
391
|
+
), r = h(() => s.value !== void 0 && s.value !== ""), a = (m, d) => {
|
|
392
|
+
s.value = m, t("select", m, d), i.value = !1;
|
|
393
|
+
}, f = (m) => {
|
|
394
|
+
i.value = m;
|
|
407
395
|
};
|
|
408
|
-
return (
|
|
409
|
-
const
|
|
410
|
-
return
|
|
411
|
-
options:
|
|
396
|
+
return (m, d) => {
|
|
397
|
+
const k = O("f-icon"), x = O("f-dropdown");
|
|
398
|
+
return l(), W(x, {
|
|
399
|
+
options: m.options,
|
|
412
400
|
trigger: "click",
|
|
413
401
|
onSelect: a,
|
|
414
|
-
onShow:
|
|
415
|
-
onHide:
|
|
402
|
+
onShow: d[0] || (d[0] = (w) => f(!0)),
|
|
403
|
+
onHide: d[1] || (d[1] = (w) => f(!1)),
|
|
416
404
|
placement: "bottom",
|
|
417
405
|
offset: 4
|
|
418
406
|
}, {
|
|
419
|
-
default:
|
|
407
|
+
default: I(() => [
|
|
420
408
|
z("div", {
|
|
421
|
-
class: C(["f-select", { "is-active":
|
|
409
|
+
class: C(["f-select", { "is-active": p(r), "is-open": p(i) }])
|
|
422
410
|
}, [
|
|
423
411
|
z("span", {
|
|
424
|
-
class: C(["f-select__label", { "is-placeholder": !
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
default:
|
|
428
|
-
|
|
412
|
+
class: C(["f-select__label", { "is-placeholder": !p(r) }])
|
|
413
|
+
}, V(p(u)), 3),
|
|
414
|
+
S(k, { class: "f-select__arrow" }, {
|
|
415
|
+
default: I(() => [
|
|
416
|
+
S(p(Be))
|
|
429
417
|
]),
|
|
430
418
|
_: 1
|
|
431
419
|
})
|
|
@@ -435,12 +423,12 @@ const Pe = (r, e, t) => {
|
|
|
435
423
|
}, 8, ["options"]);
|
|
436
424
|
};
|
|
437
425
|
}
|
|
438
|
-
}),
|
|
426
|
+
}), mt = /* @__PURE__ */ b(ft, [["__scopeId", "data-v-25e7d03d"]]), _t = { class: "f-pagination" }, ht = { class: "f-pagination__list" }, vt = {
|
|
439
427
|
key: 0,
|
|
440
428
|
class: "page-btn ellipsis"
|
|
441
|
-
},
|
|
429
|
+
}, gt = ["onClick"], bt = /* @__PURE__ */ g({
|
|
442
430
|
__name: "FPagination",
|
|
443
|
-
props: /* @__PURE__ */
|
|
431
|
+
props: /* @__PURE__ */ H({
|
|
444
432
|
total: {},
|
|
445
433
|
pageSize: { default: 10 },
|
|
446
434
|
hideOnSingle: { type: Boolean }
|
|
@@ -448,51 +436,51 @@ const Pe = (r, e, t) => {
|
|
|
448
436
|
modelValue: { default: 1 },
|
|
449
437
|
modelModifiers: {}
|
|
450
438
|
}),
|
|
451
|
-
emits: /* @__PURE__ */
|
|
452
|
-
setup(
|
|
453
|
-
const
|
|
454
|
-
const
|
|
455
|
-
return !
|
|
456
|
-
}),
|
|
457
|
-
typeof
|
|
439
|
+
emits: /* @__PURE__ */ H(["update:currentPage"], ["update:modelValue"]),
|
|
440
|
+
setup(n, { emit: e }) {
|
|
441
|
+
const o = n, t = Q(n, "modelValue"), s = h(() => Math.ceil(o.total / o.pageSize) || 1), i = h(() => {
|
|
442
|
+
const r = s.value, a = t.value;
|
|
443
|
+
return !r || r <= 0 ? [] : r <= 7 ? Array.from({ length: r }, (f, m) => m + 1) : a <= 4 ? [1, 2, 3, 4, 5, "...", r] : a >= r - 3 ? [1, "...", r - 4, r - 3, r - 2, r - 1, r] : [1, "...", a - 1, a, a + 1, "...", r];
|
|
444
|
+
}), u = (r) => {
|
|
445
|
+
typeof r == "number" && (r < 1 || r > s.value || r === t.value || (t.value = r));
|
|
458
446
|
};
|
|
459
|
-
return (
|
|
460
|
-
const
|
|
461
|
-
return
|
|
447
|
+
return (r, a) => {
|
|
448
|
+
const f = O("f-icon");
|
|
449
|
+
return l(), c("div", _t, [
|
|
462
450
|
z("button", {
|
|
463
|
-
class: C(["page-btn", { disabled:
|
|
464
|
-
onClick: a[0] || (a[0] = (
|
|
451
|
+
class: C(["page-btn", { disabled: t.value === 1 }]),
|
|
452
|
+
onClick: a[0] || (a[0] = (m) => u(t.value - 1))
|
|
465
453
|
}, [
|
|
466
|
-
|
|
467
|
-
default:
|
|
468
|
-
|
|
454
|
+
S(f, null, {
|
|
455
|
+
default: I(() => [
|
|
456
|
+
S(p(Ve))
|
|
469
457
|
]),
|
|
470
458
|
_: 1
|
|
471
459
|
})
|
|
472
460
|
], 2),
|
|
473
|
-
z("ul",
|
|
474
|
-
(
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
default:
|
|
478
|
-
|
|
461
|
+
z("ul", ht, [
|
|
462
|
+
(l(!0), c(P, null, G(p(i), (m, d) => (l(), c(P, { key: d }, [
|
|
463
|
+
m === "..." ? (l(), c("li", vt, [
|
|
464
|
+
S(f, null, {
|
|
465
|
+
default: I(() => [
|
|
466
|
+
S(p(Re))
|
|
479
467
|
]),
|
|
480
468
|
_: 1
|
|
481
469
|
})
|
|
482
|
-
])) : (
|
|
470
|
+
])) : (l(), c("li", {
|
|
483
471
|
key: 1,
|
|
484
|
-
class: C(["page-btn", { active:
|
|
485
|
-
onClick: (
|
|
486
|
-
},
|
|
472
|
+
class: C(["page-btn", { active: t.value === m }]),
|
|
473
|
+
onClick: (k) => u(m)
|
|
474
|
+
}, V(m), 11, gt))
|
|
487
475
|
], 64))), 128))
|
|
488
476
|
]),
|
|
489
477
|
z("button", {
|
|
490
|
-
class: C(["page-btn", { disabled:
|
|
491
|
-
onClick: a[1] || (a[1] = (
|
|
478
|
+
class: C(["page-btn", { disabled: t.value === p(s) }]),
|
|
479
|
+
onClick: a[1] || (a[1] = (m) => u(t.value + 1))
|
|
492
480
|
}, [
|
|
493
|
-
|
|
494
|
-
default:
|
|
495
|
-
|
|
481
|
+
S(f, null, {
|
|
482
|
+
default: I(() => [
|
|
483
|
+
S(p(Ae))
|
|
496
484
|
]),
|
|
497
485
|
_: 1
|
|
498
486
|
})
|
|
@@ -500,87 +488,87 @@ const Pe = (r, e, t) => {
|
|
|
500
488
|
]);
|
|
501
489
|
};
|
|
502
490
|
}
|
|
503
|
-
}),
|
|
491
|
+
}), yt = /* @__PURE__ */ b(bt, [["__scopeId", "data-v-e58f1ac9"]]), $t = {
|
|
504
492
|
key: 0,
|
|
505
493
|
class: "f-card__header"
|
|
506
|
-
},
|
|
494
|
+
}, kt = {
|
|
507
495
|
key: 0,
|
|
508
496
|
class: "f-card__header-extra"
|
|
509
|
-
},
|
|
497
|
+
}, wt = {
|
|
510
498
|
key: 1,
|
|
511
499
|
class: "f-card__cover"
|
|
512
|
-
},
|
|
500
|
+
}, Ft = {
|
|
513
501
|
key: 2,
|
|
514
502
|
class: "f-card__body"
|
|
515
|
-
},
|
|
503
|
+
}, zt = {
|
|
516
504
|
key: 3,
|
|
517
505
|
class: "f-card__footer"
|
|
518
|
-
},
|
|
506
|
+
}, Ct = {
|
|
519
507
|
key: 0,
|
|
520
508
|
class: "f-card__header"
|
|
521
|
-
},
|
|
509
|
+
}, xt = {
|
|
522
510
|
key: 0,
|
|
523
511
|
class: "f-card__header-extra"
|
|
524
|
-
},
|
|
512
|
+
}, St = {
|
|
525
513
|
key: 1,
|
|
526
514
|
class: "f-card__cover"
|
|
527
|
-
},
|
|
515
|
+
}, Mt = { class: "f-card__content" }, It = {
|
|
528
516
|
key: 0,
|
|
529
517
|
class: "f-card__body"
|
|
530
|
-
},
|
|
518
|
+
}, Tt = {
|
|
531
519
|
key: 1,
|
|
532
520
|
class: "f-card__footer"
|
|
533
|
-
},
|
|
521
|
+
}, Bt = /* @__PURE__ */ g({
|
|
534
522
|
__name: "FCard",
|
|
535
523
|
props: {
|
|
536
524
|
hoverable: { type: Boolean, default: !0 },
|
|
537
525
|
direction: { default: "vertical" }
|
|
538
526
|
},
|
|
539
|
-
setup(
|
|
540
|
-
return (e,
|
|
527
|
+
setup(n) {
|
|
528
|
+
return (e, o) => (l(), c("div", {
|
|
541
529
|
class: C(["f-card", [`f-card--${e.direction}`, { "is-hoverable": e.hoverable }]])
|
|
542
530
|
}, [
|
|
543
|
-
e.direction === "vertical" ? (
|
|
544
|
-
e.$slots.header || e.$slots["header-extra"] ? (
|
|
545
|
-
|
|
546
|
-
e.$slots["header-extra"] ? (
|
|
547
|
-
|
|
548
|
-
])) :
|
|
549
|
-
])) :
|
|
550
|
-
e.$slots.cover ? (
|
|
551
|
-
|
|
552
|
-
])) :
|
|
553
|
-
e.$slots.default ? (
|
|
554
|
-
|
|
555
|
-
])) :
|
|
556
|
-
e.$slots.footer ? (
|
|
557
|
-
|
|
558
|
-
])) :
|
|
559
|
-
], 64)) : (
|
|
560
|
-
e.$slots.header || e.$slots["header-extra"] ? (
|
|
561
|
-
|
|
562
|
-
e.$slots["header-extra"] ? (
|
|
563
|
-
|
|
564
|
-
])) :
|
|
565
|
-
])) :
|
|
566
|
-
e.$slots.cover ? (
|
|
567
|
-
|
|
568
|
-
])) :
|
|
569
|
-
z("div",
|
|
570
|
-
e.$slots.default ? (
|
|
571
|
-
|
|
572
|
-
])) :
|
|
573
|
-
e.$slots.footer ? (
|
|
574
|
-
|
|
575
|
-
])) :
|
|
531
|
+
e.direction === "vertical" ? (l(), c(P, { key: 0 }, [
|
|
532
|
+
e.$slots.header || e.$slots["header-extra"] ? (l(), c("div", $t, [
|
|
533
|
+
v(e.$slots, "header", {}, void 0, !0),
|
|
534
|
+
e.$slots["header-extra"] ? (l(), c("div", kt, [
|
|
535
|
+
v(e.$slots, "header-extra", {}, void 0, !0)
|
|
536
|
+
])) : y("", !0)
|
|
537
|
+
])) : y("", !0),
|
|
538
|
+
e.$slots.cover ? (l(), c("div", wt, [
|
|
539
|
+
v(e.$slots, "cover", {}, void 0, !0)
|
|
540
|
+
])) : y("", !0),
|
|
541
|
+
e.$slots.default ? (l(), c("div", Ft, [
|
|
542
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
543
|
+
])) : y("", !0),
|
|
544
|
+
e.$slots.footer ? (l(), c("div", zt, [
|
|
545
|
+
v(e.$slots, "footer", {}, void 0, !0)
|
|
546
|
+
])) : y("", !0)
|
|
547
|
+
], 64)) : (l(), c(P, { key: 1 }, [
|
|
548
|
+
e.$slots.header || e.$slots["header-extra"] ? (l(), c("div", Ct, [
|
|
549
|
+
v(e.$slots, "header", {}, void 0, !0),
|
|
550
|
+
e.$slots["header-extra"] ? (l(), c("div", xt, [
|
|
551
|
+
v(e.$slots, "header-extra", {}, void 0, !0)
|
|
552
|
+
])) : y("", !0)
|
|
553
|
+
])) : y("", !0),
|
|
554
|
+
e.$slots.cover ? (l(), c("div", St, [
|
|
555
|
+
v(e.$slots, "cover", {}, void 0, !0)
|
|
556
|
+
])) : y("", !0),
|
|
557
|
+
z("div", Mt, [
|
|
558
|
+
e.$slots.default ? (l(), c("div", It, [
|
|
559
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
560
|
+
])) : y("", !0),
|
|
561
|
+
e.$slots.footer ? (l(), c("div", Tt, [
|
|
562
|
+
v(e.$slots, "footer", {}, void 0, !0)
|
|
563
|
+
])) : y("", !0)
|
|
576
564
|
])
|
|
577
565
|
], 64))
|
|
578
566
|
], 2));
|
|
579
567
|
}
|
|
580
|
-
}),
|
|
568
|
+
}), Vt = /* @__PURE__ */ b(Bt, [["__scopeId", "data-v-a66fa373"]]), Rt = {
|
|
581
569
|
key: 0,
|
|
582
570
|
class: "f-tag__dot"
|
|
583
|
-
},
|
|
571
|
+
}, At = /* @__PURE__ */ g({
|
|
584
572
|
__name: "FTag",
|
|
585
573
|
props: {
|
|
586
574
|
color: {},
|
|
@@ -590,36 +578,36 @@ const Pe = (r, e, t) => {
|
|
|
590
578
|
size: { default: "normal" }
|
|
591
579
|
},
|
|
592
580
|
emits: ["close"],
|
|
593
|
-
setup(
|
|
594
|
-
const
|
|
595
|
-
return (
|
|
596
|
-
var
|
|
597
|
-
const
|
|
598
|
-
return
|
|
581
|
+
setup(n, { emit: e }) {
|
|
582
|
+
const o = e, t = R(!1);
|
|
583
|
+
return (s, i) => {
|
|
584
|
+
var r, a, f;
|
|
585
|
+
const u = O("f-icon");
|
|
586
|
+
return l(), c("span", {
|
|
599
587
|
class: C(["f-tag", [
|
|
600
|
-
`f-tag--${(
|
|
601
|
-
`f-tag--${(a =
|
|
602
|
-
(
|
|
588
|
+
`f-tag--${(r = s.type) != null ? r : "round"}`,
|
|
589
|
+
`f-tag--${(a = s.effect) != null ? a : "light"}`,
|
|
590
|
+
(f = s.color) != null ? f : "default"
|
|
603
591
|
]]),
|
|
604
|
-
onMouseenter:
|
|
605
|
-
onMouseleave:
|
|
592
|
+
onMouseenter: i[1] || (i[1] = (m) => t.value = !0),
|
|
593
|
+
onMouseleave: i[2] || (i[2] = (m) => t.value = !1)
|
|
606
594
|
}, [
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
595
|
+
s.type === "dot" ? (l(), c("span", Rt)) : y("", !0),
|
|
596
|
+
v(s.$slots, "default", {}, void 0, !0),
|
|
597
|
+
s.closable ? (l(), W(u, {
|
|
610
598
|
key: 1,
|
|
611
599
|
class: "f-tag__close",
|
|
612
|
-
onClick:
|
|
600
|
+
onClick: i[0] || (i[0] = se((m) => o("close"), ["stop"]))
|
|
613
601
|
}, {
|
|
614
|
-
default:
|
|
615
|
-
(
|
|
602
|
+
default: I(() => [
|
|
603
|
+
(l(), W(Y(p(t) ? p(Pe) : p(We))))
|
|
616
604
|
]),
|
|
617
605
|
_: 1
|
|
618
|
-
})) :
|
|
606
|
+
})) : y("", !0)
|
|
619
607
|
], 34);
|
|
620
608
|
};
|
|
621
609
|
}
|
|
622
|
-
}),
|
|
610
|
+
}), Pt = /* @__PURE__ */ b(At, [["__scopeId", "data-v-9f7974a7"]]), Wt = /* @__PURE__ */ g({
|
|
623
611
|
__name: "FTooltip",
|
|
624
612
|
props: {
|
|
625
613
|
content: {},
|
|
@@ -629,77 +617,77 @@ const Pe = (r, e, t) => {
|
|
|
629
617
|
offset: { default: 6 },
|
|
630
618
|
maxWidth: { default: 240 }
|
|
631
619
|
},
|
|
632
|
-
setup(
|
|
633
|
-
const e =
|
|
634
|
-
let
|
|
635
|
-
const
|
|
636
|
-
e.disabled || (
|
|
637
|
-
|
|
620
|
+
setup(n) {
|
|
621
|
+
const e = n, o = R(null), t = R(null), s = R(!1), i = R({ top: 0, left: 0 });
|
|
622
|
+
let u = null;
|
|
623
|
+
const r = () => {
|
|
624
|
+
e.disabled || (u = setTimeout(() => {
|
|
625
|
+
s.value = !0, pe(f);
|
|
638
626
|
}, e.delay));
|
|
639
627
|
}, a = () => {
|
|
640
|
-
|
|
641
|
-
},
|
|
642
|
-
var
|
|
643
|
-
if (!
|
|
644
|
-
const
|
|
645
|
-
if (!
|
|
646
|
-
const
|
|
647
|
-
let
|
|
648
|
-
switch (
|
|
628
|
+
u && clearTimeout(u), s.value = !1;
|
|
629
|
+
}, f = () => {
|
|
630
|
+
var Z, _;
|
|
631
|
+
if (!t.value) return;
|
|
632
|
+
const m = (_ = (Z = o.value) == null ? void 0 : Z.firstElementChild) != null ? _ : o.value;
|
|
633
|
+
if (!m) return;
|
|
634
|
+
const d = m.getBoundingClientRect(), k = t.value.getBoundingClientRect(), x = e.offset, [w, B] = e.placement.split("-");
|
|
635
|
+
let A = 0, M = 0;
|
|
636
|
+
switch (w) {
|
|
649
637
|
case "top":
|
|
650
|
-
|
|
638
|
+
A = d.top - k.height - x;
|
|
651
639
|
break;
|
|
652
640
|
case "bottom":
|
|
653
|
-
|
|
641
|
+
A = d.bottom + x;
|
|
654
642
|
break;
|
|
655
643
|
case "left":
|
|
656
|
-
|
|
644
|
+
M = d.left - k.width - x;
|
|
657
645
|
break;
|
|
658
646
|
case "right":
|
|
659
|
-
|
|
647
|
+
M = d.right + x;
|
|
660
648
|
break;
|
|
661
649
|
}
|
|
662
|
-
|
|
663
|
-
const
|
|
664
|
-
|
|
650
|
+
w === "top" || w === "bottom" ? B === "start" ? M = d.left : B === "end" ? M = d.right - k.width : M = d.left + (d.width - k.width) / 2 : B === "start" ? A = d.top : B === "end" ? A = d.bottom - k.height : A = d.top + (d.height - k.height) / 2;
|
|
651
|
+
const E = 8;
|
|
652
|
+
M = Math.max(E, Math.min(M, window.innerWidth - k.width - E)), A = Math.max(E, Math.min(A, window.innerHeight - k.height - E)), i.value = { top: A + window.scrollY, left: M + window.scrollX };
|
|
665
653
|
};
|
|
666
|
-
return
|
|
654
|
+
return oe(a), (m, d) => (l(), c("div", {
|
|
667
655
|
class: "f-tooltip",
|
|
668
656
|
ref_key: "triggerRef",
|
|
669
|
-
ref:
|
|
670
|
-
onMouseenter:
|
|
657
|
+
ref: o,
|
|
658
|
+
onMouseenter: r,
|
|
671
659
|
onMouseleave: a
|
|
672
660
|
}, [
|
|
673
|
-
|
|
674
|
-
(
|
|
675
|
-
|
|
676
|
-
default:
|
|
677
|
-
|
|
661
|
+
v(m.$slots, "default", {}, void 0, !0),
|
|
662
|
+
(l(), W(fe, { to: "body" }, [
|
|
663
|
+
S(K, { name: "f-tooltip" }, {
|
|
664
|
+
default: I(() => [
|
|
665
|
+
p(s) && (m.content || m.$slots.content) ? (l(), c("div", {
|
|
678
666
|
key: 0,
|
|
679
667
|
ref_key: "tooltipRef",
|
|
680
|
-
ref:
|
|
681
|
-
class: C(["f-tooltip-wrapper", `is-${
|
|
682
|
-
style:
|
|
683
|
-
top: `${
|
|
684
|
-
left: `${
|
|
685
|
-
maxWidth: `${
|
|
668
|
+
ref: t,
|
|
669
|
+
class: C(["f-tooltip-wrapper", `is-${m.placement.split("-")[0]}`]),
|
|
670
|
+
style: T({
|
|
671
|
+
top: `${p(i).top}px`,
|
|
672
|
+
left: `${p(i).left}px`,
|
|
673
|
+
maxWidth: `${m.maxWidth}px`
|
|
686
674
|
})
|
|
687
675
|
}, [
|
|
688
|
-
|
|
689
|
-
|
|
676
|
+
v(m.$slots, "content", {}, () => [
|
|
677
|
+
me(V(m.content), 1)
|
|
690
678
|
], !0),
|
|
691
|
-
|
|
692
|
-
], 6)) :
|
|
679
|
+
d[0] || (d[0] = z("span", { class: "f-tooltip-arrow" }, null, -1))
|
|
680
|
+
], 6)) : y("", !0)
|
|
693
681
|
]),
|
|
694
682
|
_: 3
|
|
695
683
|
})
|
|
696
684
|
]))
|
|
697
685
|
], 544));
|
|
698
686
|
}
|
|
699
|
-
}),
|
|
687
|
+
}), jt = /* @__PURE__ */ b(Wt, [["__scopeId", "data-v-be9acca7"]]), Dt = { class: "f-progress" }, Et = {
|
|
700
688
|
key: 0,
|
|
701
689
|
class: "f-progress__text"
|
|
702
|
-
},
|
|
690
|
+
}, Lt = /* @__PURE__ */ g({
|
|
703
691
|
__name: "FProgress",
|
|
704
692
|
props: {
|
|
705
693
|
percent: {},
|
|
@@ -707,25 +695,25 @@ const Pe = (r, e, t) => {
|
|
|
707
695
|
showText: { type: Boolean, default: !1 },
|
|
708
696
|
height: { default: 5 }
|
|
709
697
|
},
|
|
710
|
-
setup(
|
|
711
|
-
const e =
|
|
712
|
-
return (
|
|
698
|
+
setup(n) {
|
|
699
|
+
const e = n, o = h(() => Math.min(100, Math.max(0, e.percent)));
|
|
700
|
+
return (t, s) => (l(), c("div", Dt, [
|
|
713
701
|
z("div", {
|
|
714
702
|
class: "f-progress__track",
|
|
715
|
-
style:
|
|
703
|
+
style: T({ height: `${t.height}px` })
|
|
716
704
|
}, [
|
|
717
705
|
z("div", {
|
|
718
706
|
class: "f-progress__fill",
|
|
719
|
-
style:
|
|
720
|
-
width: `${
|
|
721
|
-
background:
|
|
707
|
+
style: T({
|
|
708
|
+
width: `${p(o)}%`,
|
|
709
|
+
background: t.color
|
|
722
710
|
})
|
|
723
711
|
}, null, 4)
|
|
724
712
|
], 4),
|
|
725
|
-
|
|
713
|
+
t.showText ? (l(), c("span", Et, V(p(o)) + "%", 1)) : y("", !0)
|
|
726
714
|
]));
|
|
727
715
|
}
|
|
728
|
-
}),
|
|
716
|
+
}), Ot = /* @__PURE__ */ b(Lt, [["__scopeId", "data-v-c2164d6e"]]), Ht = { class: "f-tabs__nav-container" }, Nt = { class: "f-tabs__nav" }, qt = ["onClick"], Gt = { class: "f-tabs__label" }, Ut = /* @__PURE__ */ g({
|
|
729
717
|
__name: "FTabs",
|
|
730
718
|
props: {
|
|
731
719
|
tabs: {},
|
|
@@ -733,93 +721,93 @@ const Pe = (r, e, t) => {
|
|
|
733
721
|
type: { default: "line" }
|
|
734
722
|
},
|
|
735
723
|
emits: ["update:active", "change"],
|
|
736
|
-
setup(
|
|
737
|
-
const
|
|
724
|
+
setup(n, { emit: e }) {
|
|
725
|
+
const o = n, t = e, s = h({
|
|
738
726
|
get: () => {
|
|
739
|
-
var
|
|
740
|
-
if (
|
|
741
|
-
return
|
|
742
|
-
const
|
|
743
|
-
return (
|
|
727
|
+
var r;
|
|
728
|
+
if (o.active && o.tabs.some((a) => a.name === o.active && !a.disabled))
|
|
729
|
+
return o.active;
|
|
730
|
+
const u = o.tabs.find((a) => !a.disabled);
|
|
731
|
+
return (r = u == null ? void 0 : u.name) != null ? r : "";
|
|
744
732
|
},
|
|
745
|
-
set: (
|
|
746
|
-
|
|
733
|
+
set: (u) => {
|
|
734
|
+
t("update:active", u), t("change", u);
|
|
747
735
|
}
|
|
748
|
-
}),
|
|
749
|
-
|
|
736
|
+
}), i = (u, r) => {
|
|
737
|
+
r || (s.value = u);
|
|
750
738
|
};
|
|
751
|
-
return (
|
|
752
|
-
class: C(["f-tabs", [`f-tabs--${
|
|
739
|
+
return (u, r) => (l(), c("div", {
|
|
740
|
+
class: C(["f-tabs", [`f-tabs--${u.type}`]])
|
|
753
741
|
}, [
|
|
754
|
-
z("div",
|
|
755
|
-
z("div",
|
|
756
|
-
(
|
|
742
|
+
z("div", Ht, [
|
|
743
|
+
z("div", Nt, [
|
|
744
|
+
(l(!0), c(P, null, G(u.tabs, (a) => (l(), c("div", {
|
|
757
745
|
key: a.name,
|
|
758
746
|
class: C(["f-tabs__tab", {
|
|
759
|
-
active:
|
|
747
|
+
active: p(s) === a.name,
|
|
760
748
|
disabled: a.disabled
|
|
761
749
|
}]),
|
|
762
|
-
onClick: (
|
|
750
|
+
onClick: (f) => i(a.name, a.disabled)
|
|
763
751
|
}, [
|
|
764
|
-
z("span",
|
|
765
|
-
], 10,
|
|
752
|
+
z("span", Gt, V(a.label), 1)
|
|
753
|
+
], 10, qt))), 128))
|
|
766
754
|
])
|
|
767
755
|
]),
|
|
768
|
-
(
|
|
756
|
+
(l(!0), c(P, null, G(u.tabs, (a) => te((l(), c("div", {
|
|
769
757
|
key: a.name,
|
|
770
758
|
class: "f-tabs__panel"
|
|
771
759
|
}, [
|
|
772
|
-
|
|
760
|
+
v(u.$slots, a.name, {}, void 0, !0)
|
|
773
761
|
])), [
|
|
774
|
-
[
|
|
762
|
+
[ue, p(s) === a.name]
|
|
775
763
|
])), 128))
|
|
776
764
|
], 2));
|
|
777
765
|
}
|
|
778
|
-
}),
|
|
766
|
+
}), Xt = /* @__PURE__ */ b(Ut, [["__scopeId", "data-v-268fc654"]]), Yt = {
|
|
779
767
|
class: "f-breadcrumb__current",
|
|
780
768
|
"aria-current": "page"
|
|
781
|
-
},
|
|
769
|
+
}, Jt = ["href"], Kt = {
|
|
782
770
|
key: 3,
|
|
783
771
|
class: "f-breadcrumb__text"
|
|
784
|
-
},
|
|
772
|
+
}, Qt = /* @__PURE__ */ g({
|
|
785
773
|
__name: "FBreadcrumb",
|
|
786
774
|
props: {
|
|
787
775
|
items: { default: () => [] },
|
|
788
776
|
separator: { default: "/" },
|
|
789
777
|
animated: { type: Boolean, default: !1 }
|
|
790
778
|
},
|
|
791
|
-
setup(
|
|
792
|
-
return (e,
|
|
779
|
+
setup(n) {
|
|
780
|
+
return (e, o) => (l(), c("nav", {
|
|
793
781
|
class: C(["f-breadcrumb", { "f-breadcrumb--animated": e.animated }]),
|
|
794
782
|
"aria-label": "breadcrumb"
|
|
795
783
|
}, [
|
|
796
|
-
|
|
797
|
-
default:
|
|
798
|
-
(
|
|
799
|
-
key:
|
|
784
|
+
S(Fe, { name: "breadcrumb" }, {
|
|
785
|
+
default: I(() => [
|
|
786
|
+
(l(!0), c(P, null, G(e.items, (t, s) => (l(), c(P, {
|
|
787
|
+
key: t.label
|
|
800
788
|
}, [
|
|
801
|
-
|
|
802
|
-
key: `sep-${
|
|
789
|
+
s > 0 ? (l(), c("span", {
|
|
790
|
+
key: `sep-${t.label}`,
|
|
803
791
|
class: "f-breadcrumb__sep",
|
|
804
792
|
"aria-hidden": "true"
|
|
805
|
-
},
|
|
806
|
-
|
|
793
|
+
}, V(e.separator), 1)) : y("", !0),
|
|
794
|
+
s === e.items.length - 1 ? v(e.$slots, "default", {
|
|
807
795
|
key: 1,
|
|
808
|
-
item:
|
|
796
|
+
item: t
|
|
809
797
|
}, () => [
|
|
810
|
-
z("span",
|
|
811
|
-
], !0) :
|
|
798
|
+
z("span", Yt, V(t.label), 1)
|
|
799
|
+
], !0) : t.href ? (l(), c("a", {
|
|
812
800
|
key: 2,
|
|
813
|
-
href:
|
|
801
|
+
href: t.href,
|
|
814
802
|
class: "f-breadcrumb__link"
|
|
815
|
-
},
|
|
803
|
+
}, V(t.label), 9, Jt)) : (l(), c("span", Kt, V(t.label), 1))
|
|
816
804
|
], 64))), 128))
|
|
817
805
|
]),
|
|
818
806
|
_: 3
|
|
819
807
|
})
|
|
820
808
|
], 2));
|
|
821
809
|
}
|
|
822
|
-
}),
|
|
810
|
+
}), Zt = /* @__PURE__ */ b(Qt, [["__scopeId", "data-v-bb787dcc"]]), eo = /* @__PURE__ */ g({
|
|
823
811
|
__name: "FCol",
|
|
824
812
|
props: {
|
|
825
813
|
span: { default: 24 },
|
|
@@ -830,28 +818,28 @@ const Pe = (r, e, t) => {
|
|
|
830
818
|
md: {},
|
|
831
819
|
lg: {}
|
|
832
820
|
},
|
|
833
|
-
setup(
|
|
834
|
-
const e =
|
|
821
|
+
setup(n) {
|
|
822
|
+
const e = n, o = (i) => typeof i == "number" ? { span: i } : i, t = h(() => ({
|
|
835
823
|
"--col-span": e.span,
|
|
836
824
|
"--col-offset": e.offset,
|
|
837
825
|
"--col-order": e.order
|
|
838
|
-
})),
|
|
839
|
-
const
|
|
840
|
-
for (const [
|
|
826
|
+
})), s = h(() => {
|
|
827
|
+
const i = [], u = { xs: e.xs, sm: e.sm, md: e.md, lg: e.lg };
|
|
828
|
+
for (const [r, a] of Object.entries(u)) {
|
|
841
829
|
if (a === void 0) continue;
|
|
842
|
-
const { span:
|
|
843
|
-
|
|
830
|
+
const { span: f, offset: m, order: d } = o(a);
|
|
831
|
+
f !== void 0 && i.push(`f-col--${r}-${f}`), m !== void 0 && i.push(`f-col--${r}-offset-${m}`), d !== void 0 && i.push(`f-col--${r}-order-${d}`);
|
|
844
832
|
}
|
|
845
|
-
return
|
|
833
|
+
return i;
|
|
846
834
|
});
|
|
847
|
-
return (
|
|
848
|
-
class: C(["f-col",
|
|
849
|
-
style:
|
|
835
|
+
return (i, u) => (l(), c("div", {
|
|
836
|
+
class: C(["f-col", p(s)]),
|
|
837
|
+
style: T(p(t))
|
|
850
838
|
}, [
|
|
851
|
-
|
|
839
|
+
v(i.$slots, "default", {}, void 0, !0)
|
|
852
840
|
], 6));
|
|
853
841
|
}
|
|
854
|
-
}),
|
|
842
|
+
}), to = /* @__PURE__ */ b(eo, [["__scopeId", "data-v-5a8b0cb4"]]), oo = /* @__PURE__ */ g({
|
|
855
843
|
__name: "FRow",
|
|
856
844
|
props: {
|
|
857
845
|
gutter: { default: 0 },
|
|
@@ -860,47 +848,47 @@ const Pe = (r, e, t) => {
|
|
|
860
848
|
wrap: { default: "wrap" },
|
|
861
849
|
tag: { default: "div" }
|
|
862
850
|
},
|
|
863
|
-
setup(
|
|
864
|
-
const e =
|
|
851
|
+
setup(n) {
|
|
852
|
+
const e = n, o = h(
|
|
865
853
|
() => Array.isArray(e.gutter) ? e.gutter[0] : e.gutter
|
|
866
|
-
),
|
|
854
|
+
), t = h(
|
|
867
855
|
() => Array.isArray(e.gutter) ? e.gutter[1] : 0
|
|
868
|
-
),
|
|
856
|
+
), s = {
|
|
869
857
|
start: "flex-start",
|
|
870
858
|
end: "flex-end",
|
|
871
859
|
center: "center",
|
|
872
860
|
"space-between": "space-between",
|
|
873
861
|
"space-around": "space-around",
|
|
874
862
|
"space-evenly": "space-evenly"
|
|
875
|
-
},
|
|
863
|
+
}, i = {
|
|
876
864
|
top: "flex-start",
|
|
877
865
|
middle: "center",
|
|
878
866
|
bottom: "flex-end",
|
|
879
867
|
stretch: "stretch"
|
|
880
|
-
},
|
|
881
|
-
marginLeft:
|
|
882
|
-
marginRight:
|
|
883
|
-
rowGap:
|
|
884
|
-
justifyContent:
|
|
885
|
-
alignItems:
|
|
868
|
+
}, u = h(() => ({
|
|
869
|
+
marginLeft: o.value ? `-${o.value / 2}px` : void 0,
|
|
870
|
+
marginRight: o.value ? `-${o.value / 2}px` : void 0,
|
|
871
|
+
rowGap: t.value ? `${t.value}px` : void 0,
|
|
872
|
+
justifyContent: s[e.justify],
|
|
873
|
+
alignItems: i[e.align],
|
|
886
874
|
flexWrap: e.wrap,
|
|
887
|
-
"--row-gutter-h":
|
|
875
|
+
"--row-gutter-h": o.value ? `${o.value / 2}px` : "0px"
|
|
888
876
|
}));
|
|
889
|
-
return (
|
|
877
|
+
return (r, a) => (l(), W(Y(r.tag), {
|
|
890
878
|
class: "f-row",
|
|
891
|
-
style:
|
|
879
|
+
style: T(p(u))
|
|
892
880
|
}, {
|
|
893
|
-
default:
|
|
894
|
-
|
|
881
|
+
default: I(() => [
|
|
882
|
+
v(r.$slots, "default", {}, void 0, !0)
|
|
895
883
|
]),
|
|
896
884
|
_: 3
|
|
897
885
|
}, 8, ["style"]));
|
|
898
886
|
}
|
|
899
|
-
}),
|
|
887
|
+
}), so = /* @__PURE__ */ b(oo, [["__scopeId", "data-v-72f62339"]]), ao = { class: "f-space__item" }, no = {
|
|
900
888
|
key: 0,
|
|
901
889
|
class: "f-space__split",
|
|
902
890
|
"aria-hidden": "true"
|
|
903
|
-
},
|
|
891
|
+
}, lo = /* @__PURE__ */ g({
|
|
904
892
|
__name: "FSpace",
|
|
905
893
|
props: {
|
|
906
894
|
direction: { default: "horizontal" },
|
|
@@ -910,80 +898,80 @@ const Pe = (r, e, t) => {
|
|
|
910
898
|
wrap: { type: Boolean, default: !1 },
|
|
911
899
|
split: {}
|
|
912
900
|
},
|
|
913
|
-
setup(
|
|
914
|
-
const e =
|
|
901
|
+
setup(n) {
|
|
902
|
+
const e = n, o = {
|
|
915
903
|
small: 6,
|
|
916
904
|
normal: 12,
|
|
917
905
|
large: 18
|
|
918
|
-
},
|
|
906
|
+
}, t = (a) => typeof a == "number" ? a : o[a], s = h(() => {
|
|
919
907
|
const a = e.size;
|
|
920
|
-
return Array.isArray(a) ? `${
|
|
921
|
-
}),
|
|
908
|
+
return Array.isArray(a) ? `${t(a[1])}px ${t(a[0])}px` : `${t(a)}px`;
|
|
909
|
+
}), i = h(() => ({
|
|
922
910
|
flexDirection: e.direction === "vertical" ? "column" : "row",
|
|
923
911
|
alignItems: e.align,
|
|
924
912
|
justifyContent: e.justify,
|
|
925
913
|
flexWrap: e.wrap ? "wrap" : "nowrap",
|
|
926
|
-
gap:
|
|
927
|
-
})),
|
|
928
|
-
var
|
|
929
|
-
const a = (
|
|
914
|
+
gap: s.value
|
|
915
|
+
})), u = ze(), r = h(() => {
|
|
916
|
+
var m;
|
|
917
|
+
const a = (m = u.default) == null ? void 0 : m.call(u);
|
|
930
918
|
if (!a) return [];
|
|
931
|
-
const
|
|
932
|
-
for (const
|
|
933
|
-
|
|
934
|
-
return
|
|
919
|
+
const f = [];
|
|
920
|
+
for (const d of a)
|
|
921
|
+
d.type === P ? f.push(...d.children) : f.push(d);
|
|
922
|
+
return f.filter((d) => d.type !== Comment);
|
|
935
923
|
});
|
|
936
|
-
return (a,
|
|
924
|
+
return (a, f) => (l(), c("div", {
|
|
937
925
|
class: "f-space",
|
|
938
|
-
style:
|
|
926
|
+
style: T(p(i))
|
|
939
927
|
}, [
|
|
940
|
-
(
|
|
941
|
-
z("div",
|
|
942
|
-
(
|
|
928
|
+
(l(!0), c(P, null, G(p(r), (m, d) => (l(), c(P, { key: d }, [
|
|
929
|
+
z("div", ao, [
|
|
930
|
+
(l(), W(Y(m)))
|
|
943
931
|
]),
|
|
944
|
-
a.split &&
|
|
932
|
+
a.split && d < p(r).length - 1 ? (l(), c("span", no, V(a.split), 1)) : y("", !0)
|
|
945
933
|
], 64))), 128))
|
|
946
934
|
], 4));
|
|
947
935
|
}
|
|
948
|
-
}),
|
|
936
|
+
}), ro = /* @__PURE__ */ b(lo, [["__scopeId", "data-v-5fb3b1a0"]]), io = /* @__PURE__ */ g({
|
|
949
937
|
__name: "FContainer",
|
|
950
938
|
props: {
|
|
951
939
|
gap: { default: 12 }
|
|
952
940
|
},
|
|
953
|
-
setup(
|
|
954
|
-
const e =
|
|
941
|
+
setup(n) {
|
|
942
|
+
const e = n, o = h(() => ({
|
|
955
943
|
gap: typeof e.gap == "number" ? `${e.gap}px` : e.gap
|
|
956
944
|
}));
|
|
957
|
-
return (
|
|
945
|
+
return (t, s) => (l(), c("div", {
|
|
958
946
|
class: "f-container",
|
|
959
|
-
style:
|
|
947
|
+
style: T(p(o))
|
|
960
948
|
}, [
|
|
961
|
-
|
|
949
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
962
950
|
], 4));
|
|
963
951
|
}
|
|
964
|
-
}),
|
|
952
|
+
}), co = /* @__PURE__ */ b(io, [["__scopeId", "data-v-08450ddf"]]), uo = /* @__PURE__ */ g({
|
|
965
953
|
__name: "FDivider",
|
|
966
954
|
props: {
|
|
967
955
|
color: {},
|
|
968
956
|
direction: { default: "horizontal" },
|
|
969
957
|
line: { default: "solid" }
|
|
970
958
|
},
|
|
971
|
-
setup(
|
|
972
|
-
const e =
|
|
973
|
-
const
|
|
959
|
+
setup(n) {
|
|
960
|
+
const e = n, o = h(() => {
|
|
961
|
+
const t = e.color || "var(--el-color-primary)", s = e.direction === "horizontal";
|
|
974
962
|
return {
|
|
975
|
-
borderTop:
|
|
976
|
-
borderLeft:
|
|
977
|
-
height:
|
|
978
|
-
width:
|
|
979
|
-
margin:
|
|
963
|
+
borderTop: s ? `${e.line} ${t}` : "none",
|
|
964
|
+
borderLeft: s ? "none" : `${e.line} ${t}`,
|
|
965
|
+
height: s ? "0" : "100%",
|
|
966
|
+
width: s ? "100%" : "0",
|
|
967
|
+
margin: s ? "24px 0" : "0"
|
|
980
968
|
};
|
|
981
969
|
});
|
|
982
|
-
return (
|
|
983
|
-
style:
|
|
970
|
+
return (t, s) => (l(), c("hr", {
|
|
971
|
+
style: T(o.value)
|
|
984
972
|
}, null, 4));
|
|
985
973
|
}
|
|
986
|
-
}),
|
|
974
|
+
}), po = /* @__PURE__ */ b(uo, [["__scopeId", "data-v-512ee743"]]), fo = ["src", "alt"], mo = /* @__PURE__ */ g({
|
|
987
975
|
__name: "FAvatar",
|
|
988
976
|
props: {
|
|
989
977
|
src: {},
|
|
@@ -992,39 +980,39 @@ const Pe = (r, e, t) => {
|
|
|
992
980
|
shape: { default: "circle" },
|
|
993
981
|
icon: {}
|
|
994
982
|
},
|
|
995
|
-
setup(
|
|
996
|
-
const e =
|
|
983
|
+
setup(n) {
|
|
984
|
+
const e = n, o = {
|
|
997
985
|
small: "32px",
|
|
998
986
|
normal: "48px",
|
|
999
987
|
large: "64px"
|
|
1000
|
-
},
|
|
1001
|
-
width: typeof e.size == "string" ?
|
|
1002
|
-
height: typeof e.size == "string" ?
|
|
988
|
+
}, t = h(() => ({
|
|
989
|
+
width: typeof e.size == "string" ? o[e.size] : `${e.size}px`,
|
|
990
|
+
height: typeof e.size == "string" ? o[e.size] : `${e.size}px`,
|
|
1003
991
|
borderRadius: e.shape === "circle" ? "50%" : "8px"
|
|
1004
992
|
}));
|
|
1005
|
-
return (
|
|
1006
|
-
const
|
|
1007
|
-
return
|
|
993
|
+
return (s, i) => {
|
|
994
|
+
const u = O("f-icon");
|
|
995
|
+
return l(), c("div", {
|
|
1008
996
|
class: "f-avatar",
|
|
1009
|
-
style:
|
|
997
|
+
style: T(p(t))
|
|
1010
998
|
}, [
|
|
1011
|
-
|
|
999
|
+
s.src ? (l(), c("img", {
|
|
1012
1000
|
key: 0,
|
|
1013
|
-
src:
|
|
1014
|
-
alt:
|
|
1015
|
-
}, null, 8,
|
|
1001
|
+
src: s.src,
|
|
1002
|
+
alt: s.alt
|
|
1003
|
+
}, null, 8, fo)) : (l(), W(u, {
|
|
1016
1004
|
key: 1,
|
|
1017
1005
|
size: 24
|
|
1018
1006
|
}, {
|
|
1019
|
-
default:
|
|
1020
|
-
(
|
|
1007
|
+
default: I(() => [
|
|
1008
|
+
(l(), W(Y(s.icon ? s.icon : p(je))))
|
|
1021
1009
|
]),
|
|
1022
1010
|
_: 1
|
|
1023
1011
|
}))
|
|
1024
1012
|
], 4);
|
|
1025
1013
|
};
|
|
1026
1014
|
}
|
|
1027
|
-
}),
|
|
1015
|
+
}), _o = /* @__PURE__ */ b(mo, [["__scopeId", "data-v-799350d0"]]), ho = ["disabled"], vo = /* @__PURE__ */ g({
|
|
1028
1016
|
__name: "FButton",
|
|
1029
1017
|
props: {
|
|
1030
1018
|
size: { default: "normal" },
|
|
@@ -1033,49 +1021,49 @@ const Pe = (r, e, t) => {
|
|
|
1033
1021
|
bgColor: {},
|
|
1034
1022
|
variant: {}
|
|
1035
1023
|
},
|
|
1036
|
-
setup(
|
|
1037
|
-
const e =
|
|
1024
|
+
setup(n) {
|
|
1025
|
+
const e = n, o = {
|
|
1038
1026
|
small: { height: "24px", minWidth: "24px", padding: "0 8px", fontSize: "11px" },
|
|
1039
1027
|
normal: { height: "32px", minWidth: "32px", padding: "0 12px", fontSize: "12px" },
|
|
1040
1028
|
large: { height: "40px", minWidth: "40px", padding: "0 16px", fontSize: "13px" }
|
|
1041
|
-
},
|
|
1042
|
-
var
|
|
1043
|
-
return
|
|
1029
|
+
}, t = h(() => {
|
|
1030
|
+
var s;
|
|
1031
|
+
return ce(ie({}, (s = o[e.size]) != null ? s : o.normal), {
|
|
1044
1032
|
borderRadius: e.round === !0 ? "999px" : typeof e.round == "number" ? `${e.round}px` : "6px",
|
|
1045
1033
|
backgroundColor: e.bgColor
|
|
1046
1034
|
});
|
|
1047
1035
|
});
|
|
1048
|
-
return (
|
|
1049
|
-
var
|
|
1050
|
-
return
|
|
1036
|
+
return (s, i) => {
|
|
1037
|
+
var u;
|
|
1038
|
+
return l(), c("button", {
|
|
1051
1039
|
class: C(["f-button", [
|
|
1052
|
-
`f-button--${(
|
|
1053
|
-
{ "is-disabled":
|
|
1040
|
+
`f-button--${(u = s.variant) != null ? u : "default"}`,
|
|
1041
|
+
{ "is-disabled": s.disabled }
|
|
1054
1042
|
]]),
|
|
1055
|
-
style:
|
|
1056
|
-
disabled:
|
|
1043
|
+
style: T(p(t)),
|
|
1044
|
+
disabled: s.disabled
|
|
1057
1045
|
}, [
|
|
1058
|
-
|
|
1059
|
-
], 14,
|
|
1046
|
+
v(s.$slots, "default", {}, void 0, !0)
|
|
1047
|
+
], 14, ho);
|
|
1060
1048
|
};
|
|
1061
1049
|
}
|
|
1062
|
-
}),
|
|
1050
|
+
}), go = /* @__PURE__ */ b(vo, [["__scopeId", "data-v-eeff7101"]]), bo = /* @__PURE__ */ g({
|
|
1063
1051
|
__name: "FTypography",
|
|
1064
1052
|
props: {
|
|
1065
1053
|
color: { default: "" }
|
|
1066
1054
|
},
|
|
1067
|
-
setup(
|
|
1068
|
-
const e =
|
|
1055
|
+
setup(n) {
|
|
1056
|
+
const e = n, o = h(() => ({
|
|
1069
1057
|
color: e.color
|
|
1070
1058
|
}));
|
|
1071
|
-
return (
|
|
1059
|
+
return (t, s) => (l(), c("div", {
|
|
1072
1060
|
class: "f-typography",
|
|
1073
|
-
style:
|
|
1061
|
+
style: T(p(o))
|
|
1074
1062
|
}, [
|
|
1075
|
-
|
|
1063
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
1076
1064
|
], 4));
|
|
1077
1065
|
}
|
|
1078
|
-
}),
|
|
1066
|
+
}), yo = /* @__PURE__ */ b(bo, [["__scopeId", "data-v-54c9aca5"]]), $o = /* @__PURE__ */ g({
|
|
1079
1067
|
__name: "FText",
|
|
1080
1068
|
props: {
|
|
1081
1069
|
tag: { default: "span" },
|
|
@@ -1086,46 +1074,46 @@ const Pe = (r, e, t) => {
|
|
|
1086
1074
|
truncate: { type: Boolean },
|
|
1087
1075
|
italic: { type: Boolean }
|
|
1088
1076
|
},
|
|
1089
|
-
setup(
|
|
1090
|
-
const e =
|
|
1077
|
+
setup(n) {
|
|
1078
|
+
const e = n, o = {
|
|
1091
1079
|
1: "3xl",
|
|
1092
1080
|
2: "2xl",
|
|
1093
1081
|
3: "xl",
|
|
1094
1082
|
4: "lg",
|
|
1095
1083
|
5: "normal",
|
|
1096
1084
|
6: "sm"
|
|
1097
|
-
},
|
|
1085
|
+
}, t = {
|
|
1098
1086
|
1: "bolder",
|
|
1099
1087
|
2: "bold",
|
|
1100
1088
|
3: "bold",
|
|
1101
1089
|
4: "medium",
|
|
1102
1090
|
5: "medium",
|
|
1103
1091
|
6: "normal"
|
|
1104
|
-
},
|
|
1105
|
-
var
|
|
1106
|
-
return e.heading ? `h${e.heading}` : (
|
|
1107
|
-
}),
|
|
1108
|
-
var
|
|
1109
|
-
return (
|
|
1110
|
-
}),
|
|
1111
|
-
var
|
|
1112
|
-
return (
|
|
1092
|
+
}, s = h(() => {
|
|
1093
|
+
var r;
|
|
1094
|
+
return e.heading ? `h${e.heading}` : (r = e.tag) != null ? r : "span";
|
|
1095
|
+
}), i = h(() => {
|
|
1096
|
+
var r;
|
|
1097
|
+
return (r = e.size) != null ? r : e.heading ? o[e.heading] : "normal";
|
|
1098
|
+
}), u = h(() => {
|
|
1099
|
+
var r;
|
|
1100
|
+
return (r = e.weight) != null ? r : e.heading ? t[e.heading] : "normal";
|
|
1113
1101
|
});
|
|
1114
|
-
return (
|
|
1102
|
+
return (r, a) => (l(), W(Y(p(s)), {
|
|
1115
1103
|
class: C(["f-text", [
|
|
1116
|
-
`f-text--${
|
|
1117
|
-
`f-text--${u
|
|
1118
|
-
|
|
1119
|
-
{ "f-text--truncate":
|
|
1104
|
+
`f-text--${p(i)}`,
|
|
1105
|
+
`f-text--${p(u)}`,
|
|
1106
|
+
r.color && `f-text--${r.color}`,
|
|
1107
|
+
{ "f-text--truncate": r.truncate, "f-text--italic": r.italic }
|
|
1120
1108
|
]])
|
|
1121
1109
|
}, {
|
|
1122
|
-
default:
|
|
1123
|
-
|
|
1110
|
+
default: I(() => [
|
|
1111
|
+
v(r.$slots, "default", {}, void 0, !0)
|
|
1124
1112
|
]),
|
|
1125
1113
|
_: 3
|
|
1126
1114
|
}, 8, ["class"]));
|
|
1127
1115
|
}
|
|
1128
|
-
}),
|
|
1116
|
+
}), ko = /* @__PURE__ */ b($o, [["__scopeId", "data-v-8bcfc6b3"]]), wo = ["href", "target", "rel"], Fo = /* @__PURE__ */ g({
|
|
1129
1117
|
__name: "FLink",
|
|
1130
1118
|
props: {
|
|
1131
1119
|
href: {},
|
|
@@ -1134,9 +1122,9 @@ const Pe = (r, e, t) => {
|
|
|
1134
1122
|
color: {},
|
|
1135
1123
|
disabled: { type: Boolean }
|
|
1136
1124
|
},
|
|
1137
|
-
setup(
|
|
1138
|
-
const e =
|
|
1139
|
-
return (
|
|
1125
|
+
setup(n) {
|
|
1126
|
+
const e = n;
|
|
1127
|
+
return (o, t) => (l(), c("a", {
|
|
1140
1128
|
class: C(["f-link", [
|
|
1141
1129
|
e.color && `f-link--${e.color}`,
|
|
1142
1130
|
`f-link--underline-${e.underline}`,
|
|
@@ -1146,10 +1134,10 @@ const Pe = (r, e, t) => {
|
|
|
1146
1134
|
target: e.target,
|
|
1147
1135
|
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
1148
1136
|
}, [
|
|
1149
|
-
|
|
1150
|
-
], 10,
|
|
1137
|
+
v(o.$slots, "default", {}, void 0, !0)
|
|
1138
|
+
], 10, wo));
|
|
1151
1139
|
}
|
|
1152
|
-
}),
|
|
1140
|
+
}), zo = /* @__PURE__ */ b(Fo, [["__scopeId", "data-v-daaa3e25"]]), Co = { class: "f-badge" }, xo = /* @__PURE__ */ g({
|
|
1153
1141
|
__name: "FBadge",
|
|
1154
1142
|
props: {
|
|
1155
1143
|
value: {},
|
|
@@ -1159,109 +1147,325 @@ const Pe = (r, e, t) => {
|
|
|
1159
1147
|
placement: { default: "top-right" },
|
|
1160
1148
|
offset: { default: () => [0, 0] }
|
|
1161
1149
|
},
|
|
1162
|
-
setup(
|
|
1163
|
-
const e =
|
|
1164
|
-
var
|
|
1165
|
-
return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (
|
|
1166
|
-
}),
|
|
1167
|
-
const [
|
|
1150
|
+
setup(n) {
|
|
1151
|
+
const e = n, o = h(() => {
|
|
1152
|
+
var s;
|
|
1153
|
+
return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (s = e.value) != null ? s : "";
|
|
1154
|
+
}), t = h(() => {
|
|
1155
|
+
const [s, i] = e.offset;
|
|
1168
1156
|
return {
|
|
1169
|
-
"top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${
|
|
1170
|
-
"top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${
|
|
1171
|
-
"bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${
|
|
1172
|
-
"bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${
|
|
1157
|
+
"top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${s}px), calc(-50% + ${i}px))` },
|
|
1158
|
+
"top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${s}px), calc(-50% + ${i}px))` },
|
|
1159
|
+
"bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${s}px), calc(50% + ${i}px))` },
|
|
1160
|
+
"bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${s}px), calc(50% + ${i}px))` }
|
|
1173
1161
|
}[e.placement];
|
|
1174
1162
|
});
|
|
1175
|
-
return (
|
|
1176
|
-
|
|
1177
|
-
|
|
1163
|
+
return (s, i) => (l(), c("div", Co, [
|
|
1164
|
+
v(s.$slots, "default", {}, void 0, !0),
|
|
1165
|
+
s.dot || s.value !== void 0 && s.value !== "" ? (l(), c("span", {
|
|
1178
1166
|
key: 0,
|
|
1179
|
-
class: C(["f-badge__content", [`f-badge--${
|
|
1180
|
-
style:
|
|
1181
|
-
},
|
|
1167
|
+
class: C(["f-badge__content", [`f-badge--${s.type}`, { "f-badge--dot": s.dot }]]),
|
|
1168
|
+
style: T(p(t))
|
|
1169
|
+
}, V(p(o)), 7)) : y("", !0)
|
|
1182
1170
|
]));
|
|
1183
1171
|
}
|
|
1184
|
-
}),
|
|
1172
|
+
}), So = /* @__PURE__ */ b(xo, [["__scopeId", "data-v-be6947ff"]]), Mo = /* @__PURE__ */ g({
|
|
1185
1173
|
__name: "FAffix",
|
|
1186
1174
|
props: {
|
|
1187
1175
|
placement: { default: "top-right" },
|
|
1188
1176
|
offset: { default: () => [8, 8] }
|
|
1189
1177
|
},
|
|
1190
|
-
setup(
|
|
1191
|
-
const e =
|
|
1192
|
-
const [
|
|
1178
|
+
setup(n) {
|
|
1179
|
+
const e = n, o = h(() => {
|
|
1180
|
+
const [t, s] = e.offset;
|
|
1193
1181
|
return {
|
|
1194
|
-
"top-left": { top: `${
|
|
1195
|
-
"top-right": { top: `${
|
|
1196
|
-
"bottom-left": { bottom: `${
|
|
1197
|
-
"bottom-right": { bottom: `${
|
|
1182
|
+
"top-left": { top: `${s}px`, left: `${t}px` },
|
|
1183
|
+
"top-right": { top: `${s}px`, right: `${t}px` },
|
|
1184
|
+
"bottom-left": { bottom: `${s}px`, left: `${t}px` },
|
|
1185
|
+
"bottom-right": { bottom: `${s}px`, right: `${t}px` }
|
|
1198
1186
|
}[e.placement];
|
|
1199
1187
|
});
|
|
1200
|
-
return (
|
|
1188
|
+
return (t, s) => (l(), c("div", {
|
|
1201
1189
|
class: "f-affix",
|
|
1202
|
-
style:
|
|
1190
|
+
style: T(p(o))
|
|
1203
1191
|
}, [
|
|
1204
|
-
|
|
1192
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
1205
1193
|
], 4));
|
|
1206
1194
|
}
|
|
1207
|
-
}),
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
"
|
|
1213
|
-
"
|
|
1214
|
-
"
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
"
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1195
|
+
}), Io = /* @__PURE__ */ b(Mo, [["__scopeId", "data-v-8506d679"]]), To = /* @__PURE__ */ g({
|
|
1196
|
+
__name: "FForm",
|
|
1197
|
+
props: {
|
|
1198
|
+
model: {},
|
|
1199
|
+
rules: { default: () => ({}) },
|
|
1200
|
+
labelWidth: { default: "80px" },
|
|
1201
|
+
labelPosition: { default: "right" },
|
|
1202
|
+
size: { default: "normal" }
|
|
1203
|
+
},
|
|
1204
|
+
setup(n, { expose: e }) {
|
|
1205
|
+
const o = n, t = R([]), s = (a) => {
|
|
1206
|
+
t.value.push(a);
|
|
1207
|
+
}, i = (a) => {
|
|
1208
|
+
t.value = t.value.filter((f) => f.prop !== a);
|
|
1209
|
+
};
|
|
1210
|
+
return _e("FFormContext", {
|
|
1211
|
+
model: o.model,
|
|
1212
|
+
rules: o.rules,
|
|
1213
|
+
labelWidth: o.labelWidth,
|
|
1214
|
+
labelPosition: h(() => o.labelPosition),
|
|
1215
|
+
size: h(() => o.size),
|
|
1216
|
+
registerField: s,
|
|
1217
|
+
unregisterField: i
|
|
1218
|
+
}), e({
|
|
1219
|
+
validate: () => J(null, null, function* () {
|
|
1220
|
+
const a = t.value.map((d) => d.validate());
|
|
1221
|
+
if ((yield Promise.all(a)).filter((d) => d !== void 0).length > 0)
|
|
1222
|
+
throw new Error("表单校验失败");
|
|
1223
|
+
return !0;
|
|
1224
|
+
}),
|
|
1225
|
+
resetFields: () => {
|
|
1226
|
+
t.value.forEach((a) => a.clearValidate());
|
|
1227
|
+
}
|
|
1228
|
+
}), (a, f) => (l(), c("form", {
|
|
1229
|
+
class: C(["f-form", [
|
|
1230
|
+
`f-form--label-${a.labelPosition}`,
|
|
1231
|
+
`f-form--size-${a.size}`
|
|
1232
|
+
]]),
|
|
1233
|
+
onSubmit: f[0] || (f[0] = se(() => {
|
|
1234
|
+
}, ["prevent"]))
|
|
1235
|
+
}, [
|
|
1236
|
+
v(a.$slots, "default", {}, void 0, !0)
|
|
1237
|
+
], 34));
|
|
1238
|
+
}
|
|
1239
|
+
}), Bo = /* @__PURE__ */ b(To, [["__scopeId", "data-v-21f7de9b"]]), Vo = (n, e) => J(null, null, function* () {
|
|
1240
|
+
const o = Array.isArray(e) ? e : [e];
|
|
1241
|
+
for (let t of o) {
|
|
1242
|
+
t.transform && (n = t.transform(n));
|
|
1243
|
+
const s = n == null || n === "", i = t.whitespace && typeof n == "string" && n.trim() === "";
|
|
1244
|
+
if (t.required && (s || i))
|
|
1245
|
+
return t.message || "此字段为必填项";
|
|
1246
|
+
if (!t.required && s) continue;
|
|
1247
|
+
if (t.type) {
|
|
1248
|
+
const r = Ro(n, t);
|
|
1249
|
+
if (r) return r;
|
|
1250
|
+
}
|
|
1251
|
+
const u = Ao(n, t);
|
|
1252
|
+
if (u) return u;
|
|
1253
|
+
if (t.pattern && !t.pattern.test(String(n)))
|
|
1254
|
+
return t.message || "格式不匹配";
|
|
1255
|
+
if (t.enum && !t.enum.includes(n))
|
|
1256
|
+
return t.message || "不在指定的枚举范围内";
|
|
1257
|
+
if (t.validator) {
|
|
1258
|
+
const r = yield Promise.resolve(t.validator(n, t));
|
|
1259
|
+
if (typeof r == "string") return r;
|
|
1260
|
+
if (r === !1) return t.message || "校验失败";
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}), Ro = (n, e) => {
|
|
1264
|
+
const { type: o, message: t } = e;
|
|
1265
|
+
switch (o) {
|
|
1266
|
+
case "string":
|
|
1267
|
+
if (typeof n != "string") return t || "必须是字符串";
|
|
1268
|
+
break;
|
|
1269
|
+
case "number":
|
|
1270
|
+
if (typeof n != "number" || isNaN(n)) return t || "必须是数字";
|
|
1271
|
+
break;
|
|
1272
|
+
case "integer":
|
|
1273
|
+
if (!Number.isInteger(n)) return t || "必须是整数";
|
|
1274
|
+
break;
|
|
1275
|
+
case "boolean":
|
|
1276
|
+
if (typeof n != "boolean") return t || "必须是布尔值";
|
|
1277
|
+
break;
|
|
1278
|
+
case "array":
|
|
1279
|
+
if (!Array.isArray(n)) return t || "必须是数组";
|
|
1280
|
+
break;
|
|
1281
|
+
case "object":
|
|
1282
|
+
if (typeof n != "object" || n === null) return t || "必须是对象";
|
|
1283
|
+
break;
|
|
1284
|
+
case "email":
|
|
1285
|
+
if (!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(n)) return t || "邮箱格式不正确";
|
|
1286
|
+
break;
|
|
1287
|
+
case "regexp":
|
|
1288
|
+
if (e.pattern && !e.pattern.test(String(n)))
|
|
1289
|
+
return e.message || "格式不匹配";
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
}, Ao = (n, e) => {
|
|
1293
|
+
const { min: o, max: t, len: s, message: i, type: u } = e, r = u === "number" || u === "integer" || u === "float", a = r && typeof n == "number" ? n : n == null ? void 0 : n.length;
|
|
1294
|
+
if (a !== void 0) {
|
|
1295
|
+
if (s !== void 0 && a !== s)
|
|
1296
|
+
return i || (r ? `值必须等于 ${s}` : `长度必须为 ${s}`);
|
|
1297
|
+
if (o !== void 0 && a < o)
|
|
1298
|
+
return i || (r ? `最小值不能小于 ${o}` : `长度不能小于 ${o}`);
|
|
1299
|
+
if (t !== void 0 && a > t)
|
|
1300
|
+
return i || (r ? `最大值不能大于 ${t}` : `长度不能大于 ${t}`);
|
|
1301
|
+
}
|
|
1302
|
+
}, Po = {
|
|
1303
|
+
key: 0,
|
|
1304
|
+
class: "star"
|
|
1305
|
+
}, Wo = { class: "f-form-item__content" }, jo = {
|
|
1306
|
+
key: 0,
|
|
1307
|
+
class: "f-form-item__error"
|
|
1308
|
+
}, Do = /* @__PURE__ */ g({
|
|
1309
|
+
__name: "FFormItem",
|
|
1310
|
+
props: {
|
|
1311
|
+
label: {},
|
|
1312
|
+
prop: {}
|
|
1313
|
+
},
|
|
1314
|
+
setup(n, { expose: e }) {
|
|
1315
|
+
const o = n, t = Ce("FFormContext"), s = R(""), i = h(() => {
|
|
1316
|
+
var d;
|
|
1317
|
+
return ((d = t == null ? void 0 : t.labelPosition) == null ? void 0 : d.value) || "right";
|
|
1318
|
+
}), u = h(() => {
|
|
1319
|
+
var d;
|
|
1320
|
+
return ((d = t == null ? void 0 : t.size) == null ? void 0 : d.value) || "default";
|
|
1321
|
+
}), r = h(() => {
|
|
1322
|
+
if (!(t != null && t.rules) || !o.prop) return [];
|
|
1323
|
+
const d = t.rules[o.prop] || [];
|
|
1324
|
+
return Array.isArray(d) ? d : [d];
|
|
1325
|
+
}), a = h(() => r.value.some((d) => d.required)), f = () => J(null, null, function* () {
|
|
1326
|
+
if (!o.prop || !t) return;
|
|
1327
|
+
const d = t.model[o.prop], k = yield Vo(d, r.value);
|
|
1328
|
+
return s.value = k || "", k;
|
|
1329
|
+
}), m = () => {
|
|
1330
|
+
s.value = "";
|
|
1331
|
+
};
|
|
1332
|
+
return _e("FFormItemContext", { errorMsg: s, validate: f }), xe(() => {
|
|
1333
|
+
o.prop && (t != null && t.registerField) && t.registerField({ prop: o.prop, validate: f, clearValidate: m });
|
|
1334
|
+
}), oe(() => {
|
|
1335
|
+
o.prop && (t != null && t.unregisterField) && t.unregisterField(o.prop);
|
|
1336
|
+
}), ee(() => t == null ? void 0 : t.model[o.prop], () => {
|
|
1337
|
+
s.value && f();
|
|
1338
|
+
}), e({ validate: f, clearValidate: m }), (d, k) => {
|
|
1339
|
+
var x;
|
|
1340
|
+
return l(), c("div", {
|
|
1341
|
+
class: C(["f-form-item", [
|
|
1342
|
+
`is-label-${p(i)}`,
|
|
1343
|
+
`is-size-${p(u)}`,
|
|
1344
|
+
{ "is-error": p(s) }
|
|
1345
|
+
]])
|
|
1346
|
+
}, [
|
|
1347
|
+
d.label ? (l(), c("label", {
|
|
1348
|
+
key: 0,
|
|
1349
|
+
class: "f-form-item__label",
|
|
1350
|
+
style: T({
|
|
1351
|
+
width: p(i) === "top" ? "100%" : (x = p(t)) == null ? void 0 : x.labelWidth,
|
|
1352
|
+
textAlign: p(i) === "top" ? "left" : p(i)
|
|
1353
|
+
})
|
|
1354
|
+
}, [
|
|
1355
|
+
p(a) ? (l(), c("span", Po, "*")) : y("", !0),
|
|
1356
|
+
me(" " + V(d.label) + ": ", 1)
|
|
1357
|
+
], 4)) : y("", !0),
|
|
1358
|
+
z("div", Wo, [
|
|
1359
|
+
v(d.$slots, "default", {}, void 0, !0),
|
|
1360
|
+
S(K, { name: "err-slide" }, {
|
|
1361
|
+
default: I(() => [
|
|
1362
|
+
p(s) ? (l(), c("p", jo, V(p(s)), 1)) : y("", !0)
|
|
1363
|
+
]),
|
|
1364
|
+
_: 1
|
|
1365
|
+
})
|
|
1366
|
+
])
|
|
1367
|
+
], 2);
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
}), Eo = /* @__PURE__ */ b(Do, [["__scopeId", "data-v-c3d6ec01"]]), Lo = { class: "f-checkbox__wrapper" }, Oo = ["checked", "disabled"], Ho = {
|
|
1371
|
+
key: 0,
|
|
1372
|
+
class: "f-checkbox__label"
|
|
1373
|
+
}, No = /* @__PURE__ */ g({
|
|
1374
|
+
__name: "FCheckbox",
|
|
1375
|
+
props: /* @__PURE__ */ H({
|
|
1376
|
+
label: {},
|
|
1377
|
+
disabled: { type: Boolean }
|
|
1378
|
+
}, {
|
|
1379
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1380
|
+
modelModifiers: {}
|
|
1381
|
+
}),
|
|
1382
|
+
emits: ["update:modelValue"],
|
|
1383
|
+
setup(n) {
|
|
1384
|
+
const e = Q(n, "modelValue"), o = n, t = (s) => {
|
|
1385
|
+
if (o.disabled) return;
|
|
1386
|
+
const i = s.target;
|
|
1387
|
+
e.value = i.checked;
|
|
1388
|
+
};
|
|
1389
|
+
return (s, i) => (l(), c("label", {
|
|
1390
|
+
class: C(["f-checkbox", { "is-disabled": s.disabled }])
|
|
1391
|
+
}, [
|
|
1392
|
+
z("span", Lo, [
|
|
1393
|
+
z("input", {
|
|
1394
|
+
type: "checkbox",
|
|
1395
|
+
checked: e.value,
|
|
1396
|
+
disabled: s.disabled,
|
|
1397
|
+
onChange: t
|
|
1398
|
+
}, null, 40, Oo),
|
|
1399
|
+
i[0] || (i[0] = z("span", { class: "f-checkbox__checkmark" }, null, -1))
|
|
1400
|
+
]),
|
|
1401
|
+
s.label ? (l(), c("span", Ho, V(s.label), 1)) : y("", !0)
|
|
1402
|
+
], 2));
|
|
1403
|
+
}
|
|
1404
|
+
}), qo = /* @__PURE__ */ b(No, [["__scopeId", "data-v-633b283a"]]), Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1405
|
+
__proto__: null,
|
|
1406
|
+
FAffix: Io,
|
|
1407
|
+
FAvatar: _o,
|
|
1408
|
+
FBadge: So,
|
|
1409
|
+
FBreadcrumb: Zt,
|
|
1410
|
+
FButton: go,
|
|
1411
|
+
FCard: Vt,
|
|
1412
|
+
FCheckbox: qo,
|
|
1413
|
+
FCol: to,
|
|
1414
|
+
FContainer: co,
|
|
1415
|
+
FDivider: po,
|
|
1416
|
+
FDropdown: pt,
|
|
1417
|
+
FForm: Bo,
|
|
1418
|
+
FFormItem: Eo,
|
|
1419
|
+
FIcon: Le,
|
|
1420
|
+
FImage: Xe,
|
|
1421
|
+
FInput: Ke,
|
|
1422
|
+
FLink: zo,
|
|
1423
|
+
FLoading: tt,
|
|
1424
|
+
FPagination: yt,
|
|
1425
|
+
FProgress: Ot,
|
|
1426
|
+
FRate: nt,
|
|
1427
|
+
FRow: so,
|
|
1428
|
+
FSelect: mt,
|
|
1429
|
+
FSpace: ro,
|
|
1430
|
+
FTabs: Xt,
|
|
1431
|
+
FTag: Pt,
|
|
1432
|
+
FText: ko,
|
|
1433
|
+
FTooltip: jt,
|
|
1434
|
+
FTypography: yo
|
|
1435
|
+
}, Symbol.toStringTag, { value: "Module" })), Ko = (n) => {
|
|
1436
|
+
Object.entries(Go).forEach(([e, o]) => {
|
|
1437
|
+
n.component(e, o);
|
|
1237
1438
|
});
|
|
1238
1439
|
};
|
|
1239
1440
|
export {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
po as
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1441
|
+
Io as FAffix,
|
|
1442
|
+
_o as FAvatar,
|
|
1443
|
+
So as FBadge,
|
|
1444
|
+
Zt as FBreadcrumb,
|
|
1445
|
+
go as FButton,
|
|
1446
|
+
Vt as FCard,
|
|
1447
|
+
qo as FCheckbox,
|
|
1448
|
+
to as FCol,
|
|
1449
|
+
co as FContainer,
|
|
1450
|
+
po as FDivider,
|
|
1451
|
+
pt as FDropdown,
|
|
1452
|
+
Bo as FForm,
|
|
1453
|
+
Eo as FFormItem,
|
|
1454
|
+
Le as FIcon,
|
|
1455
|
+
Xe as FImage,
|
|
1456
|
+
Ke as FInput,
|
|
1457
|
+
zo as FLink,
|
|
1458
|
+
tt as FLoading,
|
|
1459
|
+
yt as FPagination,
|
|
1460
|
+
Ot as FProgress,
|
|
1461
|
+
nt as FRate,
|
|
1462
|
+
so as FRow,
|
|
1463
|
+
mt as FSelect,
|
|
1464
|
+
ro as FSpace,
|
|
1465
|
+
Xt as FTabs,
|
|
1466
|
+
Pt as FTag,
|
|
1467
|
+
ko as FText,
|
|
1468
|
+
jt as FTooltip,
|
|
1469
|
+
yo as FTypography,
|
|
1470
|
+
Ko as default
|
|
1267
1471
|
};
|