fantasia-ui 0.2.2 → 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/README.en.md +14 -1
- package/README.md +16 -3
- package/dist/fantasia-ui.css +1 -0
- package/dist/fantasia-ui.es.js +888 -1020
- package/dist/fantasia-ui.umd.js +1 -2
- 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 +37 -15
- package/dist/assets/index.d.ts +0 -5
- package/dist/components/index.d.ts +0 -27
- package/dist/components/modules/FAffix.vue.d.ts +0 -21
- package/dist/components/modules/FAvatar.vue.d.ts +0 -6
- package/dist/components/modules/FBadge.vue.d.ts +0 -24
- package/dist/components/modules/FBreadcrumb.vue.d.ts +0 -24
- package/dist/components/modules/FButton.vue.d.ts +0 -21
- package/dist/components/modules/FCard.vue.d.ts +0 -31
- package/dist/components/modules/FCol.vue.d.ts +0 -22
- package/dist/components/modules/FContainer.vue.d.ts +0 -20
- package/dist/components/modules/FDivider.vue.d.ts +0 -6
- package/dist/components/modules/FDropdown.vue.d.ts +0 -35
- package/dist/components/modules/FIcon.vue.d.ts +0 -20
- package/dist/components/modules/FImage.vue.d.ts +0 -23
- package/dist/components/modules/FInput.vue.d.ts +0 -27
- package/dist/components/modules/FLink.vue.d.ts +0 -21
- package/dist/components/modules/FLoading.vue.d.ts +0 -6
- package/dist/components/modules/FPagination.vue.d.ts +0 -16
- package/dist/components/modules/FProgress.vue.d.ts +0 -6
- package/dist/components/modules/FRate.vue.d.ts +0 -22
- package/dist/components/modules/FRow.vue.d.ts +0 -24
- package/dist/components/modules/FSelect.vue.d.ts +0 -17
- package/dist/components/modules/FSpace.vue.d.ts +0 -9
- package/dist/components/modules/FTabs.vue.d.ts +0 -24
- package/dist/components/modules/FTag.vue.d.ts +0 -25
- package/dist/components/modules/FText.vue.d.ts +0 -22
- package/dist/components/modules/FTooltip.vue.d.ts +0 -31
- package/dist/components/modules/FTypography.vue.d.ts +0 -22
- package/dist/index.css +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/types/components/modules/base.d.ts +0 -7
- package/dist/types/components/modules/f-affix.d.ts +0 -5
- package/dist/types/components/modules/f-avatar.d.ts +0 -10
- package/dist/types/components/modules/f-badge.d.ts +0 -9
- package/dist/types/components/modules/f-breadcrumb.d.ts +0 -10
- package/dist/types/components/modules/f-button.d.ts +0 -9
- package/dist/types/components/modules/f-card.d.ts +0 -6
- package/dist/types/components/modules/f-col.d.ts +0 -15
- package/dist/types/components/modules/f-container.d.ts +0 -4
- package/dist/types/components/modules/f-dialog.d.ts +0 -6
- package/dist/types/components/modules/f-divider.d.ts +0 -8
- package/dist/types/components/modules/f-dropdown.d.ts +0 -17
- package/dist/types/components/modules/f-form.d.ts +0 -83
- package/dist/types/components/modules/f-icon.d.ts +0 -5
- package/dist/types/components/modules/f-image.d.ts +0 -8
- package/dist/types/components/modules/f-input.d.ts +0 -9
- package/dist/types/components/modules/f-link.d.ts +0 -8
- package/dist/types/components/modules/f-loading.d.ts +0 -6
- package/dist/types/components/modules/f-menu.d.ts +0 -13
- package/dist/types/components/modules/f-pagination.d.ts +0 -6
- package/dist/types/components/modules/f-progress.d.ts +0 -7
- package/dist/types/components/modules/f-rate.d.ts +0 -12
- package/dist/types/components/modules/f-row.d.ts +0 -9
- package/dist/types/components/modules/f-slider-captcha.d.ts +0 -16
- package/dist/types/components/modules/f-space.d.ts +0 -11
- package/dist/types/components/modules/f-table.d.ts +0 -12
- package/dist/types/components/modules/f-tabs.d.ts +0 -12
- package/dist/types/components/modules/f-tag.d.ts +0 -10
- package/dist/types/components/modules/f-tagsview.d.ts +0 -7
- package/dist/types/components/modules/f-text.d.ts +0 -10
- package/dist/types/components/modules/f-toolbar.d.ts +0 -26
- package/dist/types/components/modules/f-tooltip.d.ts +0 -10
- package/dist/types/components/modules/f-upload.d.ts +0 -11
- package/dist/types/models/index.d.ts +0 -26
package/dist/fantasia-ui.es.js
CHANGED
|
@@ -1,48 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
try {
|
|
16
|
+
r(o.next(a));
|
|
17
|
+
} catch (f) {
|
|
18
|
+
s(f);
|
|
19
|
+
}
|
|
20
|
+
}, u = (a) => {
|
|
21
|
+
try {
|
|
22
|
+
r(o.throw(a));
|
|
23
|
+
} catch (f) {
|
|
24
|
+
s(f);
|
|
25
|
+
}
|
|
26
|
+
}, r = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(i, u);
|
|
27
|
+
r((o = o.apply(n, e)).next());
|
|
28
|
+
});
|
|
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({
|
|
15
33
|
__name: "FIcon",
|
|
16
34
|
props: {
|
|
17
35
|
color: {},
|
|
18
36
|
size: { default: "1em" }
|
|
19
37
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const e =
|
|
38
|
+
setup(n) {
|
|
39
|
+
const e = n, o = h(() => ({
|
|
22
40
|
width: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
23
41
|
height: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
24
42
|
color: e.color
|
|
25
43
|
}));
|
|
26
|
-
return (
|
|
44
|
+
return (t, s) => (l(), c("span", {
|
|
27
45
|
role: "img",
|
|
28
46
|
class: "f-icon",
|
|
29
|
-
style:
|
|
47
|
+
style: T(p(o))
|
|
30
48
|
}, [
|
|
31
|
-
|
|
49
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
32
50
|
], 4));
|
|
33
51
|
}
|
|
34
|
-
}),
|
|
35
|
-
const
|
|
36
|
-
for (const [
|
|
37
|
-
t
|
|
38
|
-
return
|
|
39
|
-
},
|
|
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 = {
|
|
40
58
|
key: 0,
|
|
41
59
|
class: "f-image__placeholder"
|
|
42
|
-
},
|
|
60
|
+
}, qe = {
|
|
43
61
|
key: 0,
|
|
44
62
|
class: "f-image__error"
|
|
45
|
-
},
|
|
63
|
+
}, Ge = ["src", "loading"], Ue = /* @__PURE__ */ g({
|
|
46
64
|
__name: "FImage",
|
|
47
65
|
props: {
|
|
48
66
|
src: {},
|
|
@@ -50,382 +68,54 @@ const we = (s, e, t) => {
|
|
|
50
68
|
fit: { default: "cover" },
|
|
51
69
|
lazy: { type: Boolean, default: !0 }
|
|
52
70
|
},
|
|
53
|
-
setup(
|
|
54
|
-
const e =
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
setup(n) {
|
|
72
|
+
const e = n, o = R("loading");
|
|
73
|
+
ee(() => e.src, () => {
|
|
74
|
+
o.value = "loading";
|
|
57
75
|
}, { immediate: !1 });
|
|
58
|
-
const
|
|
59
|
-
return (
|
|
60
|
-
const
|
|
61
|
-
return l(),
|
|
62
|
-
|
|
63
|
-
default:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
])) :
|
|
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)
|
|
67
85
|
]),
|
|
68
86
|
_: 1
|
|
69
87
|
}),
|
|
70
|
-
|
|
71
|
-
default:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
default:
|
|
76
|
-
|
|
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))
|
|
77
95
|
]),
|
|
78
96
|
_: 1
|
|
79
97
|
})
|
|
80
98
|
], !0)
|
|
81
|
-
])) :
|
|
99
|
+
])) : y("", !0)
|
|
82
100
|
]),
|
|
83
101
|
_: 3
|
|
84
102
|
}),
|
|
85
|
-
|
|
103
|
+
te(z("img", {
|
|
86
104
|
src: e.src,
|
|
87
|
-
loading:
|
|
88
|
-
style:
|
|
105
|
+
loading: i.lazy ? "lazy" : "eager",
|
|
106
|
+
style: T({ objectFit: e.fit }),
|
|
89
107
|
class: "f-image__img",
|
|
90
|
-
onLoad:
|
|
91
|
-
onError:
|
|
92
|
-
}, null, 44,
|
|
93
|
-
[
|
|
108
|
+
onLoad: t,
|
|
109
|
+
onError: s
|
|
110
|
+
}, null, 44, Ge), [
|
|
111
|
+
[ue, p(o) === "loaded"]
|
|
94
112
|
])
|
|
95
113
|
]);
|
|
96
114
|
};
|
|
97
115
|
}
|
|
98
|
-
}),
|
|
99
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
100
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
101
|
-
viewBox: "0 0 512 512"
|
|
102
|
-
}, Se = m({
|
|
103
|
-
name: "ChevronBackOutline",
|
|
104
|
-
render: function(e, t) {
|
|
105
|
-
return l(), r(
|
|
106
|
-
"svg",
|
|
107
|
-
Me,
|
|
108
|
-
t[0] || (t[0] = [
|
|
109
|
-
h(
|
|
110
|
-
"path",
|
|
111
|
-
{
|
|
112
|
-
fill: "none",
|
|
113
|
-
stroke: "currentColor",
|
|
114
|
-
"stroke-linecap": "round",
|
|
115
|
-
"stroke-linejoin": "round",
|
|
116
|
-
"stroke-width": "48",
|
|
117
|
-
d: "M328 112L184 256l144 144"
|
|
118
|
-
},
|
|
119
|
-
null,
|
|
120
|
-
-1
|
|
121
|
-
/* HOISTED */
|
|
122
|
-
)
|
|
123
|
-
])
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
}), Be = {
|
|
127
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
128
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
129
|
-
viewBox: "0 0 512 512"
|
|
130
|
-
}, Te = m({
|
|
131
|
-
name: "ChevronDownOutline",
|
|
132
|
-
render: function(e, t) {
|
|
133
|
-
return l(), r(
|
|
134
|
-
"svg",
|
|
135
|
-
Be,
|
|
136
|
-
t[0] || (t[0] = [
|
|
137
|
-
h(
|
|
138
|
-
"path",
|
|
139
|
-
{
|
|
140
|
-
fill: "none",
|
|
141
|
-
stroke: "currentColor",
|
|
142
|
-
"stroke-linecap": "round",
|
|
143
|
-
"stroke-linejoin": "round",
|
|
144
|
-
"stroke-width": "48",
|
|
145
|
-
d: "M112 184l144 144l144-144"
|
|
146
|
-
},
|
|
147
|
-
null,
|
|
148
|
-
-1
|
|
149
|
-
/* HOISTED */
|
|
150
|
-
)
|
|
151
|
-
])
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
}), Ie = {
|
|
155
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
156
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
157
|
-
viewBox: "0 0 512 512"
|
|
158
|
-
}, Le = m({
|
|
159
|
-
name: "ChevronForwardOutline",
|
|
160
|
-
render: function(e, t) {
|
|
161
|
-
return l(), r(
|
|
162
|
-
"svg",
|
|
163
|
-
Ie,
|
|
164
|
-
t[0] || (t[0] = [
|
|
165
|
-
h(
|
|
166
|
-
"path",
|
|
167
|
-
{
|
|
168
|
-
fill: "none",
|
|
169
|
-
stroke: "currentColor",
|
|
170
|
-
"stroke-linecap": "round",
|
|
171
|
-
"stroke-linejoin": "round",
|
|
172
|
-
"stroke-width": "48",
|
|
173
|
-
d: "M184 112l144 144l-144 144"
|
|
174
|
-
},
|
|
175
|
-
null,
|
|
176
|
-
-1
|
|
177
|
-
/* HOISTED */
|
|
178
|
-
)
|
|
179
|
-
])
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
}), Ae = {
|
|
183
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
184
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
185
|
-
viewBox: "0 0 512 512"
|
|
186
|
-
}, Ve = m({
|
|
187
|
-
name: "Close",
|
|
188
|
-
render: function(e, t) {
|
|
189
|
-
return l(), r(
|
|
190
|
-
"svg",
|
|
191
|
-
Ae,
|
|
192
|
-
t[0] || (t[0] = [
|
|
193
|
-
h(
|
|
194
|
-
"path",
|
|
195
|
-
{
|
|
196
|
-
d: "M289.94 256l95-95A24 24 0 0 0 351 127l-95 95l-95-95a24 24 0 0 0-34 34l95 95l-95 95a24 24 0 1 0 34 34l95-95l95 95a24 24 0 0 0 34-34z",
|
|
197
|
-
fill: "currentColor"
|
|
198
|
-
},
|
|
199
|
-
null,
|
|
200
|
-
-1
|
|
201
|
-
/* HOISTED */
|
|
202
|
-
)
|
|
203
|
-
])
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
}), Re = {
|
|
207
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
208
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
209
|
-
viewBox: "0 0 512 512"
|
|
210
|
-
}, De = m({
|
|
211
|
-
name: "CloseCircle",
|
|
212
|
-
render: function(e, t) {
|
|
213
|
-
return l(), r(
|
|
214
|
-
"svg",
|
|
215
|
-
Re,
|
|
216
|
-
t[0] || (t[0] = [
|
|
217
|
-
h(
|
|
218
|
-
"path",
|
|
219
|
-
{
|
|
220
|
-
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 1 1-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 0 1-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0 1 22.62-22.62L256 233.37l52.69-52.68a16 16 0 0 1 22.62 22.62L278.63 256z",
|
|
221
|
-
fill: "currentColor"
|
|
222
|
-
},
|
|
223
|
-
null,
|
|
224
|
-
-1
|
|
225
|
-
/* HOISTED */
|
|
226
|
-
)
|
|
227
|
-
])
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
}), He = {
|
|
231
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
232
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
233
|
-
viewBox: "0 0 512 512"
|
|
234
|
-
}, je = m({
|
|
235
|
-
name: "EllipsisHorizontal",
|
|
236
|
-
render: function(e, t) {
|
|
237
|
-
return l(), r(
|
|
238
|
-
"svg",
|
|
239
|
-
He,
|
|
240
|
-
t[0] || (t[0] = [
|
|
241
|
-
h(
|
|
242
|
-
"circle",
|
|
243
|
-
{
|
|
244
|
-
cx: "256",
|
|
245
|
-
cy: "256",
|
|
246
|
-
r: "48",
|
|
247
|
-
fill: "currentColor"
|
|
248
|
-
},
|
|
249
|
-
null,
|
|
250
|
-
-1
|
|
251
|
-
/* HOISTED */
|
|
252
|
-
),
|
|
253
|
-
h(
|
|
254
|
-
"circle",
|
|
255
|
-
{
|
|
256
|
-
cx: "416",
|
|
257
|
-
cy: "256",
|
|
258
|
-
r: "48",
|
|
259
|
-
fill: "currentColor"
|
|
260
|
-
},
|
|
261
|
-
null,
|
|
262
|
-
-1
|
|
263
|
-
/* HOISTED */
|
|
264
|
-
),
|
|
265
|
-
h(
|
|
266
|
-
"circle",
|
|
267
|
-
{
|
|
268
|
-
cx: "96",
|
|
269
|
-
cy: "256",
|
|
270
|
-
r: "48",
|
|
271
|
-
fill: "currentColor"
|
|
272
|
-
},
|
|
273
|
-
null,
|
|
274
|
-
-1
|
|
275
|
-
/* HOISTED */
|
|
276
|
-
)
|
|
277
|
-
])
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
}), Oe = {
|
|
281
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
282
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
283
|
-
viewBox: "0 0 512 512"
|
|
284
|
-
}, We = m({
|
|
285
|
-
name: "Person",
|
|
286
|
-
render: function(e, t) {
|
|
287
|
-
return l(), r(
|
|
288
|
-
"svg",
|
|
289
|
-
Oe,
|
|
290
|
-
t[0] || (t[0] = [
|
|
291
|
-
h(
|
|
292
|
-
"path",
|
|
293
|
-
{
|
|
294
|
-
d: "M332.64 64.58C313.18 43.57 286 32 256 32c-30.16 0-57.43 11.5-76.8 32.38c-19.58 21.11-29.12 49.8-26.88 80.78C156.76 206.28 203.27 256 256 256s99.16-49.71 103.67-110.82c2.27-30.7-7.33-59.33-27.03-80.6z",
|
|
295
|
-
fill: "currentColor"
|
|
296
|
-
},
|
|
297
|
-
null,
|
|
298
|
-
-1
|
|
299
|
-
/* HOISTED */
|
|
300
|
-
),
|
|
301
|
-
h(
|
|
302
|
-
"path",
|
|
303
|
-
{
|
|
304
|
-
d: "M432 480H80a31 31 0 0 1-24.2-11.13c-6.5-7.77-9.12-18.38-7.18-29.11C57.06 392.94 83.4 353.61 124.8 326c36.78-24.51 83.37-38 131.2-38s94.42 13.5 131.2 38c41.4 27.6 67.74 66.93 76.18 113.75c1.94 10.73-.68 21.34-7.18 29.11A31 31 0 0 1 432 480z",
|
|
305
|
-
fill: "currentColor"
|
|
306
|
-
},
|
|
307
|
-
null,
|
|
308
|
-
-1
|
|
309
|
-
/* HOISTED */
|
|
310
|
-
)
|
|
311
|
-
])
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
}), Pe = {
|
|
315
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
316
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
317
|
-
viewBox: "0 0 512 512"
|
|
318
|
-
}, Ee = m({
|
|
319
|
-
name: "Search",
|
|
320
|
-
render: function(e, t) {
|
|
321
|
-
return l(), r(
|
|
322
|
-
"svg",
|
|
323
|
-
Pe,
|
|
324
|
-
t[0] || (t[0] = [
|
|
325
|
-
h(
|
|
326
|
-
"path",
|
|
327
|
-
{
|
|
328
|
-
d: "M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z",
|
|
329
|
-
fill: "currentColor"
|
|
330
|
-
},
|
|
331
|
-
null,
|
|
332
|
-
-1
|
|
333
|
-
/* HOISTED */
|
|
334
|
-
)
|
|
335
|
-
])
|
|
336
|
-
);
|
|
337
|
-
}
|
|
338
|
-
}), Ne = {
|
|
339
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
340
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
341
|
-
viewBox: "0 0 512 512"
|
|
342
|
-
}, Ge = m({
|
|
343
|
-
name: "Star",
|
|
344
|
-
render: function(e, t) {
|
|
345
|
-
return l(), r(
|
|
346
|
-
"svg",
|
|
347
|
-
Ne,
|
|
348
|
-
t[0] || (t[0] = [
|
|
349
|
-
h(
|
|
350
|
-
"path",
|
|
351
|
-
{
|
|
352
|
-
d: "M394 480a16 16 0 0 1-9.39-3L256 383.76L127.39 477a16 16 0 0 1-24.55-18.08L153 310.35L23 221.2a16 16 0 0 1 9-29.2h160.38l48.4-148.95a16 16 0 0 1 30.44 0l48.4 149H480a16 16 0 0 1 9.05 29.2L359 310.35l50.13 148.53A16 16 0 0 1 394 480z",
|
|
353
|
-
fill: "currentColor"
|
|
354
|
-
},
|
|
355
|
-
null,
|
|
356
|
-
-1
|
|
357
|
-
/* HOISTED */
|
|
358
|
-
)
|
|
359
|
-
])
|
|
360
|
-
);
|
|
361
|
-
}
|
|
362
|
-
}), Ue = {
|
|
363
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
364
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
365
|
-
viewBox: "0 0 512 512"
|
|
366
|
-
}, qe = m({
|
|
367
|
-
name: "StarHalf",
|
|
368
|
-
render: function(e, t) {
|
|
369
|
-
return l(), r(
|
|
370
|
-
"svg",
|
|
371
|
-
Ue,
|
|
372
|
-
t[0] || (t[0] = [
|
|
373
|
-
h(
|
|
374
|
-
"path",
|
|
375
|
-
{
|
|
376
|
-
d: "M480 208H308L256 48l-52 160H32l140 96l-54 160l138-100l138 100l-54-160z",
|
|
377
|
-
fill: "none",
|
|
378
|
-
stroke: "currentColor",
|
|
379
|
-
"stroke-linejoin": "round",
|
|
380
|
-
"stroke-width": "32"
|
|
381
|
-
},
|
|
382
|
-
null,
|
|
383
|
-
-1
|
|
384
|
-
/* HOISTED */
|
|
385
|
-
),
|
|
386
|
-
h(
|
|
387
|
-
"path",
|
|
388
|
-
{
|
|
389
|
-
d: "M256 48v316L118 464l54-160l-140-96h172l52-160z",
|
|
390
|
-
fill: "currentColor"
|
|
391
|
-
},
|
|
392
|
-
null,
|
|
393
|
-
-1
|
|
394
|
-
/* HOISTED */
|
|
395
|
-
)
|
|
396
|
-
])
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
}), Xe = {
|
|
400
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
401
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
402
|
-
viewBox: "0 0 512 512"
|
|
403
|
-
}, Ye = m({
|
|
404
|
-
name: "StarOutline",
|
|
405
|
-
render: function(e, t) {
|
|
406
|
-
return l(), r(
|
|
407
|
-
"svg",
|
|
408
|
-
Xe,
|
|
409
|
-
t[0] || (t[0] = [
|
|
410
|
-
h(
|
|
411
|
-
"path",
|
|
412
|
-
{
|
|
413
|
-
d: "M480 208H308L256 48l-52 160H32l140 96l-54 160l138-100l138 100l-54-160z",
|
|
414
|
-
fill: "none",
|
|
415
|
-
stroke: "currentColor",
|
|
416
|
-
"stroke-linejoin": "round",
|
|
417
|
-
"stroke-width": "32"
|
|
418
|
-
},
|
|
419
|
-
null,
|
|
420
|
-
-1
|
|
421
|
-
/* HOISTED */
|
|
422
|
-
)
|
|
423
|
-
])
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
}), Je = ["type", "placeholder", "disabled", "readonly", "name", "id"], Ke = /* @__PURE__ */ m({
|
|
116
|
+
}), Xe = /* @__PURE__ */ b(Ue, [["__scopeId", "data-v-2948108d"]]), Ye = ["type", "placeholder", "disabled", "readonly", "name", "id"], Je = /* @__PURE__ */ g({
|
|
427
117
|
__name: "FInput",
|
|
428
|
-
props: /* @__PURE__ */
|
|
118
|
+
props: /* @__PURE__ */ H({
|
|
429
119
|
placeholder: { default: "输入..." },
|
|
430
120
|
type: { default: "text" },
|
|
431
121
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -436,85 +126,85 @@ const we = (s, e, t) => {
|
|
|
436
126
|
modelValue: { default: "" },
|
|
437
127
|
modelModifiers: {}
|
|
438
128
|
}),
|
|
439
|
-
emits: /* @__PURE__ */
|
|
440
|
-
setup(
|
|
441
|
-
const
|
|
442
|
-
const f = a.target.value;
|
|
443
|
-
o("input", f);
|
|
444
|
-
}, c = (a) => {
|
|
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) => {
|
|
445
132
|
const f = a.target.value;
|
|
446
|
-
|
|
447
|
-
}, d = (a) => {
|
|
448
|
-
o("focus", a);
|
|
133
|
+
t("input", f);
|
|
449
134
|
}, i = (a) => {
|
|
450
|
-
|
|
135
|
+
const f = a.target.value;
|
|
136
|
+
t("change", f);
|
|
137
|
+
}, u = (a) => {
|
|
138
|
+
t("focus", a);
|
|
139
|
+
}, r = (a) => {
|
|
140
|
+
t("blur", a);
|
|
451
141
|
};
|
|
452
142
|
return (a, f) => {
|
|
453
|
-
const
|
|
454
|
-
return l(),
|
|
455
|
-
class:
|
|
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) }])
|
|
456
146
|
}, [
|
|
457
|
-
|
|
458
|
-
default:
|
|
459
|
-
|
|
147
|
+
S(m, { class: "f-input__icon" }, {
|
|
148
|
+
default: I(() => [
|
|
149
|
+
S(p(Se))
|
|
460
150
|
]),
|
|
461
151
|
_: 1
|
|
462
152
|
}),
|
|
463
|
-
|
|
153
|
+
te(z("input", {
|
|
464
154
|
class: "f-input__text",
|
|
465
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
155
|
+
"onUpdate:modelValue": f[0] || (f[0] = (d) => o.value = d),
|
|
466
156
|
type: a.type,
|
|
467
157
|
placeholder: a.placeholder,
|
|
468
158
|
disabled: a.disabled,
|
|
469
|
-
readonly: "readonly" in a ? a.readonly :
|
|
159
|
+
readonly: "readonly" in a ? a.readonly : p(de),
|
|
470
160
|
name: a.name,
|
|
471
161
|
id: a.id,
|
|
472
|
-
onInput:
|
|
473
|
-
onChange:
|
|
474
|
-
onFocus:
|
|
475
|
-
onBlur:
|
|
476
|
-
}, null, 40,
|
|
477
|
-
[
|
|
162
|
+
onInput: s,
|
|
163
|
+
onChange: i,
|
|
164
|
+
onFocus: u,
|
|
165
|
+
onBlur: r
|
|
166
|
+
}, null, 40, Ye), [
|
|
167
|
+
[we, o.value]
|
|
478
168
|
])
|
|
479
169
|
], 2);
|
|
480
170
|
};
|
|
481
171
|
}
|
|
482
|
-
}),
|
|
172
|
+
}), Ke = /* @__PURE__ */ b(Je, [["__scopeId", "data-v-6c6d7c63"]]), Qe = {
|
|
483
173
|
key: 0,
|
|
484
174
|
class: "loop cubes"
|
|
485
175
|
}, Ze = {
|
|
486
176
|
key: 2,
|
|
487
177
|
class: "msg"
|
|
488
|
-
}, et = /* @__PURE__ */
|
|
178
|
+
}, et = /* @__PURE__ */ g({
|
|
489
179
|
__name: "FLoading",
|
|
490
180
|
props: {
|
|
491
181
|
type: { default: "dots" },
|
|
492
182
|
text: {},
|
|
493
183
|
mask: { type: Boolean, default: !1 }
|
|
494
184
|
},
|
|
495
|
-
setup(
|
|
496
|
-
const e =
|
|
497
|
-
return (
|
|
498
|
-
class:
|
|
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 }])
|
|
499
189
|
}, [
|
|
500
|
-
|
|
501
|
-
(l(),
|
|
190
|
+
o.type === "cubes" ? (l(), c("div", Qe, [
|
|
191
|
+
(l(), c(P, null, G(6, (s) => z("div", {
|
|
502
192
|
class: "item cubes",
|
|
503
|
-
key:
|
|
193
|
+
key: s
|
|
504
194
|
})), 64))
|
|
505
|
-
])) : (l(),
|
|
195
|
+
])) : (l(), c("div", {
|
|
506
196
|
key: 1,
|
|
507
|
-
class:
|
|
197
|
+
class: C(["loader", o.type])
|
|
508
198
|
}, null, 2)),
|
|
509
|
-
e.text ? (l(),
|
|
199
|
+
e.text ? (l(), c("p", Ze, V(e.text), 1)) : y("", !0)
|
|
510
200
|
], 2));
|
|
511
201
|
}
|
|
512
|
-
}),
|
|
202
|
+
}), tt = /* @__PURE__ */ b(et, [["__scopeId", "data-v-20f58a50"]]), ot = ["onMousemove"], st = {
|
|
513
203
|
key: 0,
|
|
514
204
|
class: "f-rate__score"
|
|
515
|
-
},
|
|
205
|
+
}, at = /* @__PURE__ */ g({
|
|
516
206
|
__name: "FRate",
|
|
517
|
-
props: /* @__PURE__ */
|
|
207
|
+
props: /* @__PURE__ */ H({
|
|
518
208
|
modelValue: {},
|
|
519
209
|
count: { default: 5 },
|
|
520
210
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -528,120 +218,63 @@ const we = (s, e, t) => {
|
|
|
528
218
|
modelValue: { default: 0 },
|
|
529
219
|
modelModifiers: {}
|
|
530
220
|
}),
|
|
531
|
-
emits: /* @__PURE__ */
|
|
532
|
-
setup(
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
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;
|
|
545
238
|
} else
|
|
546
|
-
|
|
547
|
-
},
|
|
548
|
-
|
|
549
|
-
},
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
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);
|
|
553
247
|
};
|
|
554
|
-
return (
|
|
555
|
-
const
|
|
556
|
-
return l(),
|
|
557
|
-
class:
|
|
558
|
-
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
|
|
559
253
|
}, [
|
|
560
|
-
(l(!0),
|
|
561
|
-
key:
|
|
254
|
+
(l(!0), c(P, null, G(t.count, (M) => (l(), c("span", {
|
|
255
|
+
key: M,
|
|
562
256
|
class: "f-rate__item",
|
|
563
|
-
onMousemove: (
|
|
564
|
-
onClick:
|
|
257
|
+
onMousemove: (E) => d(E, M),
|
|
258
|
+
onClick: x
|
|
565
259
|
}, [
|
|
566
|
-
|
|
567
|
-
color:
|
|
568
|
-
size: a
|
|
260
|
+
S(A, {
|
|
261
|
+
color: m(M),
|
|
262
|
+
size: p(a)
|
|
569
263
|
}, {
|
|
570
|
-
default:
|
|
571
|
-
f(
|
|
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 }))
|
|
572
266
|
]),
|
|
573
267
|
_: 2
|
|
574
268
|
}, 1032, ["color", "size"])
|
|
575
|
-
], 40,
|
|
576
|
-
|
|
269
|
+
], 40, ot))), 128)),
|
|
270
|
+
t.showText ? (l(), c("span", st, V(p(r)), 1)) : y("", !0)
|
|
577
271
|
], 34);
|
|
578
272
|
};
|
|
579
273
|
}
|
|
580
|
-
}),
|
|
581
|
-
function lt(s) {
|
|
582
|
-
return ve() ? (me(s), !0) : !1;
|
|
583
|
-
}
|
|
584
|
-
const st = typeof window < "u" && typeof document < "u";
|
|
585
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
586
|
-
const at = Object.prototype.toString, rt = (s) => at.call(s) === "[object Object]";
|
|
587
|
-
function ee(s) {
|
|
588
|
-
return Array.isArray(s) ? s : [s];
|
|
589
|
-
}
|
|
590
|
-
function it(s, e, t) {
|
|
591
|
-
return te(
|
|
592
|
-
s,
|
|
593
|
-
e,
|
|
594
|
-
{
|
|
595
|
-
...t,
|
|
596
|
-
immediate: !0
|
|
597
|
-
}
|
|
598
|
-
);
|
|
599
|
-
}
|
|
600
|
-
const ct = st ? window : void 0;
|
|
601
|
-
function dt(s) {
|
|
602
|
-
var e;
|
|
603
|
-
const t = K(s);
|
|
604
|
-
return (e = t == null ? void 0 : t.$el) != null ? e : t;
|
|
605
|
-
}
|
|
606
|
-
function ut(...s) {
|
|
607
|
-
const e = [], t = () => {
|
|
608
|
-
e.forEach((i) => i()), e.length = 0;
|
|
609
|
-
}, o = (i, a, f, u) => (i.addEventListener(a, f, u), () => i.removeEventListener(a, f, u)), n = _(() => {
|
|
610
|
-
const i = ee(K(s[0])).filter((a) => a != null);
|
|
611
|
-
return i.every((a) => typeof a != "string") ? i : void 0;
|
|
612
|
-
}), c = it(
|
|
613
|
-
() => {
|
|
614
|
-
var i, a;
|
|
615
|
-
return [
|
|
616
|
-
(a = (i = n.value) == null ? void 0 : i.map((f) => dt(f))) != null ? a : [ct].filter((f) => f != null),
|
|
617
|
-
ee(K(n.value ? s[1] : s[0])),
|
|
618
|
-
ee(T(n.value ? s[2] : s[1])),
|
|
619
|
-
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
620
|
-
K(n.value ? s[3] : s[2])
|
|
621
|
-
];
|
|
622
|
-
},
|
|
623
|
-
([i, a, f, u]) => {
|
|
624
|
-
if (t(), !(i != null && i.length) || !(a != null && a.length) || !(f != null && f.length))
|
|
625
|
-
return;
|
|
626
|
-
const p = rt(u) ? { ...u } : u;
|
|
627
|
-
e.push(
|
|
628
|
-
...i.flatMap(
|
|
629
|
-
(C) => a.flatMap(
|
|
630
|
-
(M) => f.map((k) => o(C, M, k, p))
|
|
631
|
-
)
|
|
632
|
-
)
|
|
633
|
-
);
|
|
634
|
-
},
|
|
635
|
-
{ flush: "post" }
|
|
636
|
-
), d = () => {
|
|
637
|
-
c(), t();
|
|
638
|
-
};
|
|
639
|
-
return lt(t), d;
|
|
640
|
-
}
|
|
641
|
-
const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }, vt = ["onClick"], mt = {
|
|
274
|
+
}), nt = /* @__PURE__ */ b(at, [["__scopeId", "data-v-d68cd0e3"]]), lt = { class: "f-dropdown-wrapper" }, rt = { class: "f-dropdown-content" }, it = ["onClick"], ct = {
|
|
642
275
|
key: 0,
|
|
643
276
|
class: "opt-icon"
|
|
644
|
-
},
|
|
277
|
+
}, dt = { class: "opt-label" }, ut = /* @__PURE__ */ g({
|
|
645
278
|
__name: "FDropdown",
|
|
646
279
|
props: {
|
|
647
280
|
placement: { default: "right-start" },
|
|
@@ -651,136 +284,136 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
651
284
|
options: { default: () => [] }
|
|
652
285
|
},
|
|
653
286
|
emits: ["select"],
|
|
654
|
-
setup(
|
|
655
|
-
const
|
|
656
|
-
const [
|
|
657
|
-
return
|
|
658
|
-
}),
|
|
659
|
-
if (!
|
|
660
|
-
const
|
|
661
|
-
let
|
|
662
|
-
|
|
663
|
-
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";
|
|
664
297
|
return {
|
|
665
|
-
top: `${
|
|
666
|
-
left: `${
|
|
667
|
-
transformOrigin: `${
|
|
298
|
+
top: `${j}px`,
|
|
299
|
+
left: `${D}px`,
|
|
300
|
+
transformOrigin: `${ve} ${he}`
|
|
668
301
|
};
|
|
669
302
|
});
|
|
670
|
-
let
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
|
|
677
|
-
|
|
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;
|
|
678
311
|
}, 400));
|
|
679
|
-
},
|
|
680
|
-
|
|
681
|
-
|
|
312
|
+
}, M = () => {
|
|
313
|
+
o.trigger === "hover" && (x && (clearTimeout(x), x = null), k = setTimeout(() => {
|
|
314
|
+
s.value = !1;
|
|
682
315
|
}, 400));
|
|
683
|
-
},
|
|
684
|
-
|
|
685
|
-
},
|
|
686
|
-
|
|
316
|
+
}, E = (_) => {
|
|
317
|
+
o.trigger !== "click" || !s.value || (s.value = !1);
|
|
318
|
+
}, Z = (_) => {
|
|
319
|
+
_.disabled || (t("select", _.key, _), _.children || (s.value = !1));
|
|
687
320
|
};
|
|
688
|
-
return
|
|
689
|
-
var
|
|
690
|
-
|
|
691
|
-
}),
|
|
692
|
-
|
|
693
|
-
}),
|
|
694
|
-
|
|
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, [
|
|
327
|
+
z("div", {
|
|
695
328
|
ref_key: "triggerRef",
|
|
696
|
-
ref:
|
|
329
|
+
ref: u,
|
|
697
330
|
class: "f-dropdown-trigger-wrapper",
|
|
698
|
-
onMouseenter:
|
|
699
|
-
onMouseleave:
|
|
700
|
-
onClick:
|
|
331
|
+
onMouseenter: A,
|
|
332
|
+
onMouseleave: M,
|
|
333
|
+
onClick: B
|
|
701
334
|
}, [
|
|
702
|
-
|
|
335
|
+
v(_.$slots, "default", {}, void 0, !0)
|
|
703
336
|
], 544),
|
|
704
|
-
(l(),
|
|
705
|
-
|
|
706
|
-
default:
|
|
707
|
-
|
|
337
|
+
(l(), W(fe, { to: "body" }, [
|
|
338
|
+
S(K, { name: "f-dropdown-motion" }, {
|
|
339
|
+
default: I(() => [
|
|
340
|
+
p(s) ? (l(), c("div", {
|
|
708
341
|
key: 0,
|
|
709
342
|
ref_key: "dropdownRef",
|
|
710
|
-
ref:
|
|
343
|
+
ref: r,
|
|
711
344
|
class: "f-dropdown-item",
|
|
712
|
-
style:
|
|
713
|
-
onMouseenter:
|
|
714
|
-
onMouseleave:
|
|
715
|
-
onClick:
|
|
345
|
+
style: T([p(d), { zIndex: _.zIndex }]),
|
|
346
|
+
onMouseenter: w,
|
|
347
|
+
onMouseleave: M,
|
|
348
|
+
onClick: N[0] || (N[0] = se(() => {
|
|
716
349
|
}, ["stop"]))
|
|
717
350
|
}, [
|
|
718
|
-
|
|
351
|
+
_.trigger === "hover" ? (l(), c("div", {
|
|
719
352
|
key: 0,
|
|
720
353
|
class: "f-dropdown-bridge",
|
|
721
|
-
style:
|
|
722
|
-
}, null, 4)) :
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
key:
|
|
726
|
-
class:
|
|
727
|
-
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($)
|
|
728
361
|
}, [
|
|
729
|
-
|
|
730
|
-
(l(),
|
|
731
|
-
])) :
|
|
732
|
-
|
|
733
|
-
], 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)
|
|
734
367
|
])
|
|
735
|
-
], 36)) :
|
|
368
|
+
], 36)) : y("", !0)
|
|
736
369
|
]),
|
|
737
370
|
_: 3
|
|
738
371
|
})
|
|
739
372
|
]))
|
|
740
373
|
]));
|
|
741
374
|
}
|
|
742
|
-
}),
|
|
375
|
+
}), pt = /* @__PURE__ */ b(ut, [["__scopeId", "data-v-addb3a3b"]]), ft = /* @__PURE__ */ g({
|
|
743
376
|
__name: "FSelect",
|
|
744
|
-
props: /* @__PURE__ */
|
|
377
|
+
props: /* @__PURE__ */ H({
|
|
745
378
|
options: {},
|
|
746
379
|
placeholder: {}
|
|
747
380
|
}, {
|
|
748
381
|
modelValue: {},
|
|
749
382
|
modelModifiers: {}
|
|
750
383
|
}),
|
|
751
|
-
emits: /* @__PURE__ */
|
|
752
|
-
setup(
|
|
753
|
-
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(
|
|
754
387
|
() => {
|
|
755
|
-
var
|
|
756
|
-
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 : "请选择";
|
|
757
390
|
}
|
|
758
|
-
),
|
|
759
|
-
|
|
760
|
-
}, f = (
|
|
761
|
-
|
|
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;
|
|
762
395
|
};
|
|
763
|
-
return (
|
|
764
|
-
const
|
|
765
|
-
return l(),
|
|
766
|
-
options:
|
|
396
|
+
return (m, d) => {
|
|
397
|
+
const k = O("f-icon"), x = O("f-dropdown");
|
|
398
|
+
return l(), W(x, {
|
|
399
|
+
options: m.options,
|
|
767
400
|
trigger: "click",
|
|
768
401
|
onSelect: a,
|
|
769
|
-
onShow:
|
|
770
|
-
onHide:
|
|
402
|
+
onShow: d[0] || (d[0] = (w) => f(!0)),
|
|
403
|
+
onHide: d[1] || (d[1] = (w) => f(!1)),
|
|
771
404
|
placement: "bottom",
|
|
772
405
|
offset: 4
|
|
773
406
|
}, {
|
|
774
|
-
default:
|
|
775
|
-
|
|
776
|
-
class:
|
|
407
|
+
default: I(() => [
|
|
408
|
+
z("div", {
|
|
409
|
+
class: C(["f-select", { "is-active": p(r), "is-open": p(i) }])
|
|
777
410
|
}, [
|
|
778
|
-
|
|
779
|
-
class:
|
|
780
|
-
}, V(
|
|
781
|
-
|
|
782
|
-
default:
|
|
783
|
-
|
|
411
|
+
z("span", {
|
|
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))
|
|
784
417
|
]),
|
|
785
418
|
_: 1
|
|
786
419
|
})
|
|
@@ -790,12 +423,12 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
790
423
|
}, 8, ["options"]);
|
|
791
424
|
};
|
|
792
425
|
}
|
|
793
|
-
}),
|
|
426
|
+
}), mt = /* @__PURE__ */ b(ft, [["__scopeId", "data-v-25e7d03d"]]), _t = { class: "f-pagination" }, ht = { class: "f-pagination__list" }, vt = {
|
|
794
427
|
key: 0,
|
|
795
428
|
class: "page-btn ellipsis"
|
|
796
|
-
},
|
|
429
|
+
}, gt = ["onClick"], bt = /* @__PURE__ */ g({
|
|
797
430
|
__name: "FPagination",
|
|
798
|
-
props: /* @__PURE__ */
|
|
431
|
+
props: /* @__PURE__ */ H({
|
|
799
432
|
total: {},
|
|
800
433
|
pageSize: { default: 10 },
|
|
801
434
|
hideOnSingle: { type: Boolean }
|
|
@@ -803,51 +436,51 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
803
436
|
modelValue: { default: 1 },
|
|
804
437
|
modelModifiers: {}
|
|
805
438
|
}),
|
|
806
|
-
emits: /* @__PURE__ */
|
|
807
|
-
setup(
|
|
808
|
-
const
|
|
809
|
-
const
|
|
810
|
-
return !
|
|
811
|
-
}),
|
|
812
|
-
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));
|
|
813
446
|
};
|
|
814
|
-
return (
|
|
815
|
-
const f =
|
|
816
|
-
return l(),
|
|
817
|
-
|
|
818
|
-
class:
|
|
819
|
-
onClick: a[0] || (a[0] = (
|
|
447
|
+
return (r, a) => {
|
|
448
|
+
const f = O("f-icon");
|
|
449
|
+
return l(), c("div", _t, [
|
|
450
|
+
z("button", {
|
|
451
|
+
class: C(["page-btn", { disabled: t.value === 1 }]),
|
|
452
|
+
onClick: a[0] || (a[0] = (m) => u(t.value - 1))
|
|
820
453
|
}, [
|
|
821
|
-
|
|
822
|
-
default:
|
|
823
|
-
|
|
454
|
+
S(f, null, {
|
|
455
|
+
default: I(() => [
|
|
456
|
+
S(p(Ve))
|
|
824
457
|
]),
|
|
825
458
|
_: 1
|
|
826
459
|
})
|
|
827
460
|
], 2),
|
|
828
|
-
|
|
829
|
-
(l(!0),
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
default:
|
|
833
|
-
|
|
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))
|
|
834
467
|
]),
|
|
835
468
|
_: 1
|
|
836
469
|
})
|
|
837
|
-
])) : (l(),
|
|
470
|
+
])) : (l(), c("li", {
|
|
838
471
|
key: 1,
|
|
839
|
-
class:
|
|
840
|
-
onClick: (
|
|
841
|
-
}, V(
|
|
472
|
+
class: C(["page-btn", { active: t.value === m }]),
|
|
473
|
+
onClick: (k) => u(m)
|
|
474
|
+
}, V(m), 11, gt))
|
|
842
475
|
], 64))), 128))
|
|
843
476
|
]),
|
|
844
|
-
|
|
845
|
-
class:
|
|
846
|
-
onClick: a[1] || (a[1] = (
|
|
477
|
+
z("button", {
|
|
478
|
+
class: C(["page-btn", { disabled: t.value === p(s) }]),
|
|
479
|
+
onClick: a[1] || (a[1] = (m) => u(t.value + 1))
|
|
847
480
|
}, [
|
|
848
|
-
|
|
849
|
-
default:
|
|
850
|
-
|
|
481
|
+
S(f, null, {
|
|
482
|
+
default: I(() => [
|
|
483
|
+
S(p(Ae))
|
|
851
484
|
]),
|
|
852
485
|
_: 1
|
|
853
486
|
})
|
|
@@ -855,87 +488,87 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
855
488
|
]);
|
|
856
489
|
};
|
|
857
490
|
}
|
|
858
|
-
}),
|
|
491
|
+
}), yt = /* @__PURE__ */ b(bt, [["__scopeId", "data-v-e58f1ac9"]]), $t = {
|
|
859
492
|
key: 0,
|
|
860
493
|
class: "f-card__header"
|
|
861
|
-
},
|
|
494
|
+
}, kt = {
|
|
862
495
|
key: 0,
|
|
863
496
|
class: "f-card__header-extra"
|
|
864
|
-
},
|
|
497
|
+
}, wt = {
|
|
865
498
|
key: 1,
|
|
866
499
|
class: "f-card__cover"
|
|
867
|
-
},
|
|
500
|
+
}, Ft = {
|
|
868
501
|
key: 2,
|
|
869
502
|
class: "f-card__body"
|
|
870
|
-
},
|
|
503
|
+
}, zt = {
|
|
871
504
|
key: 3,
|
|
872
505
|
class: "f-card__footer"
|
|
873
|
-
},
|
|
506
|
+
}, Ct = {
|
|
874
507
|
key: 0,
|
|
875
508
|
class: "f-card__header"
|
|
876
|
-
},
|
|
509
|
+
}, xt = {
|
|
877
510
|
key: 0,
|
|
878
511
|
class: "f-card__header-extra"
|
|
879
|
-
},
|
|
512
|
+
}, St = {
|
|
880
513
|
key: 1,
|
|
881
514
|
class: "f-card__cover"
|
|
882
|
-
},
|
|
515
|
+
}, Mt = { class: "f-card__content" }, It = {
|
|
883
516
|
key: 0,
|
|
884
517
|
class: "f-card__body"
|
|
885
|
-
},
|
|
518
|
+
}, Tt = {
|
|
886
519
|
key: 1,
|
|
887
520
|
class: "f-card__footer"
|
|
888
|
-
},
|
|
521
|
+
}, Bt = /* @__PURE__ */ g({
|
|
889
522
|
__name: "FCard",
|
|
890
523
|
props: {
|
|
891
524
|
hoverable: { type: Boolean, default: !0 },
|
|
892
525
|
direction: { default: "vertical" }
|
|
893
526
|
},
|
|
894
|
-
setup(
|
|
895
|
-
return (e,
|
|
896
|
-
class:
|
|
527
|
+
setup(n) {
|
|
528
|
+
return (e, o) => (l(), c("div", {
|
|
529
|
+
class: C(["f-card", [`f-card--${e.direction}`, { "is-hoverable": e.hoverable }]])
|
|
897
530
|
}, [
|
|
898
|
-
e.direction === "vertical" ? (l(),
|
|
899
|
-
e.$slots.header || e.$slots["header-extra"] ? (l(),
|
|
900
|
-
|
|
901
|
-
e.$slots["header-extra"] ? (l(),
|
|
902
|
-
|
|
903
|
-
])) :
|
|
904
|
-
])) :
|
|
905
|
-
e.$slots.cover ? (l(),
|
|
906
|
-
|
|
907
|
-
])) :
|
|
908
|
-
e.$slots.default ? (l(),
|
|
909
|
-
|
|
910
|
-
])) :
|
|
911
|
-
e.$slots.footer ? (l(),
|
|
912
|
-
|
|
913
|
-
])) :
|
|
914
|
-
], 64)) : (l(),
|
|
915
|
-
e.$slots.header || e.$slots["header-extra"] ? (l(),
|
|
916
|
-
|
|
917
|
-
e.$slots["header-extra"] ? (l(),
|
|
918
|
-
|
|
919
|
-
])) :
|
|
920
|
-
])) :
|
|
921
|
-
e.$slots.cover ? (l(),
|
|
922
|
-
|
|
923
|
-
])) :
|
|
924
|
-
|
|
925
|
-
e.$slots.default ? (l(),
|
|
926
|
-
|
|
927
|
-
])) :
|
|
928
|
-
e.$slots.footer ? (l(),
|
|
929
|
-
|
|
930
|
-
])) :
|
|
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)
|
|
931
564
|
])
|
|
932
565
|
], 64))
|
|
933
566
|
], 2));
|
|
934
567
|
}
|
|
935
|
-
}),
|
|
568
|
+
}), Vt = /* @__PURE__ */ b(Bt, [["__scopeId", "data-v-a66fa373"]]), Rt = {
|
|
936
569
|
key: 0,
|
|
937
570
|
class: "f-tag__dot"
|
|
938
|
-
},
|
|
571
|
+
}, At = /* @__PURE__ */ g({
|
|
939
572
|
__name: "FTag",
|
|
940
573
|
props: {
|
|
941
574
|
color: {},
|
|
@@ -945,35 +578,36 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
945
578
|
size: { default: "normal" }
|
|
946
579
|
},
|
|
947
580
|
emits: ["close"],
|
|
948
|
-
setup(
|
|
949
|
-
const
|
|
950
|
-
return (
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
`f-tag--${
|
|
956
|
-
|
|
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", {
|
|
587
|
+
class: C(["f-tag", [
|
|
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"
|
|
957
591
|
]]),
|
|
958
|
-
onMouseenter:
|
|
959
|
-
onMouseleave:
|
|
592
|
+
onMouseenter: i[1] || (i[1] = (m) => t.value = !0),
|
|
593
|
+
onMouseleave: i[2] || (i[2] = (m) => t.value = !1)
|
|
960
594
|
}, [
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
595
|
+
s.type === "dot" ? (l(), c("span", Rt)) : y("", !0),
|
|
596
|
+
v(s.$slots, "default", {}, void 0, !0),
|
|
597
|
+
s.closable ? (l(), W(u, {
|
|
964
598
|
key: 1,
|
|
965
599
|
class: "f-tag__close",
|
|
966
|
-
onClick:
|
|
600
|
+
onClick: i[0] || (i[0] = se((m) => o("close"), ["stop"]))
|
|
967
601
|
}, {
|
|
968
|
-
default:
|
|
969
|
-
(l(),
|
|
602
|
+
default: I(() => [
|
|
603
|
+
(l(), W(Y(p(t) ? p(Pe) : p(We))))
|
|
970
604
|
]),
|
|
971
605
|
_: 1
|
|
972
|
-
})) :
|
|
606
|
+
})) : y("", !0)
|
|
973
607
|
], 34);
|
|
974
608
|
};
|
|
975
609
|
}
|
|
976
|
-
}),
|
|
610
|
+
}), Pt = /* @__PURE__ */ b(At, [["__scopeId", "data-v-9f7974a7"]]), Wt = /* @__PURE__ */ g({
|
|
977
611
|
__name: "FTooltip",
|
|
978
612
|
props: {
|
|
979
613
|
content: {},
|
|
@@ -983,77 +617,77 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
983
617
|
offset: { default: 6 },
|
|
984
618
|
maxWidth: { default: 240 }
|
|
985
619
|
},
|
|
986
|
-
setup(
|
|
987
|
-
const e =
|
|
988
|
-
let
|
|
989
|
-
const
|
|
990
|
-
e.disabled || (
|
|
991
|
-
|
|
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);
|
|
992
626
|
}, e.delay));
|
|
993
627
|
}, a = () => {
|
|
994
|
-
|
|
628
|
+
u && clearTimeout(u), s.value = !1;
|
|
995
629
|
}, f = () => {
|
|
996
|
-
var
|
|
997
|
-
if (!
|
|
998
|
-
const
|
|
999
|
-
if (!
|
|
1000
|
-
const
|
|
1001
|
-
let
|
|
1002
|
-
switch (
|
|
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) {
|
|
1003
637
|
case "top":
|
|
1004
|
-
|
|
638
|
+
A = d.top - k.height - x;
|
|
1005
639
|
break;
|
|
1006
640
|
case "bottom":
|
|
1007
|
-
|
|
641
|
+
A = d.bottom + x;
|
|
1008
642
|
break;
|
|
1009
643
|
case "left":
|
|
1010
|
-
|
|
644
|
+
M = d.left - k.width - x;
|
|
1011
645
|
break;
|
|
1012
646
|
case "right":
|
|
1013
|
-
|
|
647
|
+
M = d.right + x;
|
|
1014
648
|
break;
|
|
1015
649
|
}
|
|
1016
|
-
|
|
1017
|
-
const
|
|
1018
|
-
|
|
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 };
|
|
1019
653
|
};
|
|
1020
|
-
return
|
|
654
|
+
return oe(a), (m, d) => (l(), c("div", {
|
|
1021
655
|
class: "f-tooltip",
|
|
1022
656
|
ref_key: "triggerRef",
|
|
1023
|
-
ref:
|
|
1024
|
-
onMouseenter:
|
|
657
|
+
ref: o,
|
|
658
|
+
onMouseenter: r,
|
|
1025
659
|
onMouseleave: a
|
|
1026
660
|
}, [
|
|
1027
|
-
|
|
1028
|
-
(l(),
|
|
1029
|
-
|
|
1030
|
-
default:
|
|
1031
|
-
|
|
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", {
|
|
1032
666
|
key: 0,
|
|
1033
667
|
ref_key: "tooltipRef",
|
|
1034
|
-
ref:
|
|
1035
|
-
class:
|
|
1036
|
-
style:
|
|
1037
|
-
top: `${
|
|
1038
|
-
left: `${
|
|
1039
|
-
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`
|
|
1040
674
|
})
|
|
1041
675
|
}, [
|
|
1042
|
-
|
|
1043
|
-
|
|
676
|
+
v(m.$slots, "content", {}, () => [
|
|
677
|
+
me(V(m.content), 1)
|
|
1044
678
|
], !0),
|
|
1045
|
-
|
|
1046
|
-
], 6)) :
|
|
679
|
+
d[0] || (d[0] = z("span", { class: "f-tooltip-arrow" }, null, -1))
|
|
680
|
+
], 6)) : y("", !0)
|
|
1047
681
|
]),
|
|
1048
682
|
_: 3
|
|
1049
683
|
})
|
|
1050
684
|
]))
|
|
1051
685
|
], 544));
|
|
1052
686
|
}
|
|
1053
|
-
}),
|
|
687
|
+
}), jt = /* @__PURE__ */ b(Wt, [["__scopeId", "data-v-be9acca7"]]), Dt = { class: "f-progress" }, Et = {
|
|
1054
688
|
key: 0,
|
|
1055
689
|
class: "f-progress__text"
|
|
1056
|
-
},
|
|
690
|
+
}, Lt = /* @__PURE__ */ g({
|
|
1057
691
|
__name: "FProgress",
|
|
1058
692
|
props: {
|
|
1059
693
|
percent: {},
|
|
@@ -1061,25 +695,25 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1061
695
|
showText: { type: Boolean, default: !1 },
|
|
1062
696
|
height: { default: 5 }
|
|
1063
697
|
},
|
|
1064
|
-
setup(
|
|
1065
|
-
const e =
|
|
1066
|
-
return (
|
|
1067
|
-
|
|
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, [
|
|
701
|
+
z("div", {
|
|
1068
702
|
class: "f-progress__track",
|
|
1069
|
-
style:
|
|
703
|
+
style: T({ height: `${t.height}px` })
|
|
1070
704
|
}, [
|
|
1071
|
-
|
|
705
|
+
z("div", {
|
|
1072
706
|
class: "f-progress__fill",
|
|
1073
|
-
style:
|
|
1074
|
-
width: `${
|
|
1075
|
-
background:
|
|
707
|
+
style: T({
|
|
708
|
+
width: `${p(o)}%`,
|
|
709
|
+
background: t.color
|
|
1076
710
|
})
|
|
1077
711
|
}, null, 4)
|
|
1078
712
|
], 4),
|
|
1079
|
-
|
|
713
|
+
t.showText ? (l(), c("span", Et, V(p(o)) + "%", 1)) : y("", !0)
|
|
1080
714
|
]));
|
|
1081
715
|
}
|
|
1082
|
-
}),
|
|
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({
|
|
1083
717
|
__name: "FTabs",
|
|
1084
718
|
props: {
|
|
1085
719
|
tabs: {},
|
|
@@ -1087,92 +721,93 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1087
721
|
type: { default: "line" }
|
|
1088
722
|
},
|
|
1089
723
|
emits: ["update:active", "change"],
|
|
1090
|
-
setup(
|
|
1091
|
-
const
|
|
724
|
+
setup(n, { emit: e }) {
|
|
725
|
+
const o = n, t = e, s = h({
|
|
1092
726
|
get: () => {
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
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 : "";
|
|
1097
732
|
},
|
|
1098
|
-
set: (
|
|
1099
|
-
|
|
733
|
+
set: (u) => {
|
|
734
|
+
t("update:active", u), t("change", u);
|
|
1100
735
|
}
|
|
1101
|
-
}),
|
|
1102
|
-
|
|
736
|
+
}), i = (u, r) => {
|
|
737
|
+
r || (s.value = u);
|
|
1103
738
|
};
|
|
1104
|
-
return (
|
|
1105
|
-
class:
|
|
739
|
+
return (u, r) => (l(), c("div", {
|
|
740
|
+
class: C(["f-tabs", [`f-tabs--${u.type}`]])
|
|
1106
741
|
}, [
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
(l(!0),
|
|
742
|
+
z("div", Ht, [
|
|
743
|
+
z("div", Nt, [
|
|
744
|
+
(l(!0), c(P, null, G(u.tabs, (a) => (l(), c("div", {
|
|
1110
745
|
key: a.name,
|
|
1111
|
-
class:
|
|
1112
|
-
active:
|
|
746
|
+
class: C(["f-tabs__tab", {
|
|
747
|
+
active: p(s) === a.name,
|
|
1113
748
|
disabled: a.disabled
|
|
1114
749
|
}]),
|
|
1115
|
-
onClick: (f) =>
|
|
750
|
+
onClick: (f) => i(a.name, a.disabled)
|
|
1116
751
|
}, [
|
|
1117
|
-
|
|
1118
|
-
], 10,
|
|
752
|
+
z("span", Gt, V(a.label), 1)
|
|
753
|
+
], 10, qt))), 128))
|
|
1119
754
|
])
|
|
1120
755
|
]),
|
|
1121
|
-
(l(!0),
|
|
756
|
+
(l(!0), c(P, null, G(u.tabs, (a) => te((l(), c("div", {
|
|
1122
757
|
key: a.name,
|
|
1123
758
|
class: "f-tabs__panel"
|
|
1124
759
|
}, [
|
|
1125
|
-
|
|
760
|
+
v(u.$slots, a.name, {}, void 0, !0)
|
|
1126
761
|
])), [
|
|
1127
|
-
[
|
|
762
|
+
[ue, p(s) === a.name]
|
|
1128
763
|
])), 128))
|
|
1129
764
|
], 2));
|
|
1130
765
|
}
|
|
1131
|
-
}),
|
|
766
|
+
}), Xt = /* @__PURE__ */ b(Ut, [["__scopeId", "data-v-268fc654"]]), Yt = {
|
|
1132
767
|
class: "f-breadcrumb__current",
|
|
1133
768
|
"aria-current": "page"
|
|
1134
|
-
},
|
|
769
|
+
}, Jt = ["href"], Kt = {
|
|
1135
770
|
key: 3,
|
|
1136
771
|
class: "f-breadcrumb__text"
|
|
1137
|
-
},
|
|
772
|
+
}, Qt = /* @__PURE__ */ g({
|
|
1138
773
|
__name: "FBreadcrumb",
|
|
1139
774
|
props: {
|
|
1140
775
|
items: { default: () => [] },
|
|
1141
776
|
separator: { default: "/" },
|
|
1142
777
|
animated: { type: Boolean, default: !1 }
|
|
1143
778
|
},
|
|
1144
|
-
setup(
|
|
1145
|
-
return (e,
|
|
1146
|
-
class:
|
|
779
|
+
setup(n) {
|
|
780
|
+
return (e, o) => (l(), c("nav", {
|
|
781
|
+
class: C(["f-breadcrumb", { "f-breadcrumb--animated": e.animated }]),
|
|
1147
782
|
"aria-label": "breadcrumb"
|
|
1148
783
|
}, [
|
|
1149
|
-
|
|
1150
|
-
default:
|
|
1151
|
-
(l(!0),
|
|
1152
|
-
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
|
|
1153
788
|
}, [
|
|
1154
|
-
|
|
1155
|
-
key: `sep-${
|
|
789
|
+
s > 0 ? (l(), c("span", {
|
|
790
|
+
key: `sep-${t.label}`,
|
|
1156
791
|
class: "f-breadcrumb__sep",
|
|
1157
792
|
"aria-hidden": "true"
|
|
1158
|
-
}, V(e.separator), 1)) :
|
|
1159
|
-
|
|
793
|
+
}, V(e.separator), 1)) : y("", !0),
|
|
794
|
+
s === e.items.length - 1 ? v(e.$slots, "default", {
|
|
1160
795
|
key: 1,
|
|
1161
|
-
item:
|
|
796
|
+
item: t
|
|
1162
797
|
}, () => [
|
|
1163
|
-
|
|
1164
|
-
], !0) :
|
|
798
|
+
z("span", Yt, V(t.label), 1)
|
|
799
|
+
], !0) : t.href ? (l(), c("a", {
|
|
1165
800
|
key: 2,
|
|
1166
|
-
href:
|
|
801
|
+
href: t.href,
|
|
1167
802
|
class: "f-breadcrumb__link"
|
|
1168
|
-
}, V(
|
|
803
|
+
}, V(t.label), 9, Jt)) : (l(), c("span", Kt, V(t.label), 1))
|
|
1169
804
|
], 64))), 128))
|
|
1170
805
|
]),
|
|
1171
806
|
_: 3
|
|
1172
807
|
})
|
|
1173
808
|
], 2));
|
|
1174
809
|
}
|
|
1175
|
-
}),
|
|
810
|
+
}), Zt = /* @__PURE__ */ b(Qt, [["__scopeId", "data-v-bb787dcc"]]), eo = /* @__PURE__ */ g({
|
|
1176
811
|
__name: "FCol",
|
|
1177
812
|
props: {
|
|
1178
813
|
span: { default: 24 },
|
|
@@ -1183,28 +818,28 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1183
818
|
md: {},
|
|
1184
819
|
lg: {}
|
|
1185
820
|
},
|
|
1186
|
-
setup(
|
|
1187
|
-
const e =
|
|
821
|
+
setup(n) {
|
|
822
|
+
const e = n, o = (i) => typeof i == "number" ? { span: i } : i, t = h(() => ({
|
|
1188
823
|
"--col-span": e.span,
|
|
1189
824
|
"--col-offset": e.offset,
|
|
1190
825
|
"--col-order": e.order
|
|
1191
|
-
})),
|
|
1192
|
-
const
|
|
1193
|
-
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)) {
|
|
1194
829
|
if (a === void 0) continue;
|
|
1195
|
-
const { span: f, offset:
|
|
1196
|
-
f !== void 0 &&
|
|
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}`);
|
|
1197
832
|
}
|
|
1198
|
-
return
|
|
833
|
+
return i;
|
|
1199
834
|
});
|
|
1200
|
-
return (
|
|
1201
|
-
class:
|
|
1202
|
-
style:
|
|
835
|
+
return (i, u) => (l(), c("div", {
|
|
836
|
+
class: C(["f-col", p(s)]),
|
|
837
|
+
style: T(p(t))
|
|
1203
838
|
}, [
|
|
1204
|
-
|
|
839
|
+
v(i.$slots, "default", {}, void 0, !0)
|
|
1205
840
|
], 6));
|
|
1206
841
|
}
|
|
1207
|
-
}),
|
|
842
|
+
}), to = /* @__PURE__ */ b(eo, [["__scopeId", "data-v-5a8b0cb4"]]), oo = /* @__PURE__ */ g({
|
|
1208
843
|
__name: "FRow",
|
|
1209
844
|
props: {
|
|
1210
845
|
gutter: { default: 0 },
|
|
@@ -1213,47 +848,47 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1213
848
|
wrap: { default: "wrap" },
|
|
1214
849
|
tag: { default: "div" }
|
|
1215
850
|
},
|
|
1216
|
-
setup(
|
|
1217
|
-
const e =
|
|
851
|
+
setup(n) {
|
|
852
|
+
const e = n, o = h(
|
|
1218
853
|
() => Array.isArray(e.gutter) ? e.gutter[0] : e.gutter
|
|
1219
|
-
),
|
|
854
|
+
), t = h(
|
|
1220
855
|
() => Array.isArray(e.gutter) ? e.gutter[1] : 0
|
|
1221
|
-
),
|
|
856
|
+
), s = {
|
|
1222
857
|
start: "flex-start",
|
|
1223
858
|
end: "flex-end",
|
|
1224
859
|
center: "center",
|
|
1225
860
|
"space-between": "space-between",
|
|
1226
861
|
"space-around": "space-around",
|
|
1227
862
|
"space-evenly": "space-evenly"
|
|
1228
|
-
},
|
|
863
|
+
}, i = {
|
|
1229
864
|
top: "flex-start",
|
|
1230
865
|
middle: "center",
|
|
1231
866
|
bottom: "flex-end",
|
|
1232
867
|
stretch: "stretch"
|
|
1233
|
-
},
|
|
1234
|
-
marginLeft:
|
|
1235
|
-
marginRight:
|
|
1236
|
-
rowGap:
|
|
1237
|
-
justifyContent:
|
|
1238
|
-
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],
|
|
1239
874
|
flexWrap: e.wrap,
|
|
1240
|
-
"--row-gutter-h":
|
|
875
|
+
"--row-gutter-h": o.value ? `${o.value / 2}px` : "0px"
|
|
1241
876
|
}));
|
|
1242
|
-
return (
|
|
877
|
+
return (r, a) => (l(), W(Y(r.tag), {
|
|
1243
878
|
class: "f-row",
|
|
1244
|
-
style:
|
|
879
|
+
style: T(p(u))
|
|
1245
880
|
}, {
|
|
1246
|
-
default:
|
|
1247
|
-
|
|
881
|
+
default: I(() => [
|
|
882
|
+
v(r.$slots, "default", {}, void 0, !0)
|
|
1248
883
|
]),
|
|
1249
884
|
_: 3
|
|
1250
885
|
}, 8, ["style"]));
|
|
1251
886
|
}
|
|
1252
|
-
}),
|
|
887
|
+
}), so = /* @__PURE__ */ b(oo, [["__scopeId", "data-v-72f62339"]]), ao = { class: "f-space__item" }, no = {
|
|
1253
888
|
key: 0,
|
|
1254
889
|
class: "f-space__split",
|
|
1255
890
|
"aria-hidden": "true"
|
|
1256
|
-
},
|
|
891
|
+
}, lo = /* @__PURE__ */ g({
|
|
1257
892
|
__name: "FSpace",
|
|
1258
893
|
props: {
|
|
1259
894
|
direction: { default: "horizontal" },
|
|
@@ -1263,80 +898,80 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1263
898
|
wrap: { type: Boolean, default: !1 },
|
|
1264
899
|
split: {}
|
|
1265
900
|
},
|
|
1266
|
-
setup(
|
|
1267
|
-
const e =
|
|
901
|
+
setup(n) {
|
|
902
|
+
const e = n, o = {
|
|
1268
903
|
small: 6,
|
|
1269
904
|
normal: 12,
|
|
1270
905
|
large: 18
|
|
1271
|
-
},
|
|
906
|
+
}, t = (a) => typeof a == "number" ? a : o[a], s = h(() => {
|
|
1272
907
|
const a = e.size;
|
|
1273
|
-
return Array.isArray(a) ? `${
|
|
1274
|
-
}),
|
|
908
|
+
return Array.isArray(a) ? `${t(a[1])}px ${t(a[0])}px` : `${t(a)}px`;
|
|
909
|
+
}), i = h(() => ({
|
|
1275
910
|
flexDirection: e.direction === "vertical" ? "column" : "row",
|
|
1276
911
|
alignItems: e.align,
|
|
1277
912
|
justifyContent: e.justify,
|
|
1278
913
|
flexWrap: e.wrap ? "wrap" : "nowrap",
|
|
1279
|
-
gap:
|
|
1280
|
-
})),
|
|
1281
|
-
var
|
|
1282
|
-
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);
|
|
1283
918
|
if (!a) return [];
|
|
1284
919
|
const f = [];
|
|
1285
|
-
for (const
|
|
1286
|
-
|
|
1287
|
-
return f.filter((
|
|
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);
|
|
1288
923
|
});
|
|
1289
|
-
return (a, f) => (l(),
|
|
924
|
+
return (a, f) => (l(), c("div", {
|
|
1290
925
|
class: "f-space",
|
|
1291
|
-
style:
|
|
926
|
+
style: T(p(i))
|
|
1292
927
|
}, [
|
|
1293
|
-
(l(!0),
|
|
1294
|
-
|
|
1295
|
-
(l(),
|
|
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)))
|
|
1296
931
|
]),
|
|
1297
|
-
a.split &&
|
|
932
|
+
a.split && d < p(r).length - 1 ? (l(), c("span", no, V(a.split), 1)) : y("", !0)
|
|
1298
933
|
], 64))), 128))
|
|
1299
934
|
], 4));
|
|
1300
935
|
}
|
|
1301
|
-
}),
|
|
936
|
+
}), ro = /* @__PURE__ */ b(lo, [["__scopeId", "data-v-5fb3b1a0"]]), io = /* @__PURE__ */ g({
|
|
1302
937
|
__name: "FContainer",
|
|
1303
938
|
props: {
|
|
1304
939
|
gap: { default: 12 }
|
|
1305
940
|
},
|
|
1306
|
-
setup(
|
|
1307
|
-
const e =
|
|
941
|
+
setup(n) {
|
|
942
|
+
const e = n, o = h(() => ({
|
|
1308
943
|
gap: typeof e.gap == "number" ? `${e.gap}px` : e.gap
|
|
1309
944
|
}));
|
|
1310
|
-
return (
|
|
945
|
+
return (t, s) => (l(), c("div", {
|
|
1311
946
|
class: "f-container",
|
|
1312
|
-
style:
|
|
947
|
+
style: T(p(o))
|
|
1313
948
|
}, [
|
|
1314
|
-
|
|
949
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
1315
950
|
], 4));
|
|
1316
951
|
}
|
|
1317
|
-
}),
|
|
952
|
+
}), co = /* @__PURE__ */ b(io, [["__scopeId", "data-v-08450ddf"]]), uo = /* @__PURE__ */ g({
|
|
1318
953
|
__name: "FDivider",
|
|
1319
954
|
props: {
|
|
1320
955
|
color: {},
|
|
1321
956
|
direction: { default: "horizontal" },
|
|
1322
957
|
line: { default: "solid" }
|
|
1323
958
|
},
|
|
1324
|
-
setup(
|
|
1325
|
-
const e =
|
|
1326
|
-
const
|
|
959
|
+
setup(n) {
|
|
960
|
+
const e = n, o = h(() => {
|
|
961
|
+
const t = e.color || "var(--el-color-primary)", s = e.direction === "horizontal";
|
|
1327
962
|
return {
|
|
1328
|
-
borderTop:
|
|
1329
|
-
borderLeft:
|
|
1330
|
-
height:
|
|
1331
|
-
width:
|
|
1332
|
-
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"
|
|
1333
968
|
};
|
|
1334
969
|
});
|
|
1335
|
-
return (
|
|
1336
|
-
style:
|
|
970
|
+
return (t, s) => (l(), c("hr", {
|
|
971
|
+
style: T(o.value)
|
|
1337
972
|
}, null, 4));
|
|
1338
973
|
}
|
|
1339
|
-
}),
|
|
974
|
+
}), po = /* @__PURE__ */ b(uo, [["__scopeId", "data-v-512ee743"]]), fo = ["src", "alt"], mo = /* @__PURE__ */ g({
|
|
1340
975
|
__name: "FAvatar",
|
|
1341
976
|
props: {
|
|
1342
977
|
src: {},
|
|
@@ -1345,39 +980,39 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1345
980
|
shape: { default: "circle" },
|
|
1346
981
|
icon: {}
|
|
1347
982
|
},
|
|
1348
|
-
setup(
|
|
1349
|
-
const e =
|
|
983
|
+
setup(n) {
|
|
984
|
+
const e = n, o = {
|
|
1350
985
|
small: "32px",
|
|
1351
986
|
normal: "48px",
|
|
1352
987
|
large: "64px"
|
|
1353
|
-
},
|
|
1354
|
-
width: typeof e.size == "string" ?
|
|
1355
|
-
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`,
|
|
1356
991
|
borderRadius: e.shape === "circle" ? "50%" : "8px"
|
|
1357
992
|
}));
|
|
1358
|
-
return (
|
|
1359
|
-
const
|
|
1360
|
-
return l(),
|
|
993
|
+
return (s, i) => {
|
|
994
|
+
const u = O("f-icon");
|
|
995
|
+
return l(), c("div", {
|
|
1361
996
|
class: "f-avatar",
|
|
1362
|
-
style:
|
|
997
|
+
style: T(p(t))
|
|
1363
998
|
}, [
|
|
1364
|
-
|
|
999
|
+
s.src ? (l(), c("img", {
|
|
1365
1000
|
key: 0,
|
|
1366
|
-
src:
|
|
1367
|
-
alt:
|
|
1368
|
-
}, null, 8,
|
|
1001
|
+
src: s.src,
|
|
1002
|
+
alt: s.alt
|
|
1003
|
+
}, null, 8, fo)) : (l(), W(u, {
|
|
1369
1004
|
key: 1,
|
|
1370
1005
|
size: 24
|
|
1371
1006
|
}, {
|
|
1372
|
-
default:
|
|
1373
|
-
(l(),
|
|
1007
|
+
default: I(() => [
|
|
1008
|
+
(l(), W(Y(s.icon ? s.icon : p(je))))
|
|
1374
1009
|
]),
|
|
1375
1010
|
_: 1
|
|
1376
1011
|
}))
|
|
1377
1012
|
], 4);
|
|
1378
1013
|
};
|
|
1379
1014
|
}
|
|
1380
|
-
}),
|
|
1015
|
+
}), _o = /* @__PURE__ */ b(mo, [["__scopeId", "data-v-799350d0"]]), ho = ["disabled"], vo = /* @__PURE__ */ g({
|
|
1381
1016
|
__name: "FButton",
|
|
1382
1017
|
props: {
|
|
1383
1018
|
size: { default: "normal" },
|
|
@@ -1386,44 +1021,49 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1386
1021
|
bgColor: {},
|
|
1387
1022
|
variant: {}
|
|
1388
1023
|
},
|
|
1389
|
-
setup(
|
|
1390
|
-
const e =
|
|
1024
|
+
setup(n) {
|
|
1025
|
+
const e = n, o = {
|
|
1391
1026
|
small: { height: "24px", minWidth: "24px", padding: "0 8px", fontSize: "11px" },
|
|
1392
1027
|
normal: { height: "32px", minWidth: "32px", padding: "0 12px", fontSize: "12px" },
|
|
1393
1028
|
large: { height: "40px", minWidth: "40px", padding: "0 16px", fontSize: "13px" }
|
|
1394
|
-
},
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1029
|
+
}, t = h(() => {
|
|
1030
|
+
var s;
|
|
1031
|
+
return ce(ie({}, (s = o[e.size]) != null ? s : o.normal), {
|
|
1032
|
+
borderRadius: e.round === !0 ? "999px" : typeof e.round == "number" ? `${e.round}px` : "6px",
|
|
1033
|
+
backgroundColor: e.bgColor
|
|
1034
|
+
});
|
|
1035
|
+
});
|
|
1036
|
+
return (s, i) => {
|
|
1037
|
+
var u;
|
|
1038
|
+
return l(), c("button", {
|
|
1039
|
+
class: C(["f-button", [
|
|
1040
|
+
`f-button--${(u = s.variant) != null ? u : "default"}`,
|
|
1041
|
+
{ "is-disabled": s.disabled }
|
|
1042
|
+
]]),
|
|
1043
|
+
style: T(p(t)),
|
|
1044
|
+
disabled: s.disabled
|
|
1045
|
+
}, [
|
|
1046
|
+
v(s.$slots, "default", {}, void 0, !0)
|
|
1047
|
+
], 14, ho);
|
|
1048
|
+
};
|
|
1409
1049
|
}
|
|
1410
|
-
}),
|
|
1050
|
+
}), go = /* @__PURE__ */ b(vo, [["__scopeId", "data-v-eeff7101"]]), bo = /* @__PURE__ */ g({
|
|
1411
1051
|
__name: "FTypography",
|
|
1412
1052
|
props: {
|
|
1413
1053
|
color: { default: "" }
|
|
1414
1054
|
},
|
|
1415
|
-
setup(
|
|
1416
|
-
const e =
|
|
1055
|
+
setup(n) {
|
|
1056
|
+
const e = n, o = h(() => ({
|
|
1417
1057
|
color: e.color
|
|
1418
1058
|
}));
|
|
1419
|
-
return (
|
|
1059
|
+
return (t, s) => (l(), c("div", {
|
|
1420
1060
|
class: "f-typography",
|
|
1421
|
-
style:
|
|
1061
|
+
style: T(p(o))
|
|
1422
1062
|
}, [
|
|
1423
|
-
|
|
1063
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
1424
1064
|
], 4));
|
|
1425
1065
|
}
|
|
1426
|
-
}),
|
|
1066
|
+
}), yo = /* @__PURE__ */ b(bo, [["__scopeId", "data-v-54c9aca5"]]), $o = /* @__PURE__ */ g({
|
|
1427
1067
|
__name: "FText",
|
|
1428
1068
|
props: {
|
|
1429
1069
|
tag: { default: "span" },
|
|
@@ -1434,37 +1074,46 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1434
1074
|
truncate: { type: Boolean },
|
|
1435
1075
|
italic: { type: Boolean }
|
|
1436
1076
|
},
|
|
1437
|
-
setup(
|
|
1438
|
-
const e =
|
|
1077
|
+
setup(n) {
|
|
1078
|
+
const e = n, o = {
|
|
1439
1079
|
1: "3xl",
|
|
1440
1080
|
2: "2xl",
|
|
1441
1081
|
3: "xl",
|
|
1442
1082
|
4: "lg",
|
|
1443
1083
|
5: "normal",
|
|
1444
1084
|
6: "sm"
|
|
1445
|
-
},
|
|
1085
|
+
}, t = {
|
|
1446
1086
|
1: "bolder",
|
|
1447
1087
|
2: "bold",
|
|
1448
1088
|
3: "bold",
|
|
1449
1089
|
4: "medium",
|
|
1450
1090
|
5: "medium",
|
|
1451
1091
|
6: "normal"
|
|
1452
|
-
},
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
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";
|
|
1101
|
+
});
|
|
1102
|
+
return (r, a) => (l(), W(Y(p(s)), {
|
|
1103
|
+
class: C(["f-text", [
|
|
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 }
|
|
1459
1108
|
]])
|
|
1460
1109
|
}, {
|
|
1461
|
-
default:
|
|
1462
|
-
|
|
1110
|
+
default: I(() => [
|
|
1111
|
+
v(r.$slots, "default", {}, void 0, !0)
|
|
1463
1112
|
]),
|
|
1464
1113
|
_: 3
|
|
1465
1114
|
}, 8, ["class"]));
|
|
1466
1115
|
}
|
|
1467
|
-
}),
|
|
1116
|
+
}), ko = /* @__PURE__ */ b($o, [["__scopeId", "data-v-8bcfc6b3"]]), wo = ["href", "target", "rel"], Fo = /* @__PURE__ */ g({
|
|
1468
1117
|
__name: "FLink",
|
|
1469
1118
|
props: {
|
|
1470
1119
|
href: {},
|
|
@@ -1473,10 +1122,10 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1473
1122
|
color: {},
|
|
1474
1123
|
disabled: { type: Boolean }
|
|
1475
1124
|
},
|
|
1476
|
-
setup(
|
|
1477
|
-
const e =
|
|
1478
|
-
return (
|
|
1479
|
-
class:
|
|
1125
|
+
setup(n) {
|
|
1126
|
+
const e = n;
|
|
1127
|
+
return (o, t) => (l(), c("a", {
|
|
1128
|
+
class: C(["f-link", [
|
|
1480
1129
|
e.color && `f-link--${e.color}`,
|
|
1481
1130
|
`f-link--underline-${e.underline}`,
|
|
1482
1131
|
{ "f-link--disabled": e.disabled }
|
|
@@ -1485,10 +1134,10 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1485
1134
|
target: e.target,
|
|
1486
1135
|
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
1487
1136
|
}, [
|
|
1488
|
-
|
|
1489
|
-
], 10,
|
|
1137
|
+
v(o.$slots, "default", {}, void 0, !0)
|
|
1138
|
+
], 10, wo));
|
|
1490
1139
|
}
|
|
1491
|
-
}),
|
|
1140
|
+
}), zo = /* @__PURE__ */ b(Fo, [["__scopeId", "data-v-daaa3e25"]]), Co = { class: "f-badge" }, xo = /* @__PURE__ */ g({
|
|
1492
1141
|
__name: "FBadge",
|
|
1493
1142
|
props: {
|
|
1494
1143
|
value: {},
|
|
@@ -1498,106 +1147,325 @@ const pt = { class: "f-dropdown-wrapper" }, ft = { class: "f-dropdown-content" }
|
|
|
1498
1147
|
placement: { default: "top-right" },
|
|
1499
1148
|
offset: { default: () => [0, 0] }
|
|
1500
1149
|
},
|
|
1501
|
-
setup(
|
|
1502
|
-
const e =
|
|
1503
|
-
|
|
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;
|
|
1504
1156
|
return {
|
|
1505
|
-
"top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${
|
|
1506
|
-
"top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${
|
|
1507
|
-
"bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${
|
|
1508
|
-
"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))` }
|
|
1509
1161
|
}[e.placement];
|
|
1510
1162
|
});
|
|
1511
|
-
return (
|
|
1512
|
-
|
|
1513
|
-
|
|
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", {
|
|
1514
1166
|
key: 0,
|
|
1515
|
-
class:
|
|
1516
|
-
style:
|
|
1517
|
-
}, V(
|
|
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)
|
|
1518
1170
|
]));
|
|
1519
1171
|
}
|
|
1520
|
-
}),
|
|
1172
|
+
}), So = /* @__PURE__ */ b(xo, [["__scopeId", "data-v-be6947ff"]]), Mo = /* @__PURE__ */ g({
|
|
1521
1173
|
__name: "FAffix",
|
|
1522
1174
|
props: {
|
|
1523
1175
|
placement: { default: "top-right" },
|
|
1524
1176
|
offset: { default: () => [8, 8] }
|
|
1525
1177
|
},
|
|
1526
|
-
setup(
|
|
1527
|
-
const e =
|
|
1528
|
-
const [
|
|
1178
|
+
setup(n) {
|
|
1179
|
+
const e = n, o = h(() => {
|
|
1180
|
+
const [t, s] = e.offset;
|
|
1529
1181
|
return {
|
|
1530
|
-
"top-left": { top: `${
|
|
1531
|
-
"top-right": { top: `${
|
|
1532
|
-
"bottom-left": { bottom: `${
|
|
1533
|
-
"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` }
|
|
1534
1186
|
}[e.placement];
|
|
1535
1187
|
});
|
|
1536
|
-
return (
|
|
1188
|
+
return (t, s) => (l(), c("div", {
|
|
1537
1189
|
class: "f-affix",
|
|
1538
|
-
style:
|
|
1190
|
+
style: T(p(o))
|
|
1539
1191
|
}, [
|
|
1540
|
-
|
|
1192
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
1541
1193
|
], 4));
|
|
1542
1194
|
}
|
|
1543
|
-
}),
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
"
|
|
1549
|
-
"
|
|
1550
|
-
"
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
"
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
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);
|
|
1573
1438
|
});
|
|
1574
1439
|
};
|
|
1575
1440
|
export {
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
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
|
|
1603
1471
|
};
|