fantasia-ui 0.2.4 → 0.2.5
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 +22 -0
- package/README.md +22 -0
- package/dist/fantasia-ui.css +1 -1
- package/dist/fantasia-ui.es.js +1432 -862
- package/dist/fantasia-ui.umd.js +9 -1
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/components/index.js +5 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/types/components/index.d.ts +4 -0
- package/dist/types/types/components/index.js +4 -0
- package/dist/types/types/components/modules/f-alert.d.ts +6 -0
- package/dist/types/types/components/modules/f-alert.js +1 -0
- package/dist/types/types/components/modules/f-editor.d.ts +9 -0
- package/dist/types/types/components/modules/f-editor.js +1 -0
- package/dist/types/types/components/modules/f-pagination.d.ts +3 -1
- package/dist/types/types/components/modules/f-result.d.ts +9 -0
- package/dist/types/types/components/modules/f-result.js +1 -0
- package/dist/types/types/components/modules/f-table.d.ts +17 -10
- package/dist/types/types/components/modules/f-typography.d.ts +4 -0
- package/dist/types/types/components/modules/f-typography.js +1 -0
- package/package.json +4 -1
package/dist/fantasia-ui.es.js
CHANGED
|
@@ -1,66 +1,96 @@
|
|
|
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 i = (
|
|
1
|
+
var Ee = Object.defineProperty, Oe = Object.defineProperties;
|
|
2
|
+
var Pe = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var $e = Object.getOwnPropertySymbols;
|
|
4
|
+
var Le = Object.prototype.hasOwnProperty, je = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ke = (a, e, s) => e in a ? Ee(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s, we = (a, e) => {
|
|
6
|
+
for (var s in e || (e = {}))
|
|
7
|
+
Le.call(e, s) && ke(a, s, e[s]);
|
|
8
|
+
if ($e)
|
|
9
|
+
for (var s of $e(e))
|
|
10
|
+
je.call(e, s) && ke(a, s, e[s]);
|
|
11
|
+
return a;
|
|
12
|
+
}, Fe = (a, e) => Oe(a, Pe(e));
|
|
13
|
+
var ie = (a, e, s) => new Promise((t, o) => {
|
|
14
|
+
var i = (r) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
u(s.next(r));
|
|
17
|
+
} catch (v) {
|
|
18
|
+
o(v);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, d = (r) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
u(s.throw(r));
|
|
23
|
+
} catch (v) {
|
|
24
|
+
o(v);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, u = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(i, d);
|
|
27
|
+
u((s = s.apply(a, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { defineComponent as
|
|
30
|
-
import { Search as
|
|
31
|
-
import { useEventListener as
|
|
32
|
-
const
|
|
29
|
+
import { defineComponent as S, computed as g, createElementBlock as n, openBlock as l, normalizeStyle as O, unref as c, renderSlot as z, normalizeClass as M, createCommentVNode as k, Fragment as L, renderList as W, createElementVNode as h, toDisplayString as R, ref as V, watch as ce, createVNode as H, withDirectives as de, Transition as ae, withCtx as E, vShow as ze, mergeModels as U, useModel as te, readonly as ve, vModelDynamic as We, createBlock as j, nextTick as _e, onUnmounted as he, Teleport as ge, withModifiers as ue, resolveDynamicComponent as se, withKeys as Ne, isRef as Ge, vModelText as Se, createTextVNode as ne, TransitionGroup as Ue, useSlots as Je, provide as Ie, inject as qe, onMounted as Me, onBeforeUnmount as Xe } from "vue";
|
|
30
|
+
import { Search as Ye, StarOutline as Ke, StarHalf as Qe, Star as Ze, ChevronDownOutline as et, ChevronBackOutline as tt, EllipsisHorizontal as st, ChevronForwardOutline as ot, CloseCircle as Te, Close as xe, Person as lt, InformationCircleOutline as at, WarningOutline as nt, AlertCircleOutline as rt, CheckmarkCircleOutline as it, CloudUpload as ct, DocumentOutline as dt } from "@vicons/ionicons5";
|
|
31
|
+
import { useEventListener as ut } from "@vueuse/core";
|
|
32
|
+
const pt = /* @__PURE__ */ S({
|
|
33
33
|
__name: "FIcon",
|
|
34
34
|
props: {
|
|
35
35
|
color: {},
|
|
36
36
|
size: { default: "1em" }
|
|
37
37
|
},
|
|
38
|
-
setup(
|
|
39
|
-
const e =
|
|
38
|
+
setup(a) {
|
|
39
|
+
const e = a, s = g(() => ({
|
|
40
40
|
width: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
41
41
|
height: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
42
42
|
color: e.color
|
|
43
43
|
}));
|
|
44
|
-
return (t,
|
|
44
|
+
return (t, o) => (l(), n("span", {
|
|
45
45
|
role: "img",
|
|
46
46
|
class: "f-icon",
|
|
47
|
-
style:
|
|
47
|
+
style: O(c(s))
|
|
48
48
|
}, [
|
|
49
|
-
|
|
49
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
50
50
|
], 4));
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
53
|
-
const
|
|
54
|
-
for (const [t,
|
|
55
|
-
|
|
56
|
-
return
|
|
57
|
-
},
|
|
52
|
+
}), I = (a, e) => {
|
|
53
|
+
const s = a.__vccOpts || a;
|
|
54
|
+
for (const [t, o] of e)
|
|
55
|
+
s[t] = o;
|
|
56
|
+
return s;
|
|
57
|
+
}, G = /* @__PURE__ */ I(pt, [["__scopeId", "data-v-524b7dbb"]]), ft = "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", _t = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "loop cubes"
|
|
60
|
+
}, mt = {
|
|
61
|
+
key: 2,
|
|
62
|
+
class: "msg"
|
|
63
|
+
}, vt = /* @__PURE__ */ S({
|
|
64
|
+
__name: "FLoading",
|
|
65
|
+
props: {
|
|
66
|
+
type: { default: "dots" },
|
|
67
|
+
text: {},
|
|
68
|
+
mask: { type: Boolean, default: !1 }
|
|
69
|
+
},
|
|
70
|
+
setup(a) {
|
|
71
|
+
const e = a;
|
|
72
|
+
return (s, t) => (l(), n("div", {
|
|
73
|
+
class: M(["flex-center-col size-full loading-container", { "global-mask": s.mask }])
|
|
74
|
+
}, [
|
|
75
|
+
s.type === "cubes" ? (l(), n("div", _t, [
|
|
76
|
+
(l(), n(L, null, W(6, (o) => h("div", {
|
|
77
|
+
class: "item cubes",
|
|
78
|
+
key: o
|
|
79
|
+
})), 64))
|
|
80
|
+
])) : (l(), n("div", {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: M(["loader", s.type])
|
|
83
|
+
}, null, 2)),
|
|
84
|
+
e.text ? (l(), n("p", mt, R(e.text), 1)) : k("", !0)
|
|
85
|
+
], 2));
|
|
86
|
+
}
|
|
87
|
+
}), Be = /* @__PURE__ */ I(vt, [["__scopeId", "data-v-20f58a50"]]), ht = { class: "f-image" }, gt = {
|
|
58
88
|
key: 0,
|
|
59
89
|
class: "f-image__placeholder"
|
|
60
|
-
},
|
|
90
|
+
}, yt = {
|
|
61
91
|
key: 0,
|
|
62
92
|
class: "f-image__error"
|
|
63
|
-
},
|
|
93
|
+
}, bt = ["src", "loading"], $t = /* @__PURE__ */ S({
|
|
64
94
|
__name: "FImage",
|
|
65
95
|
props: {
|
|
66
96
|
src: {},
|
|
@@ -68,54 +98,51 @@ const Ee = /* @__PURE__ */ g({
|
|
|
68
98
|
fit: { default: "cover" },
|
|
69
99
|
lazy: { type: Boolean, default: !0 }
|
|
70
100
|
},
|
|
71
|
-
setup(
|
|
72
|
-
const e =
|
|
73
|
-
|
|
74
|
-
|
|
101
|
+
setup(a) {
|
|
102
|
+
const e = a, s = V("loading");
|
|
103
|
+
ce(() => e.src, () => {
|
|
104
|
+
s.value = "loading";
|
|
75
105
|
}, { immediate: !1 });
|
|
76
|
-
const t = () =>
|
|
77
|
-
return (i,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
])
|
|
113
|
-
]);
|
|
114
|
-
};
|
|
106
|
+
const t = () => s.value = "loaded", o = () => s.value = "error";
|
|
107
|
+
return (i, d) => (l(), n("div", ht, [
|
|
108
|
+
H(ae, { name: "fade" }, {
|
|
109
|
+
default: E(() => [
|
|
110
|
+
c(s) === "loading" ? (l(), n("div", gt, [
|
|
111
|
+
H(Be, { type: "classic first" })
|
|
112
|
+
])) : k("", !0)
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}),
|
|
116
|
+
H(ae, { name: "fade" }, {
|
|
117
|
+
default: E(() => [
|
|
118
|
+
c(s) === "error" ? (l(), n("div", yt, [
|
|
119
|
+
z(i.$slots, "error", {}, () => [
|
|
120
|
+
H(G, { size: "48px" }, {
|
|
121
|
+
default: E(() => [
|
|
122
|
+
H(c(ft))
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
})
|
|
126
|
+
], !0)
|
|
127
|
+
])) : k("", !0)
|
|
128
|
+
]),
|
|
129
|
+
_: 3
|
|
130
|
+
}),
|
|
131
|
+
de(h("img", {
|
|
132
|
+
src: e.src,
|
|
133
|
+
loading: i.lazy ? "lazy" : "eager",
|
|
134
|
+
style: O({ objectFit: e.fit }),
|
|
135
|
+
class: "f-image__img",
|
|
136
|
+
onLoad: t,
|
|
137
|
+
onError: o
|
|
138
|
+
}, null, 44, bt), [
|
|
139
|
+
[ze, c(s) === "loaded"]
|
|
140
|
+
])
|
|
141
|
+
]));
|
|
115
142
|
}
|
|
116
|
-
}),
|
|
143
|
+
}), kt = /* @__PURE__ */ I($t, [["__scopeId", "data-v-e959ab10"]]), wt = ["type", "placeholder", "disabled", "readonly", "name", "id"], Ft = /* @__PURE__ */ S({
|
|
117
144
|
__name: "FInput",
|
|
118
|
-
props: /* @__PURE__ */
|
|
145
|
+
props: /* @__PURE__ */ U({
|
|
119
146
|
placeholder: { default: "输入..." },
|
|
120
147
|
type: { default: "text" },
|
|
121
148
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -126,85 +153,52 @@ const Ee = /* @__PURE__ */ g({
|
|
|
126
153
|
modelValue: { default: "" },
|
|
127
154
|
modelModifiers: {}
|
|
128
155
|
}),
|
|
129
|
-
emits: /* @__PURE__ */
|
|
130
|
-
setup(
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
t("input",
|
|
134
|
-
}, i = (
|
|
135
|
-
const
|
|
136
|
-
t("change",
|
|
137
|
-
},
|
|
138
|
-
t("focus",
|
|
139
|
-
},
|
|
140
|
-
t("blur",
|
|
141
|
-
};
|
|
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) }])
|
|
146
|
-
}, [
|
|
147
|
-
S(m, { class: "f-input__icon" }, {
|
|
148
|
-
default: I(() => [
|
|
149
|
-
S(p(Se))
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
}),
|
|
153
|
-
te(z("input", {
|
|
154
|
-
class: "f-input__text",
|
|
155
|
-
"onUpdate:modelValue": f[0] || (f[0] = (d) => o.value = d),
|
|
156
|
-
type: a.type,
|
|
157
|
-
placeholder: a.placeholder,
|
|
158
|
-
disabled: a.disabled,
|
|
159
|
-
readonly: "readonly" in a ? a.readonly : p(de),
|
|
160
|
-
name: a.name,
|
|
161
|
-
id: a.id,
|
|
162
|
-
onInput: s,
|
|
163
|
-
onChange: i,
|
|
164
|
-
onFocus: u,
|
|
165
|
-
onBlur: r
|
|
166
|
-
}, null, 40, Ye), [
|
|
167
|
-
[we, o.value]
|
|
168
|
-
])
|
|
169
|
-
], 2);
|
|
156
|
+
emits: /* @__PURE__ */ U(["input", "change", "focus", "blur"], ["update:modelValue"]),
|
|
157
|
+
setup(a, { emit: e }) {
|
|
158
|
+
const s = te(a, "modelValue"), t = e, o = (r) => {
|
|
159
|
+
const v = r.target.value;
|
|
160
|
+
t("input", v);
|
|
161
|
+
}, i = (r) => {
|
|
162
|
+
const v = r.target.value;
|
|
163
|
+
t("change", v);
|
|
164
|
+
}, d = (r) => {
|
|
165
|
+
t("focus", r);
|
|
166
|
+
}, u = (r) => {
|
|
167
|
+
t("blur", r);
|
|
170
168
|
};
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
key: 0,
|
|
174
|
-
class: "loop cubes"
|
|
175
|
-
}, Ze = {
|
|
176
|
-
key: 2,
|
|
177
|
-
class: "msg"
|
|
178
|
-
}, et = /* @__PURE__ */ g({
|
|
179
|
-
__name: "FLoading",
|
|
180
|
-
props: {
|
|
181
|
-
type: { default: "dots" },
|
|
182
|
-
text: {},
|
|
183
|
-
mask: { type: Boolean, default: !1 }
|
|
184
|
-
},
|
|
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 }])
|
|
169
|
+
return (r, v) => (l(), n("div", {
|
|
170
|
+
class: M(["f-input", { "is-disabled": r.disabled, "is-readonly": "readonly" in r ? r.readonly : c(ve) }])
|
|
189
171
|
}, [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
class:
|
|
198
|
-
|
|
199
|
-
|
|
172
|
+
H(G, { class: "f-input__icon" }, {
|
|
173
|
+
default: E(() => [
|
|
174
|
+
H(c(Ye))
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
}),
|
|
178
|
+
de(h("input", {
|
|
179
|
+
class: "f-input__text",
|
|
180
|
+
"onUpdate:modelValue": v[0] || (v[0] = (y) => s.value = y),
|
|
181
|
+
type: r.type,
|
|
182
|
+
placeholder: r.placeholder,
|
|
183
|
+
disabled: r.disabled,
|
|
184
|
+
readonly: "readonly" in r ? r.readonly : c(ve),
|
|
185
|
+
name: r.name,
|
|
186
|
+
id: r.id,
|
|
187
|
+
onInput: o,
|
|
188
|
+
onChange: i,
|
|
189
|
+
onFocus: d,
|
|
190
|
+
onBlur: u
|
|
191
|
+
}, null, 40, wt), [
|
|
192
|
+
[We, s.value]
|
|
193
|
+
])
|
|
200
194
|
], 2));
|
|
201
195
|
}
|
|
202
|
-
}),
|
|
196
|
+
}), Ct = /* @__PURE__ */ I(Ft, [["__scopeId", "data-v-9af0fbbe"]]), zt = ["onMousemove"], St = {
|
|
203
197
|
key: 0,
|
|
204
198
|
class: "f-rate__score"
|
|
205
|
-
},
|
|
199
|
+
}, It = /* @__PURE__ */ S({
|
|
206
200
|
__name: "FRate",
|
|
207
|
-
props: /* @__PURE__ */
|
|
201
|
+
props: /* @__PURE__ */ U({
|
|
208
202
|
modelValue: {},
|
|
209
203
|
count: { default: 5 },
|
|
210
204
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -218,63 +212,60 @@ const Ee = /* @__PURE__ */ g({
|
|
|
218
212
|
modelValue: { default: 0 },
|
|
219
213
|
modelModifiers: {}
|
|
220
214
|
}),
|
|
221
|
-
emits: /* @__PURE__ */
|
|
222
|
-
setup(
|
|
223
|
-
const
|
|
224
|
-
var
|
|
225
|
-
return (
|
|
226
|
-
}),
|
|
227
|
-
() => t.scoreTemplate.replace("{value}", String(
|
|
228
|
-
),
|
|
215
|
+
emits: /* @__PURE__ */ U(["change"], ["update:modelValue"]),
|
|
216
|
+
setup(a, { emit: e }) {
|
|
217
|
+
const s = te(a, "modelValue"), t = a, o = e, i = V(null), d = g(() => {
|
|
218
|
+
var p;
|
|
219
|
+
return (p = i.value) != null ? p : s.value;
|
|
220
|
+
}), u = g(
|
|
221
|
+
() => t.scoreTemplate.replace("{value}", String(s.value))
|
|
222
|
+
), r = g(
|
|
229
223
|
() => t.size === "normal" ? 16 : t.size === "small" ? 12 : 20
|
|
230
|
-
),
|
|
231
|
-
const
|
|
232
|
-
return
|
|
233
|
-
},
|
|
224
|
+
), v = (p) => {
|
|
225
|
+
const $ = d.value;
|
|
226
|
+
return $ >= p ? "full" : t.allowHalf && $ >= p - 0.5 ? "half" : "empty";
|
|
227
|
+
}, y = (p) => v(p) === "full" ? t.voidColor : t.color, _ = (p, $) => {
|
|
234
228
|
if (!t.readonly)
|
|
235
229
|
if (t.allowHalf) {
|
|
236
|
-
const
|
|
237
|
-
i.value = (
|
|
230
|
+
const w = p.currentTarget, { left: T, width: D } = w.getBoundingClientRect();
|
|
231
|
+
i.value = (p.clientX - T) / D < 0.5 ? $ - 0.5 : $;
|
|
238
232
|
} else
|
|
239
|
-
i.value =
|
|
240
|
-
},
|
|
233
|
+
i.value = $;
|
|
234
|
+
}, f = () => {
|
|
241
235
|
t.readonly || (i.value = null);
|
|
242
|
-
},
|
|
243
|
-
var
|
|
236
|
+
}, m = () => {
|
|
237
|
+
var $;
|
|
244
238
|
if (t.readonly) return;
|
|
245
|
-
const
|
|
246
|
-
|
|
239
|
+
const p = ($ = i.value) != null ? $ : s.value;
|
|
240
|
+
s.value = p, o("change", p);
|
|
247
241
|
};
|
|
248
|
-
return (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
242
|
+
return (p, $) => (l(), n("div", {
|
|
243
|
+
class: M(["f-rate", { "f-rate--readonly": t.readonly }]),
|
|
244
|
+
onMouseleave: f
|
|
245
|
+
}, [
|
|
246
|
+
(l(!0), n(L, null, W(t.count, (w) => (l(), n("span", {
|
|
247
|
+
key: w,
|
|
248
|
+
class: "f-rate__item",
|
|
249
|
+
onMousemove: (T) => _(T, w),
|
|
250
|
+
onClick: m
|
|
253
251
|
}, [
|
|
254
|
-
(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
]),
|
|
267
|
-
_: 2
|
|
268
|
-
}, 1032, ["color", "size"])
|
|
269
|
-
], 40, ot))), 128)),
|
|
270
|
-
t.showText ? (l(), c("span", st, V(p(r)), 1)) : y("", !0)
|
|
271
|
-
], 34);
|
|
272
|
-
};
|
|
252
|
+
H(G, {
|
|
253
|
+
color: y(w),
|
|
254
|
+
size: c(r)
|
|
255
|
+
}, {
|
|
256
|
+
default: E(() => [
|
|
257
|
+
v(w) === "full" ? (l(), j(c(Ke), { key: 0 })) : v(w) === "half" ? (l(), j(c(Qe), { key: 1 })) : (l(), j(c(Ze), { key: 2 }))
|
|
258
|
+
]),
|
|
259
|
+
_: 2
|
|
260
|
+
}, 1032, ["color", "size"])
|
|
261
|
+
], 40, zt))), 128)),
|
|
262
|
+
t.showText ? (l(), n("span", St, R(c(u)), 1)) : k("", !0)
|
|
263
|
+
], 34));
|
|
273
264
|
}
|
|
274
|
-
}),
|
|
265
|
+
}), Mt = /* @__PURE__ */ I(It, [["__scopeId", "data-v-3b5c4f14"]]), Tt = { class: "f-dropdown-wrapper" }, xt = { class: "f-dropdown-content" }, Bt = ["onClick"], Vt = {
|
|
275
266
|
key: 0,
|
|
276
267
|
class: "opt-icon"
|
|
277
|
-
},
|
|
268
|
+
}, Rt = { class: "opt-label" }, Ht = /* @__PURE__ */ S({
|
|
278
269
|
__name: "FDropdown",
|
|
279
270
|
props: {
|
|
280
271
|
placement: { default: "right-start" },
|
|
@@ -284,291 +275,339 @@ const Ee = /* @__PURE__ */ g({
|
|
|
284
275
|
options: { default: () => [] }
|
|
285
276
|
},
|
|
286
277
|
emits: ["select"],
|
|
287
|
-
setup(
|
|
288
|
-
const
|
|
289
|
-
const [
|
|
290
|
-
return
|
|
291
|
-
}),
|
|
278
|
+
setup(a, { emit: e }) {
|
|
279
|
+
const s = a, t = e, o = V(!1), i = V(null), d = V(null), u = V(null), r = V(0), v = V(0), y = g(() => {
|
|
280
|
+
const [b] = s.placement.split("-"), x = (Array.isArray(s.offset) ? s.offset[0] : s.offset) + 4, A = { position: "absolute" };
|
|
281
|
+
return b === "right" ? (A.width = `${x}px`, A.left = `-${x}px`, A.top = 0, A.bottom = 0) : b === "left" ? (A.width = `${x}px`, A.right = `-${x}px`, A.top = 0, A.bottom = 0) : b === "bottom" ? (A.height = `${x}px`, A.top = `-${x}px`, A.left = 0, A.right = 0) : b === "top" && (A.height = `${x}px`, A.bottom = `-${x}px`, A.left = 0, A.right = 0), A;
|
|
282
|
+
}), _ = g(() => {
|
|
292
283
|
if (!i.value) return {};
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
|
|
296
|
-
const
|
|
284
|
+
const b = i.value, { placement: Y } = s, x = Array.isArray(s.offset) ? s.offset[0] : s.offset, [A, N] = Y.split("-"), le = window.innerWidth, pe = window.innerHeight, K = v.value || 160, Q = r.value || 200;
|
|
285
|
+
let F = 0, C = 0, B = A;
|
|
286
|
+
A === "right" ? (C = b.right + x, C + K > le && (C = b.left - K - x, B = "left")) : A === "left" ? (C = b.left - K - x, C < 0 && (C = b.right + x, B = "right")) : A === "bottom" ? (F = b.bottom + x, F + Q > pe && (F = b.top - Q - x, B = "top")) : A === "top" && (F = b.top - Q - x, F < 0 && (F = b.bottom + x, B = "bottom")), B === "top" || B === "bottom" ? (N === "start" ? C = b.left : N === "end" ? C = b.right - K : C = b.left + (b.width - K) / 2, C = Math.max(8, Math.min(C, le - K - 8))) : (N === "start" ? F = b.top : N === "end" ? F = b.bottom - Q : F = b.top + (b.height - Q) / 2, F = Math.max(8, Math.min(F, pe - Q - 8)));
|
|
287
|
+
const P = B === "right" ? "left" : B === "left" ? "right" : N === "start" ? "left" : N === "end" ? "right" : "center", J = B === "bottom" ? "top" : B === "top" ? "bottom" : N === "start" ? "top" : N === "end" ? "bottom" : "center";
|
|
297
288
|
return {
|
|
298
|
-
top: `${
|
|
299
|
-
left: `${
|
|
300
|
-
transformOrigin: `${
|
|
289
|
+
top: `${F}px`,
|
|
290
|
+
left: `${C}px`,
|
|
291
|
+
transformOrigin: `${J} ${P}`
|
|
301
292
|
};
|
|
302
293
|
});
|
|
303
|
-
let
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
},
|
|
309
|
-
|
|
310
|
-
|
|
294
|
+
let f = null, m = null;
|
|
295
|
+
const p = () => {
|
|
296
|
+
f && (clearTimeout(f), f = null);
|
|
297
|
+
}, $ = (b) => {
|
|
298
|
+
s.trigger === "click" && (b.stopPropagation(), o.value ? o.value = !1 : (i.value = d.value.getBoundingClientRect(), o.value = !0));
|
|
299
|
+
}, w = () => {
|
|
300
|
+
s.trigger === "hover" && (p(), m = setTimeout(() => {
|
|
301
|
+
d.value && (i.value = d.value.getBoundingClientRect()), o.value = !0;
|
|
311
302
|
}, 400));
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
|
|
303
|
+
}, T = () => {
|
|
304
|
+
s.trigger === "hover" && (m && (clearTimeout(m), m = null), f = setTimeout(() => {
|
|
305
|
+
o.value = !1;
|
|
315
306
|
}, 400));
|
|
316
|
-
},
|
|
317
|
-
|
|
318
|
-
},
|
|
319
|
-
|
|
307
|
+
}, D = (b) => {
|
|
308
|
+
s.trigger !== "click" || !o.value || (o.value = !1);
|
|
309
|
+
}, q = (b) => {
|
|
310
|
+
b.disabled || (t("select", b.key, b), b.children || (o.value = !1));
|
|
320
311
|
};
|
|
321
|
-
return
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
})),
|
|
325
|
-
|
|
326
|
-
}),
|
|
327
|
-
|
|
312
|
+
return ce(o, (b) => ie(null, null, function* () {
|
|
313
|
+
var Y, x;
|
|
314
|
+
b ? (i.value = d.value.getBoundingClientRect(), yield _e(), r.value = ((Y = u.value) == null ? void 0 : Y.offsetHeight) || 200, v.value = ((x = u.value) == null ? void 0 : x.offsetWidth) || 160) : (r.value = 0, v.value = 0);
|
|
315
|
+
})), he(() => {
|
|
316
|
+
p(), m && clearTimeout(m);
|
|
317
|
+
}), ut(window, "click", D), (b, Y) => (l(), n("div", Tt, [
|
|
318
|
+
h("div", {
|
|
328
319
|
ref_key: "triggerRef",
|
|
329
|
-
ref:
|
|
320
|
+
ref: d,
|
|
330
321
|
class: "f-dropdown-trigger-wrapper",
|
|
331
|
-
onMouseenter:
|
|
332
|
-
onMouseleave:
|
|
333
|
-
onClick:
|
|
322
|
+
onMouseenter: w,
|
|
323
|
+
onMouseleave: T,
|
|
324
|
+
onClick: $
|
|
334
325
|
}, [
|
|
335
|
-
|
|
326
|
+
z(b.$slots, "default", {}, void 0, !0)
|
|
336
327
|
], 544),
|
|
337
|
-
(l(),
|
|
338
|
-
|
|
339
|
-
default:
|
|
340
|
-
|
|
328
|
+
(l(), j(ge, { to: "body" }, [
|
|
329
|
+
H(ae, { name: "f-dropdown-motion" }, {
|
|
330
|
+
default: E(() => [
|
|
331
|
+
c(o) ? (l(), n("div", {
|
|
341
332
|
key: 0,
|
|
342
333
|
ref_key: "dropdownRef",
|
|
343
|
-
ref:
|
|
334
|
+
ref: u,
|
|
344
335
|
class: "f-dropdown-item",
|
|
345
|
-
style:
|
|
346
|
-
onMouseenter:
|
|
347
|
-
onMouseleave:
|
|
348
|
-
onClick:
|
|
336
|
+
style: O([c(_), { zIndex: b.zIndex }]),
|
|
337
|
+
onMouseenter: p,
|
|
338
|
+
onMouseleave: T,
|
|
339
|
+
onClick: Y[0] || (Y[0] = ue(() => {
|
|
349
340
|
}, ["stop"]))
|
|
350
341
|
}, [
|
|
351
|
-
|
|
342
|
+
b.trigger === "hover" ? (l(), n("div", {
|
|
352
343
|
key: 0,
|
|
353
344
|
class: "f-dropdown-bridge",
|
|
354
|
-
style:
|
|
355
|
-
}, null, 4)) :
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
key:
|
|
359
|
-
class:
|
|
360
|
-
onClick: (
|
|
345
|
+
style: O(c(y))
|
|
346
|
+
}, null, 4)) : k("", !0),
|
|
347
|
+
h("div", xt, [
|
|
348
|
+
b.options && b.options.length > 0 ? (l(!0), n(L, { key: 0 }, W(b.options, (x) => (l(), n("div", {
|
|
349
|
+
key: x.key,
|
|
350
|
+
class: M(["f-dropdown-option", { "is-disabled": x.disabled }]),
|
|
351
|
+
onClick: (A) => q(x)
|
|
361
352
|
}, [
|
|
362
|
-
|
|
363
|
-
(l(),
|
|
364
|
-
])) :
|
|
365
|
-
|
|
366
|
-
], 10,
|
|
353
|
+
x.icon ? (l(), n("span", Vt, [
|
|
354
|
+
(l(), j(se(x.icon)))
|
|
355
|
+
])) : k("", !0),
|
|
356
|
+
h("span", Rt, R(x.label), 1)
|
|
357
|
+
], 10, Bt))), 128)) : z(b.$slots, "content", { key: 1 }, void 0, !0)
|
|
367
358
|
])
|
|
368
|
-
], 36)) :
|
|
359
|
+
], 36)) : k("", !0)
|
|
369
360
|
]),
|
|
370
361
|
_: 3
|
|
371
362
|
})
|
|
372
363
|
]))
|
|
373
364
|
]));
|
|
374
365
|
}
|
|
375
|
-
}),
|
|
366
|
+
}), Ve = /* @__PURE__ */ I(Ht, [["__scopeId", "data-v-addb3a3b"]]), Dt = /* @__PURE__ */ S({
|
|
376
367
|
__name: "FSelect",
|
|
377
|
-
props: /* @__PURE__ */
|
|
368
|
+
props: /* @__PURE__ */ U({
|
|
378
369
|
options: {},
|
|
379
370
|
placeholder: {}
|
|
380
371
|
}, {
|
|
381
372
|
modelValue: {},
|
|
382
373
|
modelModifiers: {}
|
|
383
374
|
}),
|
|
384
|
-
emits: /* @__PURE__ */
|
|
385
|
-
setup(
|
|
386
|
-
const
|
|
375
|
+
emits: /* @__PURE__ */ U(["select"], ["update:modelValue"]),
|
|
376
|
+
setup(a, { emit: e }) {
|
|
377
|
+
const s = a, t = e, o = te(a, "modelValue"), i = V(!1), d = g(
|
|
387
378
|
() => {
|
|
388
|
-
var
|
|
389
|
-
return (
|
|
379
|
+
var y, _, f;
|
|
380
|
+
return (f = (y = s.options.find((m) => m.key === o.value)) == null ? void 0 : y.label) != null ? f : (_ = s.placeholder) != null ? _ : "请选择";
|
|
390
381
|
}
|
|
391
|
-
),
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
i.value =
|
|
395
|
-
};
|
|
396
|
-
return (m, d) => {
|
|
397
|
-
const k = O("f-icon"), x = O("f-dropdown");
|
|
398
|
-
return l(), W(x, {
|
|
399
|
-
options: m.options,
|
|
400
|
-
trigger: "click",
|
|
401
|
-
onSelect: a,
|
|
402
|
-
onShow: d[0] || (d[0] = (w) => f(!0)),
|
|
403
|
-
onHide: d[1] || (d[1] = (w) => f(!1)),
|
|
404
|
-
placement: "bottom",
|
|
405
|
-
offset: 4
|
|
406
|
-
}, {
|
|
407
|
-
default: I(() => [
|
|
408
|
-
z("div", {
|
|
409
|
-
class: C(["f-select", { "is-active": p(r), "is-open": p(i) }])
|
|
410
|
-
}, [
|
|
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))
|
|
417
|
-
]),
|
|
418
|
-
_: 1
|
|
419
|
-
})
|
|
420
|
-
], 2)
|
|
421
|
-
]),
|
|
422
|
-
_: 1
|
|
423
|
-
}, 8, ["options"]);
|
|
382
|
+
), u = g(() => o.value !== void 0 && o.value !== ""), r = (y, _) => {
|
|
383
|
+
o.value = y, t("select", y, _), i.value = !1;
|
|
384
|
+
}, v = (y) => {
|
|
385
|
+
i.value = y;
|
|
424
386
|
};
|
|
387
|
+
return (y, _) => (l(), j(Ve, {
|
|
388
|
+
options: y.options,
|
|
389
|
+
trigger: "click",
|
|
390
|
+
onSelect: r,
|
|
391
|
+
onShow: _[0] || (_[0] = (f) => v(!0)),
|
|
392
|
+
onHide: _[1] || (_[1] = (f) => v(!1)),
|
|
393
|
+
placement: "bottom",
|
|
394
|
+
offset: 4
|
|
395
|
+
}, {
|
|
396
|
+
default: E(() => [
|
|
397
|
+
h("div", {
|
|
398
|
+
class: M(["f-select", { "is-active": c(u), "is-open": c(i) }])
|
|
399
|
+
}, [
|
|
400
|
+
h("span", {
|
|
401
|
+
class: M(["f-select__label", { "is-placeholder": !c(u) }])
|
|
402
|
+
}, R(c(d)), 3),
|
|
403
|
+
H(G, { class: "f-select__arrow" }, {
|
|
404
|
+
default: E(() => [
|
|
405
|
+
H(c(et))
|
|
406
|
+
]),
|
|
407
|
+
_: 1
|
|
408
|
+
})
|
|
409
|
+
], 2)
|
|
410
|
+
]),
|
|
411
|
+
_: 1
|
|
412
|
+
}, 8, ["options"]));
|
|
425
413
|
}
|
|
426
|
-
}),
|
|
414
|
+
}), At = /* @__PURE__ */ I(Dt, [["__scopeId", "data-v-61444561"]]), Et = {
|
|
415
|
+
key: 0,
|
|
416
|
+
class: "f-pagination"
|
|
417
|
+
}, Ot = {
|
|
418
|
+
key: 0,
|
|
419
|
+
class: "f-pagination__total"
|
|
420
|
+
}, Pt = {
|
|
421
|
+
key: 1,
|
|
422
|
+
class: "f-pagination__size"
|
|
423
|
+
}, Lt = ["value"], jt = ["value"], Wt = {
|
|
424
|
+
key: 3,
|
|
425
|
+
class: "f-pagination__list"
|
|
426
|
+
}, Nt = {
|
|
427
427
|
key: 0,
|
|
428
428
|
class: "page-btn ellipsis"
|
|
429
|
-
},
|
|
429
|
+
}, Gt = ["onClick"], Ut = {
|
|
430
|
+
key: 5,
|
|
431
|
+
class: "f-pagination__jump"
|
|
432
|
+
}, Jt = ["max"], qt = /* @__PURE__ */ S({
|
|
430
433
|
__name: "FPagination",
|
|
431
|
-
props: /* @__PURE__ */
|
|
434
|
+
props: /* @__PURE__ */ U({
|
|
432
435
|
total: {},
|
|
433
436
|
pageSize: { default: 10 },
|
|
434
|
-
hideOnSingle: { type: Boolean }
|
|
437
|
+
hideOnSingle: { type: Boolean, default: !1 },
|
|
438
|
+
pageSizes: { default: () => [10, 20, 50, 100] },
|
|
439
|
+
layout: { default: () => ["prev", "pager", "next"] }
|
|
435
440
|
}, {
|
|
436
441
|
modelValue: { default: 1 },
|
|
437
442
|
modelModifiers: {}
|
|
438
443
|
}),
|
|
439
|
-
emits: /* @__PURE__ */
|
|
440
|
-
setup(
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
emits: /* @__PURE__ */ U(["update:pageSize"], ["update:modelValue"]),
|
|
445
|
+
setup(a, { emit: e }) {
|
|
446
|
+
const s = a, t = e, o = te(a, "modelValue"), i = g(
|
|
447
|
+
() => {
|
|
448
|
+
var f;
|
|
449
|
+
return (f = s.layout) != null ? f : ["prev", "pager", "next"];
|
|
450
|
+
}
|
|
451
|
+
), d = g(() => Math.ceil(s.total / s.pageSize) || 1), u = g(() => {
|
|
452
|
+
const f = d.value, m = o.value;
|
|
453
|
+
return !f || f <= 0 ? [] : f <= 7 ? Array.from({ length: f }, (p, $) => $ + 1) : m <= 4 ? [1, 2, 3, 4, 5, "...", f] : m >= f - 3 ? [1, "...", f - 4, f - 3, f - 2, f - 1, f] : [1, "...", m - 1, m, m + 1, "...", f];
|
|
454
|
+
}), r = (f) => {
|
|
455
|
+
typeof f == "number" && (f < 1 || f > d.value || f === o.value || (o.value = f));
|
|
456
|
+
}, v = (f) => {
|
|
457
|
+
t("update:pageSize", parseInt(f.target.value, 10)), o.value = 1;
|
|
458
|
+
}, y = V(""), _ = () => {
|
|
459
|
+
const f = parseInt(y.value, 10);
|
|
460
|
+
isNaN(f) || r(f), y.value = "";
|
|
446
461
|
};
|
|
447
|
-
return (
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
462
|
+
return (f, m) => !f.hideOnSingle || c(d) > 1 ? (l(), n("div", Et, [
|
|
463
|
+
(l(!0), n(L, null, W(c(i), (p) => (l(), n(L, { key: p }, [
|
|
464
|
+
p === "total" ? (l(), n("span", Ot, " 共 " + R(f.total) + " 条 ", 1)) : p === "sizes" ? (l(), n("div", Pt, [
|
|
465
|
+
h("select", {
|
|
466
|
+
class: "size-select",
|
|
467
|
+
value: f.pageSize,
|
|
468
|
+
onChange: v
|
|
469
|
+
}, [
|
|
470
|
+
(l(!0), n(L, null, W(f.pageSizes, ($) => (l(), n("option", {
|
|
471
|
+
key: $,
|
|
472
|
+
value: $
|
|
473
|
+
}, R($) + " 条/页", 9, jt))), 128))
|
|
474
|
+
], 40, Lt)
|
|
475
|
+
])) : p === "prev" ? (l(), n("button", {
|
|
476
|
+
key: 2,
|
|
477
|
+
class: M(["page-btn", { disabled: o.value === 1 }]),
|
|
478
|
+
onClick: m[0] || (m[0] = ($) => r(o.value - 1))
|
|
453
479
|
}, [
|
|
454
|
-
|
|
455
|
-
default:
|
|
456
|
-
|
|
480
|
+
H(G, null, {
|
|
481
|
+
default: E(() => [
|
|
482
|
+
H(c(tt))
|
|
457
483
|
]),
|
|
458
484
|
_: 1
|
|
459
485
|
})
|
|
460
|
-
], 2),
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
S(p(Re))
|
|
486
|
+
], 2)) : p === "pager" ? (l(), n("ul", Wt, [
|
|
487
|
+
(l(!0), n(L, null, W(c(u), ($, w) => (l(), n(L, { key: w }, [
|
|
488
|
+
$ === "..." ? (l(), n("li", Nt, [
|
|
489
|
+
H(G, null, {
|
|
490
|
+
default: E(() => [
|
|
491
|
+
H(c(st))
|
|
467
492
|
]),
|
|
468
493
|
_: 1
|
|
469
494
|
})
|
|
470
|
-
])) : (l(),
|
|
495
|
+
])) : (l(), n("li", {
|
|
471
496
|
key: 1,
|
|
472
|
-
class:
|
|
473
|
-
onClick: (
|
|
474
|
-
},
|
|
497
|
+
class: M(["page-btn", { active: o.value === $ }]),
|
|
498
|
+
onClick: (T) => r($)
|
|
499
|
+
}, R($), 11, Gt))
|
|
475
500
|
], 64))), 128))
|
|
476
|
-
]),
|
|
477
|
-
|
|
478
|
-
class:
|
|
479
|
-
onClick:
|
|
501
|
+
])) : p === "next" ? (l(), n("button", {
|
|
502
|
+
key: 4,
|
|
503
|
+
class: M(["page-btn", { disabled: o.value === c(d) }]),
|
|
504
|
+
onClick: m[1] || (m[1] = ($) => r(o.value + 1))
|
|
480
505
|
}, [
|
|
481
|
-
|
|
482
|
-
default:
|
|
483
|
-
|
|
506
|
+
H(G, null, {
|
|
507
|
+
default: E(() => [
|
|
508
|
+
H(c(ot))
|
|
484
509
|
]),
|
|
485
510
|
_: 1
|
|
486
511
|
})
|
|
487
|
-
], 2)
|
|
488
|
-
|
|
489
|
-
|
|
512
|
+
], 2)) : p === "jumper" ? (l(), n("div", Ut, [
|
|
513
|
+
m[3] || (m[3] = h("span", { class: "jump-label" }, "前往", -1)),
|
|
514
|
+
de(h("input", {
|
|
515
|
+
"onUpdate:modelValue": m[2] || (m[2] = ($) => Ge(y) ? y.value = $ : null),
|
|
516
|
+
class: "jump-input",
|
|
517
|
+
type: "number",
|
|
518
|
+
min: 1,
|
|
519
|
+
max: c(d),
|
|
520
|
+
onKeydown: Ne(_, ["enter"]),
|
|
521
|
+
onBlur: _
|
|
522
|
+
}, null, 40, Jt), [
|
|
523
|
+
[Se, c(y)]
|
|
524
|
+
]),
|
|
525
|
+
m[4] || (m[4] = h("span", { class: "jump-label" }, "页", -1))
|
|
526
|
+
])) : k("", !0)
|
|
527
|
+
], 64))), 128))
|
|
528
|
+
])) : k("", !0);
|
|
490
529
|
}
|
|
491
|
-
}),
|
|
530
|
+
}), Xt = /* @__PURE__ */ I(qt, [["__scopeId", "data-v-930f8b20"]]), Yt = {
|
|
492
531
|
key: 0,
|
|
493
532
|
class: "f-card__header"
|
|
494
|
-
},
|
|
533
|
+
}, Kt = {
|
|
495
534
|
key: 0,
|
|
496
535
|
class: "f-card__header-extra"
|
|
497
|
-
},
|
|
536
|
+
}, Qt = {
|
|
498
537
|
key: 1,
|
|
499
538
|
class: "f-card__cover"
|
|
500
|
-
},
|
|
539
|
+
}, Zt = {
|
|
501
540
|
key: 2,
|
|
502
541
|
class: "f-card__body"
|
|
503
|
-
},
|
|
542
|
+
}, es = {
|
|
504
543
|
key: 3,
|
|
505
544
|
class: "f-card__footer"
|
|
506
|
-
},
|
|
545
|
+
}, ts = {
|
|
507
546
|
key: 0,
|
|
508
547
|
class: "f-card__header"
|
|
509
|
-
},
|
|
548
|
+
}, ss = {
|
|
510
549
|
key: 0,
|
|
511
550
|
class: "f-card__header-extra"
|
|
512
|
-
},
|
|
551
|
+
}, os = {
|
|
513
552
|
key: 1,
|
|
514
553
|
class: "f-card__cover"
|
|
515
|
-
},
|
|
554
|
+
}, ls = { class: "f-card__content" }, as = {
|
|
516
555
|
key: 0,
|
|
517
556
|
class: "f-card__body"
|
|
518
|
-
},
|
|
557
|
+
}, ns = {
|
|
519
558
|
key: 1,
|
|
520
559
|
class: "f-card__footer"
|
|
521
|
-
},
|
|
560
|
+
}, rs = /* @__PURE__ */ S({
|
|
522
561
|
__name: "FCard",
|
|
523
562
|
props: {
|
|
524
563
|
hoverable: { type: Boolean, default: !0 },
|
|
525
564
|
direction: { default: "vertical" }
|
|
526
565
|
},
|
|
527
|
-
setup(
|
|
528
|
-
return (e,
|
|
529
|
-
class:
|
|
566
|
+
setup(a) {
|
|
567
|
+
return (e, s) => (l(), n("div", {
|
|
568
|
+
class: M(["f-card", [`f-card--${e.direction}`, { "is-hoverable": e.hoverable }]])
|
|
530
569
|
}, [
|
|
531
|
-
e.direction === "vertical" ? (l(),
|
|
532
|
-
e.$slots.header || e.$slots["header-extra"] ? (l(),
|
|
533
|
-
|
|
534
|
-
e.$slots["header-extra"] ? (l(),
|
|
535
|
-
|
|
536
|
-
])) :
|
|
537
|
-
])) :
|
|
538
|
-
e.$slots.cover ? (l(),
|
|
539
|
-
|
|
540
|
-
])) :
|
|
541
|
-
e.$slots.default ? (l(),
|
|
542
|
-
|
|
543
|
-
])) :
|
|
544
|
-
e.$slots.footer ? (l(),
|
|
545
|
-
|
|
546
|
-
])) :
|
|
547
|
-
], 64)) : (l(),
|
|
548
|
-
e.$slots.header || e.$slots["header-extra"] ? (l(),
|
|
549
|
-
|
|
550
|
-
e.$slots["header-extra"] ? (l(),
|
|
551
|
-
|
|
552
|
-
])) :
|
|
553
|
-
])) :
|
|
554
|
-
e.$slots.cover ? (l(),
|
|
555
|
-
|
|
556
|
-
])) :
|
|
557
|
-
|
|
558
|
-
e.$slots.default ? (l(),
|
|
559
|
-
|
|
560
|
-
])) :
|
|
561
|
-
e.$slots.footer ? (l(),
|
|
562
|
-
|
|
563
|
-
])) :
|
|
570
|
+
e.direction === "vertical" ? (l(), n(L, { key: 0 }, [
|
|
571
|
+
e.$slots.header || e.$slots["header-extra"] ? (l(), n("div", Yt, [
|
|
572
|
+
z(e.$slots, "header", {}, void 0, !0),
|
|
573
|
+
e.$slots["header-extra"] ? (l(), n("div", Kt, [
|
|
574
|
+
z(e.$slots, "header-extra", {}, void 0, !0)
|
|
575
|
+
])) : k("", !0)
|
|
576
|
+
])) : k("", !0),
|
|
577
|
+
e.$slots.cover ? (l(), n("div", Qt, [
|
|
578
|
+
z(e.$slots, "cover", {}, void 0, !0)
|
|
579
|
+
])) : k("", !0),
|
|
580
|
+
e.$slots.default ? (l(), n("div", Zt, [
|
|
581
|
+
z(e.$slots, "default", {}, void 0, !0)
|
|
582
|
+
])) : k("", !0),
|
|
583
|
+
e.$slots.footer ? (l(), n("div", es, [
|
|
584
|
+
z(e.$slots, "footer", {}, void 0, !0)
|
|
585
|
+
])) : k("", !0)
|
|
586
|
+
], 64)) : (l(), n(L, { key: 1 }, [
|
|
587
|
+
e.$slots.header || e.$slots["header-extra"] ? (l(), n("div", ts, [
|
|
588
|
+
z(e.$slots, "header", {}, void 0, !0),
|
|
589
|
+
e.$slots["header-extra"] ? (l(), n("div", ss, [
|
|
590
|
+
z(e.$slots, "header-extra", {}, void 0, !0)
|
|
591
|
+
])) : k("", !0)
|
|
592
|
+
])) : k("", !0),
|
|
593
|
+
e.$slots.cover ? (l(), n("div", os, [
|
|
594
|
+
z(e.$slots, "cover", {}, void 0, !0)
|
|
595
|
+
])) : k("", !0),
|
|
596
|
+
h("div", ls, [
|
|
597
|
+
e.$slots.default ? (l(), n("div", as, [
|
|
598
|
+
z(e.$slots, "default", {}, void 0, !0)
|
|
599
|
+
])) : k("", !0),
|
|
600
|
+
e.$slots.footer ? (l(), n("div", ns, [
|
|
601
|
+
z(e.$slots, "footer", {}, void 0, !0)
|
|
602
|
+
])) : k("", !0)
|
|
564
603
|
])
|
|
565
604
|
], 64))
|
|
566
605
|
], 2));
|
|
567
606
|
}
|
|
568
|
-
}),
|
|
607
|
+
}), is = /* @__PURE__ */ I(rs, [["__scopeId", "data-v-a66fa373"]]), cs = {
|
|
569
608
|
key: 0,
|
|
570
609
|
class: "f-tag__dot"
|
|
571
|
-
},
|
|
610
|
+
}, ds = /* @__PURE__ */ S({
|
|
572
611
|
__name: "FTag",
|
|
573
612
|
props: {
|
|
574
613
|
color: {},
|
|
@@ -578,36 +617,35 @@ const Ee = /* @__PURE__ */ g({
|
|
|
578
617
|
size: { default: "normal" }
|
|
579
618
|
},
|
|
580
619
|
emits: ["close"],
|
|
581
|
-
setup(
|
|
582
|
-
const
|
|
583
|
-
return (
|
|
584
|
-
var
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
`f-tag--${(
|
|
589
|
-
|
|
590
|
-
(f = s.color) != null ? f : "default"
|
|
620
|
+
setup(a, { emit: e }) {
|
|
621
|
+
const s = e, t = V(!1);
|
|
622
|
+
return (o, i) => {
|
|
623
|
+
var d, u, r;
|
|
624
|
+
return l(), n("span", {
|
|
625
|
+
class: M(["f-tag", [
|
|
626
|
+
`f-tag--${(d = o.type) != null ? d : "round"}`,
|
|
627
|
+
`f-tag--${(u = o.effect) != null ? u : "light"}`,
|
|
628
|
+
(r = o.color) != null ? r : "default"
|
|
591
629
|
]]),
|
|
592
|
-
onMouseenter: i[1] || (i[1] = (
|
|
593
|
-
onMouseleave: i[2] || (i[2] = (
|
|
630
|
+
onMouseenter: i[1] || (i[1] = (v) => t.value = !0),
|
|
631
|
+
onMouseleave: i[2] || (i[2] = (v) => t.value = !1)
|
|
594
632
|
}, [
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
633
|
+
o.type === "dot" ? (l(), n("span", cs)) : k("", !0),
|
|
634
|
+
z(o.$slots, "default", {}, void 0, !0),
|
|
635
|
+
o.closable ? (l(), j(G, {
|
|
598
636
|
key: 1,
|
|
599
637
|
class: "f-tag__close",
|
|
600
|
-
onClick: i[0] || (i[0] =
|
|
638
|
+
onClick: i[0] || (i[0] = ue((v) => s("close"), ["stop"]))
|
|
601
639
|
}, {
|
|
602
|
-
default:
|
|
603
|
-
(l(),
|
|
640
|
+
default: E(() => [
|
|
641
|
+
(l(), j(se(c(t) ? c(Te) : c(xe))))
|
|
604
642
|
]),
|
|
605
643
|
_: 1
|
|
606
|
-
})) :
|
|
644
|
+
})) : k("", !0)
|
|
607
645
|
], 34);
|
|
608
646
|
};
|
|
609
647
|
}
|
|
610
|
-
}),
|
|
648
|
+
}), Re = /* @__PURE__ */ I(ds, [["__scopeId", "data-v-02bd5aa6"]]), us = /* @__PURE__ */ S({
|
|
611
649
|
__name: "FTooltip",
|
|
612
650
|
props: {
|
|
613
651
|
content: {},
|
|
@@ -617,77 +655,77 @@ const Ee = /* @__PURE__ */ g({
|
|
|
617
655
|
offset: { default: 6 },
|
|
618
656
|
maxWidth: { default: 240 }
|
|
619
657
|
},
|
|
620
|
-
setup(
|
|
621
|
-
const e =
|
|
622
|
-
let
|
|
623
|
-
const
|
|
624
|
-
e.disabled || (
|
|
625
|
-
|
|
658
|
+
setup(a) {
|
|
659
|
+
const e = a, s = V(null), t = V(null), o = V(!1), i = V({ top: 0, left: 0 });
|
|
660
|
+
let d = null;
|
|
661
|
+
const u = () => {
|
|
662
|
+
e.disabled || (d = setTimeout(() => {
|
|
663
|
+
o.value = !0, _e(v);
|
|
626
664
|
}, e.delay));
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
},
|
|
630
|
-
var
|
|
665
|
+
}, r = () => {
|
|
666
|
+
d && clearTimeout(d), o.value = !1;
|
|
667
|
+
}, v = () => {
|
|
668
|
+
var q, b;
|
|
631
669
|
if (!t.value) return;
|
|
632
|
-
const
|
|
633
|
-
if (!
|
|
634
|
-
const
|
|
635
|
-
let
|
|
636
|
-
switch (
|
|
670
|
+
const y = (b = (q = s.value) == null ? void 0 : q.firstElementChild) != null ? b : s.value;
|
|
671
|
+
if (!y) return;
|
|
672
|
+
const _ = y.getBoundingClientRect(), f = t.value.getBoundingClientRect(), m = e.offset, [p, $] = e.placement.split("-");
|
|
673
|
+
let w = 0, T = 0;
|
|
674
|
+
switch (p) {
|
|
637
675
|
case "top":
|
|
638
|
-
|
|
676
|
+
w = _.top - f.height - m;
|
|
639
677
|
break;
|
|
640
678
|
case "bottom":
|
|
641
|
-
|
|
679
|
+
w = _.bottom + m;
|
|
642
680
|
break;
|
|
643
681
|
case "left":
|
|
644
|
-
|
|
682
|
+
T = _.left - f.width - m;
|
|
645
683
|
break;
|
|
646
684
|
case "right":
|
|
647
|
-
|
|
685
|
+
T = _.right + m;
|
|
648
686
|
break;
|
|
649
687
|
}
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
|
|
688
|
+
p === "top" || p === "bottom" ? $ === "start" ? T = _.left : $ === "end" ? T = _.right - f.width : T = _.left + (_.width - f.width) / 2 : $ === "start" ? w = _.top : $ === "end" ? w = _.bottom - f.height : w = _.top + (_.height - f.height) / 2;
|
|
689
|
+
const D = 8;
|
|
690
|
+
T = Math.max(D, Math.min(T, window.innerWidth - f.width - D)), w = Math.max(D, Math.min(w, window.innerHeight - f.height - D)), i.value = { top: w + window.scrollY, left: T + window.scrollX };
|
|
653
691
|
};
|
|
654
|
-
return
|
|
692
|
+
return he(r), (y, _) => (l(), n("div", {
|
|
655
693
|
class: "f-tooltip",
|
|
656
694
|
ref_key: "triggerRef",
|
|
657
|
-
ref:
|
|
658
|
-
onMouseenter:
|
|
659
|
-
onMouseleave:
|
|
695
|
+
ref: s,
|
|
696
|
+
onMouseenter: u,
|
|
697
|
+
onMouseleave: r
|
|
660
698
|
}, [
|
|
661
|
-
|
|
662
|
-
(l(),
|
|
663
|
-
|
|
664
|
-
default:
|
|
665
|
-
|
|
699
|
+
z(y.$slots, "default", {}, void 0, !0),
|
|
700
|
+
(l(), j(ge, { to: "body" }, [
|
|
701
|
+
H(ae, { name: "f-tooltip" }, {
|
|
702
|
+
default: E(() => [
|
|
703
|
+
c(o) && (y.content || y.$slots.content) ? (l(), n("div", {
|
|
666
704
|
key: 0,
|
|
667
705
|
ref_key: "tooltipRef",
|
|
668
706
|
ref: t,
|
|
669
|
-
class:
|
|
670
|
-
style:
|
|
671
|
-
top: `${
|
|
672
|
-
left: `${
|
|
673
|
-
maxWidth: `${
|
|
707
|
+
class: M(["f-tooltip-wrapper", `is-${y.placement.split("-")[0]}`]),
|
|
708
|
+
style: O({
|
|
709
|
+
top: `${c(i).top}px`,
|
|
710
|
+
left: `${c(i).left}px`,
|
|
711
|
+
maxWidth: `${y.maxWidth}px`
|
|
674
712
|
})
|
|
675
713
|
}, [
|
|
676
|
-
|
|
677
|
-
|
|
714
|
+
z(y.$slots, "content", {}, () => [
|
|
715
|
+
ne(R(y.content), 1)
|
|
678
716
|
], !0),
|
|
679
|
-
|
|
680
|
-
], 6)) :
|
|
717
|
+
_[0] || (_[0] = h("span", { class: "f-tooltip-arrow" }, null, -1))
|
|
718
|
+
], 6)) : k("", !0)
|
|
681
719
|
]),
|
|
682
720
|
_: 3
|
|
683
721
|
})
|
|
684
722
|
]))
|
|
685
723
|
], 544));
|
|
686
724
|
}
|
|
687
|
-
}),
|
|
725
|
+
}), He = /* @__PURE__ */ I(us, [["__scopeId", "data-v-be9acca7"]]), ps = { class: "f-progress" }, fs = {
|
|
688
726
|
key: 0,
|
|
689
727
|
class: "f-progress__text"
|
|
690
|
-
},
|
|
728
|
+
}, _s = /* @__PURE__ */ S({
|
|
691
729
|
__name: "FProgress",
|
|
692
730
|
props: {
|
|
693
731
|
percent: {},
|
|
@@ -695,25 +733,25 @@ const Ee = /* @__PURE__ */ g({
|
|
|
695
733
|
showText: { type: Boolean, default: !1 },
|
|
696
734
|
height: { default: 5 }
|
|
697
735
|
},
|
|
698
|
-
setup(
|
|
699
|
-
const e =
|
|
700
|
-
return (t,
|
|
701
|
-
|
|
736
|
+
setup(a) {
|
|
737
|
+
const e = a, s = g(() => Math.min(100, Math.max(0, e.percent)));
|
|
738
|
+
return (t, o) => (l(), n("div", ps, [
|
|
739
|
+
h("div", {
|
|
702
740
|
class: "f-progress__track",
|
|
703
|
-
style:
|
|
741
|
+
style: O({ height: `${t.height}px` })
|
|
704
742
|
}, [
|
|
705
|
-
|
|
743
|
+
h("div", {
|
|
706
744
|
class: "f-progress__fill",
|
|
707
|
-
style:
|
|
708
|
-
width: `${
|
|
745
|
+
style: O({
|
|
746
|
+
width: `${c(s)}%`,
|
|
709
747
|
background: t.color
|
|
710
748
|
})
|
|
711
749
|
}, null, 4)
|
|
712
750
|
], 4),
|
|
713
|
-
t.showText ? (l(),
|
|
751
|
+
t.showText ? (l(), n("span", fs, R(c(s)) + "%", 1)) : k("", !0)
|
|
714
752
|
]));
|
|
715
753
|
}
|
|
716
|
-
}),
|
|
754
|
+
}), De = /* @__PURE__ */ I(_s, [["__scopeId", "data-v-c2164d6e"]]), ms = { class: "f-tabs__nav-container" }, vs = { class: "f-tabs__nav" }, hs = ["onClick"], gs = { class: "f-tabs__label" }, ys = /* @__PURE__ */ S({
|
|
717
755
|
__name: "FTabs",
|
|
718
756
|
props: {
|
|
719
757
|
tabs: {},
|
|
@@ -721,93 +759,93 @@ const Ee = /* @__PURE__ */ g({
|
|
|
721
759
|
type: { default: "line" }
|
|
722
760
|
},
|
|
723
761
|
emits: ["update:active", "change"],
|
|
724
|
-
setup(
|
|
725
|
-
const
|
|
762
|
+
setup(a, { emit: e }) {
|
|
763
|
+
const s = a, t = e, o = g({
|
|
726
764
|
get: () => {
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
729
|
-
return
|
|
730
|
-
const
|
|
731
|
-
return (
|
|
765
|
+
var u;
|
|
766
|
+
if (s.active && s.tabs.some((r) => r.name === s.active && !r.disabled))
|
|
767
|
+
return s.active;
|
|
768
|
+
const d = s.tabs.find((r) => !r.disabled);
|
|
769
|
+
return (u = d == null ? void 0 : d.name) != null ? u : "";
|
|
732
770
|
},
|
|
733
|
-
set: (
|
|
734
|
-
t("update:active",
|
|
771
|
+
set: (d) => {
|
|
772
|
+
t("update:active", d), t("change", d);
|
|
735
773
|
}
|
|
736
|
-
}), i = (
|
|
737
|
-
|
|
774
|
+
}), i = (d, u) => {
|
|
775
|
+
u || (o.value = d);
|
|
738
776
|
};
|
|
739
|
-
return (
|
|
740
|
-
class:
|
|
777
|
+
return (d, u) => (l(), n("div", {
|
|
778
|
+
class: M(["f-tabs", [`f-tabs--${d.type}`]])
|
|
741
779
|
}, [
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
(l(!0),
|
|
745
|
-
key:
|
|
746
|
-
class:
|
|
747
|
-
active:
|
|
748
|
-
disabled:
|
|
780
|
+
h("div", ms, [
|
|
781
|
+
h("div", vs, [
|
|
782
|
+
(l(!0), n(L, null, W(d.tabs, (r) => (l(), n("div", {
|
|
783
|
+
key: r.name,
|
|
784
|
+
class: M(["f-tabs__tab", {
|
|
785
|
+
active: c(o) === r.name,
|
|
786
|
+
disabled: r.disabled
|
|
749
787
|
}]),
|
|
750
|
-
onClick: (
|
|
788
|
+
onClick: (v) => i(r.name, r.disabled)
|
|
751
789
|
}, [
|
|
752
|
-
|
|
753
|
-
], 10,
|
|
790
|
+
h("span", gs, R(r.label), 1)
|
|
791
|
+
], 10, hs))), 128))
|
|
754
792
|
])
|
|
755
793
|
]),
|
|
756
|
-
(l(!0),
|
|
757
|
-
key:
|
|
794
|
+
(l(!0), n(L, null, W(d.tabs, (r) => de((l(), n("div", {
|
|
795
|
+
key: r.name,
|
|
758
796
|
class: "f-tabs__panel"
|
|
759
797
|
}, [
|
|
760
|
-
|
|
798
|
+
z(d.$slots, r.name, {}, void 0, !0)
|
|
761
799
|
])), [
|
|
762
|
-
[
|
|
800
|
+
[ze, c(o) === r.name]
|
|
763
801
|
])), 128))
|
|
764
802
|
], 2));
|
|
765
803
|
}
|
|
766
|
-
}),
|
|
804
|
+
}), bs = /* @__PURE__ */ I(ys, [["__scopeId", "data-v-268fc654"]]), $s = {
|
|
767
805
|
class: "f-breadcrumb__current",
|
|
768
806
|
"aria-current": "page"
|
|
769
|
-
},
|
|
807
|
+
}, ks = ["href"], ws = {
|
|
770
808
|
key: 3,
|
|
771
809
|
class: "f-breadcrumb__text"
|
|
772
|
-
},
|
|
810
|
+
}, Fs = /* @__PURE__ */ S({
|
|
773
811
|
__name: "FBreadcrumb",
|
|
774
812
|
props: {
|
|
775
813
|
items: { default: () => [] },
|
|
776
814
|
separator: { default: "/" },
|
|
777
815
|
animated: { type: Boolean, default: !1 }
|
|
778
816
|
},
|
|
779
|
-
setup(
|
|
780
|
-
return (e,
|
|
781
|
-
class:
|
|
817
|
+
setup(a) {
|
|
818
|
+
return (e, s) => (l(), n("nav", {
|
|
819
|
+
class: M(["f-breadcrumb", { "f-breadcrumb--animated": e.animated }]),
|
|
782
820
|
"aria-label": "breadcrumb"
|
|
783
821
|
}, [
|
|
784
|
-
|
|
785
|
-
default:
|
|
786
|
-
(l(!0),
|
|
822
|
+
H(Ue, { name: "breadcrumb" }, {
|
|
823
|
+
default: E(() => [
|
|
824
|
+
(l(!0), n(L, null, W(e.items, (t, o) => (l(), n(L, {
|
|
787
825
|
key: t.label
|
|
788
826
|
}, [
|
|
789
|
-
|
|
827
|
+
o > 0 ? (l(), n("span", {
|
|
790
828
|
key: `sep-${t.label}`,
|
|
791
829
|
class: "f-breadcrumb__sep",
|
|
792
830
|
"aria-hidden": "true"
|
|
793
|
-
},
|
|
794
|
-
|
|
831
|
+
}, R(e.separator), 1)) : k("", !0),
|
|
832
|
+
o === e.items.length - 1 ? z(e.$slots, "default", {
|
|
795
833
|
key: 1,
|
|
796
834
|
item: t
|
|
797
835
|
}, () => [
|
|
798
|
-
|
|
799
|
-
], !0) : t.href ? (l(),
|
|
836
|
+
h("span", $s, R(t.label), 1)
|
|
837
|
+
], !0) : t.href ? (l(), n("a", {
|
|
800
838
|
key: 2,
|
|
801
839
|
href: t.href,
|
|
802
840
|
class: "f-breadcrumb__link"
|
|
803
|
-
},
|
|
841
|
+
}, R(t.label), 9, ks)) : (l(), n("span", ws, R(t.label), 1))
|
|
804
842
|
], 64))), 128))
|
|
805
843
|
]),
|
|
806
844
|
_: 3
|
|
807
845
|
})
|
|
808
846
|
], 2));
|
|
809
847
|
}
|
|
810
|
-
}),
|
|
848
|
+
}), Cs = /* @__PURE__ */ I(Fs, [["__scopeId", "data-v-bb787dcc"]]), zs = /* @__PURE__ */ S({
|
|
811
849
|
__name: "FCol",
|
|
812
850
|
props: {
|
|
813
851
|
span: { default: 24 },
|
|
@@ -818,28 +856,28 @@ const Ee = /* @__PURE__ */ g({
|
|
|
818
856
|
md: {},
|
|
819
857
|
lg: {}
|
|
820
858
|
},
|
|
821
|
-
setup(
|
|
822
|
-
const e =
|
|
859
|
+
setup(a) {
|
|
860
|
+
const e = a, s = (i) => typeof i == "number" ? { span: i } : i, t = g(() => ({
|
|
823
861
|
"--col-span": e.span,
|
|
824
862
|
"--col-offset": e.offset,
|
|
825
863
|
"--col-order": e.order
|
|
826
|
-
})),
|
|
827
|
-
const i = [],
|
|
828
|
-
for (const [
|
|
829
|
-
if (
|
|
830
|
-
const { span:
|
|
831
|
-
|
|
864
|
+
})), o = g(() => {
|
|
865
|
+
const i = [], d = { xs: e.xs, sm: e.sm, md: e.md, lg: e.lg };
|
|
866
|
+
for (const [u, r] of Object.entries(d)) {
|
|
867
|
+
if (r === void 0) continue;
|
|
868
|
+
const { span: v, offset: y, order: _ } = s(r);
|
|
869
|
+
v !== void 0 && i.push(`f-col--${u}-${v}`), y !== void 0 && i.push(`f-col--${u}-offset-${y}`), _ !== void 0 && i.push(`f-col--${u}-order-${_}`);
|
|
832
870
|
}
|
|
833
871
|
return i;
|
|
834
872
|
});
|
|
835
|
-
return (i,
|
|
836
|
-
class:
|
|
837
|
-
style:
|
|
873
|
+
return (i, d) => (l(), n("div", {
|
|
874
|
+
class: M(["f-col", c(o)]),
|
|
875
|
+
style: O(c(t))
|
|
838
876
|
}, [
|
|
839
|
-
|
|
877
|
+
z(i.$slots, "default", {}, void 0, !0)
|
|
840
878
|
], 6));
|
|
841
879
|
}
|
|
842
|
-
}),
|
|
880
|
+
}), Ss = /* @__PURE__ */ I(zs, [["__scopeId", "data-v-5a8b0cb4"]]), Is = /* @__PURE__ */ S({
|
|
843
881
|
__name: "FRow",
|
|
844
882
|
props: {
|
|
845
883
|
gutter: { default: 0 },
|
|
@@ -848,12 +886,12 @@ const Ee = /* @__PURE__ */ g({
|
|
|
848
886
|
wrap: { default: "wrap" },
|
|
849
887
|
tag: { default: "div" }
|
|
850
888
|
},
|
|
851
|
-
setup(
|
|
852
|
-
const e =
|
|
889
|
+
setup(a) {
|
|
890
|
+
const e = a, s = g(
|
|
853
891
|
() => Array.isArray(e.gutter) ? e.gutter[0] : e.gutter
|
|
854
|
-
), t =
|
|
892
|
+
), t = g(
|
|
855
893
|
() => Array.isArray(e.gutter) ? e.gutter[1] : 0
|
|
856
|
-
),
|
|
894
|
+
), o = {
|
|
857
895
|
start: "flex-start",
|
|
858
896
|
end: "flex-end",
|
|
859
897
|
center: "center",
|
|
@@ -865,30 +903,30 @@ const Ee = /* @__PURE__ */ g({
|
|
|
865
903
|
middle: "center",
|
|
866
904
|
bottom: "flex-end",
|
|
867
905
|
stretch: "stretch"
|
|
868
|
-
},
|
|
869
|
-
marginLeft:
|
|
870
|
-
marginRight:
|
|
906
|
+
}, d = g(() => ({
|
|
907
|
+
marginLeft: s.value ? `-${s.value / 2}px` : void 0,
|
|
908
|
+
marginRight: s.value ? `-${s.value / 2}px` : void 0,
|
|
871
909
|
rowGap: t.value ? `${t.value}px` : void 0,
|
|
872
|
-
justifyContent:
|
|
910
|
+
justifyContent: o[e.justify],
|
|
873
911
|
alignItems: i[e.align],
|
|
874
912
|
flexWrap: e.wrap,
|
|
875
|
-
"--row-gutter-h":
|
|
913
|
+
"--row-gutter-h": s.value ? `${s.value / 2}px` : "0px"
|
|
876
914
|
}));
|
|
877
|
-
return (
|
|
915
|
+
return (u, r) => (l(), j(se(u.tag), {
|
|
878
916
|
class: "f-row",
|
|
879
|
-
style:
|
|
917
|
+
style: O(c(d))
|
|
880
918
|
}, {
|
|
881
|
-
default:
|
|
882
|
-
|
|
919
|
+
default: E(() => [
|
|
920
|
+
z(u.$slots, "default", {}, void 0, !0)
|
|
883
921
|
]),
|
|
884
922
|
_: 3
|
|
885
923
|
}, 8, ["style"]));
|
|
886
924
|
}
|
|
887
|
-
}),
|
|
925
|
+
}), Ms = /* @__PURE__ */ I(Is, [["__scopeId", "data-v-72f62339"]]), Ts = { class: "f-space__item" }, xs = {
|
|
888
926
|
key: 0,
|
|
889
927
|
class: "f-space__split",
|
|
890
928
|
"aria-hidden": "true"
|
|
891
|
-
},
|
|
929
|
+
}, Bs = /* @__PURE__ */ S({
|
|
892
930
|
__name: "FSpace",
|
|
893
931
|
props: {
|
|
894
932
|
direction: { default: "horizontal" },
|
|
@@ -898,80 +936,80 @@ const Ee = /* @__PURE__ */ g({
|
|
|
898
936
|
wrap: { type: Boolean, default: !1 },
|
|
899
937
|
split: {}
|
|
900
938
|
},
|
|
901
|
-
setup(
|
|
902
|
-
const e =
|
|
939
|
+
setup(a) {
|
|
940
|
+
const e = a, s = {
|
|
903
941
|
small: 6,
|
|
904
942
|
normal: 12,
|
|
905
943
|
large: 18
|
|
906
|
-
}, t = (
|
|
907
|
-
const
|
|
908
|
-
return Array.isArray(
|
|
909
|
-
}), i =
|
|
944
|
+
}, t = (r) => typeof r == "number" ? r : s[r], o = g(() => {
|
|
945
|
+
const r = e.size;
|
|
946
|
+
return Array.isArray(r) ? `${t(r[1])}px ${t(r[0])}px` : `${t(r)}px`;
|
|
947
|
+
}), i = g(() => ({
|
|
910
948
|
flexDirection: e.direction === "vertical" ? "column" : "row",
|
|
911
949
|
alignItems: e.align,
|
|
912
950
|
justifyContent: e.justify,
|
|
913
951
|
flexWrap: e.wrap ? "wrap" : "nowrap",
|
|
914
|
-
gap:
|
|
915
|
-
})),
|
|
916
|
-
var
|
|
917
|
-
const
|
|
918
|
-
if (!
|
|
919
|
-
const
|
|
920
|
-
for (const
|
|
921
|
-
|
|
922
|
-
return
|
|
952
|
+
gap: o.value
|
|
953
|
+
})), d = Je(), u = g(() => {
|
|
954
|
+
var y;
|
|
955
|
+
const r = (y = d.default) == null ? void 0 : y.call(d);
|
|
956
|
+
if (!r) return [];
|
|
957
|
+
const v = [];
|
|
958
|
+
for (const _ of r)
|
|
959
|
+
_.type === L ? v.push(..._.children) : v.push(_);
|
|
960
|
+
return v.filter((_) => _.type !== Comment);
|
|
923
961
|
});
|
|
924
|
-
return (
|
|
962
|
+
return (r, v) => (l(), n("div", {
|
|
925
963
|
class: "f-space",
|
|
926
|
-
style:
|
|
964
|
+
style: O(c(i))
|
|
927
965
|
}, [
|
|
928
|
-
(l(!0),
|
|
929
|
-
|
|
930
|
-
(l(),
|
|
966
|
+
(l(!0), n(L, null, W(c(u), (y, _) => (l(), n(L, { key: _ }, [
|
|
967
|
+
h("div", Ts, [
|
|
968
|
+
(l(), j(se(y)))
|
|
931
969
|
]),
|
|
932
|
-
|
|
970
|
+
r.split && _ < c(u).length - 1 ? (l(), n("span", xs, R(r.split), 1)) : k("", !0)
|
|
933
971
|
], 64))), 128))
|
|
934
972
|
], 4));
|
|
935
973
|
}
|
|
936
|
-
}),
|
|
974
|
+
}), Vs = /* @__PURE__ */ I(Bs, [["__scopeId", "data-v-5fb3b1a0"]]), Rs = /* @__PURE__ */ S({
|
|
937
975
|
__name: "FContainer",
|
|
938
976
|
props: {
|
|
939
977
|
gap: { default: 12 }
|
|
940
978
|
},
|
|
941
|
-
setup(
|
|
942
|
-
const e =
|
|
979
|
+
setup(a) {
|
|
980
|
+
const e = a, s = g(() => ({
|
|
943
981
|
gap: typeof e.gap == "number" ? `${e.gap}px` : e.gap
|
|
944
982
|
}));
|
|
945
|
-
return (t,
|
|
983
|
+
return (t, o) => (l(), n("div", {
|
|
946
984
|
class: "f-container",
|
|
947
|
-
style:
|
|
985
|
+
style: O(c(s))
|
|
948
986
|
}, [
|
|
949
|
-
|
|
987
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
950
988
|
], 4));
|
|
951
989
|
}
|
|
952
|
-
}),
|
|
990
|
+
}), Hs = /* @__PURE__ */ I(Rs, [["__scopeId", "data-v-08450ddf"]]), Ds = /* @__PURE__ */ S({
|
|
953
991
|
__name: "FDivider",
|
|
954
992
|
props: {
|
|
955
993
|
color: {},
|
|
956
994
|
direction: { default: "horizontal" },
|
|
957
995
|
line: { default: "solid" }
|
|
958
996
|
},
|
|
959
|
-
setup(
|
|
960
|
-
const e =
|
|
961
|
-
const t = e.color || "var(--el-color-primary)",
|
|
997
|
+
setup(a) {
|
|
998
|
+
const e = a, s = g(() => {
|
|
999
|
+
const t = e.color || "var(--el-color-primary)", o = e.direction === "horizontal";
|
|
962
1000
|
return {
|
|
963
|
-
borderTop:
|
|
964
|
-
borderLeft:
|
|
965
|
-
height:
|
|
966
|
-
width:
|
|
967
|
-
margin:
|
|
1001
|
+
borderTop: o ? `${e.line} ${t}` : "none",
|
|
1002
|
+
borderLeft: o ? "none" : `${e.line} ${t}`,
|
|
1003
|
+
height: o ? "0" : "100%",
|
|
1004
|
+
width: o ? "100%" : "0",
|
|
1005
|
+
margin: o ? "24px 0" : "0"
|
|
968
1006
|
};
|
|
969
1007
|
});
|
|
970
|
-
return (t,
|
|
971
|
-
style:
|
|
1008
|
+
return (t, o) => (l(), n("hr", {
|
|
1009
|
+
style: O(s.value)
|
|
972
1010
|
}, null, 4));
|
|
973
1011
|
}
|
|
974
|
-
}),
|
|
1012
|
+
}), As = /* @__PURE__ */ I(Ds, [["__scopeId", "data-v-512ee743"]]), Es = ["src", "alt"], Os = /* @__PURE__ */ S({
|
|
975
1013
|
__name: "FAvatar",
|
|
976
1014
|
props: {
|
|
977
1015
|
src: {},
|
|
@@ -980,39 +1018,36 @@ const Ee = /* @__PURE__ */ g({
|
|
|
980
1018
|
shape: { default: "circle" },
|
|
981
1019
|
icon: {}
|
|
982
1020
|
},
|
|
983
|
-
setup(
|
|
984
|
-
const e =
|
|
1021
|
+
setup(a) {
|
|
1022
|
+
const e = a, s = {
|
|
985
1023
|
small: "32px",
|
|
986
1024
|
normal: "48px",
|
|
987
1025
|
large: "64px"
|
|
988
|
-
}, t =
|
|
989
|
-
width: typeof e.size == "string" ?
|
|
990
|
-
height: typeof e.size == "string" ?
|
|
1026
|
+
}, t = g(() => ({
|
|
1027
|
+
width: typeof e.size == "string" ? s[e.size] : `${e.size}px`,
|
|
1028
|
+
height: typeof e.size == "string" ? s[e.size] : `${e.size}px`,
|
|
991
1029
|
borderRadius: e.shape === "circle" ? "50%" : "8px"
|
|
992
1030
|
}));
|
|
993
|
-
return (
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
}))
|
|
1012
|
-
], 4);
|
|
1013
|
-
};
|
|
1031
|
+
return (o, i) => (l(), n("div", {
|
|
1032
|
+
class: "f-avatar",
|
|
1033
|
+
style: O(c(t))
|
|
1034
|
+
}, [
|
|
1035
|
+
o.src ? (l(), n("img", {
|
|
1036
|
+
key: 0,
|
|
1037
|
+
src: o.src,
|
|
1038
|
+
alt: o.alt
|
|
1039
|
+
}, null, 8, Es)) : (l(), j(G, {
|
|
1040
|
+
key: 1,
|
|
1041
|
+
size: 24
|
|
1042
|
+
}, {
|
|
1043
|
+
default: E(() => [
|
|
1044
|
+
(l(), j(se(o.icon ? o.icon : c(lt))))
|
|
1045
|
+
]),
|
|
1046
|
+
_: 1
|
|
1047
|
+
}))
|
|
1048
|
+
], 4));
|
|
1014
1049
|
}
|
|
1015
|
-
}),
|
|
1050
|
+
}), Ps = /* @__PURE__ */ I(Os, [["__scopeId", "data-v-b3665268"]]), Ls = ["disabled"], js = /* @__PURE__ */ S({
|
|
1016
1051
|
__name: "FButton",
|
|
1017
1052
|
props: {
|
|
1018
1053
|
size: { default: "normal" },
|
|
@@ -1021,49 +1056,49 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1021
1056
|
bgColor: {},
|
|
1022
1057
|
variant: {}
|
|
1023
1058
|
},
|
|
1024
|
-
setup(
|
|
1025
|
-
const e =
|
|
1059
|
+
setup(a) {
|
|
1060
|
+
const e = a, s = {
|
|
1026
1061
|
small: { height: "24px", minWidth: "24px", padding: "0 8px", fontSize: "11px" },
|
|
1027
1062
|
normal: { height: "32px", minWidth: "32px", padding: "0 12px", fontSize: "12px" },
|
|
1028
1063
|
large: { height: "40px", minWidth: "40px", padding: "0 16px", fontSize: "13px" }
|
|
1029
|
-
}, t =
|
|
1030
|
-
var
|
|
1031
|
-
return
|
|
1064
|
+
}, t = g(() => {
|
|
1065
|
+
var o;
|
|
1066
|
+
return Fe(we({}, (o = s[e.size]) != null ? o : s.normal), {
|
|
1032
1067
|
borderRadius: e.round === !0 ? "999px" : typeof e.round == "number" ? `${e.round}px` : "6px",
|
|
1033
1068
|
backgroundColor: e.bgColor
|
|
1034
1069
|
});
|
|
1035
1070
|
});
|
|
1036
|
-
return (
|
|
1037
|
-
var
|
|
1038
|
-
return l(),
|
|
1039
|
-
class:
|
|
1040
|
-
`f-button--${(
|
|
1041
|
-
{ "is-disabled":
|
|
1071
|
+
return (o, i) => {
|
|
1072
|
+
var d;
|
|
1073
|
+
return l(), n("button", {
|
|
1074
|
+
class: M(["f-button", [
|
|
1075
|
+
`f-button--${(d = o.variant) != null ? d : "default"}`,
|
|
1076
|
+
{ "is-disabled": o.disabled }
|
|
1042
1077
|
]]),
|
|
1043
|
-
style:
|
|
1044
|
-
disabled:
|
|
1078
|
+
style: O(c(t)),
|
|
1079
|
+
disabled: o.disabled
|
|
1045
1080
|
}, [
|
|
1046
|
-
|
|
1047
|
-
], 14,
|
|
1081
|
+
z(o.$slots, "default", {}, void 0, !0)
|
|
1082
|
+
], 14, Ls);
|
|
1048
1083
|
};
|
|
1049
1084
|
}
|
|
1050
|
-
}),
|
|
1085
|
+
}), Ws = /* @__PURE__ */ I(js, [["__scopeId", "data-v-eeff7101"]]), Ns = /* @__PURE__ */ S({
|
|
1051
1086
|
__name: "FTypography",
|
|
1052
1087
|
props: {
|
|
1053
1088
|
color: { default: "" }
|
|
1054
1089
|
},
|
|
1055
|
-
setup(
|
|
1056
|
-
const e =
|
|
1090
|
+
setup(a) {
|
|
1091
|
+
const e = a, s = g(() => ({
|
|
1057
1092
|
color: e.color
|
|
1058
1093
|
}));
|
|
1059
|
-
return (t,
|
|
1094
|
+
return (t, o) => (l(), n("div", {
|
|
1060
1095
|
class: "f-typography",
|
|
1061
|
-
style:
|
|
1096
|
+
style: O(c(s))
|
|
1062
1097
|
}, [
|
|
1063
|
-
|
|
1098
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
1064
1099
|
], 4));
|
|
1065
1100
|
}
|
|
1066
|
-
}),
|
|
1101
|
+
}), Gs = /* @__PURE__ */ I(Ns, [["__scopeId", "data-v-50e044db"]]), Us = /* @__PURE__ */ S({
|
|
1067
1102
|
__name: "FText",
|
|
1068
1103
|
props: {
|
|
1069
1104
|
tag: { default: "span" },
|
|
@@ -1074,8 +1109,8 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1074
1109
|
truncate: { type: Boolean },
|
|
1075
1110
|
italic: { type: Boolean }
|
|
1076
1111
|
},
|
|
1077
|
-
setup(
|
|
1078
|
-
const e =
|
|
1112
|
+
setup(a) {
|
|
1113
|
+
const e = a, s = {
|
|
1079
1114
|
1: "3xl",
|
|
1080
1115
|
2: "2xl",
|
|
1081
1116
|
3: "xl",
|
|
@@ -1089,31 +1124,31 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1089
1124
|
4: "medium",
|
|
1090
1125
|
5: "medium",
|
|
1091
1126
|
6: "normal"
|
|
1092
|
-
},
|
|
1093
|
-
var
|
|
1094
|
-
return e.heading ? `h${e.heading}` : (
|
|
1095
|
-
}), i =
|
|
1096
|
-
var
|
|
1097
|
-
return (
|
|
1098
|
-
}),
|
|
1099
|
-
var
|
|
1100
|
-
return (
|
|
1127
|
+
}, o = g(() => {
|
|
1128
|
+
var u;
|
|
1129
|
+
return e.heading ? `h${e.heading}` : (u = e.tag) != null ? u : "span";
|
|
1130
|
+
}), i = g(() => {
|
|
1131
|
+
var u;
|
|
1132
|
+
return (u = e.size) != null ? u : e.heading ? s[e.heading] : "normal";
|
|
1133
|
+
}), d = g(() => {
|
|
1134
|
+
var u;
|
|
1135
|
+
return (u = e.weight) != null ? u : e.heading ? t[e.heading] : "normal";
|
|
1101
1136
|
});
|
|
1102
|
-
return (
|
|
1103
|
-
class:
|
|
1104
|
-
`f-text--${
|
|
1105
|
-
`f-text--${
|
|
1106
|
-
|
|
1107
|
-
{ "f-text--truncate":
|
|
1137
|
+
return (u, r) => (l(), j(se(c(o)), {
|
|
1138
|
+
class: M(["f-text", [
|
|
1139
|
+
`f-text--${c(i)}`,
|
|
1140
|
+
`f-text--${c(d)}`,
|
|
1141
|
+
u.color && `f-text--${u.color}`,
|
|
1142
|
+
{ "f-text--truncate": u.truncate, "f-text--italic": u.italic }
|
|
1108
1143
|
]])
|
|
1109
1144
|
}, {
|
|
1110
|
-
default:
|
|
1111
|
-
|
|
1145
|
+
default: E(() => [
|
|
1146
|
+
z(u.$slots, "default", {}, void 0, !0)
|
|
1112
1147
|
]),
|
|
1113
1148
|
_: 3
|
|
1114
1149
|
}, 8, ["class"]));
|
|
1115
1150
|
}
|
|
1116
|
-
}),
|
|
1151
|
+
}), Js = /* @__PURE__ */ I(Us, [["__scopeId", "data-v-8bcfc6b3"]]), qs = ["href", "target", "rel"], Xs = /* @__PURE__ */ S({
|
|
1117
1152
|
__name: "FLink",
|
|
1118
1153
|
props: {
|
|
1119
1154
|
href: {},
|
|
@@ -1122,10 +1157,10 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1122
1157
|
color: {},
|
|
1123
1158
|
disabled: { type: Boolean }
|
|
1124
1159
|
},
|
|
1125
|
-
setup(
|
|
1126
|
-
const e =
|
|
1127
|
-
return (
|
|
1128
|
-
class:
|
|
1160
|
+
setup(a) {
|
|
1161
|
+
const e = a;
|
|
1162
|
+
return (s, t) => (l(), n("a", {
|
|
1163
|
+
class: M(["f-link", [
|
|
1129
1164
|
e.color && `f-link--${e.color}`,
|
|
1130
1165
|
`f-link--underline-${e.underline}`,
|
|
1131
1166
|
{ "f-link--disabled": e.disabled }
|
|
@@ -1134,10 +1169,10 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1134
1169
|
target: e.target,
|
|
1135
1170
|
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
1136
1171
|
}, [
|
|
1137
|
-
|
|
1138
|
-
], 10,
|
|
1172
|
+
z(s.$slots, "default", {}, void 0, !0)
|
|
1173
|
+
], 10, qs));
|
|
1139
1174
|
}
|
|
1140
|
-
}),
|
|
1175
|
+
}), Ys = /* @__PURE__ */ I(Xs, [["__scopeId", "data-v-daaa3e25"]]), Ks = { class: "f-badge" }, Qs = /* @__PURE__ */ S({
|
|
1141
1176
|
__name: "FBadge",
|
|
1142
1177
|
props: {
|
|
1143
1178
|
value: {},
|
|
@@ -1147,52 +1182,52 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1147
1182
|
placement: { default: "top-right" },
|
|
1148
1183
|
offset: { default: () => [0, 0] }
|
|
1149
1184
|
},
|
|
1150
|
-
setup(
|
|
1151
|
-
const e =
|
|
1152
|
-
var
|
|
1153
|
-
return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (
|
|
1154
|
-
}), t =
|
|
1155
|
-
const [
|
|
1185
|
+
setup(a) {
|
|
1186
|
+
const e = a, s = g(() => {
|
|
1187
|
+
var o;
|
|
1188
|
+
return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (o = e.value) != null ? o : "";
|
|
1189
|
+
}), t = g(() => {
|
|
1190
|
+
const [o, i] = e.offset;
|
|
1156
1191
|
return {
|
|
1157
|
-
"top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${
|
|
1158
|
-
"top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${
|
|
1159
|
-
"bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${
|
|
1160
|
-
"bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${
|
|
1192
|
+
"top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${o}px), calc(-50% + ${i}px))` },
|
|
1193
|
+
"top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${o}px), calc(-50% + ${i}px))` },
|
|
1194
|
+
"bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${o}px), calc(50% + ${i}px))` },
|
|
1195
|
+
"bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${o}px), calc(50% + ${i}px))` }
|
|
1161
1196
|
}[e.placement];
|
|
1162
1197
|
});
|
|
1163
|
-
return (
|
|
1164
|
-
|
|
1165
|
-
|
|
1198
|
+
return (o, i) => (l(), n("div", Ks, [
|
|
1199
|
+
z(o.$slots, "default", {}, void 0, !0),
|
|
1200
|
+
o.dot || o.value !== void 0 && o.value !== "" ? (l(), n("span", {
|
|
1166
1201
|
key: 0,
|
|
1167
|
-
class:
|
|
1168
|
-
style:
|
|
1169
|
-
},
|
|
1202
|
+
class: M(["f-badge__content", [`f-badge--${o.type}`, { "f-badge--dot": o.dot }]]),
|
|
1203
|
+
style: O(c(t))
|
|
1204
|
+
}, R(c(s)), 7)) : k("", !0)
|
|
1170
1205
|
]));
|
|
1171
1206
|
}
|
|
1172
|
-
}),
|
|
1207
|
+
}), Zs = /* @__PURE__ */ I(Qs, [["__scopeId", "data-v-be6947ff"]]), eo = /* @__PURE__ */ S({
|
|
1173
1208
|
__name: "FAffix",
|
|
1174
1209
|
props: {
|
|
1175
1210
|
placement: { default: "top-right" },
|
|
1176
1211
|
offset: { default: () => [8, 8] }
|
|
1177
1212
|
},
|
|
1178
|
-
setup(
|
|
1179
|
-
const e =
|
|
1180
|
-
const [t,
|
|
1213
|
+
setup(a) {
|
|
1214
|
+
const e = a, s = g(() => {
|
|
1215
|
+
const [t, o] = e.offset;
|
|
1181
1216
|
return {
|
|
1182
|
-
"top-left": { top: `${
|
|
1183
|
-
"top-right": { top: `${
|
|
1184
|
-
"bottom-left": { bottom: `${
|
|
1185
|
-
"bottom-right": { bottom: `${
|
|
1217
|
+
"top-left": { top: `${o}px`, left: `${t}px` },
|
|
1218
|
+
"top-right": { top: `${o}px`, right: `${t}px` },
|
|
1219
|
+
"bottom-left": { bottom: `${o}px`, left: `${t}px` },
|
|
1220
|
+
"bottom-right": { bottom: `${o}px`, right: `${t}px` }
|
|
1186
1221
|
}[e.placement];
|
|
1187
1222
|
});
|
|
1188
|
-
return (t,
|
|
1223
|
+
return (t, o) => (l(), n("div", {
|
|
1189
1224
|
class: "f-affix",
|
|
1190
|
-
style:
|
|
1225
|
+
style: O(c(s))
|
|
1191
1226
|
}, [
|
|
1192
|
-
|
|
1227
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
1193
1228
|
], 4));
|
|
1194
1229
|
}
|
|
1195
|
-
}),
|
|
1230
|
+
}), to = /* @__PURE__ */ I(eo, [["__scopeId", "data-v-8506d679"]]), so = /* @__PURE__ */ S({
|
|
1196
1231
|
__name: "FForm",
|
|
1197
1232
|
props: {
|
|
1198
1233
|
model: {},
|
|
@@ -1201,165 +1236,165 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1201
1236
|
labelPosition: { default: "right" },
|
|
1202
1237
|
size: { default: "normal" }
|
|
1203
1238
|
},
|
|
1204
|
-
setup(
|
|
1205
|
-
const
|
|
1206
|
-
t.value.push(
|
|
1207
|
-
}, i = (
|
|
1208
|
-
t.value = t.value.filter((
|
|
1239
|
+
setup(a, { expose: e }) {
|
|
1240
|
+
const s = a, t = V([]), o = (r) => {
|
|
1241
|
+
t.value.push(r);
|
|
1242
|
+
}, i = (r) => {
|
|
1243
|
+
t.value = t.value.filter((v) => v.prop !== r);
|
|
1209
1244
|
};
|
|
1210
|
-
return
|
|
1211
|
-
model:
|
|
1212
|
-
rules:
|
|
1213
|
-
labelWidth:
|
|
1214
|
-
labelPosition:
|
|
1215
|
-
size:
|
|
1216
|
-
registerField:
|
|
1245
|
+
return Ie("FFormContext", {
|
|
1246
|
+
model: s.model,
|
|
1247
|
+
rules: s.rules,
|
|
1248
|
+
labelWidth: s.labelWidth,
|
|
1249
|
+
labelPosition: g(() => s.labelPosition),
|
|
1250
|
+
size: g(() => s.size),
|
|
1251
|
+
registerField: o,
|
|
1217
1252
|
unregisterField: i
|
|
1218
1253
|
}), e({
|
|
1219
|
-
validate: () =>
|
|
1220
|
-
const
|
|
1221
|
-
if ((yield Promise.all(
|
|
1254
|
+
validate: () => ie(null, null, function* () {
|
|
1255
|
+
const r = t.value.map((_) => _.validate());
|
|
1256
|
+
if ((yield Promise.all(r)).filter((_) => _ !== void 0).length > 0)
|
|
1222
1257
|
throw new Error("表单校验失败");
|
|
1223
1258
|
return !0;
|
|
1224
1259
|
}),
|
|
1225
1260
|
resetFields: () => {
|
|
1226
|
-
t.value.forEach((
|
|
1261
|
+
t.value.forEach((r) => r.clearValidate());
|
|
1227
1262
|
}
|
|
1228
|
-
}), (
|
|
1229
|
-
class:
|
|
1230
|
-
`f-form--label-${
|
|
1231
|
-
`f-form--size-${
|
|
1263
|
+
}), (r, v) => (l(), n("form", {
|
|
1264
|
+
class: M(["f-form", [
|
|
1265
|
+
`f-form--label-${r.labelPosition}`,
|
|
1266
|
+
`f-form--size-${r.size}`
|
|
1232
1267
|
]]),
|
|
1233
|
-
onSubmit:
|
|
1268
|
+
onSubmit: v[0] || (v[0] = ue(() => {
|
|
1234
1269
|
}, ["prevent"]))
|
|
1235
1270
|
}, [
|
|
1236
|
-
|
|
1271
|
+
z(r.$slots, "default", {}, void 0, !0)
|
|
1237
1272
|
], 34));
|
|
1238
1273
|
}
|
|
1239
|
-
}),
|
|
1240
|
-
const
|
|
1241
|
-
for (let t of
|
|
1242
|
-
t.transform && (
|
|
1243
|
-
const
|
|
1244
|
-
if (t.required && (
|
|
1274
|
+
}), oo = /* @__PURE__ */ I(so, [["__scopeId", "data-v-21f7de9b"]]), lo = (a, e) => ie(null, null, function* () {
|
|
1275
|
+
const s = Array.isArray(e) ? e : [e];
|
|
1276
|
+
for (let t of s) {
|
|
1277
|
+
t.transform && (a = t.transform(a));
|
|
1278
|
+
const o = a == null || a === "", i = t.whitespace && typeof a == "string" && a.trim() === "";
|
|
1279
|
+
if (t.required && (o || i))
|
|
1245
1280
|
return t.message || "此字段为必填项";
|
|
1246
|
-
if (!t.required &&
|
|
1281
|
+
if (!t.required && o) continue;
|
|
1247
1282
|
if (t.type) {
|
|
1248
|
-
const
|
|
1249
|
-
if (
|
|
1283
|
+
const u = ao(a, t);
|
|
1284
|
+
if (u) return u;
|
|
1250
1285
|
}
|
|
1251
|
-
const
|
|
1252
|
-
if (
|
|
1253
|
-
if (t.pattern && !t.pattern.test(String(
|
|
1286
|
+
const d = no(a, t);
|
|
1287
|
+
if (d) return d;
|
|
1288
|
+
if (t.pattern && !t.pattern.test(String(a)))
|
|
1254
1289
|
return t.message || "格式不匹配";
|
|
1255
|
-
if (t.enum && !t.enum.includes(
|
|
1290
|
+
if (t.enum && !t.enum.includes(a))
|
|
1256
1291
|
return t.message || "不在指定的枚举范围内";
|
|
1257
1292
|
if (t.validator) {
|
|
1258
|
-
const
|
|
1259
|
-
if (typeof
|
|
1260
|
-
if (
|
|
1293
|
+
const u = yield Promise.resolve(t.validator(a, t));
|
|
1294
|
+
if (typeof u == "string") return u;
|
|
1295
|
+
if (u === !1) return t.message || "校验失败";
|
|
1261
1296
|
}
|
|
1262
1297
|
}
|
|
1263
|
-
}),
|
|
1264
|
-
const { type:
|
|
1265
|
-
switch (
|
|
1298
|
+
}), ao = (a, e) => {
|
|
1299
|
+
const { type: s, message: t } = e;
|
|
1300
|
+
switch (s) {
|
|
1266
1301
|
case "string":
|
|
1267
|
-
if (typeof
|
|
1302
|
+
if (typeof a != "string") return t || "必须是字符串";
|
|
1268
1303
|
break;
|
|
1269
1304
|
case "number":
|
|
1270
|
-
if (typeof
|
|
1305
|
+
if (typeof a != "number" || isNaN(a)) return t || "必须是数字";
|
|
1271
1306
|
break;
|
|
1272
1307
|
case "integer":
|
|
1273
|
-
if (!Number.isInteger(
|
|
1308
|
+
if (!Number.isInteger(a)) return t || "必须是整数";
|
|
1274
1309
|
break;
|
|
1275
1310
|
case "boolean":
|
|
1276
|
-
if (typeof
|
|
1311
|
+
if (typeof a != "boolean") return t || "必须是布尔值";
|
|
1277
1312
|
break;
|
|
1278
1313
|
case "array":
|
|
1279
|
-
if (!Array.isArray(
|
|
1314
|
+
if (!Array.isArray(a)) return t || "必须是数组";
|
|
1280
1315
|
break;
|
|
1281
1316
|
case "object":
|
|
1282
|
-
if (typeof
|
|
1317
|
+
if (typeof a != "object" || a === null) return t || "必须是对象";
|
|
1283
1318
|
break;
|
|
1284
1319
|
case "email":
|
|
1285
|
-
if (!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(
|
|
1320
|
+
if (!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(a)) return t || "邮箱格式不正确";
|
|
1286
1321
|
break;
|
|
1287
1322
|
case "regexp":
|
|
1288
|
-
if (e.pattern && !e.pattern.test(String(
|
|
1323
|
+
if (e.pattern && !e.pattern.test(String(a)))
|
|
1289
1324
|
return e.message || "格式不匹配";
|
|
1290
1325
|
break;
|
|
1291
1326
|
}
|
|
1292
|
-
},
|
|
1293
|
-
const { min:
|
|
1294
|
-
if (
|
|
1295
|
-
if (
|
|
1296
|
-
return i || (
|
|
1297
|
-
if (
|
|
1298
|
-
return i || (
|
|
1299
|
-
if (t !== void 0 &&
|
|
1300
|
-
return i || (
|
|
1327
|
+
}, no = (a, e) => {
|
|
1328
|
+
const { min: s, max: t, len: o, message: i, type: d } = e, u = d === "number" || d === "integer" || d === "float", r = u && typeof a == "number" ? a : a == null ? void 0 : a.length;
|
|
1329
|
+
if (r !== void 0) {
|
|
1330
|
+
if (o !== void 0 && r !== o)
|
|
1331
|
+
return i || (u ? `值必须等于 ${o}` : `长度必须为 ${o}`);
|
|
1332
|
+
if (s !== void 0 && r < s)
|
|
1333
|
+
return i || (u ? `最小值不能小于 ${s}` : `长度不能小于 ${s}`);
|
|
1334
|
+
if (t !== void 0 && r > t)
|
|
1335
|
+
return i || (u ? `最大值不能大于 ${t}` : `长度不能大于 ${t}`);
|
|
1301
1336
|
}
|
|
1302
|
-
},
|
|
1337
|
+
}, ro = {
|
|
1303
1338
|
key: 0,
|
|
1304
1339
|
class: "star"
|
|
1305
|
-
},
|
|
1340
|
+
}, io = { class: "f-form-item__content" }, co = {
|
|
1306
1341
|
key: 0,
|
|
1307
1342
|
class: "f-form-item__error"
|
|
1308
|
-
},
|
|
1343
|
+
}, uo = /* @__PURE__ */ S({
|
|
1309
1344
|
__name: "FFormItem",
|
|
1310
1345
|
props: {
|
|
1311
1346
|
label: {},
|
|
1312
1347
|
prop: {}
|
|
1313
1348
|
},
|
|
1314
|
-
setup(
|
|
1315
|
-
const
|
|
1316
|
-
var
|
|
1317
|
-
return ((
|
|
1318
|
-
}),
|
|
1319
|
-
var
|
|
1320
|
-
return ((
|
|
1321
|
-
}),
|
|
1322
|
-
if (!(t != null && t.rules) || !
|
|
1323
|
-
const
|
|
1324
|
-
return Array.isArray(
|
|
1325
|
-
}),
|
|
1326
|
-
if (!
|
|
1327
|
-
const
|
|
1328
|
-
return
|
|
1329
|
-
}),
|
|
1330
|
-
|
|
1349
|
+
setup(a, { expose: e }) {
|
|
1350
|
+
const s = a, t = qe("FFormContext"), o = V(""), i = g(() => {
|
|
1351
|
+
var _;
|
|
1352
|
+
return ((_ = t == null ? void 0 : t.labelPosition) == null ? void 0 : _.value) || "right";
|
|
1353
|
+
}), d = g(() => {
|
|
1354
|
+
var _;
|
|
1355
|
+
return ((_ = t == null ? void 0 : t.size) == null ? void 0 : _.value) || "default";
|
|
1356
|
+
}), u = g(() => {
|
|
1357
|
+
if (!(t != null && t.rules) || !s.prop) return [];
|
|
1358
|
+
const _ = t.rules[s.prop] || [];
|
|
1359
|
+
return Array.isArray(_) ? _ : [_];
|
|
1360
|
+
}), r = g(() => u.value.some((_) => _.required)), v = () => ie(null, null, function* () {
|
|
1361
|
+
if (!s.prop || !t) return;
|
|
1362
|
+
const _ = t.model[s.prop], f = yield lo(_, u.value);
|
|
1363
|
+
return o.value = f || "", f;
|
|
1364
|
+
}), y = () => {
|
|
1365
|
+
o.value = "";
|
|
1331
1366
|
};
|
|
1332
|
-
return
|
|
1333
|
-
|
|
1334
|
-
}),
|
|
1335
|
-
|
|
1336
|
-
}),
|
|
1337
|
-
|
|
1338
|
-
}), e({ validate:
|
|
1339
|
-
var
|
|
1340
|
-
return l(),
|
|
1341
|
-
class:
|
|
1342
|
-
`is-label-${
|
|
1343
|
-
`is-size-${
|
|
1344
|
-
{ "is-error":
|
|
1367
|
+
return Ie("FFormItemContext", { errorMsg: o, validate: v }), Me(() => {
|
|
1368
|
+
s.prop && (t != null && t.registerField) && t.registerField({ prop: s.prop, validate: v, clearValidate: y });
|
|
1369
|
+
}), he(() => {
|
|
1370
|
+
s.prop && (t != null && t.unregisterField) && t.unregisterField(s.prop);
|
|
1371
|
+
}), ce(() => t == null ? void 0 : t.model[s.prop], () => {
|
|
1372
|
+
o.value && v();
|
|
1373
|
+
}), e({ validate: v, clearValidate: y }), (_, f) => {
|
|
1374
|
+
var m;
|
|
1375
|
+
return l(), n("div", {
|
|
1376
|
+
class: M(["f-form-item", [
|
|
1377
|
+
`is-label-${c(i)}`,
|
|
1378
|
+
`is-size-${c(d)}`,
|
|
1379
|
+
{ "is-error": c(o) }
|
|
1345
1380
|
]])
|
|
1346
1381
|
}, [
|
|
1347
|
-
|
|
1382
|
+
_.label ? (l(), n("label", {
|
|
1348
1383
|
key: 0,
|
|
1349
1384
|
class: "f-form-item__label",
|
|
1350
|
-
style:
|
|
1351
|
-
width:
|
|
1352
|
-
textAlign:
|
|
1385
|
+
style: O({
|
|
1386
|
+
width: c(i) === "top" ? "100%" : (m = c(t)) == null ? void 0 : m.labelWidth,
|
|
1387
|
+
textAlign: c(i) === "top" ? "left" : c(i)
|
|
1353
1388
|
})
|
|
1354
1389
|
}, [
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
], 4)) :
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
default:
|
|
1362
|
-
|
|
1390
|
+
c(r) ? (l(), n("span", ro, "*")) : k("", !0),
|
|
1391
|
+
ne(" " + R(_.label) + ": ", 1)
|
|
1392
|
+
], 4)) : k("", !0),
|
|
1393
|
+
h("div", io, [
|
|
1394
|
+
z(_.$slots, "default", {}, void 0, !0),
|
|
1395
|
+
H(ae, { name: "err-slide" }, {
|
|
1396
|
+
default: E(() => [
|
|
1397
|
+
c(o) ? (l(), n("p", co, R(c(o)), 1)) : k("", !0)
|
|
1363
1398
|
]),
|
|
1364
1399
|
_: 1
|
|
1365
1400
|
})
|
|
@@ -1367,12 +1402,12 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1367
1402
|
], 2);
|
|
1368
1403
|
};
|
|
1369
1404
|
}
|
|
1370
|
-
}),
|
|
1405
|
+
}), po = /* @__PURE__ */ I(uo, [["__scopeId", "data-v-c3d6ec01"]]), fo = { class: "f-checkbox__wrapper" }, _o = ["checked", "disabled"], mo = {
|
|
1371
1406
|
key: 0,
|
|
1372
1407
|
class: "f-checkbox__label"
|
|
1373
|
-
},
|
|
1408
|
+
}, vo = /* @__PURE__ */ S({
|
|
1374
1409
|
__name: "FCheckbox",
|
|
1375
|
-
props: /* @__PURE__ */
|
|
1410
|
+
props: /* @__PURE__ */ U({
|
|
1376
1411
|
label: {},
|
|
1377
1412
|
disabled: { type: Boolean }
|
|
1378
1413
|
}, {
|
|
@@ -1380,92 +1415,627 @@ const Ee = /* @__PURE__ */ g({
|
|
|
1380
1415
|
modelModifiers: {}
|
|
1381
1416
|
}),
|
|
1382
1417
|
emits: ["update:modelValue"],
|
|
1383
|
-
setup(
|
|
1384
|
-
const e =
|
|
1385
|
-
if (
|
|
1386
|
-
const i =
|
|
1418
|
+
setup(a) {
|
|
1419
|
+
const e = te(a, "modelValue"), s = a, t = (o) => {
|
|
1420
|
+
if (s.disabled) return;
|
|
1421
|
+
const i = o.target;
|
|
1387
1422
|
e.value = i.checked;
|
|
1388
1423
|
};
|
|
1389
|
-
return (
|
|
1390
|
-
class:
|
|
1424
|
+
return (o, i) => (l(), n("label", {
|
|
1425
|
+
class: M(["f-checkbox", { "is-disabled": o.disabled }])
|
|
1391
1426
|
}, [
|
|
1392
|
-
|
|
1393
|
-
|
|
1427
|
+
h("span", fo, [
|
|
1428
|
+
h("input", {
|
|
1394
1429
|
type: "checkbox",
|
|
1395
1430
|
checked: e.value,
|
|
1396
|
-
disabled:
|
|
1431
|
+
disabled: o.disabled,
|
|
1397
1432
|
onChange: t
|
|
1398
|
-
}, null, 40,
|
|
1399
|
-
i[0] || (i[0] =
|
|
1433
|
+
}, null, 40, _o),
|
|
1434
|
+
i[0] || (i[0] = h("span", { class: "f-checkbox__checkmark" }, null, -1))
|
|
1400
1435
|
]),
|
|
1401
|
-
|
|
1436
|
+
o.label ? (l(), n("span", mo, R(o.label), 1)) : k("", !0)
|
|
1402
1437
|
], 2));
|
|
1403
1438
|
}
|
|
1404
|
-
}),
|
|
1439
|
+
}), ho = /* @__PURE__ */ I(vo, [["__scopeId", "data-v-633b283a"]]), go = { class: "alert__body" }, yo = { class: "alert__title" }, bo = { class: "alert__content" }, $o = /* @__PURE__ */ S({
|
|
1440
|
+
__name: "FAlert",
|
|
1441
|
+
props: {
|
|
1442
|
+
type: { default: "info" },
|
|
1443
|
+
title: {},
|
|
1444
|
+
content: {}
|
|
1445
|
+
},
|
|
1446
|
+
setup(a) {
|
|
1447
|
+
const e = a, s = g(() => ({
|
|
1448
|
+
success: { icon: it, label: "Success" },
|
|
1449
|
+
error: { icon: rt, label: "Error" },
|
|
1450
|
+
warning: { icon: nt, label: "Warning" },
|
|
1451
|
+
info: { icon: at, label: "Tips" }
|
|
1452
|
+
})[e.type]);
|
|
1453
|
+
return (t, o) => {
|
|
1454
|
+
var i;
|
|
1455
|
+
return l(), n("div", {
|
|
1456
|
+
class: M(["alert", `alert--${t.type}`])
|
|
1457
|
+
}, [
|
|
1458
|
+
H(G, { class: "alert__icon" }, {
|
|
1459
|
+
default: E(() => [
|
|
1460
|
+
(l(), j(se(c(s).icon)))
|
|
1461
|
+
]),
|
|
1462
|
+
_: 1
|
|
1463
|
+
}),
|
|
1464
|
+
h("div", go, [
|
|
1465
|
+
h("h4", yo, R((i = t.title) != null ? i : c(s).label), 1),
|
|
1466
|
+
h("div", bo, [
|
|
1467
|
+
z(t.$slots, "default", {}, () => [
|
|
1468
|
+
ne(R(t.content), 1)
|
|
1469
|
+
], !0)
|
|
1470
|
+
])
|
|
1471
|
+
])
|
|
1472
|
+
], 2);
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
}), ko = /* @__PURE__ */ I($o, [["__scopeId", "data-v-f16678ef"]]), wo = { class: "f-editor__toolbar" }, Fo = { class: "f-editor__status" }, Co = { class: "f-editor__lines" }, zo = { class: "f-editor__code-wrapper" }, So = ["innerHTML"], Io = ["rows", "readonly", "placeholder"], me = 17.6, Ce = 12, Mo = 180, To = 1500, xo = /* @__PURE__ */ S({
|
|
1476
|
+
__name: "FEditor",
|
|
1477
|
+
props: /* @__PURE__ */ U({
|
|
1478
|
+
placeholder: {},
|
|
1479
|
+
rows: {},
|
|
1480
|
+
language: {},
|
|
1481
|
+
readonly: { type: Boolean },
|
|
1482
|
+
showLine: { type: Boolean },
|
|
1483
|
+
height: { default: 420 }
|
|
1484
|
+
}, {
|
|
1485
|
+
modelValue: { default: "" },
|
|
1486
|
+
modelModifiers: {}
|
|
1487
|
+
}),
|
|
1488
|
+
emits: /* @__PURE__ */ U(["blur"], ["update:modelValue"]),
|
|
1489
|
+
setup(a, { emit: e }) {
|
|
1490
|
+
const s = te(a, "modelValue"), t = a, o = e, i = V(), d = V(), u = V(), r = V(0), v = V(1), y = V(0), _ = (F) => {
|
|
1491
|
+
if (F.key === "Tab") {
|
|
1492
|
+
F.preventDefault();
|
|
1493
|
+
const C = i.value;
|
|
1494
|
+
if (!C) return;
|
|
1495
|
+
const B = C.selectionStart, P = C.selectionEnd;
|
|
1496
|
+
s.value = s.value.slice(0, B) + " " + s.value.slice(P), _e(() => {
|
|
1497
|
+
C.selectionStart = C.selectionEnd = B + 2;
|
|
1498
|
+
});
|
|
1499
|
+
return;
|
|
1500
|
+
}
|
|
1501
|
+
if (F.key === "Enter") {
|
|
1502
|
+
const C = i.value;
|
|
1503
|
+
if (!C) return;
|
|
1504
|
+
const B = C.selectionStart, P = s.value.lastIndexOf(`
|
|
1505
|
+
`, B - 1) + 1, J = s.value.slice(P, B), X = J.match(/^\s*/), re = X ? X[0] : "", Z = J.trim().slice(-1), ee = Z === "{" || Z === "[" ? " " : "";
|
|
1506
|
+
if (ee) {
|
|
1507
|
+
F.preventDefault();
|
|
1508
|
+
const oe = `
|
|
1509
|
+
` + re + ee;
|
|
1510
|
+
s.value = s.value.slice(0, B) + oe + s.value.slice(B), _e(() => {
|
|
1511
|
+
C.selectionStart = C.selectionEnd = B + oe.length;
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}, f = t.height, m = g(() => {
|
|
1516
|
+
const F = Ce * 2 + w.value * me;
|
|
1517
|
+
return Math.min(f, Math.max(Mo, F));
|
|
1518
|
+
}), p = () => {
|
|
1519
|
+
const F = i.value;
|
|
1520
|
+
F && (y.value = F.selectionStart, v.value = s.value.slice(0, F.selectionStart).split(`
|
|
1521
|
+
`).length);
|
|
1522
|
+
}, $ = g(() => s.value.split(`
|
|
1523
|
+
`)), w = g(() => $.value.length), T = g(() => w.value > To);
|
|
1524
|
+
let D = null;
|
|
1525
|
+
const q = V(s.value);
|
|
1526
|
+
ce(s, (F) => {
|
|
1527
|
+
D && clearTimeout(D);
|
|
1528
|
+
const C = F.length > 2e4 ? 120 : 0;
|
|
1529
|
+
D = setTimeout(() => {
|
|
1530
|
+
q.value = F;
|
|
1531
|
+
}, C);
|
|
1532
|
+
}, { immediate: !0 });
|
|
1533
|
+
const b = g(() => {
|
|
1534
|
+
if (t.language !== "json" || !q.value.trim()) return null;
|
|
1535
|
+
try {
|
|
1536
|
+
return JSON.parse(q.value), null;
|
|
1537
|
+
} catch (F) {
|
|
1538
|
+
const C = F.message || "", B = C.match(/position (\d+)/);
|
|
1539
|
+
if (B) return parseInt(B[1], 10);
|
|
1540
|
+
const P = C.match(/line (\d+) column (\d+)/);
|
|
1541
|
+
if (P) {
|
|
1542
|
+
const J = parseInt(P[1], 10), X = parseInt(P[2], 10), re = q.value.split(`
|
|
1543
|
+
`);
|
|
1544
|
+
let Z = 0;
|
|
1545
|
+
for (let ee = 0; ee < J - 1; ee++) Z += re[ee].length + 1;
|
|
1546
|
+
return Z + X - 1;
|
|
1547
|
+
}
|
|
1548
|
+
return q.value.length;
|
|
1549
|
+
}
|
|
1550
|
+
}), Y = g(() => b.value === null ? null : q.value.slice(0, b.value).split(`
|
|
1551
|
+
`).length), x = g(() => b.value === null), A = () => {
|
|
1552
|
+
if (t.language === "json")
|
|
1553
|
+
try {
|
|
1554
|
+
s.value = JSON.stringify(JSON.parse(s.value), null, 2);
|
|
1555
|
+
} catch (F) {
|
|
1556
|
+
}
|
|
1557
|
+
}, N = (F) => F.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), le = (F) => N(F).replace(/("(?:\\.|[^"\\])*")(\s*:)?/g, (B, P, J) => `<span class="${J ? "tok-key" : "tok-string"}">${P}</span>${J || ""}`).replace(/\b(true|false|null)\b/g, '<span class="tok-keyword">$1</span>').replace(/(-?\b\d+\.?\d*(?:[eE][+-]?\d+)?\b)/g, '<span class="tok-number">$1</span>').replace(/([{}[\],])/g, '<span class="tok-punct">$1</span>'), pe = g(() => {
|
|
1558
|
+
const C = q.value.split(`
|
|
1559
|
+
`), B = b.value, P = Y.value;
|
|
1560
|
+
let J = 0;
|
|
1561
|
+
return C.map((X, re) => {
|
|
1562
|
+
const Z = re + 1, ee = J;
|
|
1563
|
+
J += X.length + 1;
|
|
1564
|
+
let oe;
|
|
1565
|
+
if (P === Z && B !== null) {
|
|
1566
|
+
const fe = B - ee, ye = X.slice(0, Math.max(0, fe)), Ae = X.slice(fe, fe + 1) || " ", be = X.slice(fe + 1);
|
|
1567
|
+
oe = (T.value ? N(ye) : le(ye)) + `<span class="tok-error">${N(Ae)}</span>` + (T.value ? N(be) : le(be));
|
|
1568
|
+
} else t.language === "json" && !T.value ? oe = le(X) : oe = N(X);
|
|
1569
|
+
return { lineNo: Z, html: oe || " " };
|
|
1570
|
+
});
|
|
1571
|
+
}), K = () => {
|
|
1572
|
+
i.value && (r.value = i.value.scrollTop, d.value && (d.value.scrollTop = i.value.scrollTop, d.value.scrollLeft = i.value.scrollLeft), u.value && (u.value.scrollTop = i.value.scrollTop));
|
|
1573
|
+
}, Q = () => {
|
|
1574
|
+
K(), p();
|
|
1575
|
+
};
|
|
1576
|
+
return (F, C) => {
|
|
1577
|
+
var B;
|
|
1578
|
+
return l(), n("div", {
|
|
1579
|
+
class: M(["f-editor", { "f-editor--invalid": !c(x) }])
|
|
1580
|
+
}, [
|
|
1581
|
+
h("div", wo, [
|
|
1582
|
+
h("span", Fo, [
|
|
1583
|
+
h("span", Co, R(c(w)) + " 行", 1),
|
|
1584
|
+
c(T) ? (l(), j(Re, {
|
|
1585
|
+
key: 0,
|
|
1586
|
+
color: "orange",
|
|
1587
|
+
type: "square",
|
|
1588
|
+
effect: "plain"
|
|
1589
|
+
}, {
|
|
1590
|
+
default: E(() => C[2] || (C[2] = [
|
|
1591
|
+
ne("大文件模式")
|
|
1592
|
+
])),
|
|
1593
|
+
_: 1,
|
|
1594
|
+
__: [2]
|
|
1595
|
+
})) : k("", !0)
|
|
1596
|
+
]),
|
|
1597
|
+
F.language === "json" ? (l(), n("button", {
|
|
1598
|
+
key: 0,
|
|
1599
|
+
type: "button",
|
|
1600
|
+
class: "f-editor__format",
|
|
1601
|
+
onClick: A
|
|
1602
|
+
}, " 格式化 ")) : k("", !0)
|
|
1603
|
+
]),
|
|
1604
|
+
h("div", {
|
|
1605
|
+
class: "f-editor__body",
|
|
1606
|
+
style: O({ height: `${c(m)}px` })
|
|
1607
|
+
}, [
|
|
1608
|
+
F.showLine ? (l(), n("div", {
|
|
1609
|
+
key: 0,
|
|
1610
|
+
ref_key: "gutterRef",
|
|
1611
|
+
ref: u,
|
|
1612
|
+
class: "f-editor__gutter"
|
|
1613
|
+
}, [
|
|
1614
|
+
(l(!0), n(L, null, W(c(w), (P) => (l(), n("div", {
|
|
1615
|
+
key: P,
|
|
1616
|
+
class: M(["f-editor__gutter-line", { "f-editor__gutter-line--active": P === c(v) }])
|
|
1617
|
+
}, R(P), 3))), 128))
|
|
1618
|
+
], 512)) : k("", !0),
|
|
1619
|
+
h("div", zo, [
|
|
1620
|
+
h("div", {
|
|
1621
|
+
class: "f-editor__active-line",
|
|
1622
|
+
style: O({
|
|
1623
|
+
top: `${Ce + (c(v) - 1) * me - c(r)}px`,
|
|
1624
|
+
height: `${me}px`
|
|
1625
|
+
})
|
|
1626
|
+
}, null, 4),
|
|
1627
|
+
h("pre", {
|
|
1628
|
+
ref_key: "highlightRef",
|
|
1629
|
+
ref: d,
|
|
1630
|
+
class: "f-editor__highlight"
|
|
1631
|
+
}, [
|
|
1632
|
+
(l(!0), n(L, null, W(c(pe), (P) => (l(), n("span", {
|
|
1633
|
+
key: P.lineNo,
|
|
1634
|
+
class: "f-editor__line",
|
|
1635
|
+
innerHTML: P.html + `
|
|
1636
|
+
`
|
|
1637
|
+
}, null, 8, So))), 128))
|
|
1638
|
+
], 512),
|
|
1639
|
+
de(h("textarea", {
|
|
1640
|
+
ref_key: "textareaRef",
|
|
1641
|
+
ref: i,
|
|
1642
|
+
"onUpdate:modelValue": C[0] || (C[0] = (P) => s.value = P),
|
|
1643
|
+
rows: (B = F.rows) != null ? B : 8,
|
|
1644
|
+
readonly: "readonly" in F ? F.readonly : c(ve),
|
|
1645
|
+
class: "f-editor__textarea",
|
|
1646
|
+
spellcheck: "false",
|
|
1647
|
+
placeholder: F.placeholder,
|
|
1648
|
+
onKeydown: _,
|
|
1649
|
+
onScroll: K,
|
|
1650
|
+
onInput: Q,
|
|
1651
|
+
onClick: p,
|
|
1652
|
+
onKeyup: p,
|
|
1653
|
+
onBlur: C[1] || (C[1] = (P) => o("blur"))
|
|
1654
|
+
}, null, 40, Io), [
|
|
1655
|
+
[Se, s.value]
|
|
1656
|
+
])
|
|
1657
|
+
])
|
|
1658
|
+
], 4)
|
|
1659
|
+
], 2);
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
}), Bo = /* @__PURE__ */ I(xo, [["__scopeId", "data-v-6d590649"]]), Vo = { class: "f-table" }, Ro = {
|
|
1663
|
+
key: 0,
|
|
1664
|
+
class: "f-table__loading"
|
|
1665
|
+
}, Ho = { class: "f-table__inner" }, Do = {
|
|
1666
|
+
key: 0,
|
|
1667
|
+
class: "f-table__col--index"
|
|
1668
|
+
}, Ao = { class: "f-table__head" }, Eo = {
|
|
1669
|
+
key: 0,
|
|
1670
|
+
class: "f-table__th f-table__th--index"
|
|
1671
|
+
}, Oo = { class: "f-table__th-inner" }, Po = { class: "f-table__body" }, Lo = {
|
|
1672
|
+
key: 0,
|
|
1673
|
+
class: "f-table__spacer"
|
|
1674
|
+
}, jo = ["colspan"], Wo = {
|
|
1675
|
+
key: 0,
|
|
1676
|
+
class: "f-table__td f-table__td--index"
|
|
1677
|
+
}, No = { key: 2 }, Go = ["colspan"], Uo = {
|
|
1678
|
+
key: 3,
|
|
1679
|
+
class: "f-table__spacer"
|
|
1680
|
+
}, Jo = ["colspan"], qo = /* @__PURE__ */ S({
|
|
1681
|
+
__name: "FTable",
|
|
1682
|
+
props: {
|
|
1683
|
+
data: {},
|
|
1684
|
+
columns: {},
|
|
1685
|
+
rowHeight: { default: 40 },
|
|
1686
|
+
overscan: { default: 5 },
|
|
1687
|
+
showIndex: { type: Boolean, default: !0 },
|
|
1688
|
+
loading: { type: Boolean, default: !1 },
|
|
1689
|
+
loadingText: { default: "加载中..." },
|
|
1690
|
+
emptyText: { default: "暂无数据" }
|
|
1691
|
+
},
|
|
1692
|
+
setup(a) {
|
|
1693
|
+
const e = a, s = V(null), t = V(0), o = V(0), i = g(() => e.columns.length + (e.showIndex ? 1 : 0)), d = g(() => {
|
|
1694
|
+
const p = Math.floor(t.value / e.rowHeight) - e.overscan;
|
|
1695
|
+
return Math.max(0, p);
|
|
1696
|
+
}), u = g(() => {
|
|
1697
|
+
const p = Math.ceil(o.value / e.rowHeight), $ = d.value + p + e.overscan * 2;
|
|
1698
|
+
return Math.min(e.data.length - 1, $);
|
|
1699
|
+
}), r = g(
|
|
1700
|
+
() => e.data.slice(d.value, u.value + 1).map((p, $) => ({
|
|
1701
|
+
row: p,
|
|
1702
|
+
index: d.value + $
|
|
1703
|
+
}))
|
|
1704
|
+
), v = g(() => d.value * e.rowHeight), y = g(
|
|
1705
|
+
() => Math.max(0, (e.data.length - u.value - 1) * e.rowHeight)
|
|
1706
|
+
), _ = (p) => {
|
|
1707
|
+
t.value = p.target.scrollTop;
|
|
1708
|
+
}, f = (p) => p == null ? "-" : typeof p == "object" ? JSON.stringify(p) : String(p);
|
|
1709
|
+
let m = null;
|
|
1710
|
+
return Me(() => {
|
|
1711
|
+
s.value && (o.value = s.value.clientHeight, m = new ResizeObserver(([p]) => {
|
|
1712
|
+
p && (o.value = p.contentRect.height);
|
|
1713
|
+
}), m.observe(s.value));
|
|
1714
|
+
}), Xe(() => {
|
|
1715
|
+
m == null || m.disconnect();
|
|
1716
|
+
}), ce(() => e.data, () => {
|
|
1717
|
+
s.value && (s.value.scrollTop = 0), t.value = 0;
|
|
1718
|
+
}), (p, $) => (l(), n("div", Vo, [
|
|
1719
|
+
p.loading ? (l(), n("div", Ro, [
|
|
1720
|
+
$[0] || ($[0] = h("span", { class: "spinner" }, null, -1)),
|
|
1721
|
+
h("span", null, R(p.loadingText), 1)
|
|
1722
|
+
])) : k("", !0),
|
|
1723
|
+
h("div", {
|
|
1724
|
+
class: "f-table__scroll",
|
|
1725
|
+
ref_key: "scrollEl",
|
|
1726
|
+
ref: s,
|
|
1727
|
+
onScroll: _
|
|
1728
|
+
}, [
|
|
1729
|
+
h("table", Ho, [
|
|
1730
|
+
h("colgroup", null, [
|
|
1731
|
+
p.showIndex ? (l(), n("col", Do)) : k("", !0),
|
|
1732
|
+
(l(!0), n(L, null, W(p.columns, (w) => {
|
|
1733
|
+
var T, D;
|
|
1734
|
+
return l(), n("col", {
|
|
1735
|
+
key: w.key,
|
|
1736
|
+
style: O({
|
|
1737
|
+
width: (T = w.width) != null ? T : "auto",
|
|
1738
|
+
minWidth: (D = w.minWidth) != null ? D : "120px"
|
|
1739
|
+
})
|
|
1740
|
+
}, null, 4);
|
|
1741
|
+
}), 128))
|
|
1742
|
+
]),
|
|
1743
|
+
h("thead", Ao, [
|
|
1744
|
+
h("tr", null, [
|
|
1745
|
+
p.showIndex ? (l(), n("th", Eo, "#")) : k("", !0),
|
|
1746
|
+
(l(!0), n(L, null, W(p.columns, (w) => (l(), n("th", {
|
|
1747
|
+
key: w.key,
|
|
1748
|
+
class: M(["f-table__th", w.thClass])
|
|
1749
|
+
}, [
|
|
1750
|
+
z(p.$slots, `header-${w.key}`, { column: w }, () => [
|
|
1751
|
+
h("div", Oo, [
|
|
1752
|
+
h("span", null, R(w.label), 1)
|
|
1753
|
+
])
|
|
1754
|
+
], !0)
|
|
1755
|
+
], 2))), 128))
|
|
1756
|
+
])
|
|
1757
|
+
]),
|
|
1758
|
+
h("tbody", Po, [
|
|
1759
|
+
c(v) > 0 ? (l(), n("tr", Lo, [
|
|
1760
|
+
h("td", {
|
|
1761
|
+
colspan: c(i),
|
|
1762
|
+
style: O({ height: c(v) + "px" })
|
|
1763
|
+
}, null, 12, jo)
|
|
1764
|
+
])) : k("", !0),
|
|
1765
|
+
c(r).length > 0 ? (l(!0), n(L, { key: 1 }, W(c(r), ({ row: w, index: T }) => (l(), n("tr", {
|
|
1766
|
+
key: T,
|
|
1767
|
+
class: "f-table__row"
|
|
1768
|
+
}, [
|
|
1769
|
+
p.showIndex ? (l(), n("td", Wo, R(T + 1), 1)) : k("", !0),
|
|
1770
|
+
(l(!0), n(L, null, W(p.columns, (D) => (l(), n("td", {
|
|
1771
|
+
key: D.key,
|
|
1772
|
+
class: M(["f-table__td", D.tdClass])
|
|
1773
|
+
}, [
|
|
1774
|
+
p.$slots[`cell-${D.key}`] ? z(p.$slots, `cell-${D.key}`, {
|
|
1775
|
+
key: 0,
|
|
1776
|
+
row: w,
|
|
1777
|
+
value: w[D.key],
|
|
1778
|
+
index: T,
|
|
1779
|
+
col: D
|
|
1780
|
+
}, void 0, !0) : p.$slots.cell ? z(p.$slots, "cell", {
|
|
1781
|
+
key: 1,
|
|
1782
|
+
row: w,
|
|
1783
|
+
value: w[D.key],
|
|
1784
|
+
index: T,
|
|
1785
|
+
col: D
|
|
1786
|
+
}, void 0, !0) : (l(), j(He, {
|
|
1787
|
+
key: 2,
|
|
1788
|
+
content: f(w[D.key])
|
|
1789
|
+
}, {
|
|
1790
|
+
default: E(() => [
|
|
1791
|
+
ne(R(f(w[D.key])), 1)
|
|
1792
|
+
]),
|
|
1793
|
+
_: 2
|
|
1794
|
+
}, 1032, ["content"]))
|
|
1795
|
+
], 2))), 128))
|
|
1796
|
+
]))), 128)) : p.loading ? k("", !0) : (l(), n("tr", No, [
|
|
1797
|
+
h("td", {
|
|
1798
|
+
colspan: c(i),
|
|
1799
|
+
class: "f-table__empty"
|
|
1800
|
+
}, [
|
|
1801
|
+
z(p.$slots, "empty", {}, () => [
|
|
1802
|
+
ne(R(p.emptyText), 1)
|
|
1803
|
+
], !0)
|
|
1804
|
+
], 8, Go)
|
|
1805
|
+
])),
|
|
1806
|
+
c(y) > 0 ? (l(), n("tr", Uo, [
|
|
1807
|
+
h("td", {
|
|
1808
|
+
colspan: c(i),
|
|
1809
|
+
style: O({ height: c(y) + "px" })
|
|
1810
|
+
}, null, 12, Jo)
|
|
1811
|
+
])) : k("", !0)
|
|
1812
|
+
])
|
|
1813
|
+
])
|
|
1814
|
+
], 544)
|
|
1815
|
+
]));
|
|
1816
|
+
}
|
|
1817
|
+
}), Xo = /* @__PURE__ */ I(qo, [["__scopeId", "data-v-22daf8be"]]), Yo = /* @__PURE__ */ S({
|
|
1818
|
+
__name: "FDialog",
|
|
1819
|
+
props: /* @__PURE__ */ U({
|
|
1820
|
+
maskClosable: { type: Boolean, default: !0 },
|
|
1821
|
+
maskColor: { default: "black" },
|
|
1822
|
+
showMask: { type: Boolean, default: !0 }
|
|
1823
|
+
}, {
|
|
1824
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1825
|
+
modelModifiers: {}
|
|
1826
|
+
}),
|
|
1827
|
+
emits: ["update:modelValue"],
|
|
1828
|
+
setup(a) {
|
|
1829
|
+
const e = a, s = te(a, "modelValue"), t = () => {
|
|
1830
|
+
e.maskClosable && (s.value = !1);
|
|
1831
|
+
}, o = g(() => {
|
|
1832
|
+
if (!e.showMask) return "transparent";
|
|
1833
|
+
switch (e.maskColor) {
|
|
1834
|
+
case "white":
|
|
1835
|
+
return "rgba(255, 255, 255, 0.5)";
|
|
1836
|
+
case "black":
|
|
1837
|
+
return "rgba(0, 0, 0, 0.5)";
|
|
1838
|
+
case "transparent":
|
|
1839
|
+
return "transparent";
|
|
1840
|
+
default:
|
|
1841
|
+
return "rgba(0, 0, 0, 0.5)";
|
|
1842
|
+
}
|
|
1843
|
+
});
|
|
1844
|
+
return (i, d) => (l(), j(ge, { to: "body" }, [
|
|
1845
|
+
H(ae, { name: "fade" }, {
|
|
1846
|
+
default: E(() => [
|
|
1847
|
+
s.value ? (l(), n("div", {
|
|
1848
|
+
key: 0,
|
|
1849
|
+
class: "f-dialog-mask",
|
|
1850
|
+
style: O({ backgroundColor: c(o) }),
|
|
1851
|
+
onClick: t
|
|
1852
|
+
}, [
|
|
1853
|
+
h("div", {
|
|
1854
|
+
class: "f-dialog-container",
|
|
1855
|
+
onClick: d[0] || (d[0] = ue(() => {
|
|
1856
|
+
}, ["stop"]))
|
|
1857
|
+
}, [
|
|
1858
|
+
z(i.$slots, "default", {}, void 0, !0)
|
|
1859
|
+
])
|
|
1860
|
+
], 4)) : k("", !0)
|
|
1861
|
+
]),
|
|
1862
|
+
_: 3
|
|
1863
|
+
})
|
|
1864
|
+
]));
|
|
1865
|
+
}
|
|
1866
|
+
}), Ko = /* @__PURE__ */ I(Yo, [["__scopeId", "data-v-31496822"]]), Qo = { class: "f-upload" }, Zo = { class: "f-upload__label" }, el = ["accept"], tl = {
|
|
1867
|
+
key: 0,
|
|
1868
|
+
class: "f-upload__file-item"
|
|
1869
|
+
}, sl = { class: "f-upload__file-info" }, ol = { class: "f-upload__file-name" }, ll = /* @__PURE__ */ S({
|
|
1870
|
+
__name: "FUpload",
|
|
1871
|
+
props: /* @__PURE__ */ U({
|
|
1872
|
+
accept: {},
|
|
1873
|
+
limit: {},
|
|
1874
|
+
progress: {}
|
|
1875
|
+
}, {
|
|
1876
|
+
file: { default: "" },
|
|
1877
|
+
fileModifiers: {}
|
|
1878
|
+
}),
|
|
1879
|
+
emits: /* @__PURE__ */ U(["change", "exceed"], ["update:file"]),
|
|
1880
|
+
setup(a, { emit: e }) {
|
|
1881
|
+
const s = te(a, "file"), t = a, o = e, i = V(!1), d = V(!1), u = () => {
|
|
1882
|
+
s.value = "";
|
|
1883
|
+
}, r = (f) => {
|
|
1884
|
+
f.preventDefault(), i.value = !0;
|
|
1885
|
+
}, v = (f) => {
|
|
1886
|
+
f.preventDefault(), i.value = !1;
|
|
1887
|
+
}, y = (f) => {
|
|
1888
|
+
var p, $;
|
|
1889
|
+
f.preventDefault(), i.value = !1;
|
|
1890
|
+
const m = ($ = (p = f.dataTransfer) == null ? void 0 : p.files) == null ? void 0 : $[0];
|
|
1891
|
+
if (m) {
|
|
1892
|
+
if (t.limit && m.size > t.limit) {
|
|
1893
|
+
o("exceed", m);
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
o("change", m);
|
|
1897
|
+
}
|
|
1898
|
+
}, _ = (f) => {
|
|
1899
|
+
var p;
|
|
1900
|
+
const m = (p = f.target.files) == null ? void 0 : p[0];
|
|
1901
|
+
if (m) {
|
|
1902
|
+
if (t.limit && m.size > t.limit) {
|
|
1903
|
+
o("exceed", m);
|
|
1904
|
+
return;
|
|
1905
|
+
}
|
|
1906
|
+
o("change", m);
|
|
1907
|
+
}
|
|
1908
|
+
};
|
|
1909
|
+
return (f, m) => (l(), n("div", Qo, [
|
|
1910
|
+
h("div", {
|
|
1911
|
+
class: M(["f-upload__zone", { "f-upload--drag": c(i) }]),
|
|
1912
|
+
onDragover: r,
|
|
1913
|
+
onDragleave: v,
|
|
1914
|
+
onDrop: y
|
|
1915
|
+
}, [
|
|
1916
|
+
h("label", Zo, [
|
|
1917
|
+
h("input", {
|
|
1918
|
+
type: "file",
|
|
1919
|
+
accept: f.accept,
|
|
1920
|
+
class: "f-upload__input",
|
|
1921
|
+
onChange: _
|
|
1922
|
+
}, null, 40, el),
|
|
1923
|
+
z(f.$slots, "default", {}, () => [
|
|
1924
|
+
H(G, { size: 40 }, {
|
|
1925
|
+
default: E(() => [
|
|
1926
|
+
H(c(ct))
|
|
1927
|
+
]),
|
|
1928
|
+
_: 1
|
|
1929
|
+
}),
|
|
1930
|
+
m[2] || (m[2] = h("span", { class: "f-upload__title" }, "点击或拖拽文件至此处", -1)),
|
|
1931
|
+
m[3] || (m[3] = h("span", { class: "f-upload__hint" }, "支持 .xlsx .xls .json .txt", -1))
|
|
1932
|
+
], !0)
|
|
1933
|
+
])
|
|
1934
|
+
], 34),
|
|
1935
|
+
s.value ? (l(), n("div", tl, [
|
|
1936
|
+
H(G, null, {
|
|
1937
|
+
default: E(() => [
|
|
1938
|
+
H(c(dt))
|
|
1939
|
+
]),
|
|
1940
|
+
_: 1
|
|
1941
|
+
}),
|
|
1942
|
+
h("div", sl, [
|
|
1943
|
+
h("span", ol, R(s.value), 1),
|
|
1944
|
+
f.progress != null ? (l(), j(De, {
|
|
1945
|
+
key: 0,
|
|
1946
|
+
percent: f.progress,
|
|
1947
|
+
"show-text": ""
|
|
1948
|
+
}, null, 8, ["percent"])) : k("", !0)
|
|
1949
|
+
]),
|
|
1950
|
+
H(G, {
|
|
1951
|
+
onClick: ue(u, ["stop"]),
|
|
1952
|
+
onMouseenter: m[0] || (m[0] = (p) => d.value = !0),
|
|
1953
|
+
onMouseleave: m[1] || (m[1] = (p) => d.value = !1),
|
|
1954
|
+
style: { cursor: "pointer", transition: "color 0.2s" }
|
|
1955
|
+
}, {
|
|
1956
|
+
default: E(() => [
|
|
1957
|
+
(l(), j(se(c(d) ? c(Te) : c(xe))))
|
|
1958
|
+
]),
|
|
1959
|
+
_: 1
|
|
1960
|
+
})
|
|
1961
|
+
])) : k("", !0)
|
|
1962
|
+
]));
|
|
1963
|
+
}
|
|
1964
|
+
}), al = /* @__PURE__ */ I(ll, [["__scopeId", "data-v-07b95a32"]]), nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1405
1965
|
__proto__: null,
|
|
1406
|
-
FAffix:
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1966
|
+
FAffix: to,
|
|
1967
|
+
FAlert: ko,
|
|
1968
|
+
FAvatar: Ps,
|
|
1969
|
+
FBadge: Zs,
|
|
1970
|
+
FBreadcrumb: Cs,
|
|
1971
|
+
FButton: Ws,
|
|
1972
|
+
FCard: is,
|
|
1973
|
+
FCheckbox: ho,
|
|
1974
|
+
FCol: Ss,
|
|
1975
|
+
FContainer: Hs,
|
|
1976
|
+
FDialog: Ko,
|
|
1977
|
+
FDivider: As,
|
|
1978
|
+
FDropdown: Ve,
|
|
1979
|
+
FEditor: Bo,
|
|
1980
|
+
FForm: oo,
|
|
1981
|
+
FFormItem: po,
|
|
1982
|
+
FIcon: G,
|
|
1983
|
+
FImage: kt,
|
|
1984
|
+
FInput: Ct,
|
|
1985
|
+
FLink: Ys,
|
|
1986
|
+
FLoading: Be,
|
|
1987
|
+
FPagination: Xt,
|
|
1988
|
+
FProgress: De,
|
|
1989
|
+
FRate: Mt,
|
|
1990
|
+
FRow: Ms,
|
|
1991
|
+
FSelect: At,
|
|
1992
|
+
FSpace: Vs,
|
|
1993
|
+
FTable: Xo,
|
|
1994
|
+
FTabs: bs,
|
|
1995
|
+
FTag: Re,
|
|
1996
|
+
FText: Js,
|
|
1997
|
+
FTooltip: He,
|
|
1998
|
+
FTypography: Gs,
|
|
1999
|
+
FUpload: al
|
|
2000
|
+
}, Symbol.toStringTag, { value: "Module" })), ul = (a) => {
|
|
2001
|
+
Object.entries(nl).forEach(([e, s]) => {
|
|
2002
|
+
a.component(e, s);
|
|
1438
2003
|
});
|
|
1439
2004
|
};
|
|
1440
2005
|
export {
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
2006
|
+
to as FAffix,
|
|
2007
|
+
ko as FAlert,
|
|
2008
|
+
Ps as FAvatar,
|
|
2009
|
+
Zs as FBadge,
|
|
2010
|
+
Cs as FBreadcrumb,
|
|
2011
|
+
Ws as FButton,
|
|
2012
|
+
is as FCard,
|
|
2013
|
+
ho as FCheckbox,
|
|
2014
|
+
Ss as FCol,
|
|
2015
|
+
Hs as FContainer,
|
|
2016
|
+
Ko as FDialog,
|
|
2017
|
+
As as FDivider,
|
|
2018
|
+
Ve as FDropdown,
|
|
2019
|
+
Bo as FEditor,
|
|
2020
|
+
oo as FForm,
|
|
2021
|
+
po as FFormItem,
|
|
2022
|
+
G as FIcon,
|
|
2023
|
+
kt as FImage,
|
|
2024
|
+
Ct as FInput,
|
|
2025
|
+
Ys as FLink,
|
|
2026
|
+
Be as FLoading,
|
|
2027
|
+
Xt as FPagination,
|
|
2028
|
+
De as FProgress,
|
|
2029
|
+
Mt as FRate,
|
|
2030
|
+
Ms as FRow,
|
|
2031
|
+
At as FSelect,
|
|
2032
|
+
Vs as FSpace,
|
|
2033
|
+
Xo as FTable,
|
|
2034
|
+
bs as FTabs,
|
|
2035
|
+
Re as FTag,
|
|
2036
|
+
Js as FText,
|
|
2037
|
+
He as FTooltip,
|
|
2038
|
+
Gs as FTypography,
|
|
2039
|
+
al as FUpload,
|
|
2040
|
+
ul as default
|
|
1471
2041
|
};
|