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.
@@ -1,66 +1,96 @@
1
- var ge = Object.defineProperty, be = Object.defineProperties;
2
- var ye = Object.getOwnPropertyDescriptors;
3
- var le = Object.getOwnPropertySymbols;
4
- var $e = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable;
5
- var re = (n, e, o) => e in n ? ge(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o, ie = (n, e) => {
6
- for (var o in e || (e = {}))
7
- $e.call(e, o) && re(n, o, e[o]);
8
- if (le)
9
- for (var o of le(e))
10
- ke.call(e, o) && re(n, o, e[o]);
11
- return n;
12
- }, ce = (n, e) => be(n, ye(e));
13
- var J = (n, e, o) => new Promise((t, s) => {
14
- var i = (a) => {
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
- r(o.next(a));
17
- } catch (f) {
18
- s(f);
16
+ u(s.next(r));
17
+ } catch (v) {
18
+ o(v);
19
19
  }
20
- }, u = (a) => {
20
+ }, d = (r) => {
21
21
  try {
22
- r(o.throw(a));
23
- } catch (f) {
24
- s(f);
22
+ u(s.throw(r));
23
+ } catch (v) {
24
+ o(v);
25
25
  }
26
- }, r = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(i, u);
27
- r((o = o.apply(n, e)).next());
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 g, computed as h, createElementBlock as c, openBlock as l, normalizeStyle as T, unref as p, renderSlot as v, ref as R, watch as ee, resolveComponent as O, createVNode as S, withDirectives as te, Transition as K, withCtx as I, createCommentVNode as y, createElementVNode as z, vShow as ue, mergeModels as H, useModel as Q, normalizeClass as C, readonly as de, vModelDynamic as we, Fragment as P, renderList as G, toDisplayString as V, createBlock as W, nextTick as pe, onUnmounted as oe, Teleport as fe, withModifiers as se, resolveDynamicComponent as Y, createTextVNode as me, TransitionGroup as Fe, useSlots as ze, provide as _e, inject as Ce, onMounted as xe } from "vue";
30
- import { Search as Se, StarOutline as Me, StarHalf as Ie, Star as Te, ChevronDownOutline as Be, ChevronBackOutline as Ve, EllipsisHorizontal as Re, ChevronForwardOutline as Ae, CloseCircle as Pe, Close as We, Person as je } from "@vicons/ionicons5";
31
- import { useEventListener as De } from "@vueuse/core";
32
- const Ee = /* @__PURE__ */ g({
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(n) {
39
- const e = n, o = h(() => ({
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, s) => (l(), c("span", {
44
+ return (t, o) => (l(), n("span", {
45
45
  role: "img",
46
46
  class: "f-icon",
47
- style: T(p(o))
47
+ style: O(c(s))
48
48
  }, [
49
- v(t.$slots, "default", {}, void 0, !0)
49
+ z(t.$slots, "default", {}, void 0, !0)
50
50
  ], 4));
51
51
  }
52
- }), b = (n, e) => {
53
- const o = n.__vccOpts || n;
54
- for (const [t, s] of e)
55
- o[t] = s;
56
- return o;
57
- }, Le = /* @__PURE__ */ b(Ee, [["__scopeId", "data-v-524b7dbb"]]), Oe = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780285609860'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12961'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M894.4%20281.504a39.36%2039.36%200%200%200-27.104-11.808l-293.888-10.976-22.016%2046.88%2030.592%2087.2-55.2%2099.008%2022.4%2079.904%2056%2068.48%2081.024-70.496c7.808-6.88%2020.288-6.496%2027.104%201.216l103.904%20106.4c7.296%207.296%206.88%2019.2-0.928%2026.112a18.944%2018.944%200%200%201-13.76%204.896l-284.8-10.624-14.24%2038.72%2015.52%2034.592%20327.488%2011.808c21.504%200.8%2039.616-15.104%2040.096-35.52l18.208-439.296a34.368%2034.368%200%200%200-10.4-26.496zM684.096%20483.2c-32.32-1.184-57.28-26.88-56-57.088%201.28-30.592%2028.416-54.208%2060.288-52.992%2031.904%201.184%2057.312%2026.88%2056%2057.088-1.184%2030.208-28.384%2054.304-60.288%2052.992z%20m-211.104%20253.6l9.92-40.8-231.424%2015.104c-10.784%200.8-19.776-6.496-20.672-16.704a17.856%2017.856%200%200%201%204.672-13.504l171.52-186.272a18.048%2018.048%200%200%201%2014.208-6.112c5.184%200%2010.272%201.984%2014.176%205.696l57.28%2056.704-24.576-60.32%2044-104.288L472%20302.72l16.384-48.096-315.392%2020.8c-21.504%201.184-37.504%2018.784-36.192%2039.072l31.904%20439.424c0.384%209.792%205.184%2018.688%2013.408%2024.896%207.776%206.496%2017.696%209.792%2028%208.992l281.792-18.304-18.88-32.704z'%20p-id='12962'%3e%3c/path%3e%3c/svg%3e", He = { class: "f-image" }, Ne = {
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
- }, qe = {
90
+ }, yt = {
61
91
  key: 0,
62
92
  class: "f-image__error"
63
- }, Ge = ["src", "loading"], Ue = /* @__PURE__ */ g({
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(n) {
72
- const e = n, o = R("loading");
73
- ee(() => e.src, () => {
74
- o.value = "loading";
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 = () => o.value = "loaded", s = () => o.value = "error";
77
- return (i, u) => {
78
- const r = O("f-loading"), a = O("f-icon");
79
- return l(), c("div", He, [
80
- S(K, { name: "fade" }, {
81
- default: I(() => [
82
- p(o) === "loading" ? (l(), c("div", Ne, [
83
- S(r, { type: "classic first" })
84
- ])) : y("", !0)
85
- ]),
86
- _: 1
87
- }),
88
- S(K, { name: "fade" }, {
89
- default: I(() => [
90
- p(o) === "error" ? (l(), c("div", qe, [
91
- v(i.$slots, "error", {}, () => [
92
- S(a, { size: "48px" }, {
93
- default: I(() => [
94
- S(p(Oe))
95
- ]),
96
- _: 1
97
- })
98
- ], !0)
99
- ])) : y("", !0)
100
- ]),
101
- _: 3
102
- }),
103
- te(z("img", {
104
- src: e.src,
105
- loading: i.lazy ? "lazy" : "eager",
106
- style: T({ objectFit: e.fit }),
107
- class: "f-image__img",
108
- onLoad: t,
109
- onError: s
110
- }, null, 44, Ge), [
111
- [ue, p(o) === "loaded"]
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
- }), Xe = /* @__PURE__ */ b(Ue, [["__scopeId", "data-v-2948108d"]]), Ye = ["type", "placeholder", "disabled", "readonly", "name", "id"], Je = /* @__PURE__ */ g({
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__ */ H({
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__ */ H(["input", "change", "focus", "blur"], ["update:modelValue"]),
130
- setup(n, { emit: e }) {
131
- const o = Q(n, "modelValue"), t = e, s = (a) => {
132
- const f = a.target.value;
133
- t("input", f);
134
- }, i = (a) => {
135
- const f = a.target.value;
136
- t("change", f);
137
- }, u = (a) => {
138
- t("focus", a);
139
- }, r = (a) => {
140
- t("blur", a);
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
- }), Ke = /* @__PURE__ */ b(Je, [["__scopeId", "data-v-6c6d7c63"]]), Qe = {
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
- o.type === "cubes" ? (l(), c("div", Qe, [
191
- (l(), c(P, null, G(6, (s) => z("div", {
192
- class: "item cubes",
193
- key: s
194
- })), 64))
195
- ])) : (l(), c("div", {
196
- key: 1,
197
- class: C(["loader", o.type])
198
- }, null, 2)),
199
- e.text ? (l(), c("p", Ze, V(e.text), 1)) : y("", !0)
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
- }), tt = /* @__PURE__ */ b(et, [["__scopeId", "data-v-20f58a50"]]), ot = ["onMousemove"], st = {
196
+ }), Ct = /* @__PURE__ */ I(Ft, [["__scopeId", "data-v-9af0fbbe"]]), zt = ["onMousemove"], St = {
203
197
  key: 0,
204
198
  class: "f-rate__score"
205
- }, at = /* @__PURE__ */ g({
199
+ }, It = /* @__PURE__ */ S({
206
200
  __name: "FRate",
207
- props: /* @__PURE__ */ H({
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__ */ H(["change"], ["update:modelValue"]),
222
- setup(n, { emit: e }) {
223
- const o = Q(n, "modelValue"), t = n, s = e, i = R(null), u = h(() => {
224
- var w;
225
- return (w = i.value) != null ? w : o.value;
226
- }), r = h(
227
- () => t.scoreTemplate.replace("{value}", String(o.value))
228
- ), a = h(
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
- ), f = (w) => {
231
- const B = u.value;
232
- return B >= w ? "full" : t.allowHalf && B >= w - 0.5 ? "half" : "empty";
233
- }, m = (w) => f(w) === "full" ? t.voidColor : t.color, d = (w, B) => {
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 A = w.currentTarget, { left: M, width: E } = A.getBoundingClientRect();
237
- i.value = (w.clientX - M) / E < 0.5 ? B - 0.5 : B;
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 = B;
240
- }, k = () => {
233
+ i.value = $;
234
+ }, f = () => {
241
235
  t.readonly || (i.value = null);
242
- }, x = () => {
243
- var B;
236
+ }, m = () => {
237
+ var $;
244
238
  if (t.readonly) return;
245
- const w = (B = i.value) != null ? B : o.value;
246
- o.value = w, s("change", w);
239
+ const p = ($ = i.value) != null ? $ : s.value;
240
+ s.value = p, o("change", p);
247
241
  };
248
- return (w, B) => {
249
- const A = O("f-icon");
250
- return l(), c("div", {
251
- class: C(["f-rate", { "f-rate--readonly": t.readonly }]),
252
- onMouseleave: k
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
- (l(!0), c(P, null, G(t.count, (M) => (l(), c("span", {
255
- key: M,
256
- class: "f-rate__item",
257
- onMousemove: (E) => d(E, M),
258
- onClick: x
259
- }, [
260
- S(A, {
261
- color: m(M),
262
- size: p(a)
263
- }, {
264
- default: I(() => [
265
- f(M) === "full" ? (l(), W(p(Me), { key: 0 })) : f(M) === "half" ? (l(), W(p(Ie), { key: 1 })) : (l(), W(p(Te), { key: 2 }))
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
- }), nt = /* @__PURE__ */ b(at, [["__scopeId", "data-v-d68cd0e3"]]), lt = { class: "f-dropdown-wrapper" }, rt = { class: "f-dropdown-content" }, it = ["onClick"], ct = {
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
- }, dt = { class: "opt-label" }, ut = /* @__PURE__ */ g({
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(n, { emit: e }) {
288
- const o = n, t = e, s = R(!1), i = R(null), u = R(null), r = R(null), a = R(0), f = R(0), m = h(() => {
289
- const [_] = o.placement.split("-"), $ = (Array.isArray(o.offset) ? o.offset[0] : o.offset) + 4, F = { position: "absolute" };
290
- return _ === "right" ? (F.width = `${$}px`, F.left = `-${$}px`, F.top = 0, F.bottom = 0) : _ === "left" ? (F.width = `${$}px`, F.right = `-${$}px`, F.top = 0, F.bottom = 0) : _ === "bottom" ? (F.height = `${$}px`, F.top = `-${$}px`, F.left = 0, F.right = 0) : _ === "top" && (F.height = `${$}px`, F.bottom = `-${$}px`, F.left = 0, F.right = 0), F;
291
- }), d = h(() => {
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 _ = i.value, { placement: N } = o, $ = Array.isArray(o.offset) ? o.offset[0] : o.offset, [F, q] = N.split("-"), ae = window.innerWidth, ne = window.innerHeight, U = f.value || 160, X = a.value || 200;
294
- let j = 0, D = 0, L = F;
295
- F === "right" ? (D = _.right + $, D + U > ae && (D = _.left - U - $, L = "left")) : F === "left" ? (D = _.left - U - $, D < 0 && (D = _.right + $, L = "right")) : F === "bottom" ? (j = _.bottom + $, j + X > ne && (j = _.top - X - $, L = "top")) : F === "top" && (j = _.top - X - $, j < 0 && (j = _.bottom + $, L = "bottom")), L === "top" || L === "bottom" ? (q === "start" ? D = _.left : q === "end" ? D = _.right - U : D = _.left + (_.width - U) / 2, D = Math.max(8, Math.min(D, ae - U - 8))) : (q === "start" ? j = _.top : q === "end" ? j = _.bottom - X : j = _.top + (_.height - X) / 2, j = Math.max(8, Math.min(j, ne - X - 8)));
296
- const he = L === "right" ? "left" : L === "left" ? "right" : q === "start" ? "left" : q === "end" ? "right" : "center", ve = L === "bottom" ? "top" : L === "top" ? "bottom" : q === "start" ? "top" : q === "end" ? "bottom" : "center";
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: `${j}px`,
299
- left: `${D}px`,
300
- transformOrigin: `${ve} ${he}`
289
+ top: `${F}px`,
290
+ left: `${C}px`,
291
+ transformOrigin: `${J} ${P}`
301
292
  };
302
293
  });
303
- let k = null, x = null;
304
- const w = () => {
305
- k && (clearTimeout(k), k = null);
306
- }, B = (_) => {
307
- o.trigger === "click" && (_.stopPropagation(), s.value ? s.value = !1 : (i.value = u.value.getBoundingClientRect(), s.value = !0));
308
- }, A = () => {
309
- o.trigger === "hover" && (w(), x = setTimeout(() => {
310
- u.value && (i.value = u.value.getBoundingClientRect()), s.value = !0;
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
- }, M = () => {
313
- o.trigger === "hover" && (x && (clearTimeout(x), x = null), k = setTimeout(() => {
314
- s.value = !1;
303
+ }, T = () => {
304
+ s.trigger === "hover" && (m && (clearTimeout(m), m = null), f = setTimeout(() => {
305
+ o.value = !1;
315
306
  }, 400));
316
- }, E = (_) => {
317
- o.trigger !== "click" || !s.value || (s.value = !1);
318
- }, Z = (_) => {
319
- _.disabled || (t("select", _.key, _), _.children || (s.value = !1));
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 ee(s, (_) => J(null, null, function* () {
322
- var N, $;
323
- _ ? (i.value = u.value.getBoundingClientRect(), yield pe(), a.value = ((N = r.value) == null ? void 0 : N.offsetHeight) || 200, f.value = (($ = r.value) == null ? void 0 : $.offsetWidth) || 160) : (a.value = 0, f.value = 0);
324
- })), oe(() => {
325
- w(), x && clearTimeout(x);
326
- }), De(window, "click", E), (_, N) => (l(), c("div", lt, [
327
- z("div", {
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: u,
320
+ ref: d,
330
321
  class: "f-dropdown-trigger-wrapper",
331
- onMouseenter: A,
332
- onMouseleave: M,
333
- onClick: B
322
+ onMouseenter: w,
323
+ onMouseleave: T,
324
+ onClick: $
334
325
  }, [
335
- v(_.$slots, "default", {}, void 0, !0)
326
+ z(b.$slots, "default", {}, void 0, !0)
336
327
  ], 544),
337
- (l(), W(fe, { to: "body" }, [
338
- S(K, { name: "f-dropdown-motion" }, {
339
- default: I(() => [
340
- p(s) ? (l(), c("div", {
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: r,
334
+ ref: u,
344
335
  class: "f-dropdown-item",
345
- style: T([p(d), { zIndex: _.zIndex }]),
346
- onMouseenter: w,
347
- onMouseleave: M,
348
- onClick: N[0] || (N[0] = se(() => {
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
- _.trigger === "hover" ? (l(), c("div", {
342
+ b.trigger === "hover" ? (l(), n("div", {
352
343
  key: 0,
353
344
  class: "f-dropdown-bridge",
354
- style: T(p(m))
355
- }, null, 4)) : y("", !0),
356
- z("div", rt, [
357
- _.options && _.options.length > 0 ? (l(!0), c(P, { key: 0 }, G(_.options, ($) => (l(), c("div", {
358
- key: $.key,
359
- class: C(["f-dropdown-option", { "is-disabled": $.disabled }]),
360
- onClick: (F) => Z($)
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
- $.icon ? (l(), c("span", ct, [
363
- (l(), W(Y($.icon)))
364
- ])) : y("", !0),
365
- z("span", dt, V($.label), 1)
366
- ], 10, it))), 128)) : v(_.$slots, "content", { key: 1 }, void 0, !0)
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)) : y("", !0)
359
+ ], 36)) : k("", !0)
369
360
  ]),
370
361
  _: 3
371
362
  })
372
363
  ]))
373
364
  ]));
374
365
  }
375
- }), pt = /* @__PURE__ */ b(ut, [["__scopeId", "data-v-addb3a3b"]]), ft = /* @__PURE__ */ g({
366
+ }), Ve = /* @__PURE__ */ I(Ht, [["__scopeId", "data-v-addb3a3b"]]), Dt = /* @__PURE__ */ S({
376
367
  __name: "FSelect",
377
- props: /* @__PURE__ */ H({
368
+ props: /* @__PURE__ */ U({
378
369
  options: {},
379
370
  placeholder: {}
380
371
  }, {
381
372
  modelValue: {},
382
373
  modelModifiers: {}
383
374
  }),
384
- emits: /* @__PURE__ */ H(["select"], ["update:modelValue"]),
385
- setup(n, { emit: e }) {
386
- const o = n, t = e, s = Q(n, "modelValue"), i = R(!1), u = h(
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 m, d, k;
389
- return (k = (m = o.options.find((x) => x.key === s.value)) == null ? void 0 : m.label) != null ? k : (d = o.placeholder) != null ? d : "请选择";
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
- ), r = h(() => s.value !== void 0 && s.value !== ""), a = (m, d) => {
392
- s.value = m, t("select", m, d), i.value = !1;
393
- }, f = (m) => {
394
- i.value = m;
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
- }), mt = /* @__PURE__ */ b(ft, [["__scopeId", "data-v-25e7d03d"]]), _t = { class: "f-pagination" }, ht = { class: "f-pagination__list" }, vt = {
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
- }, gt = ["onClick"], bt = /* @__PURE__ */ g({
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__ */ H({
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__ */ H(["update:currentPage"], ["update:modelValue"]),
440
- setup(n, { emit: e }) {
441
- const o = n, t = Q(n, "modelValue"), s = h(() => Math.ceil(o.total / o.pageSize) || 1), i = h(() => {
442
- const r = s.value, a = t.value;
443
- return !r || r <= 0 ? [] : r <= 7 ? Array.from({ length: r }, (f, m) => m + 1) : a <= 4 ? [1, 2, 3, 4, 5, "...", r] : a >= r - 3 ? [1, "...", r - 4, r - 3, r - 2, r - 1, r] : [1, "...", a - 1, a, a + 1, "...", r];
444
- }), u = (r) => {
445
- typeof r == "number" && (r < 1 || r > s.value || r === t.value || (t.value = r));
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 (r, a) => {
448
- const f = O("f-icon");
449
- return l(), c("div", _t, [
450
- z("button", {
451
- class: C(["page-btn", { disabled: t.value === 1 }]),
452
- onClick: a[0] || (a[0] = (m) => u(t.value - 1))
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
- S(f, null, {
455
- default: I(() => [
456
- S(p(Ve))
480
+ H(G, null, {
481
+ default: E(() => [
482
+ H(c(tt))
457
483
  ]),
458
484
  _: 1
459
485
  })
460
- ], 2),
461
- z("ul", ht, [
462
- (l(!0), c(P, null, G(p(i), (m, d) => (l(), c(P, { key: d }, [
463
- m === "..." ? (l(), c("li", vt, [
464
- S(f, null, {
465
- default: I(() => [
466
- S(p(Re))
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(), c("li", {
495
+ ])) : (l(), n("li", {
471
496
  key: 1,
472
- class: C(["page-btn", { active: t.value === m }]),
473
- onClick: (k) => u(m)
474
- }, V(m), 11, gt))
497
+ class: M(["page-btn", { active: o.value === $ }]),
498
+ onClick: (T) => r($)
499
+ }, R($), 11, Gt))
475
500
  ], 64))), 128))
476
- ]),
477
- z("button", {
478
- class: C(["page-btn", { disabled: t.value === p(s) }]),
479
- onClick: a[1] || (a[1] = (m) => u(t.value + 1))
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
- S(f, null, {
482
- default: I(() => [
483
- S(p(Ae))
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
- }), yt = /* @__PURE__ */ b(bt, [["__scopeId", "data-v-e58f1ac9"]]), $t = {
530
+ }), Xt = /* @__PURE__ */ I(qt, [["__scopeId", "data-v-930f8b20"]]), Yt = {
492
531
  key: 0,
493
532
  class: "f-card__header"
494
- }, kt = {
533
+ }, Kt = {
495
534
  key: 0,
496
535
  class: "f-card__header-extra"
497
- }, wt = {
536
+ }, Qt = {
498
537
  key: 1,
499
538
  class: "f-card__cover"
500
- }, Ft = {
539
+ }, Zt = {
501
540
  key: 2,
502
541
  class: "f-card__body"
503
- }, zt = {
542
+ }, es = {
504
543
  key: 3,
505
544
  class: "f-card__footer"
506
- }, Ct = {
545
+ }, ts = {
507
546
  key: 0,
508
547
  class: "f-card__header"
509
- }, xt = {
548
+ }, ss = {
510
549
  key: 0,
511
550
  class: "f-card__header-extra"
512
- }, St = {
551
+ }, os = {
513
552
  key: 1,
514
553
  class: "f-card__cover"
515
- }, Mt = { class: "f-card__content" }, It = {
554
+ }, ls = { class: "f-card__content" }, as = {
516
555
  key: 0,
517
556
  class: "f-card__body"
518
- }, Tt = {
557
+ }, ns = {
519
558
  key: 1,
520
559
  class: "f-card__footer"
521
- }, Bt = /* @__PURE__ */ g({
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(n) {
528
- return (e, o) => (l(), c("div", {
529
- class: C(["f-card", [`f-card--${e.direction}`, { "is-hoverable": e.hoverable }]])
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(), c(P, { key: 0 }, [
532
- e.$slots.header || e.$slots["header-extra"] ? (l(), c("div", $t, [
533
- v(e.$slots, "header", {}, void 0, !0),
534
- e.$slots["header-extra"] ? (l(), c("div", kt, [
535
- v(e.$slots, "header-extra", {}, void 0, !0)
536
- ])) : y("", !0)
537
- ])) : y("", !0),
538
- e.$slots.cover ? (l(), c("div", wt, [
539
- v(e.$slots, "cover", {}, void 0, !0)
540
- ])) : y("", !0),
541
- e.$slots.default ? (l(), c("div", Ft, [
542
- v(e.$slots, "default", {}, void 0, !0)
543
- ])) : y("", !0),
544
- e.$slots.footer ? (l(), c("div", zt, [
545
- v(e.$slots, "footer", {}, void 0, !0)
546
- ])) : y("", !0)
547
- ], 64)) : (l(), c(P, { key: 1 }, [
548
- e.$slots.header || e.$slots["header-extra"] ? (l(), c("div", Ct, [
549
- v(e.$slots, "header", {}, void 0, !0),
550
- e.$slots["header-extra"] ? (l(), c("div", xt, [
551
- v(e.$slots, "header-extra", {}, void 0, !0)
552
- ])) : y("", !0)
553
- ])) : y("", !0),
554
- e.$slots.cover ? (l(), c("div", St, [
555
- v(e.$slots, "cover", {}, void 0, !0)
556
- ])) : y("", !0),
557
- z("div", Mt, [
558
- e.$slots.default ? (l(), c("div", It, [
559
- v(e.$slots, "default", {}, void 0, !0)
560
- ])) : y("", !0),
561
- e.$slots.footer ? (l(), c("div", Tt, [
562
- v(e.$slots, "footer", {}, void 0, !0)
563
- ])) : y("", !0)
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
- }), Vt = /* @__PURE__ */ b(Bt, [["__scopeId", "data-v-a66fa373"]]), Rt = {
607
+ }), is = /* @__PURE__ */ I(rs, [["__scopeId", "data-v-a66fa373"]]), cs = {
569
608
  key: 0,
570
609
  class: "f-tag__dot"
571
- }, At = /* @__PURE__ */ g({
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(n, { emit: e }) {
582
- const o = e, t = R(!1);
583
- return (s, i) => {
584
- var r, a, f;
585
- const u = O("f-icon");
586
- return l(), c("span", {
587
- class: C(["f-tag", [
588
- `f-tag--${(r = s.type) != null ? r : "round"}`,
589
- `f-tag--${(a = s.effect) != null ? a : "light"}`,
590
- (f = s.color) != null ? f : "default"
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] = (m) => t.value = !0),
593
- onMouseleave: i[2] || (i[2] = (m) => t.value = !1)
630
+ onMouseenter: i[1] || (i[1] = (v) => t.value = !0),
631
+ onMouseleave: i[2] || (i[2] = (v) => t.value = !1)
594
632
  }, [
595
- s.type === "dot" ? (l(), c("span", Rt)) : y("", !0),
596
- v(s.$slots, "default", {}, void 0, !0),
597
- s.closable ? (l(), W(u, {
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] = se((m) => o("close"), ["stop"]))
638
+ onClick: i[0] || (i[0] = ue((v) => s("close"), ["stop"]))
601
639
  }, {
602
- default: I(() => [
603
- (l(), W(Y(p(t) ? p(Pe) : p(We))))
640
+ default: E(() => [
641
+ (l(), j(se(c(t) ? c(Te) : c(xe))))
604
642
  ]),
605
643
  _: 1
606
- })) : y("", !0)
644
+ })) : k("", !0)
607
645
  ], 34);
608
646
  };
609
647
  }
610
- }), Pt = /* @__PURE__ */ b(At, [["__scopeId", "data-v-9f7974a7"]]), Wt = /* @__PURE__ */ g({
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(n) {
621
- const e = n, o = R(null), t = R(null), s = R(!1), i = R({ top: 0, left: 0 });
622
- let u = null;
623
- const r = () => {
624
- e.disabled || (u = setTimeout(() => {
625
- s.value = !0, pe(f);
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
- }, a = () => {
628
- u && clearTimeout(u), s.value = !1;
629
- }, f = () => {
630
- var Z, _;
665
+ }, r = () => {
666
+ d && clearTimeout(d), o.value = !1;
667
+ }, v = () => {
668
+ var q, b;
631
669
  if (!t.value) return;
632
- const m = (_ = (Z = o.value) == null ? void 0 : Z.firstElementChild) != null ? _ : o.value;
633
- if (!m) return;
634
- const d = m.getBoundingClientRect(), k = t.value.getBoundingClientRect(), x = e.offset, [w, B] = e.placement.split("-");
635
- let A = 0, M = 0;
636
- switch (w) {
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
- A = d.top - k.height - x;
676
+ w = _.top - f.height - m;
639
677
  break;
640
678
  case "bottom":
641
- A = d.bottom + x;
679
+ w = _.bottom + m;
642
680
  break;
643
681
  case "left":
644
- M = d.left - k.width - x;
682
+ T = _.left - f.width - m;
645
683
  break;
646
684
  case "right":
647
- M = d.right + x;
685
+ T = _.right + m;
648
686
  break;
649
687
  }
650
- w === "top" || w === "bottom" ? B === "start" ? M = d.left : B === "end" ? M = d.right - k.width : M = d.left + (d.width - k.width) / 2 : B === "start" ? A = d.top : B === "end" ? A = d.bottom - k.height : A = d.top + (d.height - k.height) / 2;
651
- const E = 8;
652
- M = Math.max(E, Math.min(M, window.innerWidth - k.width - E)), A = Math.max(E, Math.min(A, window.innerHeight - k.height - E)), i.value = { top: A + window.scrollY, left: M + window.scrollX };
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 oe(a), (m, d) => (l(), c("div", {
692
+ return he(r), (y, _) => (l(), n("div", {
655
693
  class: "f-tooltip",
656
694
  ref_key: "triggerRef",
657
- ref: o,
658
- onMouseenter: r,
659
- onMouseleave: a
695
+ ref: s,
696
+ onMouseenter: u,
697
+ onMouseleave: r
660
698
  }, [
661
- v(m.$slots, "default", {}, void 0, !0),
662
- (l(), W(fe, { to: "body" }, [
663
- S(K, { name: "f-tooltip" }, {
664
- default: I(() => [
665
- p(s) && (m.content || m.$slots.content) ? (l(), c("div", {
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: C(["f-tooltip-wrapper", `is-${m.placement.split("-")[0]}`]),
670
- style: T({
671
- top: `${p(i).top}px`,
672
- left: `${p(i).left}px`,
673
- maxWidth: `${m.maxWidth}px`
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
- v(m.$slots, "content", {}, () => [
677
- me(V(m.content), 1)
714
+ z(y.$slots, "content", {}, () => [
715
+ ne(R(y.content), 1)
678
716
  ], !0),
679
- d[0] || (d[0] = z("span", { class: "f-tooltip-arrow" }, null, -1))
680
- ], 6)) : y("", !0)
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
- }), jt = /* @__PURE__ */ b(Wt, [["__scopeId", "data-v-be9acca7"]]), Dt = { class: "f-progress" }, Et = {
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
- }, Lt = /* @__PURE__ */ g({
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(n) {
699
- const e = n, o = h(() => Math.min(100, Math.max(0, e.percent)));
700
- return (t, s) => (l(), c("div", Dt, [
701
- z("div", {
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: T({ height: `${t.height}px` })
741
+ style: O({ height: `${t.height}px` })
704
742
  }, [
705
- z("div", {
743
+ h("div", {
706
744
  class: "f-progress__fill",
707
- style: T({
708
- width: `${p(o)}%`,
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(), c("span", Et, V(p(o)) + "%", 1)) : y("", !0)
751
+ t.showText ? (l(), n("span", fs, R(c(s)) + "%", 1)) : k("", !0)
714
752
  ]));
715
753
  }
716
- }), Ot = /* @__PURE__ */ b(Lt, [["__scopeId", "data-v-c2164d6e"]]), Ht = { class: "f-tabs__nav-container" }, Nt = { class: "f-tabs__nav" }, qt = ["onClick"], Gt = { class: "f-tabs__label" }, Ut = /* @__PURE__ */ g({
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(n, { emit: e }) {
725
- const o = n, t = e, s = h({
762
+ setup(a, { emit: e }) {
763
+ const s = a, t = e, o = g({
726
764
  get: () => {
727
- var r;
728
- if (o.active && o.tabs.some((a) => a.name === o.active && !a.disabled))
729
- return o.active;
730
- const u = o.tabs.find((a) => !a.disabled);
731
- return (r = u == null ? void 0 : u.name) != null ? r : "";
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: (u) => {
734
- t("update:active", u), t("change", u);
771
+ set: (d) => {
772
+ t("update:active", d), t("change", d);
735
773
  }
736
- }), i = (u, r) => {
737
- r || (s.value = u);
774
+ }), i = (d, u) => {
775
+ u || (o.value = d);
738
776
  };
739
- return (u, r) => (l(), c("div", {
740
- class: C(["f-tabs", [`f-tabs--${u.type}`]])
777
+ return (d, u) => (l(), n("div", {
778
+ class: M(["f-tabs", [`f-tabs--${d.type}`]])
741
779
  }, [
742
- z("div", Ht, [
743
- z("div", Nt, [
744
- (l(!0), c(P, null, G(u.tabs, (a) => (l(), c("div", {
745
- key: a.name,
746
- class: C(["f-tabs__tab", {
747
- active: p(s) === a.name,
748
- disabled: a.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: (f) => i(a.name, a.disabled)
788
+ onClick: (v) => i(r.name, r.disabled)
751
789
  }, [
752
- z("span", Gt, V(a.label), 1)
753
- ], 10, qt))), 128))
790
+ h("span", gs, R(r.label), 1)
791
+ ], 10, hs))), 128))
754
792
  ])
755
793
  ]),
756
- (l(!0), c(P, null, G(u.tabs, (a) => te((l(), c("div", {
757
- key: a.name,
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
- v(u.$slots, a.name, {}, void 0, !0)
798
+ z(d.$slots, r.name, {}, void 0, !0)
761
799
  ])), [
762
- [ue, p(s) === a.name]
800
+ [ze, c(o) === r.name]
763
801
  ])), 128))
764
802
  ], 2));
765
803
  }
766
- }), Xt = /* @__PURE__ */ b(Ut, [["__scopeId", "data-v-268fc654"]]), Yt = {
804
+ }), bs = /* @__PURE__ */ I(ys, [["__scopeId", "data-v-268fc654"]]), $s = {
767
805
  class: "f-breadcrumb__current",
768
806
  "aria-current": "page"
769
- }, Jt = ["href"], Kt = {
807
+ }, ks = ["href"], ws = {
770
808
  key: 3,
771
809
  class: "f-breadcrumb__text"
772
- }, Qt = /* @__PURE__ */ g({
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(n) {
780
- return (e, o) => (l(), c("nav", {
781
- class: C(["f-breadcrumb", { "f-breadcrumb--animated": e.animated }]),
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
- S(Fe, { name: "breadcrumb" }, {
785
- default: I(() => [
786
- (l(!0), c(P, null, G(e.items, (t, s) => (l(), c(P, {
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
- s > 0 ? (l(), c("span", {
827
+ o > 0 ? (l(), n("span", {
790
828
  key: `sep-${t.label}`,
791
829
  class: "f-breadcrumb__sep",
792
830
  "aria-hidden": "true"
793
- }, V(e.separator), 1)) : y("", !0),
794
- s === e.items.length - 1 ? v(e.$slots, "default", {
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
- z("span", Yt, V(t.label), 1)
799
- ], !0) : t.href ? (l(), c("a", {
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
- }, V(t.label), 9, Jt)) : (l(), c("span", Kt, V(t.label), 1))
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
- }), Zt = /* @__PURE__ */ b(Qt, [["__scopeId", "data-v-bb787dcc"]]), eo = /* @__PURE__ */ g({
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(n) {
822
- const e = n, o = (i) => typeof i == "number" ? { span: i } : i, t = h(() => ({
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
- })), s = h(() => {
827
- const i = [], u = { xs: e.xs, sm: e.sm, md: e.md, lg: e.lg };
828
- for (const [r, a] of Object.entries(u)) {
829
- if (a === void 0) continue;
830
- const { span: f, offset: m, order: d } = o(a);
831
- f !== void 0 && i.push(`f-col--${r}-${f}`), m !== void 0 && i.push(`f-col--${r}-offset-${m}`), d !== void 0 && i.push(`f-col--${r}-order-${d}`);
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, u) => (l(), c("div", {
836
- class: C(["f-col", p(s)]),
837
- style: T(p(t))
873
+ return (i, d) => (l(), n("div", {
874
+ class: M(["f-col", c(o)]),
875
+ style: O(c(t))
838
876
  }, [
839
- v(i.$slots, "default", {}, void 0, !0)
877
+ z(i.$slots, "default", {}, void 0, !0)
840
878
  ], 6));
841
879
  }
842
- }), to = /* @__PURE__ */ b(eo, [["__scopeId", "data-v-5a8b0cb4"]]), oo = /* @__PURE__ */ g({
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(n) {
852
- const e = n, o = h(
889
+ setup(a) {
890
+ const e = a, s = g(
853
891
  () => Array.isArray(e.gutter) ? e.gutter[0] : e.gutter
854
- ), t = h(
892
+ ), t = g(
855
893
  () => Array.isArray(e.gutter) ? e.gutter[1] : 0
856
- ), s = {
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
- }, u = h(() => ({
869
- marginLeft: o.value ? `-${o.value / 2}px` : void 0,
870
- marginRight: o.value ? `-${o.value / 2}px` : void 0,
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: s[e.justify],
910
+ justifyContent: o[e.justify],
873
911
  alignItems: i[e.align],
874
912
  flexWrap: e.wrap,
875
- "--row-gutter-h": o.value ? `${o.value / 2}px` : "0px"
913
+ "--row-gutter-h": s.value ? `${s.value / 2}px` : "0px"
876
914
  }));
877
- return (r, a) => (l(), W(Y(r.tag), {
915
+ return (u, r) => (l(), j(se(u.tag), {
878
916
  class: "f-row",
879
- style: T(p(u))
917
+ style: O(c(d))
880
918
  }, {
881
- default: I(() => [
882
- v(r.$slots, "default", {}, void 0, !0)
919
+ default: E(() => [
920
+ z(u.$slots, "default", {}, void 0, !0)
883
921
  ]),
884
922
  _: 3
885
923
  }, 8, ["style"]));
886
924
  }
887
- }), so = /* @__PURE__ */ b(oo, [["__scopeId", "data-v-72f62339"]]), ao = { class: "f-space__item" }, no = {
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
- }, lo = /* @__PURE__ */ g({
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(n) {
902
- const e = n, o = {
939
+ setup(a) {
940
+ const e = a, s = {
903
941
  small: 6,
904
942
  normal: 12,
905
943
  large: 18
906
- }, t = (a) => typeof a == "number" ? a : o[a], s = h(() => {
907
- const a = e.size;
908
- return Array.isArray(a) ? `${t(a[1])}px ${t(a[0])}px` : `${t(a)}px`;
909
- }), i = h(() => ({
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: s.value
915
- })), u = ze(), r = h(() => {
916
- var m;
917
- const a = (m = u.default) == null ? void 0 : m.call(u);
918
- if (!a) return [];
919
- const f = [];
920
- for (const d of a)
921
- d.type === P ? f.push(...d.children) : f.push(d);
922
- return f.filter((d) => d.type !== Comment);
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 (a, f) => (l(), c("div", {
962
+ return (r, v) => (l(), n("div", {
925
963
  class: "f-space",
926
- style: T(p(i))
964
+ style: O(c(i))
927
965
  }, [
928
- (l(!0), c(P, null, G(p(r), (m, d) => (l(), c(P, { key: d }, [
929
- z("div", ao, [
930
- (l(), W(Y(m)))
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
- a.split && d < p(r).length - 1 ? (l(), c("span", no, V(a.split), 1)) : y("", !0)
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
- }), ro = /* @__PURE__ */ b(lo, [["__scopeId", "data-v-5fb3b1a0"]]), io = /* @__PURE__ */ g({
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(n) {
942
- const e = n, o = h(() => ({
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, s) => (l(), c("div", {
983
+ return (t, o) => (l(), n("div", {
946
984
  class: "f-container",
947
- style: T(p(o))
985
+ style: O(c(s))
948
986
  }, [
949
- v(t.$slots, "default", {}, void 0, !0)
987
+ z(t.$slots, "default", {}, void 0, !0)
950
988
  ], 4));
951
989
  }
952
- }), co = /* @__PURE__ */ b(io, [["__scopeId", "data-v-08450ddf"]]), uo = /* @__PURE__ */ g({
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(n) {
960
- const e = n, o = h(() => {
961
- const t = e.color || "var(--el-color-primary)", s = e.direction === "horizontal";
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: s ? `${e.line} ${t}` : "none",
964
- borderLeft: s ? "none" : `${e.line} ${t}`,
965
- height: s ? "0" : "100%",
966
- width: s ? "100%" : "0",
967
- margin: s ? "24px 0" : "0"
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, s) => (l(), c("hr", {
971
- style: T(o.value)
1008
+ return (t, o) => (l(), n("hr", {
1009
+ style: O(s.value)
972
1010
  }, null, 4));
973
1011
  }
974
- }), po = /* @__PURE__ */ b(uo, [["__scopeId", "data-v-512ee743"]]), fo = ["src", "alt"], mo = /* @__PURE__ */ g({
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(n) {
984
- const e = n, o = {
1021
+ setup(a) {
1022
+ const e = a, s = {
985
1023
  small: "32px",
986
1024
  normal: "48px",
987
1025
  large: "64px"
988
- }, t = h(() => ({
989
- width: typeof e.size == "string" ? o[e.size] : `${e.size}px`,
990
- height: typeof e.size == "string" ? o[e.size] : `${e.size}px`,
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 (s, i) => {
994
- const u = O("f-icon");
995
- return l(), c("div", {
996
- class: "f-avatar",
997
- style: T(p(t))
998
- }, [
999
- s.src ? (l(), c("img", {
1000
- key: 0,
1001
- src: s.src,
1002
- alt: s.alt
1003
- }, null, 8, fo)) : (l(), W(u, {
1004
- key: 1,
1005
- size: 24
1006
- }, {
1007
- default: I(() => [
1008
- (l(), W(Y(s.icon ? s.icon : p(je))))
1009
- ]),
1010
- _: 1
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
- }), _o = /* @__PURE__ */ b(mo, [["__scopeId", "data-v-799350d0"]]), ho = ["disabled"], vo = /* @__PURE__ */ g({
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(n) {
1025
- const e = n, o = {
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 = h(() => {
1030
- var s;
1031
- return ce(ie({}, (s = o[e.size]) != null ? s : o.normal), {
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 (s, i) => {
1037
- var u;
1038
- return l(), c("button", {
1039
- class: C(["f-button", [
1040
- `f-button--${(u = s.variant) != null ? u : "default"}`,
1041
- { "is-disabled": s.disabled }
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: T(p(t)),
1044
- disabled: s.disabled
1078
+ style: O(c(t)),
1079
+ disabled: o.disabled
1045
1080
  }, [
1046
- v(s.$slots, "default", {}, void 0, !0)
1047
- ], 14, ho);
1081
+ z(o.$slots, "default", {}, void 0, !0)
1082
+ ], 14, Ls);
1048
1083
  };
1049
1084
  }
1050
- }), go = /* @__PURE__ */ b(vo, [["__scopeId", "data-v-eeff7101"]]), bo = /* @__PURE__ */ g({
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(n) {
1056
- const e = n, o = h(() => ({
1090
+ setup(a) {
1091
+ const e = a, s = g(() => ({
1057
1092
  color: e.color
1058
1093
  }));
1059
- return (t, s) => (l(), c("div", {
1094
+ return (t, o) => (l(), n("div", {
1060
1095
  class: "f-typography",
1061
- style: T(p(o))
1096
+ style: O(c(s))
1062
1097
  }, [
1063
- v(t.$slots, "default", {}, void 0, !0)
1098
+ z(t.$slots, "default", {}, void 0, !0)
1064
1099
  ], 4));
1065
1100
  }
1066
- }), yo = /* @__PURE__ */ b(bo, [["__scopeId", "data-v-54c9aca5"]]), $o = /* @__PURE__ */ g({
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(n) {
1078
- const e = n, o = {
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
- }, s = h(() => {
1093
- var r;
1094
- return e.heading ? `h${e.heading}` : (r = e.tag) != null ? r : "span";
1095
- }), i = h(() => {
1096
- var r;
1097
- return (r = e.size) != null ? r : e.heading ? o[e.heading] : "normal";
1098
- }), u = h(() => {
1099
- var r;
1100
- return (r = e.weight) != null ? r : e.heading ? t[e.heading] : "normal";
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 (r, a) => (l(), W(Y(p(s)), {
1103
- class: C(["f-text", [
1104
- `f-text--${p(i)}`,
1105
- `f-text--${p(u)}`,
1106
- r.color && `f-text--${r.color}`,
1107
- { "f-text--truncate": r.truncate, "f-text--italic": r.italic }
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: I(() => [
1111
- v(r.$slots, "default", {}, void 0, !0)
1145
+ default: E(() => [
1146
+ z(u.$slots, "default", {}, void 0, !0)
1112
1147
  ]),
1113
1148
  _: 3
1114
1149
  }, 8, ["class"]));
1115
1150
  }
1116
- }), ko = /* @__PURE__ */ b($o, [["__scopeId", "data-v-8bcfc6b3"]]), wo = ["href", "target", "rel"], Fo = /* @__PURE__ */ g({
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(n) {
1126
- const e = n;
1127
- return (o, t) => (l(), c("a", {
1128
- class: C(["f-link", [
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
- v(o.$slots, "default", {}, void 0, !0)
1138
- ], 10, wo));
1172
+ z(s.$slots, "default", {}, void 0, !0)
1173
+ ], 10, qs));
1139
1174
  }
1140
- }), zo = /* @__PURE__ */ b(Fo, [["__scopeId", "data-v-daaa3e25"]]), Co = { class: "f-badge" }, xo = /* @__PURE__ */ g({
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(n) {
1151
- const e = n, o = h(() => {
1152
- var s;
1153
- return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (s = e.value) != null ? s : "";
1154
- }), t = h(() => {
1155
- const [s, i] = e.offset;
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% + ${s}px), calc(-50% + ${i}px))` },
1158
- "top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${s}px), calc(-50% + ${i}px))` },
1159
- "bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${s}px), calc(50% + ${i}px))` },
1160
- "bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${s}px), calc(50% + ${i}px))` }
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 (s, i) => (l(), c("div", Co, [
1164
- v(s.$slots, "default", {}, void 0, !0),
1165
- s.dot || s.value !== void 0 && s.value !== "" ? (l(), c("span", {
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: C(["f-badge__content", [`f-badge--${s.type}`, { "f-badge--dot": s.dot }]]),
1168
- style: T(p(t))
1169
- }, V(p(o)), 7)) : y("", !0)
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
- }), So = /* @__PURE__ */ b(xo, [["__scopeId", "data-v-be6947ff"]]), Mo = /* @__PURE__ */ g({
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(n) {
1179
- const e = n, o = h(() => {
1180
- const [t, s] = e.offset;
1213
+ setup(a) {
1214
+ const e = a, s = g(() => {
1215
+ const [t, o] = e.offset;
1181
1216
  return {
1182
- "top-left": { top: `${s}px`, left: `${t}px` },
1183
- "top-right": { top: `${s}px`, right: `${t}px` },
1184
- "bottom-left": { bottom: `${s}px`, left: `${t}px` },
1185
- "bottom-right": { bottom: `${s}px`, right: `${t}px` }
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, s) => (l(), c("div", {
1223
+ return (t, o) => (l(), n("div", {
1189
1224
  class: "f-affix",
1190
- style: T(p(o))
1225
+ style: O(c(s))
1191
1226
  }, [
1192
- v(t.$slots, "default", {}, void 0, !0)
1227
+ z(t.$slots, "default", {}, void 0, !0)
1193
1228
  ], 4));
1194
1229
  }
1195
- }), Io = /* @__PURE__ */ b(Mo, [["__scopeId", "data-v-8506d679"]]), To = /* @__PURE__ */ g({
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(n, { expose: e }) {
1205
- const o = n, t = R([]), s = (a) => {
1206
- t.value.push(a);
1207
- }, i = (a) => {
1208
- t.value = t.value.filter((f) => f.prop !== a);
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 _e("FFormContext", {
1211
- model: o.model,
1212
- rules: o.rules,
1213
- labelWidth: o.labelWidth,
1214
- labelPosition: h(() => o.labelPosition),
1215
- size: h(() => o.size),
1216
- registerField: s,
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: () => J(null, null, function* () {
1220
- const a = t.value.map((d) => d.validate());
1221
- if ((yield Promise.all(a)).filter((d) => d !== void 0).length > 0)
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((a) => a.clearValidate());
1261
+ t.value.forEach((r) => r.clearValidate());
1227
1262
  }
1228
- }), (a, f) => (l(), c("form", {
1229
- class: C(["f-form", [
1230
- `f-form--label-${a.labelPosition}`,
1231
- `f-form--size-${a.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: f[0] || (f[0] = se(() => {
1268
+ onSubmit: v[0] || (v[0] = ue(() => {
1234
1269
  }, ["prevent"]))
1235
1270
  }, [
1236
- v(a.$slots, "default", {}, void 0, !0)
1271
+ z(r.$slots, "default", {}, void 0, !0)
1237
1272
  ], 34));
1238
1273
  }
1239
- }), Bo = /* @__PURE__ */ b(To, [["__scopeId", "data-v-21f7de9b"]]), Vo = (n, e) => J(null, null, function* () {
1240
- const o = Array.isArray(e) ? e : [e];
1241
- for (let t of o) {
1242
- t.transform && (n = t.transform(n));
1243
- const s = n == null || n === "", i = t.whitespace && typeof n == "string" && n.trim() === "";
1244
- if (t.required && (s || i))
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 && s) continue;
1281
+ if (!t.required && o) continue;
1247
1282
  if (t.type) {
1248
- const r = Ro(n, t);
1249
- if (r) return r;
1283
+ const u = ao(a, t);
1284
+ if (u) return u;
1250
1285
  }
1251
- const u = Ao(n, t);
1252
- if (u) return u;
1253
- if (t.pattern && !t.pattern.test(String(n)))
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(n))
1290
+ if (t.enum && !t.enum.includes(a))
1256
1291
  return t.message || "不在指定的枚举范围内";
1257
1292
  if (t.validator) {
1258
- const r = yield Promise.resolve(t.validator(n, t));
1259
- if (typeof r == "string") return r;
1260
- if (r === !1) return t.message || "校验失败";
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
- }), Ro = (n, e) => {
1264
- const { type: o, message: t } = e;
1265
- switch (o) {
1298
+ }), ao = (a, e) => {
1299
+ const { type: s, message: t } = e;
1300
+ switch (s) {
1266
1301
  case "string":
1267
- if (typeof n != "string") return t || "必须是字符串";
1302
+ if (typeof a != "string") return t || "必须是字符串";
1268
1303
  break;
1269
1304
  case "number":
1270
- if (typeof n != "number" || isNaN(n)) return t || "必须是数字";
1305
+ if (typeof a != "number" || isNaN(a)) return t || "必须是数字";
1271
1306
  break;
1272
1307
  case "integer":
1273
- if (!Number.isInteger(n)) return t || "必须是整数";
1308
+ if (!Number.isInteger(a)) return t || "必须是整数";
1274
1309
  break;
1275
1310
  case "boolean":
1276
- if (typeof n != "boolean") return t || "必须是布尔值";
1311
+ if (typeof a != "boolean") return t || "必须是布尔值";
1277
1312
  break;
1278
1313
  case "array":
1279
- if (!Array.isArray(n)) return t || "必须是数组";
1314
+ if (!Array.isArray(a)) return t || "必须是数组";
1280
1315
  break;
1281
1316
  case "object":
1282
- if (typeof n != "object" || n === null) return t || "必须是对象";
1317
+ if (typeof a != "object" || a === null) return t || "必须是对象";
1283
1318
  break;
1284
1319
  case "email":
1285
- if (!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(n)) return t || "邮箱格式不正确";
1320
+ if (!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(a)) return t || "邮箱格式不正确";
1286
1321
  break;
1287
1322
  case "regexp":
1288
- if (e.pattern && !e.pattern.test(String(n)))
1323
+ if (e.pattern && !e.pattern.test(String(a)))
1289
1324
  return e.message || "格式不匹配";
1290
1325
  break;
1291
1326
  }
1292
- }, Ao = (n, e) => {
1293
- const { min: o, max: t, len: s, message: i, type: u } = e, r = u === "number" || u === "integer" || u === "float", a = r && typeof n == "number" ? n : n == null ? void 0 : n.length;
1294
- if (a !== void 0) {
1295
- if (s !== void 0 && a !== s)
1296
- return i || (r ? `值必须等于 ${s}` : `长度必须为 ${s}`);
1297
- if (o !== void 0 && a < o)
1298
- return i || (r ? `最小值不能小于 ${o}` : `长度不能小于 ${o}`);
1299
- if (t !== void 0 && a > t)
1300
- return i || (r ? `最大值不能大于 ${t}` : `长度不能大于 ${t}`);
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
- }, Po = {
1337
+ }, ro = {
1303
1338
  key: 0,
1304
1339
  class: "star"
1305
- }, Wo = { class: "f-form-item__content" }, jo = {
1340
+ }, io = { class: "f-form-item__content" }, co = {
1306
1341
  key: 0,
1307
1342
  class: "f-form-item__error"
1308
- }, Do = /* @__PURE__ */ g({
1343
+ }, uo = /* @__PURE__ */ S({
1309
1344
  __name: "FFormItem",
1310
1345
  props: {
1311
1346
  label: {},
1312
1347
  prop: {}
1313
1348
  },
1314
- setup(n, { expose: e }) {
1315
- const o = n, t = Ce("FFormContext"), s = R(""), i = h(() => {
1316
- var d;
1317
- return ((d = t == null ? void 0 : t.labelPosition) == null ? void 0 : d.value) || "right";
1318
- }), u = h(() => {
1319
- var d;
1320
- return ((d = t == null ? void 0 : t.size) == null ? void 0 : d.value) || "default";
1321
- }), r = h(() => {
1322
- if (!(t != null && t.rules) || !o.prop) return [];
1323
- const d = t.rules[o.prop] || [];
1324
- return Array.isArray(d) ? d : [d];
1325
- }), a = h(() => r.value.some((d) => d.required)), f = () => J(null, null, function* () {
1326
- if (!o.prop || !t) return;
1327
- const d = t.model[o.prop], k = yield Vo(d, r.value);
1328
- return s.value = k || "", k;
1329
- }), m = () => {
1330
- s.value = "";
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 _e("FFormItemContext", { errorMsg: s, validate: f }), xe(() => {
1333
- o.prop && (t != null && t.registerField) && t.registerField({ prop: o.prop, validate: f, clearValidate: m });
1334
- }), oe(() => {
1335
- o.prop && (t != null && t.unregisterField) && t.unregisterField(o.prop);
1336
- }), ee(() => t == null ? void 0 : t.model[o.prop], () => {
1337
- s.value && f();
1338
- }), e({ validate: f, clearValidate: m }), (d, k) => {
1339
- var x;
1340
- return l(), c("div", {
1341
- class: C(["f-form-item", [
1342
- `is-label-${p(i)}`,
1343
- `is-size-${p(u)}`,
1344
- { "is-error": p(s) }
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
- d.label ? (l(), c("label", {
1382
+ _.label ? (l(), n("label", {
1348
1383
  key: 0,
1349
1384
  class: "f-form-item__label",
1350
- style: T({
1351
- width: p(i) === "top" ? "100%" : (x = p(t)) == null ? void 0 : x.labelWidth,
1352
- textAlign: p(i) === "top" ? "left" : p(i)
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
- p(a) ? (l(), c("span", Po, "*")) : y("", !0),
1356
- me(" " + V(d.label) + ": ", 1)
1357
- ], 4)) : y("", !0),
1358
- z("div", Wo, [
1359
- v(d.$slots, "default", {}, void 0, !0),
1360
- S(K, { name: "err-slide" }, {
1361
- default: I(() => [
1362
- p(s) ? (l(), c("p", jo, V(p(s)), 1)) : y("", !0)
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
- }), Eo = /* @__PURE__ */ b(Do, [["__scopeId", "data-v-c3d6ec01"]]), Lo = { class: "f-checkbox__wrapper" }, Oo = ["checked", "disabled"], Ho = {
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
- }, No = /* @__PURE__ */ g({
1408
+ }, vo = /* @__PURE__ */ S({
1374
1409
  __name: "FCheckbox",
1375
- props: /* @__PURE__ */ H({
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(n) {
1384
- const e = Q(n, "modelValue"), o = n, t = (s) => {
1385
- if (o.disabled) return;
1386
- const i = s.target;
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 (s, i) => (l(), c("label", {
1390
- class: C(["f-checkbox", { "is-disabled": s.disabled }])
1424
+ return (o, i) => (l(), n("label", {
1425
+ class: M(["f-checkbox", { "is-disabled": o.disabled }])
1391
1426
  }, [
1392
- z("span", Lo, [
1393
- z("input", {
1427
+ h("span", fo, [
1428
+ h("input", {
1394
1429
  type: "checkbox",
1395
1430
  checked: e.value,
1396
- disabled: s.disabled,
1431
+ disabled: o.disabled,
1397
1432
  onChange: t
1398
- }, null, 40, Oo),
1399
- i[0] || (i[0] = z("span", { class: "f-checkbox__checkmark" }, null, -1))
1433
+ }, null, 40, _o),
1434
+ i[0] || (i[0] = h("span", { class: "f-checkbox__checkmark" }, null, -1))
1400
1435
  ]),
1401
- s.label ? (l(), c("span", Ho, V(s.label), 1)) : y("", !0)
1436
+ o.label ? (l(), n("span", mo, R(o.label), 1)) : k("", !0)
1402
1437
  ], 2));
1403
1438
  }
1404
- }), qo = /* @__PURE__ */ b(No, [["__scopeId", "data-v-633b283a"]]), Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), 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 || "&nbsp;" };
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: Io,
1407
- FAvatar: _o,
1408
- FBadge: So,
1409
- FBreadcrumb: Zt,
1410
- FButton: go,
1411
- FCard: Vt,
1412
- FCheckbox: qo,
1413
- FCol: to,
1414
- FContainer: co,
1415
- FDivider: po,
1416
- FDropdown: pt,
1417
- FForm: Bo,
1418
- FFormItem: Eo,
1419
- FIcon: Le,
1420
- FImage: Xe,
1421
- FInput: Ke,
1422
- FLink: zo,
1423
- FLoading: tt,
1424
- FPagination: yt,
1425
- FProgress: Ot,
1426
- FRate: nt,
1427
- FRow: so,
1428
- FSelect: mt,
1429
- FSpace: ro,
1430
- FTabs: Xt,
1431
- FTag: Pt,
1432
- FText: ko,
1433
- FTooltip: jt,
1434
- FTypography: yo
1435
- }, Symbol.toStringTag, { value: "Module" })), Ko = (n) => {
1436
- Object.entries(Go).forEach(([e, o]) => {
1437
- n.component(e, o);
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
- Io as FAffix,
1442
- _o as FAvatar,
1443
- So as FBadge,
1444
- Zt as FBreadcrumb,
1445
- go as FButton,
1446
- Vt as FCard,
1447
- qo as FCheckbox,
1448
- to as FCol,
1449
- co as FContainer,
1450
- po as FDivider,
1451
- pt as FDropdown,
1452
- Bo as FForm,
1453
- Eo as FFormItem,
1454
- Le as FIcon,
1455
- Xe as FImage,
1456
- Ke as FInput,
1457
- zo as FLink,
1458
- tt as FLoading,
1459
- yt as FPagination,
1460
- Ot as FProgress,
1461
- nt as FRate,
1462
- so as FRow,
1463
- mt as FSelect,
1464
- ro as FSpace,
1465
- Xt as FTabs,
1466
- Pt as FTag,
1467
- ko as FText,
1468
- jt as FTooltip,
1469
- yo as FTypography,
1470
- Ko as default
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
  };