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