fantasia-ui 0.2.39 → 0.2.43

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 (116) hide show
  1. package/README.en.md +8 -356
  2. package/README.md +10 -358
  3. package/dist/fantasia-ui.css +534 -205
  4. package/dist/fantasia-ui.es.js +2945 -524
  5. package/dist/fantasia-ui.umd.js +2923 -502
  6. package/dist/types/{components → packages/components}/index.d.ts +4 -3
  7. package/dist/types/{components → packages/components}/modules/FButton.vue.d.ts +3 -3
  8. package/dist/types/packages/components/modules/FDialog.vue.d.ts +46 -0
  9. package/dist/types/{components → packages/components}/modules/FDropdown.vue.d.ts +5 -0
  10. package/dist/types/packages/components/modules/FInput.vue.d.ts +11 -0
  11. package/dist/types/{components → packages/components}/modules/FInputNumber.vue.d.ts +0 -1
  12. package/dist/types/{components/modules/FDialog.vue.d.ts → packages/components/modules/FMask.vue.d.ts} +2 -2
  13. package/dist/types/{components → packages/components}/modules/FSelect.vue.d.ts +3 -0
  14. package/dist/types/packages/composables/FDialog.d.ts +3 -0
  15. package/dist/types/{types → packages/types}/components/index.d.ts +3 -1
  16. package/dist/types/{types → packages/types}/components/modules/base.d.ts +1 -1
  17. package/dist/types/{types → packages/types}/components/modules/f-button.d.ts +3 -1
  18. package/dist/types/packages/types/components/modules/f-dialog.d.ts +69 -0
  19. package/dist/types/{types → packages/types}/components/modules/f-dropdown.d.ts +1 -0
  20. package/dist/types/{types → packages/types}/components/modules/f-input-number.d.ts +0 -1
  21. package/dist/types/{types → packages/types}/components/modules/f-input.d.ts +3 -5
  22. package/dist/types/{types/components/modules/f-dialog.d.ts → packages/types/components/modules/f-mask.d.ts} +2 -2
  23. package/dist/types/packages/types/components/modules/f-select.d.ts +7 -0
  24. package/package.json +1 -1
  25. package/dist/types/components/modules/FInput.vue.d.ts +0 -27
  26. package/dist/types/{assets → packages/assets}/index.d.ts +0 -0
  27. package/dist/types/{components → packages/components}/modules/FAffix.vue.d.ts +0 -0
  28. package/dist/types/{components → packages/components}/modules/FAlert.vue.d.ts +0 -0
  29. package/dist/types/{components → packages/components}/modules/FAvatar.vue.d.ts +0 -0
  30. package/dist/types/{components → packages/components}/modules/FBadge.vue.d.ts +0 -0
  31. package/dist/types/{components → packages/components}/modules/FBreadcrumb.vue.d.ts +0 -0
  32. package/dist/types/{components → packages/components}/modules/FButtonGroup.vue.d.ts +0 -0
  33. package/dist/types/{components → packages/components}/modules/FCard.vue.d.ts +0 -0
  34. package/dist/types/{components → packages/components}/modules/FCheckbox.vue.d.ts +0 -0
  35. package/dist/types/{components → packages/components}/modules/FCol.vue.d.ts +0 -0
  36. package/dist/types/{components → packages/components}/modules/FCollapse.vue.d.ts +0 -0
  37. package/dist/types/{components → packages/components}/modules/FCollapseItem.vue.d.ts +0 -0
  38. package/dist/types/{components → packages/components}/modules/FColorPicker.vue.d.ts +0 -0
  39. package/dist/types/{components → packages/components}/modules/FContainer.vue.d.ts +0 -0
  40. package/dist/types/{components → packages/components}/modules/FDivider.vue.d.ts +0 -0
  41. package/dist/types/{components → packages/components}/modules/FEditor.vue.d.ts +2 -2
  42. package/dist/types/{components → packages/components}/modules/FEmpty.vue.d.ts +0 -0
  43. package/dist/types/{components → packages/components}/modules/FForm.vue.d.ts +0 -0
  44. package/dist/types/{components → packages/components}/modules/FFormItem.vue.d.ts +0 -0
  45. package/dist/types/{components → packages/components}/modules/FIcon.vue.d.ts +0 -0
  46. package/dist/types/{components → packages/components}/modules/FImage.vue.d.ts +0 -0
  47. package/dist/types/{components → packages/components}/modules/FLink.vue.d.ts +0 -0
  48. package/dist/types/{components → packages/components}/modules/FLoading.vue.d.ts +0 -0
  49. package/dist/types/{components → packages/components}/modules/FMessage.vue.d.ts +0 -0
  50. package/dist/types/{components → packages/components}/modules/FNotification.vue.d.ts +0 -0
  51. package/dist/types/{components → packages/components}/modules/FPagination.vue.d.ts +0 -0
  52. package/dist/types/{components → packages/components}/modules/FProgress.vue.d.ts +0 -0
  53. package/dist/types/{components → packages/components}/modules/FRate.vue.d.ts +2 -2
  54. /package/dist/types/{components → packages/components}/modules/FResult.vue.d.ts +0 -0
  55. /package/dist/types/{components → packages/components}/modules/FRow.vue.d.ts +0 -0
  56. /package/dist/types/{components → packages/components}/modules/FScrollbar.vue.d.ts +0 -0
  57. /package/dist/types/{components → packages/components}/modules/FSlider.vue.d.ts +0 -0
  58. /package/dist/types/{components → packages/components}/modules/FSpace.vue.d.ts +0 -0
  59. /package/dist/types/{components → packages/components}/modules/FTable.vue.d.ts +0 -0
  60. /package/dist/types/{components → packages/components}/modules/FTabs.vue.d.ts +0 -0
  61. /package/dist/types/{components → packages/components}/modules/FTag.vue.d.ts +0 -0
  62. /package/dist/types/{components → packages/components}/modules/FText.vue.d.ts +0 -0
  63. /package/dist/types/{components → packages/components}/modules/FTooltip.vue.d.ts +0 -0
  64. /package/dist/types/{components → packages/components}/modules/FTypography.vue.d.ts +0 -0
  65. /package/dist/types/{components → packages/components}/modules/FUpload.vue.d.ts +0 -0
  66. /package/dist/types/{components/modules → packages/composables}/FMessage.d.ts +0 -0
  67. /package/dist/types/{components/modules → packages/composables}/FNotification.d.ts +0 -0
  68. /package/dist/types/{index.d.ts → packages/index.d.ts} +0 -0
  69. /package/dist/types/{types → packages/types}/components/modules/f-affix.d.ts +0 -0
  70. /package/dist/types/{types → packages/types}/components/modules/f-alert.d.ts +0 -0
  71. /package/dist/types/{types → packages/types}/components/modules/f-avatar.d.ts +0 -0
  72. /package/dist/types/{types → packages/types}/components/modules/f-badge.d.ts +0 -0
  73. /package/dist/types/{types → packages/types}/components/modules/f-breadcrumb.d.ts +0 -0
  74. /package/dist/types/{types → packages/types}/components/modules/f-button-group.d.ts +0 -0
  75. /package/dist/types/{types → packages/types}/components/modules/f-card.d.ts +0 -0
  76. /package/dist/types/{types → packages/types}/components/modules/f-checkbox.d.ts +0 -0
  77. /package/dist/types/{types → packages/types}/components/modules/f-col.d.ts +0 -0
  78. /package/dist/types/{types → packages/types}/components/modules/f-collapse-item.d.ts +0 -0
  79. /package/dist/types/{types → packages/types}/components/modules/f-collapse.d.ts +0 -0
  80. /package/dist/types/{types → packages/types}/components/modules/f-color-picker.d.ts +0 -0
  81. /package/dist/types/{types → packages/types}/components/modules/f-container.d.ts +0 -0
  82. /package/dist/types/{types → packages/types}/components/modules/f-divider.d.ts +0 -0
  83. /package/dist/types/{types → packages/types}/components/modules/f-editor.d.ts +0 -0
  84. /package/dist/types/{types → packages/types}/components/modules/f-empty.d.ts +0 -0
  85. /package/dist/types/{types → packages/types}/components/modules/f-form-item.d.ts +0 -0
  86. /package/dist/types/{types → packages/types}/components/modules/f-form.d.ts +0 -0
  87. /package/dist/types/{types → packages/types}/components/modules/f-icon.d.ts +0 -0
  88. /package/dist/types/{types → packages/types}/components/modules/f-image.d.ts +0 -0
  89. /package/dist/types/{types → packages/types}/components/modules/f-link.d.ts +0 -0
  90. /package/dist/types/{types → packages/types}/components/modules/f-loading.d.ts +0 -0
  91. /package/dist/types/{types → packages/types}/components/modules/f-menu.d.ts +0 -0
  92. /package/dist/types/{types → packages/types}/components/modules/f-message.d.ts +0 -0
  93. /package/dist/types/{types → packages/types}/components/modules/f-notification.d.ts +0 -0
  94. /package/dist/types/{types → packages/types}/components/modules/f-pagination.d.ts +0 -0
  95. /package/dist/types/{types → packages/types}/components/modules/f-progress.d.ts +0 -0
  96. /package/dist/types/{types → packages/types}/components/modules/f-rate.d.ts +0 -0
  97. /package/dist/types/{types → packages/types}/components/modules/f-result.d.ts +0 -0
  98. /package/dist/types/{types → packages/types}/components/modules/f-row.d.ts +0 -0
  99. /package/dist/types/{types → packages/types}/components/modules/f-scrollbar.d.ts +0 -0
  100. /package/dist/types/{types → packages/types}/components/modules/f-slider-captcha.d.ts +0 -0
  101. /package/dist/types/{types → packages/types}/components/modules/f-slider.d.ts +0 -0
  102. /package/dist/types/{types → packages/types}/components/modules/f-space.d.ts +0 -0
  103. /package/dist/types/{types → packages/types}/components/modules/f-table.d.ts +0 -0
  104. /package/dist/types/{types → packages/types}/components/modules/f-tabs.d.ts +0 -0
  105. /package/dist/types/{types → packages/types}/components/modules/f-tag.d.ts +0 -0
  106. /package/dist/types/{types → packages/types}/components/modules/f-tagsview.d.ts +0 -0
  107. /package/dist/types/{types → packages/types}/components/modules/f-text.d.ts +0 -0
  108. /package/dist/types/{types → packages/types}/components/modules/f-toolbar.d.ts +0 -0
  109. /package/dist/types/{types → packages/types}/components/modules/f-tooltip.d.ts +0 -0
  110. /package/dist/types/{types → packages/types}/components/modules/f-typography.d.ts +0 -0
  111. /package/dist/types/{types → packages/types}/components/modules/f-upload.d.ts +0 -0
  112. /package/dist/types/{types → packages/types}/index.d.ts +0 -0
  113. /package/dist/types/{types → packages/types}/models/index.d.ts +0 -0
  114. /package/dist/types/{utils → packages/utils}/general.d.ts +0 -0
  115. /package/dist/types/{utils → packages/utils}/index.d.ts +0 -0
  116. /package/dist/types/{utils → packages/utils}/validator.d.ts +0 -0
@@ -37,10 +37,10 @@ var __async = (__this, __arguments, generator) => {
37
37
  step((generator = generator.apply(__this, __arguments)).next());
38
38
  });
39
39
  };
40
- import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, unref, renderSlot, normalizeClass, createCommentVNode, Fragment, renderList, createElementVNode, toDisplayString, ref, watch, createVNode, withDirectives, Transition, withCtx, vShow, mergeModels, useModel, readonly, vModelDynamic, createBlock, nextTick, onUnmounted, Teleport, withModifiers, resolveDynamicComponent, withKeys, isRef, vModelText, createTextVNode, TransitionGroup, useSlots, inject, provide, onMounted, onBeforeUnmount, reactive, toRefs, createStaticVNode, render } from "vue";
41
- import { Search, StarOutline, StarHalf, Star, ChevronDownOutline, ChevronBackOutline, EllipsisHorizontal, ChevronForwardOutline, CloseCircle, Close, Person, InformationCircleOutline, WarningOutline, AlertCircleOutline, CheckmarkCircleOutline, CloudUpload, DocumentOutline, InformationCircle, AlertCircle, CheckmarkCircle, Warning } from "@vicons/ionicons5";
40
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, unref, renderSlot, normalizeClass, createCommentVNode, Fragment, renderList, createElementVNode, toDisplayString, ref, watch, createVNode, withDirectives, Transition, withCtx, vShow, mergeModels, useModel, inject, createBlock, resolveDynamicComponent, nextTick, onUnmounted, Teleport, withModifiers, withKeys, isRef, vModelText, createTextVNode, TransitionGroup, useSlots, onMounted, onBeforeUnmount, render, h, provide, readonly, reactive, toRefs, createStaticVNode } from "vue";
41
+ import { CloseCircleOutline, EyeOutline, EyeOffOutline, StarOutline, StarHalf, Star, ChevronDownOutline, ChevronBackOutline, EllipsisHorizontal, ChevronForwardOutline, CloseCircle, Close, Person, CloseOutline, InformationCircleOutline, AlertCircleOutline, WarningOutline, CheckmarkCircleOutline, InformationCircle, Warning, CheckmarkCircle, CloudUpload, DocumentOutline, RemoveOutline, AddOutline, ChevronUpOutline, AlertCircle } from "@vicons/ionicons5";
42
42
  import { useEventListener } from "@vueuse/core";
43
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
43
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
44
44
  __name: "FIcon",
45
45
  props: {
46
46
  color: {},
@@ -64,24 +64,24 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
64
64
  };
65
65
  }
66
66
  });
67
- const _export_sfc = (sfc, props) => {
67
+ const _export_sfc$3 = (sfc, props) => {
68
68
  const target = sfc.__vccOpts || sfc;
69
69
  for (const [key, val] of props) {
70
70
  target[key] = val;
71
71
  }
72
72
  return target;
73
73
  };
74
- const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-baf7de0c"]]);
74
+ const FIcon$3 = /* @__PURE__ */ _export_sfc$3(_sfc_main$M, [["__scopeId", "data-v-baf7de0c"]]);
75
75
  const PictureError = "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";
76
- const _hoisted_1$u = {
76
+ const _hoisted_1$x = {
77
77
  key: 0,
78
78
  class: "loop cubes"
79
79
  };
80
- const _hoisted_2$n = {
80
+ const _hoisted_2$r = {
81
81
  key: 2,
82
82
  class: "msg"
83
83
  };
84
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
84
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
85
85
  __name: "FLoading",
86
86
  props: {
87
87
  type: { default: "dots" },
@@ -94,7 +94,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
94
94
  return openBlock(), createElementBlock("div", {
95
95
  class: normalizeClass(["flex-center-col size-full loading-container", { "global-mask": _ctx.mask }])
96
96
  }, [
97
- _ctx.type === "cubes" ? (openBlock(), createElementBlock("div", _hoisted_1$u, [
97
+ _ctx.type === "cubes" ? (openBlock(), createElementBlock("div", _hoisted_1$x, [
98
98
  (openBlock(), createElementBlock(Fragment, null, renderList(6, (i) => {
99
99
  return createElementVNode("div", {
100
100
  class: "item cubes",
@@ -105,23 +105,23 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
105
105
  key: 1,
106
106
  class: normalizeClass(["loader", _ctx.type])
107
107
  }, null, 2)),
108
- props.text ? (openBlock(), createElementBlock("p", _hoisted_2$n, toDisplayString(props.text), 1)) : createCommentVNode("", true)
108
+ props.text ? (openBlock(), createElementBlock("p", _hoisted_2$r, toDisplayString(props.text), 1)) : createCommentVNode("", true)
109
109
  ], 2);
110
110
  };
111
111
  }
112
112
  });
113
- const FLoading = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-20f58a50"]]);
114
- const _hoisted_1$t = { class: "f-image" };
115
- const _hoisted_2$m = {
113
+ const FLoading = /* @__PURE__ */ _export_sfc$3(_sfc_main$I, [["__scopeId", "data-v-20f58a50"]]);
114
+ const _hoisted_1$w = { class: "f-image" };
115
+ const _hoisted_2$q = {
116
116
  key: 0,
117
117
  class: "f-image__placeholder"
118
118
  };
119
- const _hoisted_3$j = {
119
+ const _hoisted_3$m = {
120
120
  key: 0,
121
121
  class: "f-image__error"
122
122
  };
123
- const _hoisted_4$b = ["src", "loading"];
124
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
123
+ const _hoisted_4$f = ["src", "loading"];
124
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
125
125
  __name: "FImage",
126
126
  props: {
127
127
  src: {},
@@ -138,10 +138,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
138
138
  const onLoad = () => status.value = "loaded";
139
139
  const onError = () => status.value = "error";
140
140
  return (_ctx, _cache) => {
141
- return openBlock(), createElementBlock("div", _hoisted_1$t, [
141
+ return openBlock(), createElementBlock("div", _hoisted_1$w, [
142
142
  createVNode(Transition, { name: "fade" }, {
143
143
  default: withCtx(() => [
144
- unref(status) === "loading" ? (openBlock(), createElementBlock("div", _hoisted_2$m, [
144
+ unref(status) === "loading" ? (openBlock(), createElementBlock("div", _hoisted_2$q, [
145
145
  createVNode(FLoading, { type: "classic first" })
146
146
  ])) : createCommentVNode("", true)
147
147
  ]),
@@ -149,9 +149,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
149
149
  }),
150
150
  createVNode(Transition, { name: "fade" }, {
151
151
  default: withCtx(() => [
152
- unref(status) === "error" ? (openBlock(), createElementBlock("div", _hoisted_3$j, [
152
+ unref(status) === "error" ? (openBlock(), createElementBlock("div", _hoisted_3$m, [
153
153
  renderSlot(_ctx.$slots, "error", {}, () => [
154
- createVNode(FIcon, { size: "48px" }, {
154
+ createVNode(FIcon$3, { size: "48px" }, {
155
155
  default: withCtx(() => [
156
156
  createVNode(unref(PictureError))
157
157
  ]),
@@ -169,83 +169,116 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
169
169
  class: "f-image__img",
170
170
  onLoad,
171
171
  onError
172
- }, null, 44, _hoisted_4$b), [
172
+ }, null, 44, _hoisted_4$f), [
173
173
  [vShow, unref(status) === "loaded"]
174
174
  ])
175
175
  ]);
176
176
  };
177
177
  }
178
178
  });
179
- const FImage = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-e959ab10"]]);
180
- const _hoisted_1$s = ["type", "placeholder", "disabled", "readonly", "name", "id"];
181
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
179
+ const FImage = /* @__PURE__ */ _export_sfc$3(_sfc_main$H, [["__scopeId", "data-v-e959ab10"]]);
180
+ const _hoisted_1$v = ["type", "value", "placeholder"];
181
+ const _hoisted_2$p = { class: "f-input__suffix" };
182
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
182
183
  __name: "FInput",
183
184
  props: /* @__PURE__ */ mergeModels({
184
- placeholder: { default: "输入..." },
185
- type: { default: "text" },
186
- disabled: { type: Boolean, default: false },
187
- readonly: { type: Boolean, default: false },
188
- name: { default: "" },
189
- id: { default: "" }
185
+ type: {},
186
+ placeholder: {},
187
+ clearable: { type: Boolean },
188
+ showPassword: { type: Boolean }
190
189
  }, {
191
190
  "modelValue": { default: "" },
192
191
  "modelModifiers": {}
193
192
  }),
194
- emits: /* @__PURE__ */ mergeModels(["input", "change", "focus", "blur"], ["update:modelValue"]),
195
- setup(__props, { emit: __emit }) {
196
- const model = useModel(__props, "modelValue");
197
- const emit = __emit;
198
- const handleInput = (event) => {
199
- const value = event.target.value;
200
- emit("input", value);
193
+ emits: ["update:modelValue"],
194
+ setup(__props) {
195
+ const modelValue = useModel(__props, "modelValue");
196
+ const props = __props;
197
+ const formItemContext = inject("FFormItemContext", null);
198
+ const isPasswordVisible = ref(false);
199
+ const isFocused = ref(false);
200
+ const hasError = computed(() => {
201
+ var _a;
202
+ return !!((_a = formItemContext == null ? void 0 : formItemContext.errorMsg) == null ? void 0 : _a.value);
203
+ });
204
+ const inputType = computed(() => {
205
+ if (props.showPassword && props.type === "password") {
206
+ return isPasswordVisible.value ? "text" : "password";
207
+ }
208
+ return props.type || "text";
209
+ });
210
+ const showClearIcon = computed(() => {
211
+ return props.clearable && modelValue.value && !props.showPassword;
212
+ });
213
+ const showPasswordIcon = computed(() => {
214
+ return props.showPassword && props.type === "password" && modelValue.value;
215
+ });
216
+ const onInput = (e) => {
217
+ modelValue.value = e.target.value;
218
+ };
219
+ const onBlur = (e) => {
220
+ isFocused.value = false;
221
+ formItemContext == null ? void 0 : formItemContext.validate();
201
222
  };
202
- const handleChange = (event) => {
203
- const value = event.target.value;
204
- emit("change", value);
223
+ const onFocus = () => {
224
+ isFocused.value = true;
205
225
  };
206
- const handleFocus = (event) => {
207
- emit("focus", event);
226
+ const clearValue = () => {
227
+ modelValue.value = "";
208
228
  };
209
- const handleBlur = (event) => {
210
- emit("blur", event);
229
+ const togglePassword = () => {
230
+ isPasswordVisible.value = !isPasswordVisible.value;
211
231
  };
212
232
  return (_ctx, _cache) => {
213
233
  return openBlock(), createElementBlock("div", {
214
- class: normalizeClass(["f-input", { "is-disabled": _ctx.disabled, "is-readonly": "readonly" in _ctx ? _ctx.readonly : unref(readonly) }])
234
+ class: normalizeClass(["f-input", {
235
+ "is-focus": unref(isFocused),
236
+ "is-error": unref(hasError)
237
+ }])
215
238
  }, [
216
- createVNode(FIcon, { class: "f-input__icon" }, {
217
- default: withCtx(() => [
218
- createVNode(unref(Search))
219
- ]),
220
- _: 1
221
- }),
222
- withDirectives(createElementVNode("input", {
223
- class: "f-input__text",
224
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
225
- type: _ctx.type,
239
+ createElementVNode("input", {
240
+ type: unref(inputType),
241
+ value: modelValue.value,
226
242
  placeholder: _ctx.placeholder,
227
- disabled: _ctx.disabled,
228
- readonly: "readonly" in _ctx ? _ctx.readonly : unref(readonly),
229
- name: _ctx.name,
230
- id: _ctx.id,
231
- onInput: handleInput,
232
- onChange: handleChange,
233
- onFocus: handleFocus,
234
- onBlur: handleBlur
235
- }, null, 40, _hoisted_1$s), [
236
- [vModelDynamic, model.value]
237
- ])
243
+ onInput,
244
+ onBlur,
245
+ onFocus,
246
+ class: "f-input__inner"
247
+ }, null, 40, _hoisted_1$v),
248
+ createElementVNode("div", _hoisted_2$p, [
249
+ unref(showClearIcon) ? (openBlock(), createBlock(FIcon$3, {
250
+ key: 0,
251
+ onClick: clearValue,
252
+ class: "icon-btn"
253
+ }, {
254
+ default: withCtx(() => [
255
+ (openBlock(), createBlock(resolveDynamicComponent(unref(CloseCircleOutline))))
256
+ ]),
257
+ _: 1
258
+ })) : createCommentVNode("", true),
259
+ unref(showPasswordIcon) ? (openBlock(), createBlock(FIcon$3, {
260
+ key: 1,
261
+ onClick: togglePassword,
262
+ class: "icon-btn"
263
+ }, {
264
+ default: withCtx(() => [
265
+ (openBlock(), createBlock(resolveDynamicComponent(unref(isPasswordVisible) ? unref(EyeOutline) : unref(EyeOffOutline))))
266
+ ]),
267
+ _: 1
268
+ })) : createCommentVNode("", true)
269
+ ]),
270
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "f-input__focus-bg" }, null, -1))
238
271
  ], 2);
239
272
  };
240
273
  }
241
274
  });
242
- const FInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-9af0fbbe"]]);
243
- const _hoisted_1$r = ["onMousemove"];
244
- const _hoisted_2$l = {
275
+ const FInput = /* @__PURE__ */ _export_sfc$3(_sfc_main$G, [["__scopeId", "data-v-68f468e1"]]);
276
+ const _hoisted_1$u = ["onMousemove"];
277
+ const _hoisted_2$o = {
245
278
  key: 0,
246
279
  class: "f-rate__score"
247
280
  };
248
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
281
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
249
282
  __name: "FRate",
250
283
  props: /* @__PURE__ */ mergeModels({
251
284
  modelValue: {},
@@ -319,7 +352,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
319
352
  onMousemove: ($event) => onMouseMove($event, index),
320
353
  onClick
321
354
  }, [
322
- createVNode(FIcon, {
355
+ createVNode(FIcon$3, {
323
356
  color: getStarColor(index),
324
357
  size: unref(starSize)
325
358
  }, {
@@ -328,32 +361,33 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
328
361
  ]),
329
362
  _: 2
330
363
  }, 1032, ["color", "size"])
331
- ], 40, _hoisted_1$r);
364
+ ], 40, _hoisted_1$u);
332
365
  }), 128)),
333
- props.showText ? (openBlock(), createElementBlock("span", _hoisted_2$l, toDisplayString(unref(scoreText)), 1)) : createCommentVNode("", true)
366
+ props.showText ? (openBlock(), createElementBlock("span", _hoisted_2$o, toDisplayString(unref(scoreText)), 1)) : createCommentVNode("", true)
334
367
  ], 34);
335
368
  };
336
369
  }
337
370
  });
338
- const FRate = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-3b5c4f14"]]);
339
- const _hoisted_1$q = { class: "f-dropdown-wrapper" };
340
- const _hoisted_2$k = { class: "f-dropdown-content" };
341
- const _hoisted_3$i = ["onClick"];
342
- const _hoisted_4$a = {
371
+ const FRate = /* @__PURE__ */ _export_sfc$3(_sfc_main$F, [["__scopeId", "data-v-3b5c4f14"]]);
372
+ const _hoisted_1$t = { class: "f-dropdown-wrapper" };
373
+ const _hoisted_2$n = { class: "f-dropdown-content" };
374
+ const _hoisted_3$l = ["onClick"];
375
+ const _hoisted_4$e = {
343
376
  key: 0,
344
377
  class: "opt-icon"
345
378
  };
346
- const _hoisted_5$9 = { class: "opt-label" };
347
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
379
+ const _hoisted_5$c = { class: "opt-label" };
380
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
348
381
  __name: "FDropdown",
349
382
  props: {
350
383
  placement: { default: "right-start" },
351
384
  offset: { default: 12 },
352
385
  zIndex: { default: 2e3 },
353
386
  trigger: { default: "hover" },
354
- options: { default: () => [] }
387
+ options: { default: () => [] },
388
+ disabled: { type: Boolean, default: false }
355
389
  },
356
- emits: ["select"],
390
+ emits: ["select", "show", "hide"],
357
391
  setup(__props, { emit: __emit }) {
358
392
  const props = __props;
359
393
  const emit = __emit;
@@ -400,7 +434,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
400
434
  const vw = window.innerWidth;
401
435
  const vh = window.innerHeight;
402
436
  const w = dropdownWidth.value || 160;
403
- const h = dropdownHeight.value || 200;
437
+ const h2 = dropdownHeight.value || 200;
404
438
  let top = 0;
405
439
  let left = 0;
406
440
  let resolvedSide = side;
@@ -418,12 +452,12 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
418
452
  }
419
453
  } else if (side === "bottom") {
420
454
  top = rect.bottom + gap;
421
- if (top + h > vh) {
422
- top = rect.top - h - gap;
455
+ if (top + h2 > vh) {
456
+ top = rect.top - h2 - gap;
423
457
  resolvedSide = "top";
424
458
  }
425
459
  } else if (side === "top") {
426
- top = rect.top - h - gap;
460
+ top = rect.top - h2 - gap;
427
461
  if (top < 0) {
428
462
  top = rect.bottom + gap;
429
463
  resolvedSide = "bottom";
@@ -436,9 +470,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
436
470
  left = Math.max(8, Math.min(left, vw - w - 8));
437
471
  } else {
438
472
  if (align === "start") top = rect.top;
439
- else if (align === "end") top = rect.bottom - h;
440
- else top = rect.top + (rect.height - h) / 2;
441
- top = Math.max(8, Math.min(top, vh - h - 8));
473
+ else if (align === "end") top = rect.bottom - h2;
474
+ else top = rect.top + (rect.height - h2) / 2;
475
+ top = Math.max(8, Math.min(top, vh - h2 - 8));
442
476
  }
443
477
  const originX = resolvedSide === "right" ? "left" : resolvedSide === "left" ? "right" : align === "start" ? "left" : align === "end" ? "right" : "center";
444
478
  const originY = resolvedSide === "bottom" ? "top" : resolvedSide === "top" ? "bottom" : align === "start" ? "top" : align === "end" ? "bottom" : "center";
@@ -457,7 +491,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
457
491
  }
458
492
  };
459
493
  const handleTriggerClick = (e) => {
460
- if (props.trigger !== "click") return;
494
+ if (props.trigger !== "click" || props.disabled) return;
461
495
  e.stopPropagation();
462
496
  if (!show.value) {
463
497
  anchorRect.value = triggerRef.value.getBoundingClientRect();
@@ -467,7 +501,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
467
501
  }
468
502
  };
469
503
  const handleMouseEnter = () => {
470
- if (props.trigger !== "hover") return;
504
+ if (props.trigger !== "hover" || props.disabled) return;
471
505
  clearLeaveTimer();
472
506
  showTimer = setTimeout(() => {
473
507
  if (triggerRef.value) {
@@ -502,9 +536,11 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
502
536
  yield nextTick();
503
537
  dropdownHeight.value = ((_a = dropdownRef.value) == null ? void 0 : _a.offsetHeight) || 200;
504
538
  dropdownWidth.value = ((_b = dropdownRef.value) == null ? void 0 : _b.offsetWidth) || 160;
539
+ emit("show");
505
540
  } else {
506
541
  dropdownHeight.value = 0;
507
542
  dropdownWidth.value = 0;
543
+ emit("hide");
508
544
  }
509
545
  }));
510
546
  onUnmounted(() => {
@@ -513,7 +549,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
513
549
  });
514
550
  useEventListener(window, "click", handleWindowClick);
515
551
  return (_ctx, _cache) => {
516
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
552
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
517
553
  createElementVNode("div", {
518
554
  ref_key: "triggerRef",
519
555
  ref: triggerRef,
@@ -543,18 +579,18 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
543
579
  class: "f-dropdown-bridge",
544
580
  style: normalizeStyle(unref(bridgeStyle))
545
581
  }, null, 4)) : createCommentVNode("", true),
546
- createElementVNode("div", _hoisted_2$k, [
582
+ createElementVNode("div", _hoisted_2$n, [
547
583
  _ctx.options && _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (opt) => {
548
584
  return openBlock(), createElementBlock("div", {
549
585
  key: opt.key,
550
586
  class: normalizeClass(["f-dropdown-option", { "is-disabled": opt.disabled }]),
551
587
  onClick: ($event) => handleOptionClick(opt)
552
588
  }, [
553
- opt.icon ? (openBlock(), createElementBlock("span", _hoisted_4$a, [
589
+ opt.icon ? (openBlock(), createElementBlock("span", _hoisted_4$e, [
554
590
  (openBlock(), createBlock(resolveDynamicComponent(opt.icon)))
555
591
  ])) : createCommentVNode("", true),
556
- createElementVNode("span", _hoisted_5$9, toDisplayString(opt.label), 1)
557
- ], 10, _hoisted_3$i);
592
+ createElementVNode("span", _hoisted_5$c, toDisplayString(opt.label), 1)
593
+ ], 10, _hoisted_3$l);
558
594
  }), 128)) : renderSlot(_ctx.$slots, "content", { key: 1 }, void 0, true)
559
595
  ])
560
596
  ], 36)) : createCommentVNode("", true)
@@ -566,55 +602,66 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
566
602
  };
567
603
  }
568
604
  });
569
- const FDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-addb3a3b"]]);
570
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
605
+ const FDropdown = /* @__PURE__ */ _export_sfc$3(_sfc_main$E, [["__scopeId", "data-v-834f9929"]]);
606
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
571
607
  __name: "FSelect",
572
608
  props: /* @__PURE__ */ mergeModels({
573
609
  options: {},
574
- placeholder: {}
610
+ placeholder: {},
611
+ disabled: { type: Boolean }
575
612
  }, {
576
613
  "modelValue": {},
577
614
  "modelModifiers": {}
578
615
  }),
579
- emits: /* @__PURE__ */ mergeModels(["select"], ["update:modelValue"]),
616
+ emits: /* @__PURE__ */ mergeModels(["select", "change"], ["update:modelValue"]),
580
617
  setup(__props, { emit: __emit }) {
581
618
  const props = __props;
582
619
  const emit = __emit;
583
620
  const modelValue = useModel(__props, "modelValue");
584
621
  const isOpen = ref(false);
585
- const selectedLabel = computed(
586
- () => {
587
- var _a, _b, _c;
588
- return (_c = (_a = props.options.find((o) => o.key === modelValue.value)) == null ? void 0 : _a.label) != null ? _c : (_b = props.placeholder) != null ? _b : "请选择";
589
- }
590
- );
591
- const hasValue = computed(() => modelValue.value !== void 0 && modelValue.value !== "");
622
+ const dropdownRef = ref();
623
+ const selectedLabel = computed(() => {
624
+ var _a, _b;
625
+ const option = props.options.find((o) => o.key === modelValue.value);
626
+ return (_b = option == null ? void 0 : option.label) != null ? _b : (_a = props.placeholder) != null ? _a : "请选择";
627
+ });
628
+ const hasValue = computed(() => {
629
+ return modelValue.value !== void 0 && modelValue.value !== null && modelValue.value !== "";
630
+ });
592
631
  const handleSelect = (key, option) => {
632
+ const oldValue = modelValue.value;
593
633
  modelValue.value = key;
594
634
  emit("select", key, option);
635
+ if (oldValue !== key) {
636
+ emit("change", key, option);
637
+ }
595
638
  isOpen.value = false;
596
639
  };
597
- const handleDropdownShow = (val) => {
598
- isOpen.value = val;
599
- };
600
640
  return (_ctx, _cache) => {
601
641
  return openBlock(), createBlock(FDropdown, {
642
+ ref_key: "dropdownRef",
643
+ ref: dropdownRef,
602
644
  options: _ctx.options,
645
+ disabled: _ctx.disabled,
603
646
  trigger: "click",
604
647
  onSelect: handleSelect,
605
- onShow: _cache[0] || (_cache[0] = ($event) => handleDropdownShow(true)),
606
- onHide: _cache[1] || (_cache[1] = ($event) => handleDropdownShow(false)),
648
+ onShow: _cache[0] || (_cache[0] = ($event) => isOpen.value = true),
649
+ onHide: _cache[1] || (_cache[1] = ($event) => isOpen.value = false),
607
650
  placement: "bottom",
608
651
  offset: 4
609
652
  }, {
610
653
  default: withCtx(() => [
611
654
  createElementVNode("div", {
612
- class: normalizeClass(["f-select", { "is-active": unref(hasValue), "is-open": unref(isOpen) }])
655
+ class: normalizeClass(["f-select", {
656
+ "is-active": unref(hasValue),
657
+ "is-open": unref(isOpen),
658
+ "is-disabled": _ctx.disabled
659
+ }])
613
660
  }, [
614
661
  createElementVNode("span", {
615
662
  class: normalizeClass(["f-select__label", { "is-placeholder": !unref(hasValue) }])
616
663
  }, toDisplayString(unref(selectedLabel)), 3),
617
- createVNode(FIcon, { class: "f-select__arrow" }, {
664
+ createVNode(FIcon$3, { class: "f-select__arrow" }, {
618
665
  default: withCtx(() => [
619
666
  createVNode(unref(ChevronDownOutline))
620
667
  ]),
@@ -623,25 +670,25 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
623
670
  ], 2)
624
671
  ]),
625
672
  _: 1
626
- }, 8, ["options"]);
673
+ }, 8, ["options", "disabled"]);
627
674
  };
628
675
  }
629
676
  });
630
- const FSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-61444561"]]);
631
- const _hoisted_1$p = {
677
+ const FSelect = /* @__PURE__ */ _export_sfc$3(_sfc_main$D, [["__scopeId", "data-v-fc1ceb39"]]);
678
+ const _hoisted_1$s = {
632
679
  key: 0,
633
680
  class: "f-pagination"
634
681
  };
635
- const _hoisted_2$j = {
682
+ const _hoisted_2$m = {
636
683
  key: 0,
637
684
  class: "f-pagination__total"
638
685
  };
639
- const _hoisted_3$h = {
686
+ const _hoisted_3$k = {
640
687
  key: 1,
641
688
  class: "f-pagination__size"
642
689
  };
643
- const _hoisted_4$9 = ["value"];
644
- const _hoisted_5$8 = ["value"];
690
+ const _hoisted_4$d = ["value"];
691
+ const _hoisted_5$b = ["value"];
645
692
  const _hoisted_6$7 = {
646
693
  key: 3,
647
694
  class: "f-pagination__list"
@@ -656,7 +703,7 @@ const _hoisted_9$2 = {
656
703
  class: "f-pagination__jump"
657
704
  };
658
705
  const _hoisted_10$2 = ["max"];
659
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
706
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
660
707
  __name: "FPagination",
661
708
  props: /* @__PURE__ */ mergeModels({
662
709
  total: {},
@@ -705,10 +752,10 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
705
752
  jumpInput.value = "";
706
753
  };
707
754
  return (_ctx, _cache) => {
708
- return !_ctx.hideOnSingle || unref(pageCount) > 1 ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
755
+ return !_ctx.hideOnSingle || unref(pageCount) > 1 ? (openBlock(), createElementBlock("div", _hoisted_1$s, [
709
756
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(layoutItems), (item) => {
710
757
  return openBlock(), createElementBlock(Fragment, { key: item }, [
711
- item === "total" ? (openBlock(), createElementBlock("span", _hoisted_2$j, " 共 " + toDisplayString(_ctx.total) + " 条 ", 1)) : item === "sizes" ? (openBlock(), createElementBlock("div", _hoisted_3$h, [
758
+ item === "total" ? (openBlock(), createElementBlock("span", _hoisted_2$m, " 共 " + toDisplayString(_ctx.total) + " 条 ", 1)) : item === "sizes" ? (openBlock(), createElementBlock("div", _hoisted_3$k, [
712
759
  createElementVNode("select", {
713
760
  class: "size-select",
714
761
  value: _ctx.pageSize,
@@ -718,15 +765,15 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
718
765
  return openBlock(), createElementBlock("option", {
719
766
  key: s,
720
767
  value: s
721
- }, toDisplayString(s) + " 条/页", 9, _hoisted_5$8);
768
+ }, toDisplayString(s) + " 条/页", 9, _hoisted_5$b);
722
769
  }), 128))
723
- ], 40, _hoisted_4$9)
770
+ ], 40, _hoisted_4$d)
724
771
  ])) : item === "prev" ? (openBlock(), createElementBlock("button", {
725
772
  key: 2,
726
773
  class: normalizeClass(["page-btn", { disabled: currentPage.value === 1 }]),
727
774
  onClick: _cache[0] || (_cache[0] = ($event) => go(currentPage.value - 1))
728
775
  }, [
729
- createVNode(FIcon, null, {
776
+ createVNode(FIcon$3, null, {
730
777
  default: withCtx(() => [
731
778
  createVNode(unref(ChevronBackOutline))
732
779
  ]),
@@ -736,7 +783,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
736
783
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(pages), (page, index) => {
737
784
  return openBlock(), createElementBlock(Fragment, { key: index }, [
738
785
  page === "..." ? (openBlock(), createElementBlock("li", _hoisted_7$3, [
739
- createVNode(FIcon, null, {
786
+ createVNode(FIcon$3, null, {
740
787
  default: withCtx(() => [
741
788
  createVNode(unref(EllipsisHorizontal))
742
789
  ]),
@@ -754,7 +801,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
754
801
  class: normalizeClass(["page-btn", { disabled: currentPage.value === unref(pageCount) }]),
755
802
  onClick: _cache[1] || (_cache[1] = ($event) => go(currentPage.value + 1))
756
803
  }, [
757
- createVNode(FIcon, null, {
804
+ createVNode(FIcon$3, null, {
758
805
  default: withCtx(() => [
759
806
  createVNode(unref(ChevronForwardOutline))
760
807
  ]),
@@ -781,24 +828,24 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
781
828
  };
782
829
  }
783
830
  });
784
- const FPagination = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-930f8b20"]]);
785
- const _hoisted_1$o = {
831
+ const FPagination = /* @__PURE__ */ _export_sfc$3(_sfc_main$C, [["__scopeId", "data-v-930f8b20"]]);
832
+ const _hoisted_1$r = {
786
833
  key: 0,
787
834
  class: "f-card__header"
788
835
  };
789
- const _hoisted_2$i = {
836
+ const _hoisted_2$l = {
790
837
  key: 0,
791
838
  class: "f-card__header-extra"
792
839
  };
793
- const _hoisted_3$g = {
840
+ const _hoisted_3$j = {
794
841
  key: 1,
795
842
  class: "f-card__cover"
796
843
  };
797
- const _hoisted_4$8 = {
844
+ const _hoisted_4$c = {
798
845
  key: 2,
799
846
  class: "f-card__body"
800
847
  };
801
- const _hoisted_5$7 = {
848
+ const _hoisted_5$a = {
802
849
  key: 3,
803
850
  class: "f-card__footer"
804
851
  };
@@ -823,7 +870,7 @@ const _hoisted_11$1 = {
823
870
  key: 1,
824
871
  class: "f-card__footer"
825
872
  };
826
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
873
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
827
874
  __name: "FCard",
828
875
  props: {
829
876
  hoverable: { type: Boolean, default: true },
@@ -835,19 +882,19 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
835
882
  class: normalizeClass(["f-card", [`f-card--${_ctx.direction}`, { "is-hoverable": _ctx.hoverable }]])
836
883
  }, [
837
884
  _ctx.direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
838
- _ctx.$slots.header || _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
885
+ _ctx.$slots.header || _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
839
886
  renderSlot(_ctx.$slots, "header", {}, void 0, true),
840
- _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
887
+ _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_2$l, [
841
888
  renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
842
889
  ])) : createCommentVNode("", true)
843
890
  ])) : createCommentVNode("", true),
844
- _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
891
+ _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_3$j, [
845
892
  renderSlot(_ctx.$slots, "cover", {}, void 0, true)
846
893
  ])) : createCommentVNode("", true),
847
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$8, [
894
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
848
895
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
849
896
  ])) : createCommentVNode("", true),
850
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
897
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
851
898
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
852
899
  ])) : createCommentVNode("", true)
853
900
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -873,12 +920,12 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
873
920
  };
874
921
  }
875
922
  });
876
- const FCard = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-a66fa373"]]);
877
- const _hoisted_1$n = {
923
+ const FCard = /* @__PURE__ */ _export_sfc$3(_sfc_main$B, [["__scopeId", "data-v-a66fa373"]]);
924
+ const _hoisted_1$q = {
878
925
  key: 0,
879
926
  class: "f-tag__dot"
880
927
  };
881
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
928
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
882
929
  __name: "FTag",
883
930
  props: {
884
931
  color: {},
@@ -902,9 +949,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
902
949
  onMouseenter: _cache[1] || (_cache[1] = ($event) => isHover.value = true),
903
950
  onMouseleave: _cache[2] || (_cache[2] = ($event) => isHover.value = false)
904
951
  }, [
905
- _ctx.type === "dot" ? (openBlock(), createElementBlock("span", _hoisted_1$n)) : createCommentVNode("", true),
952
+ _ctx.type === "dot" ? (openBlock(), createElementBlock("span", _hoisted_1$q)) : createCommentVNode("", true),
906
953
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
907
- _ctx.closable ? (openBlock(), createBlock(FIcon, {
954
+ _ctx.closable ? (openBlock(), createBlock(FIcon$3, {
908
955
  key: 1,
909
956
  class: "f-tag__close",
910
957
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("close"), ["stop"]))
@@ -918,8 +965,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
918
965
  };
919
966
  }
920
967
  });
921
- const FTag = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-02bd5aa6"]]);
922
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
968
+ const FTag = /* @__PURE__ */ _export_sfc$3(_sfc_main$A, [["__scopeId", "data-v-02bd5aa6"]]);
969
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
923
970
  __name: "FTooltip",
924
971
  props: {
925
972
  content: {},
@@ -1023,13 +1070,13 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
1023
1070
  };
1024
1071
  }
1025
1072
  });
1026
- const FTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-be9acca7"]]);
1027
- const _hoisted_1$m = { class: "f-progress" };
1028
- const _hoisted_2$h = {
1073
+ const FTooltip = /* @__PURE__ */ _export_sfc$3(_sfc_main$z, [["__scopeId", "data-v-be9acca7"]]);
1074
+ const _hoisted_1$p = { class: "f-progress" };
1075
+ const _hoisted_2$k = {
1029
1076
  key: 0,
1030
1077
  class: "f-progress__text"
1031
1078
  };
1032
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
1079
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
1033
1080
  __name: "FProgress",
1034
1081
  props: {
1035
1082
  percent: {},
@@ -1041,7 +1088,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1041
1088
  const props = __props;
1042
1089
  const clampedPercent = computed(() => Math.min(100, Math.max(0, props.percent)));
1043
1090
  return (_ctx, _cache) => {
1044
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
1091
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
1045
1092
  createElementVNode("div", {
1046
1093
  class: "f-progress__track",
1047
1094
  style: normalizeStyle({ height: `${_ctx.height}px` })
@@ -1054,17 +1101,17 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1054
1101
  })
1055
1102
  }, null, 4)
1056
1103
  ], 4),
1057
- _ctx.showText ? (openBlock(), createElementBlock("span", _hoisted_2$h, toDisplayString(unref(clampedPercent)) + "%", 1)) : createCommentVNode("", true)
1104
+ _ctx.showText ? (openBlock(), createElementBlock("span", _hoisted_2$k, toDisplayString(unref(clampedPercent)) + "%", 1)) : createCommentVNode("", true)
1058
1105
  ]);
1059
1106
  };
1060
1107
  }
1061
1108
  });
1062
- const FProgress = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-c2164d6e"]]);
1063
- const _hoisted_1$l = { class: "f-tabs__nav-container" };
1064
- const _hoisted_2$g = { class: "f-tabs__nav" };
1065
- const _hoisted_3$f = ["onClick"];
1066
- const _hoisted_4$7 = { class: "f-tabs__label" };
1067
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
1109
+ const FProgress = /* @__PURE__ */ _export_sfc$3(_sfc_main$y, [["__scopeId", "data-v-c2164d6e"]]);
1110
+ const _hoisted_1$o = { class: "f-tabs__nav-container" };
1111
+ const _hoisted_2$j = { class: "f-tabs__nav" };
1112
+ const _hoisted_3$i = ["onClick"];
1113
+ const _hoisted_4$b = { class: "f-tabs__label" };
1114
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1068
1115
  __name: "FTabs",
1069
1116
  props: {
1070
1117
  tabs: {},
@@ -1097,8 +1144,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1097
1144
  return openBlock(), createElementBlock("div", {
1098
1145
  class: normalizeClass(["f-tabs", [`f-tabs--${_ctx.type}`]])
1099
1146
  }, [
1100
- createElementVNode("div", _hoisted_1$l, [
1101
- createElementVNode("div", _hoisted_2$g, [
1147
+ createElementVNode("div", _hoisted_1$o, [
1148
+ createElementVNode("div", _hoisted_2$j, [
1102
1149
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, (tab) => {
1103
1150
  return openBlock(), createElementBlock("div", {
1104
1151
  key: tab.name,
@@ -1108,8 +1155,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1108
1155
  }]),
1109
1156
  onClick: ($event) => setActiveTab(tab.name, tab.disabled)
1110
1157
  }, [
1111
- createElementVNode("span", _hoisted_4$7, toDisplayString(tab.label), 1)
1112
- ], 10, _hoisted_3$f);
1158
+ createElementVNode("span", _hoisted_4$b, toDisplayString(tab.label), 1)
1159
+ ], 10, _hoisted_3$i);
1113
1160
  }), 128))
1114
1161
  ])
1115
1162
  ]),
@@ -1127,17 +1174,17 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1127
1174
  };
1128
1175
  }
1129
1176
  });
1130
- const FTabs = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-268fc654"]]);
1131
- const _hoisted_1$k = {
1177
+ const FTabs = /* @__PURE__ */ _export_sfc$3(_sfc_main$x, [["__scopeId", "data-v-268fc654"]]);
1178
+ const _hoisted_1$n = {
1132
1179
  class: "f-breadcrumb__current",
1133
1180
  "aria-current": "page"
1134
1181
  };
1135
- const _hoisted_2$f = ["href"];
1136
- const _hoisted_3$e = {
1182
+ const _hoisted_2$i = ["href"];
1183
+ const _hoisted_3$h = {
1137
1184
  key: 3,
1138
1185
  class: "f-breadcrumb__text"
1139
1186
  };
1140
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
1187
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1141
1188
  __name: "FBreadcrumb",
1142
1189
  props: {
1143
1190
  items: { default: () => [] },
@@ -1165,12 +1212,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1165
1212
  key: 1,
1166
1213
  item
1167
1214
  }, () => [
1168
- createElementVNode("span", _hoisted_1$k, toDisplayString(item.label), 1)
1215
+ createElementVNode("span", _hoisted_1$n, toDisplayString(item.label), 1)
1169
1216
  ], true) : item.href ? (openBlock(), createElementBlock("a", {
1170
1217
  key: 2,
1171
1218
  href: item.href,
1172
1219
  class: "f-breadcrumb__link"
1173
- }, toDisplayString(item.label), 9, _hoisted_2$f)) : (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(item.label), 1))
1220
+ }, toDisplayString(item.label), 9, _hoisted_2$i)) : (openBlock(), createElementBlock("span", _hoisted_3$h, toDisplayString(item.label), 1))
1174
1221
  ], 64);
1175
1222
  }), 128))
1176
1223
  ]),
@@ -1180,8 +1227,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1180
1227
  };
1181
1228
  }
1182
1229
  });
1183
- const FBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-55b15358"]]);
1184
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
1230
+ const FBreadcrumb = /* @__PURE__ */ _export_sfc$3(_sfc_main$w, [["__scopeId", "data-v-55b15358"]]);
1231
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1185
1232
  __name: "FCol",
1186
1233
  props: {
1187
1234
  span: { default: 24 },
@@ -1222,8 +1269,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1222
1269
  };
1223
1270
  }
1224
1271
  });
1225
- const FCol = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-5a8b0cb4"]]);
1226
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
1272
+ const FCol = /* @__PURE__ */ _export_sfc$3(_sfc_main$v, [["__scopeId", "data-v-5a8b0cb4"]]);
1273
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1227
1274
  __name: "FRow",
1228
1275
  props: {
1229
1276
  gutter: { default: 0 },
@@ -1276,14 +1323,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1276
1323
  };
1277
1324
  }
1278
1325
  });
1279
- const FRow = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-72f62339"]]);
1280
- const _hoisted_1$j = { class: "f-space__item" };
1281
- const _hoisted_2$e = {
1326
+ const FRow = /* @__PURE__ */ _export_sfc$3(_sfc_main$u, [["__scopeId", "data-v-72f62339"]]);
1327
+ const _hoisted_1$m = { class: "f-space__item" };
1328
+ const _hoisted_2$h = {
1282
1329
  key: 0,
1283
1330
  class: "f-space__split",
1284
1331
  "aria-hidden": "true"
1285
1332
  };
1286
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
1333
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1287
1334
  __name: "FSpace",
1288
1335
  props: {
1289
1336
  direction: { default: "horizontal" },
@@ -1337,18 +1384,18 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1337
1384
  }, [
1338
1385
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (child, index) => {
1339
1386
  return openBlock(), createElementBlock(Fragment, { key: index }, [
1340
- createElementVNode("div", _hoisted_1$j, [
1387
+ createElementVNode("div", _hoisted_1$m, [
1341
1388
  (openBlock(), createBlock(resolveDynamicComponent(child)))
1342
1389
  ]),
1343
- _ctx.split && index < unref(children).length - 1 ? (openBlock(), createElementBlock("span", _hoisted_2$e, toDisplayString(_ctx.split), 1)) : createCommentVNode("", true)
1390
+ _ctx.split && index < unref(children).length - 1 ? (openBlock(), createElementBlock("span", _hoisted_2$h, toDisplayString(_ctx.split), 1)) : createCommentVNode("", true)
1344
1391
  ], 64);
1345
1392
  }), 128))
1346
1393
  ], 4);
1347
1394
  };
1348
1395
  }
1349
1396
  });
1350
- const FSpace = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-5fb3b1a0"]]);
1351
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
1397
+ const FSpace = /* @__PURE__ */ _export_sfc$3(_sfc_main$t, [["__scopeId", "data-v-5fb3b1a0"]]);
1398
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1352
1399
  __name: "FContainer",
1353
1400
  props: {
1354
1401
  gap: { default: 12 }
@@ -1368,8 +1415,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1368
1415
  };
1369
1416
  }
1370
1417
  });
1371
- const FContainer = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-08450ddf"]]);
1372
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
1418
+ const FContainer = /* @__PURE__ */ _export_sfc$3(_sfc_main$s, [["__scopeId", "data-v-08450ddf"]]);
1419
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1373
1420
  __name: "FDivider",
1374
1421
  props: {
1375
1422
  color: {},
@@ -1396,9 +1443,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1396
1443
  };
1397
1444
  }
1398
1445
  });
1399
- const FDivider = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-512ee743"]]);
1400
- const _hoisted_1$i = ["src", "alt"];
1401
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
1446
+ const FDivider = /* @__PURE__ */ _export_sfc$3(_sfc_main$r, [["__scopeId", "data-v-512ee743"]]);
1447
+ const _hoisted_1$l = ["src", "alt"];
1448
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1402
1449
  __name: "FAvatar",
1403
1450
  props: {
1404
1451
  src: {},
@@ -1430,7 +1477,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1430
1477
  key: 0,
1431
1478
  src: _ctx.src,
1432
1479
  alt: _ctx.alt
1433
- }, null, 8, _hoisted_1$i)) : (openBlock(), createBlock(FIcon, {
1480
+ }, null, 8, _hoisted_1$l)) : (openBlock(), createBlock(FIcon$3, {
1434
1481
  key: 1,
1435
1482
  size: 24
1436
1483
  }, {
@@ -1443,13 +1490,2174 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1443
1490
  };
1444
1491
  }
1445
1492
  });
1446
- const FAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-b3665268"]]);
1447
- const _hoisted_1$h = ["type", "disabled"];
1448
- const _hoisted_2$d = { class: "f-button__inner" };
1449
- const _hoisted_3$d = {
1493
+ const FAvatar = /* @__PURE__ */ _export_sfc$3(_sfc_main$q, [["__scopeId", "data-v-b3665268"]]);
1494
+ var __defProp2 = Object.defineProperty;
1495
+ var __defProps2 = Object.defineProperties;
1496
+ var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
1497
+ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
1498
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1499
+ var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
1500
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1501
+ var __spreadValues2 = (a, b) => {
1502
+ for (var prop in b || (b = {}))
1503
+ if (__hasOwnProp2.call(b, prop))
1504
+ __defNormalProp2(a, prop, b[prop]);
1505
+ if (__getOwnPropSymbols2)
1506
+ for (var prop of __getOwnPropSymbols2(b)) {
1507
+ if (__propIsEnum2.call(b, prop))
1508
+ __defNormalProp2(a, prop, b[prop]);
1509
+ }
1510
+ return a;
1511
+ };
1512
+ var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
1513
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1514
+ __name: "FIcon",
1515
+ props: {
1516
+ color: {},
1517
+ size: { default: "1em" }
1518
+ },
1519
+ setup(__props) {
1520
+ const props = __props;
1521
+ const style = computed(() => ({
1522
+ width: typeof props.size === "number" ? `${props.size}px` : props.size,
1523
+ height: typeof props.size === "number" ? `${props.size}px` : props.size,
1524
+ color: props.color
1525
+ }));
1526
+ return (_ctx, _cache) => {
1527
+ return openBlock(), createElementBlock("span", {
1528
+ role: "img",
1529
+ class: "f-icon",
1530
+ style: normalizeStyle(unref(style))
1531
+ }, [
1532
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
1533
+ ], 4);
1534
+ };
1535
+ }
1536
+ });
1537
+ const _export_sfc$2 = (sfc, props) => {
1538
+ const target = sfc.__vccOpts || sfc;
1539
+ for (const [key, val] of props) {
1540
+ target[key] = val;
1541
+ }
1542
+ return target;
1543
+ };
1544
+ const FIcon$2 = /* @__PURE__ */ _export_sfc$2(_sfc_main$L, [["__scopeId", "data-v-baf7de0c"]]);
1545
+ var __defProp22 = Object.defineProperty;
1546
+ var __getOwnPropSymbols22 = Object.getOwnPropertySymbols;
1547
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1548
+ var __propIsEnum22 = Object.prototype.propertyIsEnumerable;
1549
+ var __defNormalProp22 = (obj, key, value) => key in obj ? __defProp22(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1550
+ var __spreadValues22 = (a, b) => {
1551
+ for (var prop in b || (b = {}))
1552
+ if (__hasOwnProp22.call(b, prop))
1553
+ __defNormalProp22(a, prop, b[prop]);
1554
+ if (__getOwnPropSymbols22)
1555
+ for (var prop of __getOwnPropSymbols22(b)) {
1556
+ if (__propIsEnum22.call(b, prop))
1557
+ __defNormalProp22(a, prop, b[prop]);
1558
+ }
1559
+ return a;
1560
+ };
1561
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1562
+ __name: "FIcon",
1563
+ props: {
1564
+ color: {},
1565
+ size: { default: "1em" }
1566
+ },
1567
+ setup(__props) {
1568
+ const props = __props;
1569
+ const style = computed(() => ({
1570
+ width: typeof props.size === "number" ? `${props.size}px` : props.size,
1571
+ height: typeof props.size === "number" ? `${props.size}px` : props.size,
1572
+ color: props.color
1573
+ }));
1574
+ return (_ctx, _cache) => {
1575
+ return openBlock(), createElementBlock("span", {
1576
+ role: "img",
1577
+ class: "f-icon",
1578
+ style: normalizeStyle(unref(style))
1579
+ }, [
1580
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
1581
+ ], 4);
1582
+ };
1583
+ }
1584
+ });
1585
+ const _export_sfc = (sfc, props) => {
1586
+ const target = sfc.__vccOpts || sfc;
1587
+ for (const [key, val] of props) {
1588
+ target[key] = val;
1589
+ }
1590
+ return target;
1591
+ };
1592
+ const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-baf7de0c"]]);
1593
+ var __defProp222 = Object.defineProperty;
1594
+ var __getOwnPropSymbols222 = Object.getOwnPropertySymbols;
1595
+ var __hasOwnProp222 = Object.prototype.hasOwnProperty;
1596
+ var __propIsEnum222 = Object.prototype.propertyIsEnumerable;
1597
+ var __defNormalProp222 = (obj, key, value) => key in obj ? __defProp222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1598
+ var __spreadValues222 = (a, b) => {
1599
+ for (var prop in b || (b = {}))
1600
+ if (__hasOwnProp222.call(b, prop))
1601
+ __defNormalProp222(a, prop, b[prop]);
1602
+ if (__getOwnPropSymbols222)
1603
+ for (var prop of __getOwnPropSymbols222(b)) {
1604
+ if (__propIsEnum222.call(b, prop))
1605
+ __defNormalProp222(a, prop, b[prop]);
1606
+ }
1607
+ return a;
1608
+ };
1609
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1610
+ __name: "FIcon",
1611
+ props: {
1612
+ color: {},
1613
+ size: { default: "1em" }
1614
+ },
1615
+ setup(__props) {
1616
+ const props = __props;
1617
+ const style = computed(() => ({
1618
+ width: typeof props.size === "number" ? `${props.size}px` : props.size,
1619
+ height: typeof props.size === "number" ? `${props.size}px` : props.size,
1620
+ color: props.color
1621
+ }));
1622
+ return (_ctx, _cache) => {
1623
+ return openBlock(), createElementBlock("span", {
1624
+ role: "img",
1625
+ class: "f-icon",
1626
+ style: normalizeStyle(unref(style))
1627
+ }, [
1628
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
1629
+ ], 4);
1630
+ };
1631
+ }
1632
+ });
1633
+ const _export_sfc$1 = (sfc, props) => {
1634
+ const target = sfc.__vccOpts || sfc;
1635
+ for (const [key, val] of props) {
1636
+ target[key] = val;
1637
+ }
1638
+ return target;
1639
+ };
1640
+ const FIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$K, [["__scopeId", "data-v-baf7de0c"]]);
1641
+ var __defProp2222 = Object.defineProperty;
1642
+ var __getOwnPropSymbols2222 = Object.getOwnPropertySymbols;
1643
+ var __hasOwnProp2222 = Object.prototype.hasOwnProperty;
1644
+ var __propIsEnum2222 = Object.prototype.propertyIsEnumerable;
1645
+ var __defNormalProp2222 = (obj, key, value) => key in obj ? __defProp2222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1646
+ var __spreadValues2222 = (a, b) => {
1647
+ for (var prop in b || (b = {}))
1648
+ if (__hasOwnProp2222.call(b, prop))
1649
+ __defNormalProp2222(a, prop, b[prop]);
1650
+ if (__getOwnPropSymbols2222)
1651
+ for (var prop of __getOwnPropSymbols2222(b)) {
1652
+ if (__propIsEnum2222.call(b, prop))
1653
+ __defNormalProp2222(a, prop, b[prop]);
1654
+ }
1655
+ return a;
1656
+ };
1657
+ var __defProp22222 = Object.defineProperty;
1658
+ var __getOwnPropSymbols22222 = Object.getOwnPropertySymbols;
1659
+ var __hasOwnProp22222 = Object.prototype.hasOwnProperty;
1660
+ var __propIsEnum22222 = Object.prototype.propertyIsEnumerable;
1661
+ var __defNormalProp22222 = (obj, key, value) => key in obj ? __defProp22222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1662
+ var __spreadValues22222 = (a, b) => {
1663
+ for (var prop in b || (b = {}))
1664
+ if (__hasOwnProp22222.call(b, prop))
1665
+ __defNormalProp22222(a, prop, b[prop]);
1666
+ if (__getOwnPropSymbols22222)
1667
+ for (var prop of __getOwnPropSymbols22222(b)) {
1668
+ if (__propIsEnum22222.call(b, prop))
1669
+ __defNormalProp22222(a, prop, b[prop]);
1670
+ }
1671
+ return a;
1672
+ };
1673
+ var __defProp222222 = Object.defineProperty;
1674
+ var __getOwnPropSymbols222222 = Object.getOwnPropertySymbols;
1675
+ var __hasOwnProp222222 = Object.prototype.hasOwnProperty;
1676
+ var __propIsEnum222222 = Object.prototype.propertyIsEnumerable;
1677
+ var __defNormalProp222222 = (obj, key, value) => key in obj ? __defProp222222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1678
+ var __spreadValues222222 = (a, b) => {
1679
+ for (var prop in b || (b = {}))
1680
+ if (__hasOwnProp222222.call(b, prop))
1681
+ __defNormalProp222222(a, prop, b[prop]);
1682
+ if (__getOwnPropSymbols222222)
1683
+ for (var prop of __getOwnPropSymbols222222(b)) {
1684
+ if (__propIsEnum222222.call(b, prop))
1685
+ __defNormalProp222222(a, prop, b[prop]);
1686
+ }
1687
+ return a;
1688
+ };
1689
+ var __defProp2222222 = Object.defineProperty;
1690
+ var __getOwnPropSymbols2222222 = Object.getOwnPropertySymbols;
1691
+ var __hasOwnProp2222222 = Object.prototype.hasOwnProperty;
1692
+ var __propIsEnum2222222 = Object.prototype.propertyIsEnumerable;
1693
+ var __defNormalProp2222222 = (obj, key, value) => key in obj ? __defProp2222222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1694
+ var __spreadValues2222222 = (a, b) => {
1695
+ for (var prop in b || (b = {}))
1696
+ if (__hasOwnProp2222222.call(b, prop))
1697
+ __defNormalProp2222222(a, prop, b[prop]);
1698
+ if (__getOwnPropSymbols2222222)
1699
+ for (var prop of __getOwnPropSymbols2222222(b)) {
1700
+ if (__propIsEnum2222222.call(b, prop))
1701
+ __defNormalProp2222222(a, prop, b[prop]);
1702
+ }
1703
+ return a;
1704
+ };
1705
+ var __defProp22222222 = Object.defineProperty;
1706
+ var __getOwnPropSymbols22222222 = Object.getOwnPropertySymbols;
1707
+ var __hasOwnProp22222222 = Object.prototype.hasOwnProperty;
1708
+ var __propIsEnum22222222 = Object.prototype.propertyIsEnumerable;
1709
+ var __defNormalProp22222222 = (obj, key, value) => key in obj ? __defProp22222222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1710
+ var __spreadValues22222222 = (a, b) => {
1711
+ for (var prop in b || (b = {}))
1712
+ if (__hasOwnProp22222222.call(b, prop))
1713
+ __defNormalProp22222222(a, prop, b[prop]);
1714
+ if (__getOwnPropSymbols22222222)
1715
+ for (var prop of __getOwnPropSymbols22222222(b)) {
1716
+ if (__propIsEnum22222222.call(b, prop))
1717
+ __defNormalProp22222222(a, prop, b[prop]);
1718
+ }
1719
+ return a;
1720
+ };
1721
+ const _hoisted_1$f$1 = { class: "f-checkbox__wrapper" };
1722
+ const _hoisted_2$d$1 = ["checked", "disabled"];
1723
+ const _hoisted_3$d$1 = {
1724
+ key: 0,
1725
+ class: "f-checkbox__label"
1726
+ };
1727
+ /* @__PURE__ */ defineComponent({
1728
+ __name: "FCheckbox",
1729
+ props: /* @__PURE__ */ mergeModels({
1730
+ label: {},
1731
+ disabled: { type: Boolean }
1732
+ }, {
1733
+ "modelValue": __spreadValues22222222({ type: Boolean }, { default: false }),
1734
+ "modelModifiers": {}
1735
+ }),
1736
+ emits: ["update:modelValue"],
1737
+ setup(__props) {
1738
+ const modelValue = useModel(__props, "modelValue");
1739
+ const props = __props;
1740
+ const handleChange = (e) => {
1741
+ if (props.disabled) return;
1742
+ const target = e.target;
1743
+ modelValue.value = target.checked;
1744
+ };
1745
+ return (_ctx, _cache) => {
1746
+ return openBlock(), createElementBlock("label", {
1747
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
1748
+ }, [
1749
+ createElementVNode("span", _hoisted_1$f$1, [
1750
+ createElementVNode("input", {
1751
+ type: "checkbox",
1752
+ checked: modelValue.value,
1753
+ disabled: _ctx.disabled,
1754
+ onChange: handleChange
1755
+ }, null, 40, _hoisted_2$d$1),
1756
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
1757
+ ]),
1758
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$d$1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
1759
+ ], 2);
1760
+ };
1761
+ }
1762
+ });
1763
+ /* @__PURE__ */ defineComponent({
1764
+ __name: "FDialog",
1765
+ props: /* @__PURE__ */ mergeModels({
1766
+ maskClosable: { type: Boolean, default: true },
1767
+ maskColor: { default: "black" },
1768
+ showMask: { type: Boolean, default: true }
1769
+ }, {
1770
+ "modelValue": __spreadValues22222222({ type: Boolean }, { default: false }),
1771
+ "modelModifiers": {}
1772
+ }),
1773
+ emits: ["update:modelValue"],
1774
+ setup(__props) {
1775
+ const props = __props;
1776
+ const visible = useModel(__props, "modelValue");
1777
+ const handleMaskClick = () => {
1778
+ if (props.maskClosable) visible.value = false;
1779
+ };
1780
+ const maskBackgroundColor = computed(() => {
1781
+ if (!props.showMask) return "transparent";
1782
+ switch (props.maskColor) {
1783
+ case "white":
1784
+ return "rgba(255, 255, 255, 0.5)";
1785
+ case "black":
1786
+ return "rgba(0, 0, 0, 0.5)";
1787
+ case "transparent":
1788
+ return "transparent";
1789
+ default:
1790
+ return "rgba(0, 0, 0, 0.5)";
1791
+ }
1792
+ });
1793
+ return (_ctx, _cache) => {
1794
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
1795
+ createVNode(Transition, { name: "fade" }, {
1796
+ default: withCtx(() => [
1797
+ visible.value ? (openBlock(), createElementBlock("div", {
1798
+ key: 0,
1799
+ class: "f-dialog-mask",
1800
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
1801
+ onClick: handleMaskClick
1802
+ }, [
1803
+ createElementVNode("div", {
1804
+ class: "f-dialog-container",
1805
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
1806
+ }, ["stop"]))
1807
+ }, [
1808
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
1809
+ ])
1810
+ ], 4)) : createCommentVNode("", true)
1811
+ ]),
1812
+ _: 3
1813
+ })
1814
+ ]);
1815
+ };
1816
+ }
1817
+ });
1818
+ var __defProp222222222 = Object.defineProperty;
1819
+ var __getOwnPropSymbols222222222 = Object.getOwnPropertySymbols;
1820
+ var __hasOwnProp222222222 = Object.prototype.hasOwnProperty;
1821
+ var __propIsEnum222222222 = Object.prototype.propertyIsEnumerable;
1822
+ var __defNormalProp222222222 = (obj, key, value) => key in obj ? __defProp222222222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1823
+ var __spreadValues222222222 = (a, b) => {
1824
+ for (var prop in b || (b = {}))
1825
+ if (__hasOwnProp222222222.call(b, prop))
1826
+ __defNormalProp222222222(a, prop, b[prop]);
1827
+ if (__getOwnPropSymbols222222222)
1828
+ for (var prop of __getOwnPropSymbols222222222(b)) {
1829
+ if (__propIsEnum222222222.call(b, prop))
1830
+ __defNormalProp222222222(a, prop, b[prop]);
1831
+ }
1832
+ return a;
1833
+ };
1834
+ var __defProp2222222222 = Object.defineProperty;
1835
+ var __getOwnPropSymbols2222222222 = Object.getOwnPropertySymbols;
1836
+ var __hasOwnProp2222222222 = Object.prototype.hasOwnProperty;
1837
+ var __propIsEnum2222222222 = Object.prototype.propertyIsEnumerable;
1838
+ var __defNormalProp2222222222 = (obj, key, value) => key in obj ? __defProp2222222222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1839
+ var __spreadValues2222222222 = (a, b) => {
1840
+ for (var prop in b || (b = {}))
1841
+ if (__hasOwnProp2222222222.call(b, prop))
1842
+ __defNormalProp2222222222(a, prop, b[prop]);
1843
+ if (__getOwnPropSymbols2222222222)
1844
+ for (var prop of __getOwnPropSymbols2222222222(b)) {
1845
+ if (__propIsEnum2222222222.call(b, prop))
1846
+ __defNormalProp2222222222(a, prop, b[prop]);
1847
+ }
1848
+ return a;
1849
+ };
1850
+ const _hoisted_1$d$1 = { class: "f-checkbox__wrapper" };
1851
+ const _hoisted_2$b$1 = ["checked", "disabled"];
1852
+ const _hoisted_3$b$1 = {
1853
+ key: 0,
1854
+ class: "f-checkbox__label"
1855
+ };
1856
+ /* @__PURE__ */ defineComponent({
1857
+ __name: "FCheckbox",
1858
+ props: /* @__PURE__ */ mergeModels({
1859
+ label: {},
1860
+ disabled: { type: Boolean }
1861
+ }, {
1862
+ "modelValue": __spreadValues2222222222({ type: Boolean }, { default: false }),
1863
+ "modelModifiers": {}
1864
+ }),
1865
+ emits: ["update:modelValue"],
1866
+ setup(__props) {
1867
+ const modelValue = useModel(__props, "modelValue");
1868
+ const props = __props;
1869
+ const handleChange = (e) => {
1870
+ if (props.disabled) return;
1871
+ const target = e.target;
1872
+ modelValue.value = target.checked;
1873
+ };
1874
+ return (_ctx, _cache) => {
1875
+ return openBlock(), createElementBlock("label", {
1876
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
1877
+ }, [
1878
+ createElementVNode("span", _hoisted_1$d$1, [
1879
+ createElementVNode("input", {
1880
+ type: "checkbox",
1881
+ checked: modelValue.value,
1882
+ disabled: _ctx.disabled,
1883
+ onChange: handleChange
1884
+ }, null, 40, _hoisted_2$b$1),
1885
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
1886
+ ]),
1887
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
1888
+ ], 2);
1889
+ };
1890
+ }
1891
+ });
1892
+ /* @__PURE__ */ defineComponent({
1893
+ __name: "FDialog",
1894
+ props: /* @__PURE__ */ mergeModels({
1895
+ maskClosable: { type: Boolean, default: true },
1896
+ maskColor: { default: "black" },
1897
+ showMask: { type: Boolean, default: true }
1898
+ }, {
1899
+ "modelValue": __spreadValues2222222222({ type: Boolean }, { default: false }),
1900
+ "modelModifiers": {}
1901
+ }),
1902
+ emits: ["update:modelValue"],
1903
+ setup(__props) {
1904
+ const props = __props;
1905
+ const visible = useModel(__props, "modelValue");
1906
+ const handleMaskClick = () => {
1907
+ if (props.maskClosable) visible.value = false;
1908
+ };
1909
+ const maskBackgroundColor = computed(() => {
1910
+ if (!props.showMask) return "transparent";
1911
+ switch (props.maskColor) {
1912
+ case "white":
1913
+ return "rgba(255, 255, 255, 0.5)";
1914
+ case "black":
1915
+ return "rgba(0, 0, 0, 0.5)";
1916
+ case "transparent":
1917
+ return "transparent";
1918
+ default:
1919
+ return "rgba(0, 0, 0, 0.5)";
1920
+ }
1921
+ });
1922
+ return (_ctx, _cache) => {
1923
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
1924
+ createVNode(Transition, { name: "fade" }, {
1925
+ default: withCtx(() => [
1926
+ visible.value ? (openBlock(), createElementBlock("div", {
1927
+ key: 0,
1928
+ class: "f-dialog-mask",
1929
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
1930
+ onClick: handleMaskClick
1931
+ }, [
1932
+ createElementVNode("div", {
1933
+ class: "f-dialog-container",
1934
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
1935
+ }, ["stop"]))
1936
+ }, [
1937
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
1938
+ ])
1939
+ ], 4)) : createCommentVNode("", true)
1940
+ ]),
1941
+ _: 3
1942
+ })
1943
+ ]);
1944
+ };
1945
+ }
1946
+ });
1947
+ const _hoisted_1$d$2 = { class: "f-checkbox__wrapper" };
1948
+ const _hoisted_2$b$2 = ["checked", "disabled"];
1949
+ const _hoisted_3$b$2 = {
1950
+ key: 0,
1951
+ class: "f-checkbox__label"
1952
+ };
1953
+ /* @__PURE__ */ defineComponent({
1954
+ __name: "FCheckbox",
1955
+ props: /* @__PURE__ */ mergeModels({
1956
+ label: {},
1957
+ disabled: { type: Boolean }
1958
+ }, {
1959
+ "modelValue": __spreadValues222222222({ type: Boolean }, { default: false }),
1960
+ "modelModifiers": {}
1961
+ }),
1962
+ emits: ["update:modelValue"],
1963
+ setup(__props) {
1964
+ const modelValue = useModel(__props, "modelValue");
1965
+ const props = __props;
1966
+ const handleChange = (e) => {
1967
+ if (props.disabled) return;
1968
+ const target = e.target;
1969
+ modelValue.value = target.checked;
1970
+ };
1971
+ return (_ctx, _cache) => {
1972
+ return openBlock(), createElementBlock("label", {
1973
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
1974
+ }, [
1975
+ createElementVNode("span", _hoisted_1$d$2, [
1976
+ createElementVNode("input", {
1977
+ type: "checkbox",
1978
+ checked: modelValue.value,
1979
+ disabled: _ctx.disabled,
1980
+ onChange: handleChange
1981
+ }, null, 40, _hoisted_2$b$2),
1982
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
1983
+ ]),
1984
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
1985
+ ], 2);
1986
+ };
1987
+ }
1988
+ });
1989
+ /* @__PURE__ */ defineComponent({
1990
+ __name: "FDialog",
1991
+ props: /* @__PURE__ */ mergeModels({
1992
+ maskClosable: { type: Boolean, default: true },
1993
+ maskColor: { default: "black" },
1994
+ showMask: { type: Boolean, default: true }
1995
+ }, {
1996
+ "modelValue": __spreadValues222222222({ type: Boolean }, { default: false }),
1997
+ "modelModifiers": {}
1998
+ }),
1999
+ emits: ["update:modelValue"],
2000
+ setup(__props) {
2001
+ const props = __props;
2002
+ const visible = useModel(__props, "modelValue");
2003
+ const handleMaskClick = () => {
2004
+ if (props.maskClosable) visible.value = false;
2005
+ };
2006
+ const maskBackgroundColor = computed(() => {
2007
+ if (!props.showMask) return "transparent";
2008
+ switch (props.maskColor) {
2009
+ case "white":
2010
+ return "rgba(255, 255, 255, 0.5)";
2011
+ case "black":
2012
+ return "rgba(0, 0, 0, 0.5)";
2013
+ case "transparent":
2014
+ return "transparent";
2015
+ default:
2016
+ return "rgba(0, 0, 0, 0.5)";
2017
+ }
2018
+ });
2019
+ return (_ctx, _cache) => {
2020
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2021
+ createVNode(Transition, { name: "fade" }, {
2022
+ default: withCtx(() => [
2023
+ visible.value ? (openBlock(), createElementBlock("div", {
2024
+ key: 0,
2025
+ class: "f-dialog-mask",
2026
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2027
+ onClick: handleMaskClick
2028
+ }, [
2029
+ createElementVNode("div", {
2030
+ class: "f-dialog-container",
2031
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2032
+ }, ["stop"]))
2033
+ }, [
2034
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2035
+ ])
2036
+ ], 4)) : createCommentVNode("", true)
2037
+ ]),
2038
+ _: 3
2039
+ })
2040
+ ]);
2041
+ };
2042
+ }
2043
+ });
2044
+ const _hoisted_1$d$3 = { class: "f-checkbox__wrapper" };
2045
+ const _hoisted_2$b$3 = ["checked", "disabled"];
2046
+ const _hoisted_3$b$3 = {
2047
+ key: 0,
2048
+ class: "f-checkbox__label"
2049
+ };
2050
+ /* @__PURE__ */ defineComponent({
2051
+ __name: "FCheckbox",
2052
+ props: /* @__PURE__ */ mergeModels({
2053
+ label: {},
2054
+ disabled: { type: Boolean }
2055
+ }, {
2056
+ "modelValue": __spreadValues2222222({ type: Boolean }, { default: false }),
2057
+ "modelModifiers": {}
2058
+ }),
2059
+ emits: ["update:modelValue"],
2060
+ setup(__props) {
2061
+ const modelValue = useModel(__props, "modelValue");
2062
+ const props = __props;
2063
+ const handleChange = (e) => {
2064
+ if (props.disabled) return;
2065
+ const target = e.target;
2066
+ modelValue.value = target.checked;
2067
+ };
2068
+ return (_ctx, _cache) => {
2069
+ return openBlock(), createElementBlock("label", {
2070
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2071
+ }, [
2072
+ createElementVNode("span", _hoisted_1$d$3, [
2073
+ createElementVNode("input", {
2074
+ type: "checkbox",
2075
+ checked: modelValue.value,
2076
+ disabled: _ctx.disabled,
2077
+ onChange: handleChange
2078
+ }, null, 40, _hoisted_2$b$3),
2079
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
2080
+ ]),
2081
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$3, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
2082
+ ], 2);
2083
+ };
2084
+ }
2085
+ });
2086
+ /* @__PURE__ */ defineComponent({
2087
+ __name: "FDialog",
2088
+ props: /* @__PURE__ */ mergeModels({
2089
+ maskClosable: { type: Boolean, default: true },
2090
+ maskColor: { default: "black" },
2091
+ showMask: { type: Boolean, default: true }
2092
+ }, {
2093
+ "modelValue": __spreadValues2222222({ type: Boolean }, { default: false }),
2094
+ "modelModifiers": {}
2095
+ }),
2096
+ emits: ["update:modelValue"],
2097
+ setup(__props) {
2098
+ const props = __props;
2099
+ const visible = useModel(__props, "modelValue");
2100
+ const handleMaskClick = () => {
2101
+ if (props.maskClosable) visible.value = false;
2102
+ };
2103
+ const maskBackgroundColor = computed(() => {
2104
+ if (!props.showMask) return "transparent";
2105
+ switch (props.maskColor) {
2106
+ case "white":
2107
+ return "rgba(255, 255, 255, 0.5)";
2108
+ case "black":
2109
+ return "rgba(0, 0, 0, 0.5)";
2110
+ case "transparent":
2111
+ return "transparent";
2112
+ default:
2113
+ return "rgba(0, 0, 0, 0.5)";
2114
+ }
2115
+ });
2116
+ return (_ctx, _cache) => {
2117
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2118
+ createVNode(Transition, { name: "fade" }, {
2119
+ default: withCtx(() => [
2120
+ visible.value ? (openBlock(), createElementBlock("div", {
2121
+ key: 0,
2122
+ class: "f-dialog-mask",
2123
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2124
+ onClick: handleMaskClick
2125
+ }, [
2126
+ createElementVNode("div", {
2127
+ class: "f-dialog-container",
2128
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2129
+ }, ["stop"]))
2130
+ }, [
2131
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2132
+ ])
2133
+ ], 4)) : createCommentVNode("", true)
2134
+ ]),
2135
+ _: 3
2136
+ })
2137
+ ]);
2138
+ };
2139
+ }
2140
+ });
2141
+ const _hoisted_1$d$4 = { class: "f-checkbox__wrapper" };
2142
+ const _hoisted_2$b$4 = ["checked", "disabled"];
2143
+ const _hoisted_3$b$4 = {
2144
+ key: 0,
2145
+ class: "f-checkbox__label"
2146
+ };
2147
+ /* @__PURE__ */ defineComponent({
2148
+ __name: "FCheckbox",
2149
+ props: /* @__PURE__ */ mergeModels({
2150
+ label: {},
2151
+ disabled: { type: Boolean }
2152
+ }, {
2153
+ "modelValue": __spreadValues222222({ type: Boolean }, { default: false }),
2154
+ "modelModifiers": {}
2155
+ }),
2156
+ emits: ["update:modelValue"],
2157
+ setup(__props) {
2158
+ const modelValue = useModel(__props, "modelValue");
2159
+ const props = __props;
2160
+ const handleChange = (e) => {
2161
+ if (props.disabled) return;
2162
+ const target = e.target;
2163
+ modelValue.value = target.checked;
2164
+ };
2165
+ return (_ctx, _cache) => {
2166
+ return openBlock(), createElementBlock("label", {
2167
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2168
+ }, [
2169
+ createElementVNode("span", _hoisted_1$d$4, [
2170
+ createElementVNode("input", {
2171
+ type: "checkbox",
2172
+ checked: modelValue.value,
2173
+ disabled: _ctx.disabled,
2174
+ onChange: handleChange
2175
+ }, null, 40, _hoisted_2$b$4),
2176
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
2177
+ ]),
2178
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$4, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
2179
+ ], 2);
2180
+ };
2181
+ }
2182
+ });
2183
+ /* @__PURE__ */ defineComponent({
2184
+ __name: "FDialog",
2185
+ props: /* @__PURE__ */ mergeModels({
2186
+ maskClosable: { type: Boolean, default: true },
2187
+ maskColor: { default: "black" },
2188
+ showMask: { type: Boolean, default: true }
2189
+ }, {
2190
+ "modelValue": __spreadValues222222({ type: Boolean }, { default: false }),
2191
+ "modelModifiers": {}
2192
+ }),
2193
+ emits: ["update:modelValue"],
2194
+ setup(__props) {
2195
+ const props = __props;
2196
+ const visible = useModel(__props, "modelValue");
2197
+ const handleMaskClick = () => {
2198
+ if (props.maskClosable) visible.value = false;
2199
+ };
2200
+ const maskBackgroundColor = computed(() => {
2201
+ if (!props.showMask) return "transparent";
2202
+ switch (props.maskColor) {
2203
+ case "white":
2204
+ return "rgba(255, 255, 255, 0.5)";
2205
+ case "black":
2206
+ return "rgba(0, 0, 0, 0.5)";
2207
+ case "transparent":
2208
+ return "transparent";
2209
+ default:
2210
+ return "rgba(0, 0, 0, 0.5)";
2211
+ }
2212
+ });
2213
+ return (_ctx, _cache) => {
2214
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2215
+ createVNode(Transition, { name: "fade" }, {
2216
+ default: withCtx(() => [
2217
+ visible.value ? (openBlock(), createElementBlock("div", {
2218
+ key: 0,
2219
+ class: "f-dialog-mask",
2220
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2221
+ onClick: handleMaskClick
2222
+ }, [
2223
+ createElementVNode("div", {
2224
+ class: "f-dialog-container",
2225
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2226
+ }, ["stop"]))
2227
+ }, [
2228
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2229
+ ])
2230
+ ], 4)) : createCommentVNode("", true)
2231
+ ]),
2232
+ _: 3
2233
+ })
2234
+ ]);
2235
+ };
2236
+ }
2237
+ });
2238
+ const _hoisted_1$d$5 = { class: "f-checkbox__wrapper" };
2239
+ const _hoisted_2$b$5 = ["checked", "disabled"];
2240
+ const _hoisted_3$b$5 = {
2241
+ key: 0,
2242
+ class: "f-checkbox__label"
2243
+ };
2244
+ /* @__PURE__ */ defineComponent({
2245
+ __name: "FCheckbox",
2246
+ props: /* @__PURE__ */ mergeModels({
2247
+ label: {},
2248
+ disabled: { type: Boolean }
2249
+ }, {
2250
+ "modelValue": __spreadValues22222({ type: Boolean }, { default: false }),
2251
+ "modelModifiers": {}
2252
+ }),
2253
+ emits: ["update:modelValue"],
2254
+ setup(__props) {
2255
+ const modelValue = useModel(__props, "modelValue");
2256
+ const props = __props;
2257
+ const handleChange = (e) => {
2258
+ if (props.disabled) return;
2259
+ const target = e.target;
2260
+ modelValue.value = target.checked;
2261
+ };
2262
+ return (_ctx, _cache) => {
2263
+ return openBlock(), createElementBlock("label", {
2264
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2265
+ }, [
2266
+ createElementVNode("span", _hoisted_1$d$5, [
2267
+ createElementVNode("input", {
2268
+ type: "checkbox",
2269
+ checked: modelValue.value,
2270
+ disabled: _ctx.disabled,
2271
+ onChange: handleChange
2272
+ }, null, 40, _hoisted_2$b$5),
2273
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
2274
+ ]),
2275
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$5, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
2276
+ ], 2);
2277
+ };
2278
+ }
2279
+ });
2280
+ /* @__PURE__ */ defineComponent({
2281
+ __name: "FDialog",
2282
+ props: /* @__PURE__ */ mergeModels({
2283
+ maskClosable: { type: Boolean, default: true },
2284
+ maskColor: { default: "black" },
2285
+ showMask: { type: Boolean, default: true }
2286
+ }, {
2287
+ "modelValue": __spreadValues22222({ type: Boolean }, { default: false }),
2288
+ "modelModifiers": {}
2289
+ }),
2290
+ emits: ["update:modelValue"],
2291
+ setup(__props) {
2292
+ const props = __props;
2293
+ const visible = useModel(__props, "modelValue");
2294
+ const handleMaskClick = () => {
2295
+ if (props.maskClosable) visible.value = false;
2296
+ };
2297
+ const maskBackgroundColor = computed(() => {
2298
+ if (!props.showMask) return "transparent";
2299
+ switch (props.maskColor) {
2300
+ case "white":
2301
+ return "rgba(255, 255, 255, 0.5)";
2302
+ case "black":
2303
+ return "rgba(0, 0, 0, 0.5)";
2304
+ case "transparent":
2305
+ return "transparent";
2306
+ default:
2307
+ return "rgba(0, 0, 0, 0.5)";
2308
+ }
2309
+ });
2310
+ return (_ctx, _cache) => {
2311
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2312
+ createVNode(Transition, { name: "fade" }, {
2313
+ default: withCtx(() => [
2314
+ visible.value ? (openBlock(), createElementBlock("div", {
2315
+ key: 0,
2316
+ class: "f-dialog-mask",
2317
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2318
+ onClick: handleMaskClick
2319
+ }, [
2320
+ createElementVNode("div", {
2321
+ class: "f-dialog-container",
2322
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2323
+ }, ["stop"]))
2324
+ }, [
2325
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2326
+ ])
2327
+ ], 4)) : createCommentVNode("", true)
2328
+ ]),
2329
+ _: 3
2330
+ })
2331
+ ]);
2332
+ };
2333
+ }
2334
+ });
2335
+ const _hoisted_1$d$6 = { class: "f-checkbox__wrapper" };
2336
+ const _hoisted_2$b$6 = ["checked", "disabled"];
2337
+ const _hoisted_3$b$6 = {
2338
+ key: 0,
2339
+ class: "f-checkbox__label"
2340
+ };
2341
+ /* @__PURE__ */ defineComponent({
2342
+ __name: "FCheckbox",
2343
+ props: /* @__PURE__ */ mergeModels({
2344
+ label: {},
2345
+ disabled: { type: Boolean }
2346
+ }, {
2347
+ "modelValue": __spreadValues2222({ type: Boolean }, { default: false }),
2348
+ "modelModifiers": {}
2349
+ }),
2350
+ emits: ["update:modelValue"],
2351
+ setup(__props) {
2352
+ const modelValue = useModel(__props, "modelValue");
2353
+ const props = __props;
2354
+ const handleChange = (e) => {
2355
+ if (props.disabled) return;
2356
+ const target = e.target;
2357
+ modelValue.value = target.checked;
2358
+ };
2359
+ return (_ctx, _cache) => {
2360
+ return openBlock(), createElementBlock("label", {
2361
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2362
+ }, [
2363
+ createElementVNode("span", _hoisted_1$d$6, [
2364
+ createElementVNode("input", {
2365
+ type: "checkbox",
2366
+ checked: modelValue.value,
2367
+ disabled: _ctx.disabled,
2368
+ onChange: handleChange
2369
+ }, null, 40, _hoisted_2$b$6),
2370
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
2371
+ ]),
2372
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$6, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
2373
+ ], 2);
2374
+ };
2375
+ }
2376
+ });
2377
+ /* @__PURE__ */ defineComponent({
2378
+ __name: "FDialog",
2379
+ props: /* @__PURE__ */ mergeModels({
2380
+ maskClosable: { type: Boolean, default: true },
2381
+ maskColor: { default: "black" },
2382
+ showMask: { type: Boolean, default: true }
2383
+ }, {
2384
+ "modelValue": __spreadValues2222({ type: Boolean }, { default: false }),
2385
+ "modelModifiers": {}
2386
+ }),
2387
+ emits: ["update:modelValue"],
2388
+ setup(__props) {
2389
+ const props = __props;
2390
+ const visible = useModel(__props, "modelValue");
2391
+ const handleMaskClick = () => {
2392
+ if (props.maskClosable) visible.value = false;
2393
+ };
2394
+ const maskBackgroundColor = computed(() => {
2395
+ if (!props.showMask) return "transparent";
2396
+ switch (props.maskColor) {
2397
+ case "white":
2398
+ return "rgba(255, 255, 255, 0.5)";
2399
+ case "black":
2400
+ return "rgba(0, 0, 0, 0.5)";
2401
+ case "transparent":
2402
+ return "transparent";
2403
+ default:
2404
+ return "rgba(0, 0, 0, 0.5)";
2405
+ }
2406
+ });
2407
+ return (_ctx, _cache) => {
2408
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2409
+ createVNode(Transition, { name: "fade" }, {
2410
+ default: withCtx(() => [
2411
+ visible.value ? (openBlock(), createElementBlock("div", {
2412
+ key: 0,
2413
+ class: "f-dialog-mask",
2414
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2415
+ onClick: handleMaskClick
2416
+ }, [
2417
+ createElementVNode("div", {
2418
+ class: "f-dialog-container",
2419
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2420
+ }, ["stop"]))
2421
+ }, [
2422
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2423
+ ])
2424
+ ], 4)) : createCommentVNode("", true)
2425
+ ]),
2426
+ _: 3
2427
+ })
2428
+ ]);
2429
+ };
2430
+ }
2431
+ });
2432
+ const _hoisted_1$d$7 = { class: "f-checkbox__wrapper" };
2433
+ const _hoisted_2$b$7 = ["checked", "disabled"];
2434
+ const _hoisted_3$b$7 = {
2435
+ key: 0,
2436
+ class: "f-checkbox__label"
2437
+ };
2438
+ /* @__PURE__ */ defineComponent({
2439
+ __name: "FCheckbox",
2440
+ props: /* @__PURE__ */ mergeModels({
2441
+ label: {},
2442
+ disabled: { type: Boolean }
2443
+ }, {
2444
+ "modelValue": __spreadValues222({ type: Boolean }, { default: false }),
2445
+ "modelModifiers": {}
2446
+ }),
2447
+ emits: ["update:modelValue"],
2448
+ setup(__props) {
2449
+ const modelValue = useModel(__props, "modelValue");
2450
+ const props = __props;
2451
+ const handleChange = (e) => {
2452
+ if (props.disabled) return;
2453
+ const target = e.target;
2454
+ modelValue.value = target.checked;
2455
+ };
2456
+ return (_ctx, _cache) => {
2457
+ return openBlock(), createElementBlock("label", {
2458
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2459
+ }, [
2460
+ createElementVNode("span", _hoisted_1$d$7, [
2461
+ createElementVNode("input", {
2462
+ type: "checkbox",
2463
+ checked: modelValue.value,
2464
+ disabled: _ctx.disabled,
2465
+ onChange: handleChange
2466
+ }, null, 40, _hoisted_2$b$7),
2467
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
2468
+ ]),
2469
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b$7, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
2470
+ ], 2);
2471
+ };
2472
+ }
2473
+ });
2474
+ /* @__PURE__ */ defineComponent({
2475
+ __name: "FDialog",
2476
+ props: /* @__PURE__ */ mergeModels({
2477
+ maskClosable: { type: Boolean, default: true },
2478
+ maskColor: { default: "black" },
2479
+ showMask: { type: Boolean, default: true }
2480
+ }, {
2481
+ "modelValue": __spreadValues222({ type: Boolean }, { default: false }),
2482
+ "modelModifiers": {}
2483
+ }),
2484
+ emits: ["update:modelValue"],
2485
+ setup(__props) {
2486
+ const props = __props;
2487
+ const visible = useModel(__props, "modelValue");
2488
+ const handleMaskClick = () => {
2489
+ if (props.maskClosable) visible.value = false;
2490
+ };
2491
+ const maskBackgroundColor = computed(() => {
2492
+ if (!props.showMask) return "transparent";
2493
+ switch (props.maskColor) {
2494
+ case "white":
2495
+ return "rgba(255, 255, 255, 0.5)";
2496
+ case "black":
2497
+ return "rgba(0, 0, 0, 0.5)";
2498
+ case "transparent":
2499
+ return "transparent";
2500
+ default:
2501
+ return "rgba(0, 0, 0, 0.5)";
2502
+ }
2503
+ });
2504
+ return (_ctx, _cache) => {
2505
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2506
+ createVNode(Transition, { name: "fade" }, {
2507
+ default: withCtx(() => [
2508
+ visible.value ? (openBlock(), createElementBlock("div", {
2509
+ key: 0,
2510
+ class: "f-dialog-mask",
2511
+ style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2512
+ onClick: handleMaskClick
2513
+ }, [
2514
+ createElementVNode("div", {
2515
+ class: "f-dialog-container",
2516
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2517
+ }, ["stop"]))
2518
+ }, [
2519
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2520
+ ])
2521
+ ], 4)) : createCommentVNode("", true)
2522
+ ]),
2523
+ _: 3
2524
+ })
2525
+ ]);
2526
+ };
2527
+ }
2528
+ });
2529
+ const _hoisted_1$i$1 = ["type", "disabled"];
2530
+ const _hoisted_2$e$1 = { class: "f-button__inner" };
2531
+ const _hoisted_3$e$1 = {
2532
+ key: 0,
2533
+ class: "f-loader"
2534
+ };
2535
+ const _hoisted_4$8$1 = {
2536
+ key: 2,
2537
+ class: "f-button__text"
2538
+ };
2539
+ const _sfc_main$o$1 = /* @__PURE__ */ defineComponent({
2540
+ __name: "FButton",
2541
+ props: {
2542
+ type: {},
2543
+ size: {},
2544
+ nativeType: { default: "button" },
2545
+ loading: { type: Boolean },
2546
+ disabled: { type: Boolean },
2547
+ round: { type: [Boolean, Number] },
2548
+ circle: { type: Boolean },
2549
+ plain: { type: Boolean },
2550
+ text: { type: Boolean },
2551
+ block: { type: Boolean },
2552
+ icon: {},
2553
+ active: { type: Boolean },
2554
+ bgColor: {},
2555
+ color: {}
2556
+ },
2557
+ setup(__props) {
2558
+ const SIZE_MAP = {
2559
+ small: { h: "24px", p: "0 8px", f: "12px", i: "14px" },
2560
+ normal: { h: "32px", p: "0 12px", f: "13px", i: "16px" },
2561
+ large: { h: "40px", p: "0 16px", f: "14px", i: "18px" }
2562
+ };
2563
+ const props = __props;
2564
+ const slots = useSlots();
2565
+ const groupContext = inject("FButtonGroupContext", null);
2566
+ const mergedSize = computed(() => {
2567
+ var _a, _b;
2568
+ return (_b = (_a = props.size) != null ? _a : groupContext == null ? void 0 : groupContext.size) != null ? _b : "normal";
2569
+ });
2570
+ const mergedType = computed(() => {
2571
+ var _a, _b;
2572
+ return (_b = (_a = props.type) != null ? _a : groupContext == null ? void 0 : groupContext.type) != null ? _b : "default";
2573
+ });
2574
+ const isDisabled = computed(() => props.disabled || props.loading || (groupContext == null ? void 0 : groupContext.disabled));
2575
+ const hasText = computed(() => !!slots.default);
2576
+ const buttonStyle = computed(() => {
2577
+ const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
2578
+ const style = {
2579
+ height: s.h,
2580
+ padding: props.circle ? "0" : s.p,
2581
+ fontSize: s.f,
2582
+ minWidth: props.circle ? s.h : "auto",
2583
+ backgroundColor: props.bgColor,
2584
+ color: props.color
2585
+ };
2586
+ if (props.circle) {
2587
+ style.borderRadius = "50%";
2588
+ style.width = s.h;
2589
+ } else if (typeof props.round === "number") {
2590
+ style.borderRadius = `${props.round}px`;
2591
+ } else if (props.round === true) {
2592
+ style.borderRadius = "999px";
2593
+ }
2594
+ return style;
2595
+ });
2596
+ const iconSize = computed(() => {
2597
+ const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
2598
+ return s.i;
2599
+ });
2600
+ return (_ctx, _cache) => {
2601
+ return openBlock(), createElementBlock("button", {
2602
+ type: _ctx.nativeType,
2603
+ class: normalizeClass(["f-button", [
2604
+ `f-button--${unref(mergedType)}`,
2605
+ `f-button--${unref(mergedSize)}`,
2606
+ {
2607
+ "is-disabled": unref(isDisabled),
2608
+ "is-loading": _ctx.loading,
2609
+ "is-active": _ctx.active,
2610
+ "is-text": _ctx.text,
2611
+ "is-icon-only": !unref(hasText) && (_ctx.icon || _ctx.$slots.icon)
2612
+ }
2613
+ ]]),
2614
+ disabled: unref(isDisabled),
2615
+ style: normalizeStyle(unref(buttonStyle))
2616
+ }, [
2617
+ createElementVNode("span", _hoisted_2$e$1, [
2618
+ _ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_3$e$1)) : createCommentVNode("", true),
2619
+ !_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2620
+ _ctx.$slots.icon || _ctx.icon ? (openBlock(), createBlock(unref(FIcon$1), {
2621
+ key: 0,
2622
+ class: "f-button__icon",
2623
+ style: normalizeStyle({ fontSize: unref(iconSize) })
2624
+ }, {
2625
+ default: withCtx(() => [
2626
+ renderSlot(_ctx.$slots, "icon", {}, () => [
2627
+ _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : createCommentVNode("", true)
2628
+ ], true)
2629
+ ]),
2630
+ _: 3
2631
+ }, 8, ["style"])) : createCommentVNode("", true)
2632
+ ], 64)) : createCommentVNode("", true),
2633
+ unref(hasText) ? (openBlock(), createElementBlock("span", _hoisted_4$8$1, [
2634
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2635
+ ])) : createCommentVNode("", true)
2636
+ ])
2637
+ ], 14, _hoisted_1$i$1);
2638
+ };
2639
+ }
2640
+ });
2641
+ const FButton$1 = /* @__PURE__ */ _export_sfc(_sfc_main$o$1, [["__scopeId", "data-v-41be5001"]]);
2642
+ const _hoisted_1$e$1 = { class: "f-checkbox__wrapper" };
2643
+ const _hoisted_2$c$1 = ["checked", "disabled"];
2644
+ const _hoisted_3$c$1 = {
2645
+ key: 0,
2646
+ class: "f-checkbox__label"
2647
+ };
2648
+ /* @__PURE__ */ defineComponent({
2649
+ __name: "FCheckbox",
2650
+ props: /* @__PURE__ */ mergeModels({
2651
+ label: {},
2652
+ disabled: { type: Boolean }
2653
+ }, {
2654
+ "modelValue": __spreadValues22({ type: Boolean }, { default: false }),
2655
+ "modelModifiers": {}
2656
+ }),
2657
+ emits: ["update:modelValue"],
2658
+ setup(__props) {
2659
+ const modelValue = useModel(__props, "modelValue");
2660
+ const props = __props;
2661
+ const handleChange = (e) => {
2662
+ if (props.disabled) return;
2663
+ const target = e.target;
2664
+ modelValue.value = target.checked;
2665
+ };
2666
+ return (_ctx, _cache) => {
2667
+ return openBlock(), createElementBlock("label", {
2668
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2669
+ }, [
2670
+ createElementVNode("span", _hoisted_1$e$1, [
2671
+ createElementVNode("input", {
2672
+ type: "checkbox",
2673
+ checked: modelValue.value,
2674
+ disabled: _ctx.disabled,
2675
+ onChange: handleChange
2676
+ }, null, 40, _hoisted_2$c$1),
2677
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
2678
+ ]),
2679
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$c$1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
2680
+ ], 2);
2681
+ };
2682
+ }
2683
+ });
2684
+ const _hoisted_1$j = {
2685
+ key: 0,
2686
+ class: "f-dialog__icon"
2687
+ };
2688
+ const _hoisted_2$f = { class: "f-dialog__title" };
2689
+ const _hoisted_3$f = { class: "f-dialog__body" };
2690
+ const _hoisted_4$9 = { key: 0 };
2691
+ const _hoisted_5$8 = {
2692
+ key: 2,
2693
+ class: "f-dialog__footer"
2694
+ };
2695
+ /* @__PURE__ */ defineComponent({
2696
+ __name: "FDialog",
2697
+ props: /* @__PURE__ */ mergeModels({
2698
+ title: { default: "提示" },
2699
+ content: {},
2700
+ width: { default: "500px" },
2701
+ type: { default: "default" },
2702
+ confirmText: { default: "确定" },
2703
+ cancelText: { default: "取消" },
2704
+ showCancel: { type: Boolean, default: true },
2705
+ showClose: { type: Boolean, default: true },
2706
+ closeOnClickModal: { type: Boolean, default: true },
2707
+ closeOnEsc: { type: Boolean, default: true },
2708
+ center: { type: Boolean, default: false },
2709
+ fullscreen: { type: Boolean, default: false },
2710
+ destroyOnClose: { type: Boolean, default: false },
2711
+ beforeClose: {}
2712
+ }, {
2713
+ "modelValue": __spreadValues22({ type: Boolean }, { required: true }),
2714
+ "modelModifiers": {}
2715
+ }),
2716
+ emits: /* @__PURE__ */ mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
2717
+ setup(__props, { emit: __emit }) {
2718
+ const props = __props;
2719
+ const emit = __emit;
2720
+ const visible = useModel(__props, "modelValue");
2721
+ const handleClose = () => {
2722
+ visible.value = false;
2723
+ emit("close");
2724
+ };
2725
+ const handleConfirm = () => {
2726
+ emit("confirm");
2727
+ if (props.beforeClose) {
2728
+ props.beforeClose(() => {
2729
+ visible.value = false;
2730
+ });
2731
+ } else {
2732
+ visible.value = false;
2733
+ }
2734
+ };
2735
+ const handleCancel = () => {
2736
+ emit("cancel");
2737
+ handleClose();
2738
+ };
2739
+ const handleOverlayClick = (e) => {
2740
+ if (props.closeOnClickModal && e.target === e.currentTarget) {
2741
+ handleClose();
2742
+ }
2743
+ };
2744
+ const handleKeydown = (e) => {
2745
+ if (props.closeOnEsc && e.key === "Escape") {
2746
+ handleClose();
2747
+ }
2748
+ };
2749
+ onMounted(() => {
2750
+ if (props.closeOnEsc) {
2751
+ window.addEventListener("keydown", handleKeydown);
2752
+ }
2753
+ emit("open");
2754
+ });
2755
+ onBeforeUnmount(() => {
2756
+ if (props.closeOnEsc) {
2757
+ window.removeEventListener("keydown", handleKeydown);
2758
+ }
2759
+ });
2760
+ const iconMap = {
2761
+ info: InformationCircleOutline,
2762
+ success: CheckmarkCircleOutline,
2763
+ warning: WarningOutline,
2764
+ failed: AlertCircleOutline,
2765
+ primary: InformationCircleOutline,
2766
+ default: InformationCircleOutline
2767
+ };
2768
+ const hasIcon = computed(() => props.type && props.type !== "default");
2769
+ return (_ctx, _cache) => {
2770
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2771
+ createVNode(Transition, { name: "f-dialog-fade" }, {
2772
+ default: withCtx(() => [
2773
+ visible.value ? (openBlock(), createElementBlock("div", {
2774
+ key: 0,
2775
+ class: "f-dialog-overlay",
2776
+ onClick: handleOverlayClick
2777
+ }, [
2778
+ createVNode(Transition, { name: "f-dialog-zoom" }, {
2779
+ default: withCtx(() => [
2780
+ visible.value ? (openBlock(), createElementBlock("div", {
2781
+ key: 0,
2782
+ class: normalizeClass(["f-dialog", [
2783
+ `f-dialog--${_ctx.type}`,
2784
+ {
2785
+ "is-center": _ctx.center,
2786
+ "is-fullscreen": _ctx.fullscreen
2787
+ }
2788
+ ]]),
2789
+ style: normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
2790
+ }, [
2791
+ _ctx.showClose ? (openBlock(), createElementBlock("button", {
2792
+ key: 0,
2793
+ type: "button",
2794
+ class: "f-dialog__close",
2795
+ onClick: handleClose
2796
+ }, [
2797
+ createVNode(FIcon, null, {
2798
+ default: withCtx(() => [
2799
+ createVNode(unref(CloseOutline))
2800
+ ]),
2801
+ _: 1
2802
+ })
2803
+ ])) : createCommentVNode("", true),
2804
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("div", {
2805
+ key: 1,
2806
+ class: normalizeClass(["f-dialog__header", { "has-icon": unref(hasIcon) }])
2807
+ }, [
2808
+ renderSlot(_ctx.$slots, "header", {}, () => [
2809
+ unref(hasIcon) ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
2810
+ createVNode(FIcon, null, {
2811
+ default: withCtx(() => [
2812
+ (openBlock(), createBlock(resolveDynamicComponent(iconMap[_ctx.type])))
2813
+ ]),
2814
+ _: 1
2815
+ })
2816
+ ])) : createCommentVNode("", true),
2817
+ createElementVNode("h3", _hoisted_2$f, toDisplayString(_ctx.title), 1)
2818
+ ], true)
2819
+ ], 2)) : createCommentVNode("", true),
2820
+ createElementVNode("div", _hoisted_3$f, [
2821
+ renderSlot(_ctx.$slots, "default", {}, () => [
2822
+ _ctx.content ? (openBlock(), createElementBlock("p", _hoisted_4$9, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
2823
+ ], true)
2824
+ ]),
2825
+ _ctx.$slots.footer || _ctx.showCancel ? (openBlock(), createElementBlock("div", _hoisted_5$8, [
2826
+ renderSlot(_ctx.$slots, "footer", {}, () => [
2827
+ _ctx.showCancel ? (openBlock(), createBlock(FButton$1, {
2828
+ key: 0,
2829
+ onClick: handleCancel
2830
+ }, {
2831
+ default: withCtx(() => [
2832
+ createTextVNode(toDisplayString(_ctx.cancelText), 1)
2833
+ ]),
2834
+ _: 1
2835
+ })) : createCommentVNode("", true),
2836
+ createVNode(FButton$1, {
2837
+ type: "primary",
2838
+ onClick: handleConfirm
2839
+ }, {
2840
+ default: withCtx(() => [
2841
+ createTextVNode(toDisplayString(_ctx.confirmText), 1)
2842
+ ]),
2843
+ _: 1
2844
+ })
2845
+ ], true)
2846
+ ])) : createCommentVNode("", true)
2847
+ ], 6)) : createCommentVNode("", true)
2848
+ ]),
2849
+ _: 3
2850
+ })
2851
+ ])) : createCommentVNode("", true)
2852
+ ]),
2853
+ _: 3
2854
+ })
2855
+ ]);
2856
+ };
2857
+ }
2858
+ });
2859
+ const _hoisted_1$i$2 = ["type", "disabled"];
2860
+ const _hoisted_2$e$2 = { class: "f-button__inner" };
2861
+ const _hoisted_3$e$2 = {
2862
+ key: 0,
2863
+ class: "f-loader"
2864
+ };
2865
+ const _hoisted_4$8$2 = {
2866
+ key: 2,
2867
+ class: "f-button__text"
2868
+ };
2869
+ const _sfc_main$o$2 = /* @__PURE__ */ defineComponent({
2870
+ __name: "FButton",
2871
+ props: {
2872
+ type: {},
2873
+ size: {},
2874
+ nativeType: { default: "button" },
2875
+ loading: { type: Boolean },
2876
+ disabled: { type: Boolean },
2877
+ round: { type: [Boolean, Number] },
2878
+ circle: { type: Boolean },
2879
+ plain: { type: Boolean },
2880
+ text: { type: Boolean },
2881
+ block: { type: Boolean },
2882
+ icon: {},
2883
+ active: { type: Boolean },
2884
+ bgColor: {},
2885
+ color: {}
2886
+ },
2887
+ setup(__props) {
2888
+ const SIZE_MAP = {
2889
+ small: { h: "24px", p: "0 8px", f: "12px", i: "14px" },
2890
+ normal: { h: "32px", p: "0 12px", f: "13px", i: "16px" },
2891
+ large: { h: "40px", p: "0 16px", f: "14px", i: "18px" }
2892
+ };
2893
+ const props = __props;
2894
+ const slots = useSlots();
2895
+ const groupContext = inject("FButtonGroupContext", null);
2896
+ const mergedSize = computed(() => {
2897
+ var _a, _b;
2898
+ return (_b = (_a = props.size) != null ? _a : groupContext == null ? void 0 : groupContext.size) != null ? _b : "normal";
2899
+ });
2900
+ const mergedType = computed(() => {
2901
+ var _a, _b;
2902
+ return (_b = (_a = props.type) != null ? _a : groupContext == null ? void 0 : groupContext.type) != null ? _b : "default";
2903
+ });
2904
+ const isDisabled = computed(() => props.disabled || props.loading || (groupContext == null ? void 0 : groupContext.disabled));
2905
+ const hasText = computed(() => !!slots.default);
2906
+ const buttonStyle = computed(() => {
2907
+ const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
2908
+ const style = {
2909
+ height: s.h,
2910
+ padding: props.circle ? "0" : s.p,
2911
+ fontSize: s.f,
2912
+ minWidth: props.circle ? s.h : "auto",
2913
+ backgroundColor: props.bgColor,
2914
+ color: props.color
2915
+ };
2916
+ if (props.circle) {
2917
+ style.borderRadius = "50%";
2918
+ style.width = s.h;
2919
+ } else if (typeof props.round === "number") {
2920
+ style.borderRadius = `${props.round}px`;
2921
+ } else if (props.round === true) {
2922
+ style.borderRadius = "999px";
2923
+ }
2924
+ return style;
2925
+ });
2926
+ const iconSize = computed(() => {
2927
+ const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
2928
+ return s.i;
2929
+ });
2930
+ return (_ctx, _cache) => {
2931
+ return openBlock(), createElementBlock("button", {
2932
+ type: _ctx.nativeType,
2933
+ class: normalizeClass(["f-button", [
2934
+ `f-button--${unref(mergedType)}`,
2935
+ `f-button--${unref(mergedSize)}`,
2936
+ {
2937
+ "is-disabled": unref(isDisabled),
2938
+ "is-loading": _ctx.loading,
2939
+ "is-active": _ctx.active,
2940
+ "is-text": _ctx.text,
2941
+ "is-icon-only": !unref(hasText) && (_ctx.icon || _ctx.$slots.icon)
2942
+ }
2943
+ ]]),
2944
+ disabled: unref(isDisabled),
2945
+ style: normalizeStyle(unref(buttonStyle))
2946
+ }, [
2947
+ createElementVNode("span", _hoisted_2$e$2, [
2948
+ _ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_3$e$2)) : createCommentVNode("", true),
2949
+ !_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2950
+ _ctx.$slots.icon || _ctx.icon ? (openBlock(), createBlock(unref(FIcon), {
2951
+ key: 0,
2952
+ class: "f-button__icon",
2953
+ style: normalizeStyle({ fontSize: unref(iconSize) })
2954
+ }, {
2955
+ default: withCtx(() => [
2956
+ renderSlot(_ctx.$slots, "icon", {}, () => [
2957
+ _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : createCommentVNode("", true)
2958
+ ], true)
2959
+ ]),
2960
+ _: 3
2961
+ }, 8, ["style"])) : createCommentVNode("", true)
2962
+ ], 64)) : createCommentVNode("", true),
2963
+ unref(hasText) ? (openBlock(), createElementBlock("span", _hoisted_4$8$2, [
2964
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2965
+ ])) : createCommentVNode("", true)
2966
+ ])
2967
+ ], 14, _hoisted_1$i$2);
2968
+ };
2969
+ }
2970
+ });
2971
+ const FButton$2 = /* @__PURE__ */ _export_sfc$2(_sfc_main$o$2, [["__scopeId", "data-v-41be5001"]]);
2972
+ const _hoisted_1$e$2 = { class: "f-checkbox__wrapper" };
2973
+ const _hoisted_2$c$2 = ["checked", "disabled"];
2974
+ const _hoisted_3$c$2 = {
2975
+ key: 0,
2976
+ class: "f-checkbox__label"
2977
+ };
2978
+ /* @__PURE__ */ defineComponent({
2979
+ __name: "FCheckbox",
2980
+ props: /* @__PURE__ */ mergeModels({
2981
+ label: {},
2982
+ disabled: { type: Boolean }
2983
+ }, {
2984
+ "modelValue": __spreadValues2({ type: Boolean }, { default: false }),
2985
+ "modelModifiers": {}
2986
+ }),
2987
+ emits: ["update:modelValue"],
2988
+ setup(__props) {
2989
+ const modelValue = useModel(__props, "modelValue");
2990
+ const props = __props;
2991
+ const handleChange = (e) => {
2992
+ if (props.disabled) return;
2993
+ const target = e.target;
2994
+ modelValue.value = target.checked;
2995
+ };
2996
+ return (_ctx, _cache) => {
2997
+ return openBlock(), createElementBlock("label", {
2998
+ class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
2999
+ }, [
3000
+ createElementVNode("span", _hoisted_1$e$2, [
3001
+ createElementVNode("input", {
3002
+ type: "checkbox",
3003
+ checked: modelValue.value,
3004
+ disabled: _ctx.disabled,
3005
+ onChange: handleChange
3006
+ }, null, 40, _hoisted_2$c$2),
3007
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
3008
+ ]),
3009
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$c$2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
3010
+ ], 2);
3011
+ };
3012
+ }
3013
+ });
3014
+ const _hoisted_1$2$1 = { class: "f-message__content" };
3015
+ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
3016
+ __name: "FMessage",
3017
+ props: {
3018
+ type: { default: "info" },
3019
+ message: {},
3020
+ duration: { default: 3e3 },
3021
+ closable: { type: Boolean, default: false },
3022
+ showIcon: { type: Boolean, default: true },
3023
+ offset: { default: 20 }
3024
+ },
3025
+ emits: ["close", "destroy"],
3026
+ setup(__props, { expose: __expose, emit: __emit }) {
3027
+ const props = __props;
3028
+ const emit = __emit;
3029
+ const visible = ref(false);
3030
+ let timer = null;
3031
+ const iconName = computed(() => {
3032
+ const map = {
3033
+ info: InformationCircle,
3034
+ success: CheckmarkCircle,
3035
+ warning: Warning,
3036
+ failed: CloseCircle,
3037
+ default: InformationCircle,
3038
+ primary: InformationCircle
3039
+ };
3040
+ return map[props.type];
3041
+ });
3042
+ const rootStyle = computed(() => ({
3043
+ top: `${props.offset}px`
3044
+ }));
3045
+ const startTimer = () => {
3046
+ if (props.duration <= 0) return;
3047
+ timer = setTimeout(() => {
3048
+ close();
3049
+ }, props.duration);
3050
+ };
3051
+ const clearTimer = () => {
3052
+ if (timer) {
3053
+ clearTimeout(timer);
3054
+ timer = null;
3055
+ }
3056
+ };
3057
+ const close = () => {
3058
+ clearTimer();
3059
+ visible.value = false;
3060
+ emit("close");
3061
+ };
3062
+ const handleAfterLeave = () => emit("destroy");
3063
+ onMounted(() => {
3064
+ visible.value = true;
3065
+ startTimer();
3066
+ });
3067
+ onBeforeUnmount(() => {
3068
+ clearTimer();
3069
+ });
3070
+ __expose({ close });
3071
+ return (_ctx, _cache) => {
3072
+ return openBlock(), createBlock(Transition, {
3073
+ name: "f-message-fade",
3074
+ onAfterLeave: handleAfterLeave
3075
+ }, {
3076
+ default: withCtx(() => [
3077
+ unref(visible) ? (openBlock(), createElementBlock("div", {
3078
+ key: 0,
3079
+ class: normalizeClass(["f-message", [`f-message--${_ctx.type}`]]),
3080
+ style: normalizeStyle(unref(rootStyle)),
3081
+ role: "alert",
3082
+ onMouseenter: clearTimer,
3083
+ onMouseleave: startTimer
3084
+ }, [
3085
+ _ctx.showIcon ? (openBlock(), createBlock(FIcon$2, {
3086
+ key: 0,
3087
+ class: "f-message__icon"
3088
+ }, {
3089
+ default: withCtx(() => [
3090
+ (openBlock(), createBlock(resolveDynamicComponent(unref(iconName))))
3091
+ ]),
3092
+ _: 1
3093
+ })) : createCommentVNode("", true),
3094
+ createElementVNode("span", _hoisted_1$2$1, toDisplayString(_ctx.message), 1),
3095
+ _ctx.closable ? (openBlock(), createElementBlock("button", {
3096
+ key: 1,
3097
+ type: "button",
3098
+ class: "f-message__close",
3099
+ "aria-label": "close",
3100
+ onClick: close
3101
+ }, [
3102
+ createVNode(FIcon$2, null, {
3103
+ default: withCtx(() => [
3104
+ createVNode(unref(Close))
3105
+ ]),
3106
+ _: 1
3107
+ })
3108
+ ])) : createCommentVNode("", true)
3109
+ ], 38)) : createCommentVNode("", true)
3110
+ ]),
3111
+ _: 1
3112
+ });
3113
+ };
3114
+ }
3115
+ });
3116
+ const FMessageComp$1 = /* @__PURE__ */ _export_sfc$2(_sfc_main$2$1, [["__scopeId", "data-v-97556afa"]]);
3117
+ const GAP$1$1 = 16;
3118
+ const BASE_OFFSET$1$1 = 20;
3119
+ let seed$1$1 = 0;
3120
+ const instances$1 = [];
3121
+ const normalizeOptions$1$1 = (options) => {
3122
+ return typeof options === "string" ? { message: options } : options;
3123
+ };
3124
+ const repositionAll$1 = () => {
3125
+ let offset = BASE_OFFSET$1$1;
3126
+ instances$1.forEach((item) => {
3127
+ const vm = item.vnode.component;
3128
+ if (vm) {
3129
+ vm.props.offset = offset;
3130
+ }
3131
+ offset += item.height + GAP$1$1;
3132
+ });
3133
+ };
3134
+ const removeInstance$1$1 = (id) => {
3135
+ const index = instances$1.findIndex((item) => item.id === id);
3136
+ if (index === -1) return;
3137
+ const { container } = instances$1[index];
3138
+ render(null, container);
3139
+ container.remove();
3140
+ instances$1.splice(index, 1);
3141
+ repositionAll$1();
3142
+ };
3143
+ const createInstance$1$1 = (options) => {
3144
+ var _a;
3145
+ const id = seed$1$1++;
3146
+ const container = document.createElement("div");
3147
+ const offset = instances$1.length === 0 ? BASE_OFFSET$1$1 : (() => {
3148
+ var _a2;
3149
+ const last = instances$1[instances$1.length - 1];
3150
+ return ((_a2 = last.vnode.component) == null ? void 0 : _a2.props.offset) + last.height + GAP$1$1;
3151
+ })();
3152
+ const vnode = createVNode(FMessageComp$1, __spreadProps2(__spreadValues2({}, options), {
3153
+ offset,
3154
+ onClose: () => {
3155
+ var _a2;
3156
+ (_a2 = options.onClose) == null ? void 0 : _a2.call(options);
3157
+ },
3158
+ onDestroy: () => {
3159
+ removeInstance$1$1(id);
3160
+ }
3161
+ }));
3162
+ render(vnode, container);
3163
+ document.body.appendChild(container);
3164
+ const el = vnode.el;
3165
+ const height = (_a = el == null ? void 0 : el.offsetHeight) != null ? _a : 44;
3166
+ instances$1.push({ id, vnode, container, height });
3167
+ return {
3168
+ id,
3169
+ close: () => {
3170
+ var _a2, _b, _c;
3171
+ (_c = (_b = (_a2 = vnode.component) == null ? void 0 : _a2.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
3172
+ }
3173
+ };
3174
+ };
3175
+ const FMessage$1 = (options) => {
3176
+ return createInstance$1$1(normalizeOptions$1$1(options));
3177
+ };
3178
+ const withType$1$1 = (type) => (options) => createInstance$1$1(__spreadProps2(__spreadValues2({}, normalizeOptions$1$1(options)), { type }));
3179
+ FMessage$1.info = withType$1$1("info");
3180
+ FMessage$1.success = withType$1$1("success");
3181
+ FMessage$1.warning = withType$1$1("warning");
3182
+ FMessage$1.failed = withType$1$1("failed");
3183
+ FMessage$1.closeAll = () => {
3184
+ [...instances$1].forEach((item) => {
3185
+ var _a, _b, _c;
3186
+ (_c = (_b = (_a = item.vnode.component) == null ? void 0 : _a.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
3187
+ });
3188
+ };
3189
+ const _hoisted_1$1$1 = { class: "f-notification__body" };
3190
+ const _hoisted_2$1$1 = {
3191
+ key: 0,
3192
+ class: "f-notification__title"
3193
+ };
3194
+ const _hoisted_3$1$1 = { class: "f-notification__content" };
3195
+ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
3196
+ __name: "FNotification",
3197
+ props: {
3198
+ type: { default: "info" },
3199
+ title: {},
3200
+ message: {},
3201
+ duration: { default: 4500 },
3202
+ closable: { type: Boolean, default: true },
3203
+ showIcon: { type: Boolean, default: true },
3204
+ position: { default: "top-right" },
3205
+ offset: { default: 20 }
3206
+ },
3207
+ emits: ["close", "destroy", "click"],
3208
+ setup(__props, { expose: __expose, emit: __emit }) {
3209
+ const props = __props;
3210
+ const emit = __emit;
3211
+ const visible = ref(false);
3212
+ let timer = null;
3213
+ const iconName = computed(() => {
3214
+ const map = {
3215
+ info: InformationCircle,
3216
+ success: CheckmarkCircle,
3217
+ warning: Warning,
3218
+ failed: CloseCircle,
3219
+ default: InformationCircle,
3220
+ primary: InformationCircle
3221
+ };
3222
+ return map[props.type];
3223
+ });
3224
+ const isTop = computed(() => props.position.startsWith("top"));
3225
+ const isRight = computed(() => props.position.endsWith("right"));
3226
+ const rootStyle = computed(() => ({
3227
+ [isTop.value ? "top" : "bottom"]: `${props.offset}px`,
3228
+ [isRight.value ? "right" : "left"]: "20px"
3229
+ }));
3230
+ const startTimer = () => {
3231
+ if (props.duration <= 0) return;
3232
+ timer = setTimeout(() => {
3233
+ close();
3234
+ }, props.duration);
3235
+ };
3236
+ const clearTimer = () => {
3237
+ if (timer) {
3238
+ clearTimeout(timer);
3239
+ timer = null;
3240
+ }
3241
+ };
3242
+ const close = () => {
3243
+ clearTimer();
3244
+ visible.value = false;
3245
+ emit("close");
3246
+ };
3247
+ const handleAfterLeave = () => emit("destroy");
3248
+ const handleClick = () => emit("click");
3249
+ onMounted(() => {
3250
+ visible.value = true;
3251
+ startTimer();
3252
+ });
3253
+ onBeforeUnmount(() => {
3254
+ clearTimer();
3255
+ });
3256
+ __expose({ close });
3257
+ return (_ctx, _cache) => {
3258
+ return openBlock(), createBlock(Transition, {
3259
+ name: `f-notification-${_ctx.position}`,
3260
+ onAfterLeave: handleAfterLeave
3261
+ }, {
3262
+ default: withCtx(() => [
3263
+ unref(visible) ? (openBlock(), createElementBlock("div", {
3264
+ key: 0,
3265
+ class: normalizeClass(["f-notification", [`f-notification--${_ctx.type}`]]),
3266
+ style: normalizeStyle(unref(rootStyle)),
3267
+ role: "alert",
3268
+ onMouseenter: clearTimer,
3269
+ onMouseleave: startTimer,
3270
+ onClick: handleClick
3271
+ }, [
3272
+ _ctx.showIcon ? (openBlock(), createBlock(FIcon$2, {
3273
+ key: 0,
3274
+ class: "f-notification__icon"
3275
+ }, {
3276
+ default: withCtx(() => [
3277
+ (openBlock(), createBlock(resolveDynamicComponent(unref(iconName))))
3278
+ ]),
3279
+ _: 1
3280
+ })) : createCommentVNode("", true),
3281
+ createElementVNode("div", _hoisted_1$1$1, [
3282
+ _ctx.title ? (openBlock(), createElementBlock("p", _hoisted_2$1$1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
3283
+ createElementVNode("p", _hoisted_3$1$1, toDisplayString(_ctx.message), 1)
3284
+ ]),
3285
+ _ctx.closable ? (openBlock(), createElementBlock("button", {
3286
+ key: 1,
3287
+ type: "button",
3288
+ class: "f-notification__close",
3289
+ "aria-label": "close",
3290
+ onClick: withModifiers(close, ["stop"])
3291
+ }, [
3292
+ createVNode(FIcon$2, null, {
3293
+ default: withCtx(() => [
3294
+ createVNode(unref(Close))
3295
+ ]),
3296
+ _: 1
3297
+ })
3298
+ ])) : createCommentVNode("", true)
3299
+ ], 38)) : createCommentVNode("", true)
3300
+ ]),
3301
+ _: 1
3302
+ }, 8, ["name"]);
3303
+ };
3304
+ }
3305
+ });
3306
+ const FNotificationComp$1 = /* @__PURE__ */ _export_sfc$2(_sfc_main$1$1, [["__scopeId", "data-v-0a7315d6"]]);
3307
+ const GAP$2 = 16;
3308
+ const BASE_OFFSET$2 = 20;
3309
+ let seed$2 = 0;
3310
+ const groups$1 = {
3311
+ "top-right": [],
3312
+ "top-left": [],
3313
+ "bottom-right": [],
3314
+ "bottom-left": []
3315
+ };
3316
+ const normalizeOptions$2 = (options) => {
3317
+ return typeof options === "string" ? { message: options } : options;
3318
+ };
3319
+ const repositionGroup$1 = (position) => {
3320
+ let offset = BASE_OFFSET$2;
3321
+ groups$1[position].forEach((item) => {
3322
+ const vm = item.vnode.component;
3323
+ if (vm) {
3324
+ vm.props.offset = offset;
3325
+ }
3326
+ offset += Number(item.size) + GAP$2;
3327
+ });
3328
+ };
3329
+ const removeInstance$2 = (position, id) => {
3330
+ const list = groups$1[position];
3331
+ const index = list.findIndex((item) => item.id === id);
3332
+ if (index === -1) return;
3333
+ const { container } = list[index];
3334
+ render(null, container);
3335
+ container.remove();
3336
+ list.splice(index, 1);
3337
+ repositionGroup$1(position);
3338
+ };
3339
+ const createInstance$2 = (options) => {
3340
+ var _a, _b;
3341
+ const id = seed$2++;
3342
+ const position = (_a = options.position) != null ? _a : "top-right";
3343
+ const list = groups$1[position];
3344
+ const container = document.createElement("div");
3345
+ const offset = list.length === 0 ? BASE_OFFSET$2 : (() => {
3346
+ var _a2;
3347
+ const last = list[list.length - 1];
3348
+ return Number((_a2 = last.vnode.component) == null ? void 0 : _a2.props.offset) + Number(last.size) + GAP$2;
3349
+ })();
3350
+ const vnode = createVNode(FNotificationComp$1, __spreadProps2(__spreadValues2({}, options), {
3351
+ position,
3352
+ offset,
3353
+ onClose: () => {
3354
+ var _a2;
3355
+ (_a2 = options.onClose) == null ? void 0 : _a2.call(options);
3356
+ },
3357
+ onDestroy: () => {
3358
+ removeInstance$2(position, id);
3359
+ },
3360
+ onClick: () => {
3361
+ var _a2;
3362
+ (_a2 = options.onClick) == null ? void 0 : _a2.call(options);
3363
+ }
3364
+ }));
3365
+ render(vnode, container);
3366
+ document.body.appendChild(container);
3367
+ const el = vnode.el;
3368
+ const size = (_b = el == null ? void 0 : el.offsetHeight) != null ? _b : 72;
3369
+ list.push({ id, position, vnode, container, size });
3370
+ return {
3371
+ id,
3372
+ close: () => {
3373
+ var _a2, _b2, _c;
3374
+ (_c = (_b2 = (_a2 = vnode.component) == null ? void 0 : _a2.exposed) == null ? void 0 : _b2.close) == null ? void 0 : _c.call(_b2);
3375
+ }
3376
+ };
3377
+ };
3378
+ const FNotification$1 = (options) => {
3379
+ return createInstance$2(normalizeOptions$2(options));
3380
+ };
3381
+ const withType$2 = (type) => (options) => createInstance$2(__spreadProps2(__spreadValues2({}, normalizeOptions$2(options)), { type }));
3382
+ FNotification$1.info = withType$2("info");
3383
+ FNotification$1.success = withType$2("success");
3384
+ FNotification$1.warning = withType$2("warning");
3385
+ FNotification$1.failed = withType$2("failed");
3386
+ FNotification$1.closeAll = (position) => {
3387
+ const positions = position ? [position] : Object.keys(groups$1);
3388
+ positions.forEach((pos) => {
3389
+ [...groups$1[pos]].forEach((item) => {
3390
+ var _a, _b, _c;
3391
+ (_c = (_b = (_a = item.vnode.component) == null ? void 0 : _a.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
3392
+ });
3393
+ });
3394
+ };
3395
+ const _hoisted_1$k = {
3396
+ key: 0,
3397
+ class: "f-dialog__icon"
3398
+ };
3399
+ const _hoisted_2$g = { class: "f-dialog__title" };
3400
+ const _hoisted_3$g = { class: "f-dialog__body" };
3401
+ const _hoisted_4$a = { key: 0 };
3402
+ const _hoisted_5$9 = {
3403
+ key: 2,
3404
+ class: "f-dialog__footer"
3405
+ };
3406
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3407
+ __name: "FDialog",
3408
+ props: /* @__PURE__ */ mergeModels({
3409
+ title: { default: "提示" },
3410
+ content: {},
3411
+ width: { default: "500px" },
3412
+ type: { default: "default" },
3413
+ confirmText: { default: "确定" },
3414
+ cancelText: { default: "取消" },
3415
+ showCancel: { type: Boolean, default: true },
3416
+ showClose: { type: Boolean, default: true },
3417
+ closeOnClickModal: { type: Boolean, default: true },
3418
+ closeOnEsc: { type: Boolean, default: true },
3419
+ center: { type: Boolean, default: false },
3420
+ fullscreen: { type: Boolean, default: false },
3421
+ destroyOnClose: { type: Boolean, default: false },
3422
+ beforeClose: {}
3423
+ }, {
3424
+ "modelValue": __spreadValues2({ type: Boolean }, { required: true }),
3425
+ "modelModifiers": {}
3426
+ }),
3427
+ emits: /* @__PURE__ */ mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
3428
+ setup(__props, { emit: __emit }) {
3429
+ const props = __props;
3430
+ const emit = __emit;
3431
+ const visible = useModel(__props, "modelValue");
3432
+ const handleClose = () => {
3433
+ visible.value = false;
3434
+ emit("close");
3435
+ };
3436
+ const handleConfirm = () => {
3437
+ emit("confirm");
3438
+ if (props.beforeClose) {
3439
+ props.beforeClose(() => {
3440
+ visible.value = false;
3441
+ });
3442
+ } else {
3443
+ visible.value = false;
3444
+ }
3445
+ };
3446
+ const handleCancel = () => {
3447
+ emit("cancel");
3448
+ handleClose();
3449
+ };
3450
+ const handleOverlayClick = (e) => {
3451
+ if (props.closeOnClickModal && e.target === e.currentTarget) {
3452
+ handleClose();
3453
+ }
3454
+ };
3455
+ const handleKeydown = (e) => {
3456
+ if (props.closeOnEsc && e.key === "Escape") {
3457
+ handleClose();
3458
+ }
3459
+ };
3460
+ onMounted(() => {
3461
+ if (props.closeOnEsc) {
3462
+ window.addEventListener("keydown", handleKeydown);
3463
+ }
3464
+ emit("open");
3465
+ });
3466
+ onBeforeUnmount(() => {
3467
+ if (props.closeOnEsc) {
3468
+ window.removeEventListener("keydown", handleKeydown);
3469
+ }
3470
+ });
3471
+ const iconMap = {
3472
+ info: InformationCircleOutline,
3473
+ success: CheckmarkCircleOutline,
3474
+ warning: WarningOutline,
3475
+ failed: AlertCircleOutline,
3476
+ primary: InformationCircleOutline,
3477
+ default: InformationCircleOutline
3478
+ };
3479
+ const hasIcon = computed(() => props.type && props.type !== "default");
3480
+ return (_ctx, _cache) => {
3481
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
3482
+ createVNode(Transition, { name: "f-dialog-fade" }, {
3483
+ default: withCtx(() => [
3484
+ visible.value ? (openBlock(), createElementBlock("div", {
3485
+ key: 0,
3486
+ class: "f-dialog-overlay",
3487
+ onClick: handleOverlayClick
3488
+ }, [
3489
+ createVNode(Transition, { name: "f-dialog-zoom" }, {
3490
+ default: withCtx(() => [
3491
+ visible.value ? (openBlock(), createElementBlock("div", {
3492
+ key: 0,
3493
+ class: normalizeClass(["f-dialog", [
3494
+ `f-dialog--${_ctx.type}`,
3495
+ {
3496
+ "is-center": _ctx.center,
3497
+ "is-fullscreen": _ctx.fullscreen
3498
+ }
3499
+ ]]),
3500
+ style: normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
3501
+ }, [
3502
+ _ctx.showClose ? (openBlock(), createElementBlock("button", {
3503
+ key: 0,
3504
+ type: "button",
3505
+ class: "f-dialog__close",
3506
+ onClick: handleClose
3507
+ }, [
3508
+ createVNode(FIcon$2, null, {
3509
+ default: withCtx(() => [
3510
+ createVNode(unref(CloseOutline))
3511
+ ]),
3512
+ _: 1
3513
+ })
3514
+ ])) : createCommentVNode("", true),
3515
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("div", {
3516
+ key: 1,
3517
+ class: normalizeClass(["f-dialog__header", { "has-icon": unref(hasIcon) }])
3518
+ }, [
3519
+ renderSlot(_ctx.$slots, "header", {}, () => [
3520
+ unref(hasIcon) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
3521
+ createVNode(FIcon$2, null, {
3522
+ default: withCtx(() => [
3523
+ (openBlock(), createBlock(resolveDynamicComponent(iconMap[_ctx.type])))
3524
+ ]),
3525
+ _: 1
3526
+ })
3527
+ ])) : createCommentVNode("", true),
3528
+ createElementVNode("h3", _hoisted_2$g, toDisplayString(_ctx.title), 1)
3529
+ ], true)
3530
+ ], 2)) : createCommentVNode("", true),
3531
+ createElementVNode("div", _hoisted_3$g, [
3532
+ renderSlot(_ctx.$slots, "default", {}, () => [
3533
+ _ctx.content ? (openBlock(), createElementBlock("p", _hoisted_4$a, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
3534
+ ], true)
3535
+ ]),
3536
+ _ctx.$slots.footer || _ctx.showCancel ? (openBlock(), createElementBlock("div", _hoisted_5$9, [
3537
+ renderSlot(_ctx.$slots, "footer", {}, () => [
3538
+ _ctx.showCancel ? (openBlock(), createBlock(FButton$2, {
3539
+ key: 0,
3540
+ onClick: handleCancel
3541
+ }, {
3542
+ default: withCtx(() => [
3543
+ createTextVNode(toDisplayString(_ctx.cancelText), 1)
3544
+ ]),
3545
+ _: 1
3546
+ })) : createCommentVNode("", true),
3547
+ createVNode(FButton$2, {
3548
+ type: "primary",
3549
+ onClick: handleConfirm
3550
+ }, {
3551
+ default: withCtx(() => [
3552
+ createTextVNode(toDisplayString(_ctx.confirmText), 1)
3553
+ ]),
3554
+ _: 1
3555
+ })
3556
+ ], true)
3557
+ ])) : createCommentVNode("", true)
3558
+ ], 6)) : createCommentVNode("", true)
3559
+ ]),
3560
+ _: 3
3561
+ })
3562
+ ])) : createCommentVNode("", true)
3563
+ ]),
3564
+ _: 3
3565
+ })
3566
+ ]);
3567
+ };
3568
+ }
3569
+ });
3570
+ const FDialogComp$1 = /* @__PURE__ */ _export_sfc$2(_sfc_main$p, [["__scopeId", "data-v-991352de"]]);
3571
+ const showDialog$1 = (options) => {
3572
+ return new Promise((resolve) => {
3573
+ const container = document.createElement("div");
3574
+ document.body.appendChild(container);
3575
+ const visible = ref(true);
3576
+ const handleConfirm = () => {
3577
+ cleanup();
3578
+ resolve(true);
3579
+ };
3580
+ const handleCancel = () => {
3581
+ cleanup();
3582
+ resolve(false);
3583
+ };
3584
+ const handleClose = () => {
3585
+ cleanup();
3586
+ resolve(false);
3587
+ };
3588
+ const cleanup = () => {
3589
+ visible.value = false;
3590
+ setTimeout(() => {
3591
+ render(null, container);
3592
+ document.body.removeChild(container);
3593
+ }, 300);
3594
+ };
3595
+ const vnode = h(FDialogComp$1, __spreadValues2({
3596
+ modelValue: visible.value,
3597
+ "onUpdate:modelValue": (val) => {
3598
+ visible.value = val;
3599
+ if (!val) {
3600
+ cleanup();
3601
+ }
3602
+ },
3603
+ onConfirm: handleConfirm,
3604
+ onCancel: handleCancel,
3605
+ onClose: handleClose
3606
+ }, options));
3607
+ render(vnode, container);
3608
+ });
3609
+ };
3610
+ const confirm$1 = (content, title = "确认") => {
3611
+ return showDialog$1({
3612
+ title,
3613
+ content,
3614
+ type: "warning",
3615
+ showCancel: true,
3616
+ center: true
3617
+ });
3618
+ };
3619
+ const alert$1 = (content, title = "提示", type = "info") => {
3620
+ return showDialog$1({
3621
+ title,
3622
+ content,
3623
+ type,
3624
+ showCancel: false,
3625
+ confirmText: "知道了",
3626
+ center: true
3627
+ });
3628
+ };
3629
+ const success$1 = (content, title = "成功") => {
3630
+ return alert$1(content, title, "success");
3631
+ };
3632
+ const warning$1 = (content, title = "警告") => {
3633
+ return alert$1(content, title, "warning");
3634
+ };
3635
+ const failed$1 = (content, title = "错误") => {
3636
+ return alert$1(content, title, "failed");
3637
+ };
3638
+ const info$1 = (content, title = "提示") => {
3639
+ return alert$1(content, title, "info");
3640
+ };
3641
+ const FDialog$1 = (options) => {
3642
+ return showDialog$1(options);
3643
+ };
3644
+ FDialog$1.showDialog = showDialog$1;
3645
+ FDialog$1.confirm = confirm$1;
3646
+ FDialog$1.alert = alert$1;
3647
+ FDialog$1.success = success$1;
3648
+ FDialog$1.warning = warning$1;
3649
+ FDialog$1.failed = failed$1;
3650
+ FDialog$1.info = info$1;
3651
+ const _hoisted_1$i = ["type", "disabled"];
3652
+ const _hoisted_2$e = { class: "f-button__inner" };
3653
+ const _hoisted_3$e = {
1450
3654
  key: 0,
1451
3655
  class: "f-loader"
1452
3656
  };
3657
+ const _hoisted_4$8 = {
3658
+ key: 2,
3659
+ class: "f-button__text"
3660
+ };
1453
3661
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
1454
3662
  __name: "FButton",
1455
3663
  props: {
@@ -1461,6 +3669,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1461
3669
  round: { type: [Boolean, Number] },
1462
3670
  circle: { type: Boolean },
1463
3671
  plain: { type: Boolean },
3672
+ text: { type: Boolean },
1464
3673
  block: { type: Boolean },
1465
3674
  icon: {},
1466
3675
  active: { type: Boolean },
@@ -1474,6 +3683,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1474
3683
  large: { h: "40px", p: "0 16px", f: "14px", i: "18px" }
1475
3684
  };
1476
3685
  const props = __props;
3686
+ const slots = useSlots();
1477
3687
  const groupContext = inject("FButtonGroupContext", null);
1478
3688
  const mergedSize = computed(() => {
1479
3689
  var _a, _b;
@@ -1484,6 +3694,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1484
3694
  return (_b = (_a = props.type) != null ? _a : groupContext == null ? void 0 : groupContext.type) != null ? _b : "default";
1485
3695
  });
1486
3696
  const isDisabled = computed(() => props.disabled || props.loading || (groupContext == null ? void 0 : groupContext.disabled));
3697
+ const hasText = computed(() => !!slots.default);
1487
3698
  const buttonStyle = computed(() => {
1488
3699
  const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
1489
3700
  const style = {
@@ -1504,26 +3715,52 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1504
3715
  }
1505
3716
  return style;
1506
3717
  });
3718
+ const iconSize = computed(() => {
3719
+ const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
3720
+ return s.i;
3721
+ });
1507
3722
  return (_ctx, _cache) => {
1508
3723
  return openBlock(), createElementBlock("button", {
1509
3724
  type: _ctx.nativeType,
1510
3725
  class: normalizeClass(["f-button", [
1511
3726
  `f-button--${unref(mergedType)}`,
1512
3727
  `f-button--${unref(mergedSize)}`,
1513
- { "is-disabled": unref(isDisabled), "is-loading": _ctx.loading, "is-active": _ctx.active }
3728
+ {
3729
+ "is-disabled": unref(isDisabled),
3730
+ "is-loading": _ctx.loading,
3731
+ "is-active": _ctx.active,
3732
+ "is-text": _ctx.text,
3733
+ "is-icon-only": !unref(hasText) && (_ctx.icon || _ctx.$slots.icon)
3734
+ }
1514
3735
  ]]),
1515
3736
  disabled: unref(isDisabled),
1516
3737
  style: normalizeStyle(unref(buttonStyle))
1517
3738
  }, [
1518
- createElementVNode("span", _hoisted_2$d, [
1519
- _ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_3$d)) : createCommentVNode("", true),
1520
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
3739
+ createElementVNode("span", _hoisted_2$e, [
3740
+ _ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_3$e)) : createCommentVNode("", true),
3741
+ !_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3742
+ _ctx.$slots.icon || _ctx.icon ? (openBlock(), createBlock(unref(FIcon$2), {
3743
+ key: 0,
3744
+ class: "f-button__icon",
3745
+ style: normalizeStyle({ fontSize: unref(iconSize) })
3746
+ }, {
3747
+ default: withCtx(() => [
3748
+ renderSlot(_ctx.$slots, "icon", {}, () => [
3749
+ _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : createCommentVNode("", true)
3750
+ ], true)
3751
+ ]),
3752
+ _: 3
3753
+ }, 8, ["style"])) : createCommentVNode("", true)
3754
+ ], 64)) : createCommentVNode("", true),
3755
+ unref(hasText) ? (openBlock(), createElementBlock("span", _hoisted_4$8, [
3756
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3757
+ ])) : createCommentVNode("", true)
1521
3758
  ])
1522
- ], 14, _hoisted_1$h);
3759
+ ], 14, _hoisted_1$i);
1523
3760
  };
1524
3761
  }
1525
3762
  });
1526
- const FButton = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-8ec1ff5a"]]);
3763
+ const FButton = /* @__PURE__ */ _export_sfc$3(_sfc_main$o, [["__scopeId", "data-v-41be5001"]]);
1527
3764
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
1528
3765
  __name: "FTypography",
1529
3766
  props: {
@@ -1546,7 +3783,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1546
3783
  };
1547
3784
  }
1548
3785
  });
1549
- const FTypography = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-50e044db"]]);
3786
+ const FTypography = /* @__PURE__ */ _export_sfc$3(_sfc_main$n, [["__scopeId", "data-v-50e044db"]]);
1550
3787
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
1551
3788
  __name: "FText",
1552
3789
  props: {
@@ -1605,8 +3842,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1605
3842
  };
1606
3843
  }
1607
3844
  });
1608
- const FText = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-8bcfc6b3"]]);
1609
- const _hoisted_1$g = ["href", "target", "rel"];
3845
+ const FText = /* @__PURE__ */ _export_sfc$3(_sfc_main$m, [["__scopeId", "data-v-8bcfc6b3"]]);
3846
+ const _hoisted_1$h = ["href", "target", "rel"];
1610
3847
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
1611
3848
  __name: "FLink",
1612
3849
  props: {
@@ -1630,12 +3867,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1630
3867
  rel: props.target === "_blank" ? "noopener noreferrer" : void 0
1631
3868
  }, [
1632
3869
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1633
- ], 10, _hoisted_1$g);
3870
+ ], 10, _hoisted_1$h);
1634
3871
  };
1635
3872
  }
1636
3873
  });
1637
- const FLink = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-daaa3e25"]]);
1638
- const _hoisted_1$f = { class: "f-badge" };
3874
+ const FLink = /* @__PURE__ */ _export_sfc$3(_sfc_main$l, [["__scopeId", "data-v-daaa3e25"]]);
3875
+ const _hoisted_1$g = { class: "f-badge" };
1639
3876
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
1640
3877
  __name: "FBadge",
1641
3878
  props: {
@@ -1665,7 +3902,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1665
3902
  return map[props.placement];
1666
3903
  });
1667
3904
  return (_ctx, _cache) => {
1668
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
3905
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
1669
3906
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
1670
3907
  _ctx.dot || _ctx.value !== void 0 && _ctx.value !== "" ? (openBlock(), createElementBlock("span", {
1671
3908
  key: 0,
@@ -1676,7 +3913,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1676
3913
  };
1677
3914
  }
1678
3915
  });
1679
- const FBadge = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-be6947ff"]]);
3916
+ const FBadge = /* @__PURE__ */ _export_sfc$3(_sfc_main$k, [["__scopeId", "data-v-be6947ff"]]);
1680
3917
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
1681
3918
  __name: "FAffix",
1682
3919
  props: {
@@ -1705,7 +3942,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1705
3942
  };
1706
3943
  }
1707
3944
  });
1708
- const FAffix = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-8506d679"]]);
3945
+ const FAffix = /* @__PURE__ */ _export_sfc$3(_sfc_main$j, [["__scopeId", "data-v-8506d679"]]);
1709
3946
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
1710
3947
  __name: "FForm",
1711
3948
  props: {
@@ -1763,7 +4000,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1763
4000
  };
1764
4001
  }
1765
4002
  });
1766
- const FForm = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-21f7de9b"]]);
4003
+ const FForm = /* @__PURE__ */ _export_sfc$3(_sfc_main$i, [["__scopeId", "data-v-21f7de9b"]]);
1767
4004
  const validateSingleField = (value, rules) => __async(null, null, function* () {
1768
4005
  const ruleArray = Array.isArray(rules) ? rules : [rules];
1769
4006
  for (let rule of ruleArray) {
@@ -1845,12 +4082,12 @@ const checkRange = (value, rule) => {
1845
4082
  }
1846
4083
  return void 0;
1847
4084
  };
1848
- const _hoisted_1$e = {
4085
+ const _hoisted_1$f = {
1849
4086
  key: 0,
1850
4087
  class: "star"
1851
4088
  };
1852
- const _hoisted_2$c = { class: "f-form-item__content" };
1853
- const _hoisted_3$c = {
4089
+ const _hoisted_2$d = { class: "f-form-item__content" };
4090
+ const _hoisted_3$d = {
1854
4091
  key: 0,
1855
4092
  class: "f-form-item__error"
1856
4093
  };
@@ -1920,14 +4157,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1920
4157
  textAlign: unref(labelPosition) === "top" ? "left" : unref(labelPosition)
1921
4158
  })
1922
4159
  }, [
1923
- unref(isRequired) ? (openBlock(), createElementBlock("span", _hoisted_1$e, "*")) : createCommentVNode("", true),
4160
+ unref(isRequired) ? (openBlock(), createElementBlock("span", _hoisted_1$f, "*")) : createCommentVNode("", true),
1924
4161
  createTextVNode(" " + toDisplayString(_ctx.label) + ": ", 1)
1925
4162
  ], 4)) : createCommentVNode("", true),
1926
- createElementVNode("div", _hoisted_2$c, [
4163
+ createElementVNode("div", _hoisted_2$d, [
1927
4164
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
1928
4165
  createVNode(Transition, { name: "err-slide" }, {
1929
4166
  default: withCtx(() => [
1930
- unref(errorMsg) ? (openBlock(), createElementBlock("p", _hoisted_3$c, toDisplayString(unref(errorMsg)), 1)) : createCommentVNode("", true)
4167
+ unref(errorMsg) ? (openBlock(), createElementBlock("p", _hoisted_3$d, toDisplayString(unref(errorMsg)), 1)) : createCommentVNode("", true)
1931
4168
  ]),
1932
4169
  _: 1
1933
4170
  })
@@ -1936,10 +4173,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1936
4173
  };
1937
4174
  }
1938
4175
  });
1939
- const FFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-c3d6ec01"]]);
1940
- const _hoisted_1$d = { class: "f-checkbox__wrapper" };
1941
- const _hoisted_2$b = ["checked", "disabled"];
1942
- const _hoisted_3$b = {
4176
+ const FFormItem = /* @__PURE__ */ _export_sfc$3(_sfc_main$h, [["__scopeId", "data-v-c3d6ec01"]]);
4177
+ const _hoisted_1$e = { class: "f-checkbox__wrapper" };
4178
+ const _hoisted_2$c = ["checked", "disabled"];
4179
+ const _hoisted_3$c = {
1943
4180
  key: 0,
1944
4181
  class: "f-checkbox__label"
1945
4182
  };
@@ -1965,24 +4202,24 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1965
4202
  return openBlock(), createElementBlock("label", {
1966
4203
  class: normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
1967
4204
  }, [
1968
- createElementVNode("span", _hoisted_1$d, [
4205
+ createElementVNode("span", _hoisted_1$e, [
1969
4206
  createElementVNode("input", {
1970
4207
  type: "checkbox",
1971
4208
  checked: modelValue.value,
1972
4209
  disabled: _ctx.disabled,
1973
4210
  onChange: handleChange
1974
- }, null, 40, _hoisted_2$b),
4211
+ }, null, 40, _hoisted_2$c),
1975
4212
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
1976
4213
  ]),
1977
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$b, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
4214
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$c, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
1978
4215
  ], 2);
1979
4216
  };
1980
4217
  }
1981
4218
  });
1982
- const FCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-633b283a"]]);
1983
- const _hoisted_1$c = { class: "alert__body" };
1984
- const _hoisted_2$a = { class: "alert__title" };
1985
- const _hoisted_3$a = { class: "alert__content" };
4219
+ const FCheckbox = /* @__PURE__ */ _export_sfc$3(_sfc_main$g, [["__scopeId", "data-v-633b283a"]]);
4220
+ const _hoisted_1$d = { class: "alert__body" };
4221
+ const _hoisted_2$b = { class: "alert__title" };
4222
+ const _hoisted_3$b = { class: "alert__content" };
1986
4223
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
1987
4224
  __name: "FAlert",
1988
4225
  props: {
@@ -2003,15 +4240,15 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2003
4240
  return openBlock(), createElementBlock("div", {
2004
4241
  class: normalizeClass(["alert", `alert--${_ctx.type}`])
2005
4242
  }, [
2006
- createVNode(FIcon, { class: "alert__icon" }, {
4243
+ createVNode(FIcon$3, { class: "alert__icon" }, {
2007
4244
  default: withCtx(() => [
2008
4245
  (openBlock(), createBlock(resolveDynamicComponent(unref(config).icon)))
2009
4246
  ]),
2010
4247
  _: 1
2011
4248
  }),
2012
- createElementVNode("div", _hoisted_1$c, [
2013
- createElementVNode("h4", _hoisted_2$a, toDisplayString((_a = _ctx.title) != null ? _a : unref(config).label), 1),
2014
- createElementVNode("div", _hoisted_3$a, [
4249
+ createElementVNode("div", _hoisted_1$d, [
4250
+ createElementVNode("h4", _hoisted_2$b, toDisplayString((_a = _ctx.title) != null ? _a : unref(config).label), 1),
4251
+ createElementVNode("div", _hoisted_3$b, [
2015
4252
  renderSlot(_ctx.$slots, "default", {}, () => [
2016
4253
  createTextVNode(toDisplayString(_ctx.content), 1)
2017
4254
  ], true)
@@ -2021,12 +4258,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2021
4258
  };
2022
4259
  }
2023
4260
  });
2024
- const FAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-f16678ef"]]);
2025
- const _hoisted_1$b = { class: "f-editor__toolbar" };
2026
- const _hoisted_2$9 = { class: "f-editor__status" };
2027
- const _hoisted_3$9 = { class: "f-editor__lines" };
2028
- const _hoisted_4$6 = { class: "f-editor__code-wrapper" };
2029
- const _hoisted_5$6 = ["innerHTML"];
4261
+ const FAlert = /* @__PURE__ */ _export_sfc$3(_sfc_main$f, [["__scopeId", "data-v-f16678ef"]]);
4262
+ const _hoisted_1$c = { class: "f-editor__toolbar" };
4263
+ const _hoisted_2$a = { class: "f-editor__status" };
4264
+ const _hoisted_3$a = { class: "f-editor__lines" };
4265
+ const _hoisted_4$7 = { class: "f-editor__code-wrapper" };
4266
+ const _hoisted_5$7 = ["innerHTML"];
2030
4267
  const _hoisted_6$5 = ["rows", "readonly", "placeholder"];
2031
4268
  const LINE_HEIGHT_PX = 17.6;
2032
4269
  const PADDING_TOP_PX = 12;
@@ -2198,9 +4435,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2198
4435
  return openBlock(), createElementBlock("div", {
2199
4436
  class: normalizeClass(["f-editor", { "f-editor--invalid": !unref(isJsonValid) }])
2200
4437
  }, [
2201
- createElementVNode("div", _hoisted_1$b, [
2202
- createElementVNode("span", _hoisted_2$9, [
2203
- createElementVNode("span", _hoisted_3$9, toDisplayString(unref(lineCount)) + " 行", 1),
4438
+ createElementVNode("div", _hoisted_1$c, [
4439
+ createElementVNode("span", _hoisted_2$a, [
4440
+ createElementVNode("span", _hoisted_3$a, toDisplayString(unref(lineCount)) + " 行", 1),
2204
4441
  unref(isHeavy) ? (openBlock(), createBlock(FTag, {
2205
4442
  key: 0,
2206
4443
  color: "orange",
@@ -2238,7 +4475,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2238
4475
  }, toDisplayString(ln), 3);
2239
4476
  }), 128))
2240
4477
  ], 512)) : createCommentVNode("", true),
2241
- createElementVNode("div", _hoisted_4$6, [
4478
+ createElementVNode("div", _hoisted_4$7, [
2242
4479
  createElementVNode("div", {
2243
4480
  class: "f-editor__active-line",
2244
4481
  style: normalizeStyle({
@@ -2256,7 +4493,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2256
4493
  key: line.lineNo,
2257
4494
  class: "f-editor__line",
2258
4495
  innerHTML: line.html + "\n"
2259
- }, null, 8, _hoisted_5$6);
4496
+ }, null, 8, _hoisted_5$7);
2260
4497
  }), 128))
2261
4498
  ], 512),
2262
4499
  withDirectives(createElementVNode("textarea", {
@@ -2283,18 +4520,18 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2283
4520
  };
2284
4521
  }
2285
4522
  });
2286
- const FEditor = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-6d590649"]]);
2287
- const _hoisted_1$a = { class: "f-table" };
2288
- const _hoisted_2$8 = {
4523
+ const FEditor = /* @__PURE__ */ _export_sfc$3(_sfc_main$e, [["__scopeId", "data-v-6d590649"]]);
4524
+ const _hoisted_1$b = { class: "f-table" };
4525
+ const _hoisted_2$9 = {
2289
4526
  key: 0,
2290
4527
  class: "f-table__loading"
2291
4528
  };
2292
- const _hoisted_3$8 = { class: "f-table__inner" };
2293
- const _hoisted_4$5 = {
4529
+ const _hoisted_3$9 = { class: "f-table__inner" };
4530
+ const _hoisted_4$6 = {
2294
4531
  key: 0,
2295
4532
  class: "f-table__col--index"
2296
4533
  };
2297
- const _hoisted_5$5 = { class: "f-table__head" };
4534
+ const _hoisted_5$6 = { class: "f-table__head" };
2298
4535
  const _hoisted_6$4 = {
2299
4536
  key: 0,
2300
4537
  class: "f-table__th f-table__th--index"
@@ -2381,8 +4618,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2381
4618
  scrollTop.value = 0;
2382
4619
  });
2383
4620
  return (_ctx, _cache) => {
2384
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
2385
- _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
4621
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
4622
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
2386
4623
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "spinner" }, null, -1)),
2387
4624
  createElementVNode("span", null, toDisplayString(_ctx.loadingText), 1)
2388
4625
  ])) : createCommentVNode("", true),
@@ -2392,9 +4629,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2392
4629
  ref: scrollEl,
2393
4630
  onScroll
2394
4631
  }, [
2395
- createElementVNode("table", _hoisted_3$8, [
4632
+ createElementVNode("table", _hoisted_3$9, [
2396
4633
  createElementVNode("colgroup", null, [
2397
- _ctx.showIndex ? (openBlock(), createElementBlock("col", _hoisted_4$5)) : createCommentVNode("", true),
4634
+ _ctx.showIndex ? (openBlock(), createElementBlock("col", _hoisted_4$6)) : createCommentVNode("", true),
2398
4635
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (col) => {
2399
4636
  var _a, _b;
2400
4637
  return openBlock(), createElementBlock("col", {
@@ -2406,7 +4643,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2406
4643
  }, null, 4);
2407
4644
  }), 128))
2408
4645
  ]),
2409
- createElementVNode("thead", _hoisted_5$5, [
4646
+ createElementVNode("thead", _hoisted_5$6, [
2410
4647
  createElementVNode("tr", null, [
2411
4648
  _ctx.showIndex ? (openBlock(), createElementBlock("th", _hoisted_6$4, "#")) : createCommentVNode("", true),
2412
4649
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (col) => {
@@ -2488,73 +4725,17 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2488
4725
  };
2489
4726
  }
2490
4727
  });
2491
- const FTable = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-01724962"]]);
2492
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2493
- __name: "FDialog",
2494
- props: /* @__PURE__ */ mergeModels({
2495
- maskClosable: { type: Boolean, default: true },
2496
- maskColor: { default: "black" },
2497
- showMask: { type: Boolean, default: true }
2498
- }, {
2499
- "modelValue": __spreadValues({ type: Boolean }, { default: false }),
2500
- "modelModifiers": {}
2501
- }),
2502
- emits: ["update:modelValue"],
2503
- setup(__props) {
2504
- const props = __props;
2505
- const visible = useModel(__props, "modelValue");
2506
- const handleMaskClick = () => {
2507
- if (props.maskClosable) visible.value = false;
2508
- };
2509
- const maskBackgroundColor = computed(() => {
2510
- if (!props.showMask) return "transparent";
2511
- switch (props.maskColor) {
2512
- case "white":
2513
- return "rgba(255, 255, 255, 0.5)";
2514
- case "black":
2515
- return "rgba(0, 0, 0, 0.5)";
2516
- case "transparent":
2517
- return "transparent";
2518
- default:
2519
- return "rgba(0, 0, 0, 0.5)";
2520
- }
2521
- });
2522
- return (_ctx, _cache) => {
2523
- return openBlock(), createBlock(Teleport, { to: "body" }, [
2524
- createVNode(Transition, { name: "fade" }, {
2525
- default: withCtx(() => [
2526
- visible.value ? (openBlock(), createElementBlock("div", {
2527
- key: 0,
2528
- class: "f-dialog-mask",
2529
- style: normalizeStyle({ backgroundColor: unref(maskBackgroundColor) }),
2530
- onClick: handleMaskClick
2531
- }, [
2532
- createElementVNode("div", {
2533
- class: "f-dialog-container",
2534
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2535
- }, ["stop"]))
2536
- }, [
2537
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
2538
- ])
2539
- ], 4)) : createCommentVNode("", true)
2540
- ]),
2541
- _: 3
2542
- })
2543
- ]);
2544
- };
2545
- }
2546
- });
2547
- const FDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31496822"]]);
2548
- const _hoisted_1$9 = { class: "f-upload" };
2549
- const _hoisted_2$7 = { class: "f-upload__label" };
2550
- const _hoisted_3$7 = ["accept"];
2551
- const _hoisted_4$4 = {
4728
+ const FTable = /* @__PURE__ */ _export_sfc$3(_sfc_main$d, [["__scopeId", "data-v-01724962"]]);
4729
+ const _hoisted_1$a = { class: "f-upload" };
4730
+ const _hoisted_2$8 = { class: "f-upload__label" };
4731
+ const _hoisted_3$8 = ["accept"];
4732
+ const _hoisted_4$5 = {
2552
4733
  key: 0,
2553
4734
  class: "f-upload__file-item"
2554
4735
  };
2555
- const _hoisted_5$4 = { class: "f-upload__file-info" };
4736
+ const _hoisted_5$5 = { class: "f-upload__file-info" };
2556
4737
  const _hoisted_6$3 = { class: "f-upload__file-name" };
2557
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
4738
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2558
4739
  __name: "FUpload",
2559
4740
  props: /* @__PURE__ */ mergeModels({
2560
4741
  accept: {},
@@ -2605,22 +4786,22 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2605
4786
  emit("change", f);
2606
4787
  };
2607
4788
  return (_ctx, _cache) => {
2608
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
4789
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
2609
4790
  createElementVNode("div", {
2610
4791
  class: normalizeClass(["f-upload__zone", { "f-upload--drag": unref(dragActive) }]),
2611
4792
  onDragover: onDragOver,
2612
4793
  onDragleave: onDragLeave,
2613
4794
  onDrop
2614
4795
  }, [
2615
- createElementVNode("label", _hoisted_2$7, [
4796
+ createElementVNode("label", _hoisted_2$8, [
2616
4797
  createElementVNode("input", {
2617
4798
  type: "file",
2618
4799
  accept: _ctx.accept,
2619
4800
  class: "f-upload__input",
2620
4801
  onChange: onFileChange
2621
- }, null, 40, _hoisted_3$7),
4802
+ }, null, 40, _hoisted_3$8),
2622
4803
  renderSlot(_ctx.$slots, "default", {}, () => [
2623
- createVNode(FIcon, { size: 40 }, {
4804
+ createVNode(FIcon$3, { size: 40 }, {
2624
4805
  default: withCtx(() => [
2625
4806
  createVNode(unref(CloudUpload))
2626
4807
  ]),
@@ -2631,14 +4812,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2631
4812
  ], true)
2632
4813
  ])
2633
4814
  ], 34),
2634
- file.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
2635
- createVNode(FIcon, null, {
4815
+ file.value ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
4816
+ createVNode(FIcon$3, null, {
2636
4817
  default: withCtx(() => [
2637
4818
  createVNode(unref(DocumentOutline))
2638
4819
  ]),
2639
4820
  _: 1
2640
4821
  }),
2641
- createElementVNode("div", _hoisted_5$4, [
4822
+ createElementVNode("div", _hoisted_5$5, [
2642
4823
  createElementVNode("span", _hoisted_6$3, toDisplayString(file.value), 1),
2643
4824
  _ctx.progress != null ? (openBlock(), createBlock(FProgress, {
2644
4825
  key: 0,
@@ -2646,7 +4827,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2646
4827
  "show-text": ""
2647
4828
  }, null, 8, ["percent"])) : createCommentVNode("", true)
2648
4829
  ]),
2649
- createVNode(FIcon, {
4830
+ createVNode(FIcon$3, {
2650
4831
  onClick: withModifiers(clearFile, ["stop"]),
2651
4832
  onMouseenter: _cache[0] || (_cache[0] = ($event) => isCloseHover.value = true),
2652
4833
  onMouseleave: _cache[1] || (_cache[1] = ($event) => isCloseHover.value = false),
@@ -2662,8 +4843,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2662
4843
  };
2663
4844
  }
2664
4845
  });
2665
- const FUpload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-07b95a32"]]);
2666
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
4846
+ const FUpload = /* @__PURE__ */ _export_sfc$3(_sfc_main$c, [["__scopeId", "data-v-07b95a32"]]);
4847
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2667
4848
  __name: "FButtonGroup",
2668
4849
  props: {
2669
4850
  size: { default: "normal" },
@@ -2684,9 +4865,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2684
4865
  };
2685
4866
  }
2686
4867
  });
2687
- const FButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-62561657"]]);
2688
- const _hoisted_1$8 = { class: "f-collapse" };
2689
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4868
+ const FButtonGroup = /* @__PURE__ */ _export_sfc$3(_sfc_main$b, [["__scopeId", "data-v-62561657"]]);
4869
+ const _hoisted_1$9 = { class: "f-collapse" };
4870
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2690
4871
  __name: "FCollapse",
2691
4872
  props: /* @__PURE__ */ mergeModels({
2692
4873
  accordion: { type: Boolean, default: false }
@@ -2726,16 +4907,16 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2726
4907
  })
2727
4908
  );
2728
4909
  return (_ctx, _cache) => {
2729
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
4910
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
2730
4911
  renderSlot(_ctx.$slots, "default")
2731
4912
  ]);
2732
4913
  };
2733
4914
  }
2734
4915
  });
2735
- const _hoisted_1$7 = { class: "f-collapse-item__header-title" };
2736
- const _hoisted_2$6 = { class: "f-collapse-item__wrapper" };
2737
- const _hoisted_3$6 = { class: "f-collapse-item__content" };
2738
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4916
+ const _hoisted_1$8 = { class: "f-collapse-item__header-title" };
4917
+ const _hoisted_2$7 = { class: "f-collapse-item__wrapper" };
4918
+ const _hoisted_3$7 = { class: "f-collapse-item__content" };
4919
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2739
4920
  __name: "FCollapseItem",
2740
4921
  props: {
2741
4922
  name: {},
@@ -2779,7 +4960,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2779
4960
  onClick: handleHeaderClick
2780
4961
  }, [
2781
4962
  renderSlot(_ctx.$slots, "title", {}, () => [
2782
- createElementVNode("span", _hoisted_1$7, toDisplayString(_ctx.title), 1)
4963
+ createElementVNode("span", _hoisted_1$8, toDisplayString(_ctx.title), 1)
2783
4964
  ]),
2784
4965
  _cache[0] || (_cache[0] = createElementVNode("svg", {
2785
4966
  class: "f-collapse-item__icon",
@@ -2803,8 +4984,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2803
4984
  onLeave
2804
4985
  }, {
2805
4986
  default: withCtx(() => [
2806
- withDirectives(createElementVNode("div", _hoisted_2$6, [
2807
- createElementVNode("div", _hoisted_3$6, [
4987
+ withDirectives(createElementVNode("div", _hoisted_2$7, [
4988
+ createElementVNode("div", _hoisted_3$7, [
2808
4989
  renderSlot(_ctx.$slots, "default")
2809
4990
  ])
2810
4991
  ], 512), [
@@ -2817,21 +4998,21 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2817
4998
  };
2818
4999
  }
2819
5000
  });
2820
- const _hoisted_1$6 = { class: "f-color-picker__swatch" };
2821
- const _hoisted_2$5 = {
5001
+ const _hoisted_1$7 = { class: "f-color-picker__swatch" };
5002
+ const _hoisted_2$6 = {
2822
5003
  key: 0,
2823
5004
  class: "f-color-picker__panel"
2824
5005
  };
2825
- const _hoisted_3$5 = { class: "f-color-picker__sliders" };
2826
- const _hoisted_4$3 = { class: "f-color-picker__slider-group" };
2827
- const _hoisted_5$3 = ["value"];
5006
+ const _hoisted_3$6 = { class: "f-color-picker__sliders" };
5007
+ const _hoisted_4$4 = { class: "f-color-picker__slider-group" };
5008
+ const _hoisted_5$4 = ["value"];
2828
5009
  const _hoisted_6$2 = {
2829
5010
  key: 0,
2830
5011
  class: "f-color-picker__predefine"
2831
5012
  };
2832
5013
  const _hoisted_7 = ["onClick"];
2833
5014
  const hueBackground = "linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)";
2834
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5015
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2835
5016
  __name: "FColorPicker",
2836
5017
  props: /* @__PURE__ */ mergeModels({
2837
5018
  showAlpha: { type: Boolean, default: false },
@@ -2846,20 +5027,20 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2846
5027
  setup(__props) {
2847
5028
  const props = __props;
2848
5029
  const modelValue = useModel(__props, "modelValue");
2849
- function hsvToRgb(h, s, v) {
5030
+ function hsvToRgb(h2, s, v) {
2850
5031
  s /= 100;
2851
5032
  v /= 100;
2852
5033
  const c = v * s;
2853
- const x = c * (1 - Math.abs(h / 60 % 2 - 1));
5034
+ const x = c * (1 - Math.abs(h2 / 60 % 2 - 1));
2854
5035
  const m = v - c;
2855
5036
  let r = 0;
2856
5037
  let g = 0;
2857
5038
  let b = 0;
2858
- if (h < 60) [r, g, b] = [c, x, 0];
2859
- else if (h < 120) [r, g, b] = [x, c, 0];
2860
- else if (h < 180) [r, g, b] = [0, c, x];
2861
- else if (h < 240) [r, g, b] = [0, x, c];
2862
- else if (h < 300) [r, g, b] = [x, 0, c];
5039
+ if (h2 < 60) [r, g, b] = [c, x, 0];
5040
+ else if (h2 < 120) [r, g, b] = [x, c, 0];
5041
+ else if (h2 < 180) [r, g, b] = [0, c, x];
5042
+ else if (h2 < 240) [r, g, b] = [0, x, c];
5043
+ else if (h2 < 300) [r, g, b] = [x, 0, c];
2863
5044
  else [r, g, b] = [c, 0, x];
2864
5045
  return {
2865
5046
  r: Math.round((r + m) * 255),
@@ -2874,15 +5055,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2874
5055
  const max = Math.max(r, g, b);
2875
5056
  const min = Math.min(r, g, b);
2876
5057
  const d = max - min;
2877
- let h = 0;
5058
+ let h2 = 0;
2878
5059
  if (d !== 0) {
2879
- if (max === r) h = 60 * ((g - b) / d % 6);
2880
- else if (max === g) h = 60 * ((b - r) / d + 2);
2881
- else h = 60 * ((r - g) / d + 4);
5060
+ if (max === r) h2 = 60 * ((g - b) / d % 6);
5061
+ else if (max === g) h2 = 60 * ((b - r) / d + 2);
5062
+ else h2 = 60 * ((r - g) / d + 4);
2882
5063
  }
2883
- if (h < 0) h += 360;
5064
+ if (h2 < 0) h2 += 360;
2884
5065
  const s = max === 0 ? 0 : d / max;
2885
- return { h, s: s * 100, v: max * 100 };
5066
+ return { h: h2, s: s * 100, v: max * 100 };
2886
5067
  }
2887
5068
  function rgbToHex(r, g, b) {
2888
5069
  return `#${[r, g, b].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
@@ -3057,7 +5238,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3057
5238
  class: "f-color-picker__trigger",
3058
5239
  onClick: togglePanel
3059
5240
  }, [
3060
- createElementVNode("div", _hoisted_1$6, [
5241
+ createElementVNode("div", _hoisted_1$7, [
3061
5242
  createElementVNode("span", {
3062
5243
  class: "f-color-picker__swatch-color",
3063
5244
  style: normalizeStyle({ background: `rgba(${unref(previewRgb).r}, ${unref(previewRgb).g}, ${unref(previewRgb).b}, ${unref(hsva).a})` })
@@ -3066,7 +5247,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3066
5247
  ]),
3067
5248
  createVNode(Transition, { name: "f-color-picker-fade" }, {
3068
5249
  default: withCtx(() => [
3069
- unref(visible) ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
5250
+ unref(visible) ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
3070
5251
  createElementVNode("div", {
3071
5252
  ref_key: "panelRef",
3072
5253
  ref: panelRef,
@@ -3079,8 +5260,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3079
5260
  style: normalizeStyle({ left: `${unref(hsva).s}%`, top: `${100 - unref(hsva).v}%` })
3080
5261
  }, null, 4)
3081
5262
  ], 36),
3082
- createElementVNode("div", _hoisted_3$5, [
3083
- createElementVNode("div", _hoisted_4$3, [
5263
+ createElementVNode("div", _hoisted_3$6, [
5264
+ createElementVNode("div", _hoisted_4$4, [
3084
5265
  createElementVNode("div", {
3085
5266
  ref_key: "hueRef",
3086
5267
  ref: hueRef,
@@ -3121,7 +5302,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3121
5302
  value: toColorString(),
3122
5303
  onChange: handleInputChange,
3123
5304
  onKeydown: _cache[0] || (_cache[0] = withKeys(($event) => $event.target.blur(), ["enter"]))
3124
- }, null, 40, _hoisted_5$3),
5305
+ }, null, 40, _hoisted_5$4),
3125
5306
  _ctx.predefine.length ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
3126
5307
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.predefine, (color) => {
3127
5308
  return openBlock(), createElementBlock("span", {
@@ -3140,19 +5321,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3140
5321
  };
3141
5322
  }
3142
5323
  });
3143
- const _hoisted_1$5 = { class: "f-empty" };
3144
- const _hoisted_2$4 = ["src"];
3145
- const _hoisted_3$4 = {
5324
+ const _hoisted_1$6 = { class: "f-empty" };
5325
+ const _hoisted_2$5 = ["src"];
5326
+ const _hoisted_3$5 = {
3146
5327
  key: 1,
3147
5328
  viewBox: "0 0 160 160",
3148
5329
  class: "f-empty__image-default"
3149
5330
  };
3150
- const _hoisted_4$2 = { class: "f-empty__description" };
3151
- const _hoisted_5$2 = {
5331
+ const _hoisted_4$3 = { class: "f-empty__description" };
5332
+ const _hoisted_5$3 = {
3152
5333
  key: 0,
3153
5334
  class: "f-empty__extra"
3154
5335
  };
3155
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5336
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3156
5337
  __name: "FEmpty",
3157
5338
  props: {
3158
5339
  description: { default: "暂无数据" },
@@ -3161,7 +5342,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3161
5342
  },
3162
5343
  setup(__props) {
3163
5344
  return (_ctx, _cache) => {
3164
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
5345
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
3165
5346
  createElementVNode("div", {
3166
5347
  class: "f-empty__image",
3167
5348
  style: normalizeStyle({ width: `${_ctx.imageSize}px`, height: `${_ctx.imageSize}px` })
@@ -3172,30 +5353,30 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3172
5353
  src: _ctx.image,
3173
5354
  class: "f-empty__image-img",
3174
5355
  alt: ""
3175
- }, null, 8, _hoisted_2$4)) : (openBlock(), createElementBlock("svg", _hoisted_3$4, _cache[0] || (_cache[0] = [
5356
+ }, null, 8, _hoisted_2$5)) : (openBlock(), createElementBlock("svg", _hoisted_3$5, _cache[0] || (_cache[0] = [
3176
5357
  createStaticVNode('<ellipse cx="80" cy="132" rx="46" ry="8" fill="currentColor" opacity="0.08"></ellipse><path d="M40 60 L120 60 L128 128 L32 128 Z" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round" opacity="0.35"></path><path d="M40 60 L58 32 L102 32 L120 60" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round" opacity="0.35"></path><line x1="32" y1="88" x2="128" y2="88" stroke="currentColor" stroke-width="3" opacity="0.35"></line><path d="M64 88 Q80 106 96 88" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" opacity="0.5"></path>', 5)
3177
5358
  ])))
3178
5359
  ])
3179
5360
  ], 4),
3180
- createElementVNode("div", _hoisted_4$2, [
5361
+ createElementVNode("div", _hoisted_4$3, [
3181
5362
  renderSlot(_ctx.$slots, "description", {}, () => [
3182
5363
  createTextVNode(toDisplayString(_ctx.description), 1)
3183
5364
  ])
3184
5365
  ]),
3185
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
5366
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
3186
5367
  renderSlot(_ctx.$slots, "default")
3187
5368
  ])) : createCommentVNode("", true)
3188
5369
  ]);
3189
5370
  };
3190
5371
  }
3191
5372
  });
3192
- const _hoisted_1$4 = { class: "f-slider__mark-label" };
3193
- const _hoisted_2$3 = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "onMousedown", "onKeydown", "onMouseenter"];
3194
- const _hoisted_3$3 = {
5373
+ const _hoisted_1$5 = { class: "f-slider__mark-label" };
5374
+ const _hoisted_2$4 = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "onMousedown", "onKeydown", "onMouseenter"];
5375
+ const _hoisted_3$4 = {
3195
5376
  key: 0,
3196
5377
  class: "f-slider__tooltip"
3197
5378
  };
3198
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5379
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3199
5380
  __name: "FSlider",
3200
5381
  props: /* @__PURE__ */ mergeModels({
3201
5382
  min: { default: 0 },
@@ -3369,7 +5550,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3369
5550
  style: normalizeStyle(_ctx.vertical ? { bottom: `${mark.percent}%` } : { left: `${mark.percent}%` })
3370
5551
  }, [
3371
5552
  _cache[1] || (_cache[1] = createElementVNode("span", { class: "f-slider__mark-dot" }, null, -1)),
3372
- createElementVNode("span", _hoisted_1$4, toDisplayString(mark.label), 1)
5553
+ createElementVNode("span", _hoisted_1$5, toDisplayString(mark.label), 1)
3373
5554
  ], 4);
3374
5555
  }), 128)),
3375
5556
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(values), (value, index) => {
@@ -3389,18 +5570,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3389
5570
  }, [
3390
5571
  createVNode(Transition, { name: "f-slider-tooltip-fade" }, {
3391
5572
  default: withCtx(() => [
3392
- tooltipVisible(index) ? (openBlock(), createElementBlock("div", _hoisted_3$3, toDisplayString(value), 1)) : createCommentVNode("", true)
5573
+ tooltipVisible(index) ? (openBlock(), createElementBlock("div", _hoisted_3$4, toDisplayString(value), 1)) : createCommentVNode("", true)
3393
5574
  ]),
3394
5575
  _: 2
3395
5576
  }, 1024)
3396
- ], 46, _hoisted_2$3);
5577
+ ], 46, _hoisted_2$4);
3397
5578
  }), 128))
3398
5579
  ], 544)
3399
5580
  ], 2);
3400
5581
  };
3401
5582
  }
3402
5583
  });
3403
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5584
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3404
5585
  __name: "FScrollbar",
3405
5586
  props: {
3406
5587
  height: { default: "" },
@@ -3588,16 +5769,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3588
5769
  };
3589
5770
  }
3590
5771
  });
3591
- const _hoisted_1$3 = ["disabled"];
3592
- const _hoisted_2$2 = ["value", "disabled", "placeholder"];
3593
- const _hoisted_3$2 = ["disabled"];
3594
- const _hoisted_4$1 = {
5772
+ const _hoisted_1$4 = ["disabled"];
5773
+ const _hoisted_2$3 = ["value", "disabled", "placeholder"];
5774
+ const _hoisted_3$3 = ["disabled"];
5775
+ const _hoisted_4$2 = {
3595
5776
  key: 2,
3596
5777
  class: "f-input-number__stack"
3597
5778
  };
3598
- const _hoisted_5$1 = ["disabled"];
5779
+ const _hoisted_5$2 = ["disabled"];
3599
5780
  const _hoisted_6$1 = ["disabled"];
3600
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5781
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3601
5782
  __name: "FInputNumber",
3602
5783
  props: /* @__PURE__ */ mergeModels({
3603
5784
  min: { default: -Infinity },
@@ -3605,7 +5786,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3605
5786
  step: { default: 1 },
3606
5787
  precision: { default: void 0 },
3607
5788
  disabled: { type: Boolean, default: false },
3608
- size: { default: "default" },
3609
5789
  controls: { type: Boolean, default: true },
3610
5790
  controlsPosition: { default: "right" },
3611
5791
  placeholder: { default: "" }
@@ -3620,16 +5800,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3620
5800
  const inputRef = ref(null);
3621
5801
  const isFocused = ref(false);
3622
5802
  const displayText = ref("");
3623
- function format(value) {
5803
+ const formItemContext = inject("FFormItemContext", null);
5804
+ const hasError = computed(() => {
5805
+ var _a;
5806
+ return !!((_a = formItemContext == null ? void 0 : formItemContext.errorMsg) == null ? void 0 : _a.value);
5807
+ });
5808
+ const format = (value) => {
3624
5809
  return props.precision !== void 0 ? value.toFixed(props.precision) : String(value);
3625
- }
3626
- function clamp(value) {
5810
+ };
5811
+ const clamp = (value) => {
3627
5812
  let result = Math.min(Math.max(value, props.min), props.max);
3628
5813
  if (props.precision !== void 0) {
3629
5814
  result = Number(result.toFixed(props.precision));
3630
5815
  }
3631
5816
  return result;
3632
- }
5817
+ };
3633
5818
  watch(
3634
5819
  modelValue,
3635
5820
  (val) => {
@@ -3640,7 +5825,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3640
5825
  );
3641
5826
  const canIncrease = computed(() => modelValue.value === void 0 || modelValue.value < props.max);
3642
5827
  const canDecrease = computed(() => modelValue.value === void 0 || modelValue.value > props.min);
3643
- function commit(raw) {
5828
+ const commit = (raw) => {
3644
5829
  if (raw.trim() === "") {
3645
5830
  modelValue.value = void 0;
3646
5831
  displayText.value = "";
@@ -3654,48 +5839,49 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3654
5839
  const clamped = clamp(parsed);
3655
5840
  modelValue.value = clamped;
3656
5841
  displayText.value = format(clamped);
3657
- }
3658
- function handleInput(e) {
5842
+ };
5843
+ const handleInput = (e) => {
3659
5844
  const raw = e.target.value;
3660
5845
  if (raw === "" || raw === "-" || /^-?\d*\.?\d*$/.test(raw)) {
3661
5846
  displayText.value = raw;
3662
5847
  }
3663
- }
3664
- function handleFocus() {
5848
+ };
5849
+ const handleFocus = () => {
3665
5850
  isFocused.value = true;
3666
- }
3667
- function handleBlur() {
5851
+ };
5852
+ const handleBlur = () => {
3668
5853
  isFocused.value = false;
3669
5854
  commit(displayText.value);
3670
- }
3671
- function handleEnter() {
5855
+ formItemContext == null ? void 0 : formItemContext.validate();
5856
+ };
5857
+ const handleEnter = () => {
3672
5858
  var _a;
3673
5859
  (_a = inputRef.value) == null ? void 0 : _a.blur();
3674
- }
3675
- function step(direction) {
5860
+ };
5861
+ const step = (direction) => {
3676
5862
  var _a;
3677
5863
  if (props.disabled) return;
3678
5864
  const base = (_a = modelValue.value) != null ? _a : 0;
3679
5865
  const next = clamp(base + direction * props.step);
3680
5866
  modelValue.value = next;
3681
5867
  displayText.value = format(next);
3682
- }
5868
+ };
3683
5869
  let repeatTimer = null;
3684
5870
  let repeatInterval = null;
3685
- function startRepeat(direction) {
5871
+ const startRepeat = (direction) => {
3686
5872
  if (props.disabled) return;
3687
5873
  step(direction);
3688
5874
  repeatTimer = setTimeout(() => {
3689
5875
  repeatInterval = setInterval(() => step(direction), 80);
3690
5876
  }, 400);
3691
- }
3692
- function stopRepeat() {
5877
+ };
5878
+ const stopRepeat = () => {
3693
5879
  if (repeatTimer) clearTimeout(repeatTimer);
3694
5880
  if (repeatInterval) clearInterval(repeatInterval);
3695
5881
  repeatTimer = null;
3696
5882
  repeatInterval = null;
3697
- }
3698
- function handleKeydown(e) {
5883
+ };
5884
+ const handleKeydown = (e) => {
3699
5885
  if (e.key === "ArrowUp") {
3700
5886
  e.preventDefault();
3701
5887
  step(1);
@@ -3705,43 +5891,39 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3705
5891
  } else if (e.key === "Enter") {
3706
5892
  handleEnter();
3707
5893
  }
3708
- }
3709
- function handleWheel(e) {
5894
+ };
5895
+ const handleWheel = (e) => {
3710
5896
  if (!isFocused.value || props.disabled) return;
3711
5897
  e.preventDefault();
3712
5898
  step(e.deltaY < 0 ? 1 : -1);
3713
- }
5899
+ };
3714
5900
  return (_ctx, _cache) => {
3715
5901
  return openBlock(), createElementBlock("div", {
3716
- class: normalizeClass(["f-input-number", [
3717
- `f-input-number--${_ctx.size}`,
3718
- `f-input-number--controls-${_ctx.controlsPosition}`,
3719
- { "f-input-number--disabled": _ctx.disabled, "f-input-number--without-controls": !_ctx.controls }
3720
- ]])
5902
+ class: normalizeClass(["f-input-number", {
5903
+ "is-focus": unref(isFocused),
5904
+ "is-error": unref(hasError),
5905
+ "is-disabled": _ctx.disabled,
5906
+ "has-controls-both": _ctx.controls && _ctx.controlsPosition === "both",
5907
+ "has-controls-right": _ctx.controls && _ctx.controlsPosition === "right"
5908
+ }])
3721
5909
  }, [
3722
5910
  _ctx.controls && _ctx.controlsPosition === "both" ? (openBlock(), createElementBlock("button", {
3723
5911
  key: 0,
3724
5912
  type: "button",
3725
- class: "f-input-number__control f-input-number__control--minus",
5913
+ class: "f-input-number__btn-left",
3726
5914
  tabindex: "-1",
3727
5915
  disabled: _ctx.disabled || !unref(canDecrease),
3728
5916
  onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => startRepeat(-1), ["prevent"])),
3729
5917
  onMouseup: stopRepeat,
3730
5918
  onMouseleave: stopRepeat
3731
- }, _cache[4] || (_cache[4] = [
3732
- createElementVNode("svg", {
3733
- viewBox: "0 0 12 12",
3734
- width: "10",
3735
- height: "10"
3736
- }, [
3737
- createElementVNode("path", {
3738
- d: "M2 6h8",
3739
- stroke: "currentColor",
3740
- "stroke-width": "1.5",
3741
- "stroke-linecap": "round"
3742
- })
3743
- ], -1)
3744
- ]), 40, _hoisted_1$3)) : createCommentVNode("", true),
5919
+ }, [
5920
+ createVNode(unref(FIcon$2), null, {
5921
+ default: withCtx(() => [
5922
+ createVNode(unref(RemoveOutline))
5923
+ ]),
5924
+ _: 1
5925
+ })
5926
+ ], 40, _hoisted_1$4)) : createCommentVNode("", true),
3745
5927
  createElementVNode("input", {
3746
5928
  ref_key: "inputRef",
3747
5929
  ref: inputRef,
@@ -3756,31 +5938,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3756
5938
  onBlur: handleBlur,
3757
5939
  onKeydown: handleKeydown,
3758
5940
  onWheel: handleWheel
3759
- }, null, 40, _hoisted_2$2),
5941
+ }, null, 40, _hoisted_2$3),
3760
5942
  _ctx.controls && _ctx.controlsPosition === "both" ? (openBlock(), createElementBlock("button", {
3761
5943
  key: 1,
3762
5944
  type: "button",
3763
- class: "f-input-number__control f-input-number__control--plus",
5945
+ class: "f-input-number__btn-right",
3764
5946
  tabindex: "-1",
3765
5947
  disabled: _ctx.disabled || !unref(canIncrease),
3766
5948
  onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => startRepeat(1), ["prevent"])),
3767
5949
  onMouseup: stopRepeat,
3768
5950
  onMouseleave: stopRepeat
3769
- }, _cache[5] || (_cache[5] = [
3770
- createElementVNode("svg", {
3771
- viewBox: "0 0 12 12",
3772
- width: "10",
3773
- height: "10"
3774
- }, [
3775
- createElementVNode("path", {
3776
- d: "M2 6h8M6 2v8",
3777
- stroke: "currentColor",
3778
- "stroke-width": "1.5",
3779
- "stroke-linecap": "round"
3780
- })
3781
- ], -1)
3782
- ]), 40, _hoisted_3$2)) : createCommentVNode("", true),
3783
- _ctx.controls && _ctx.controlsPosition === "right" ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
5951
+ }, [
5952
+ createVNode(unref(FIcon$2), null, {
5953
+ default: withCtx(() => [
5954
+ createVNode(unref(AddOutline))
5955
+ ]),
5956
+ _: 1
5957
+ })
5958
+ ], 40, _hoisted_3$3)) : createCommentVNode("", true),
5959
+ _ctx.controls && _ctx.controlsPosition === "right" ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
3784
5960
  createElementVNode("button", {
3785
5961
  type: "button",
3786
5962
  class: "f-input-number__stack-btn",
@@ -3789,22 +5965,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3789
5965
  onMousedown: _cache[2] || (_cache[2] = withModifiers(($event) => startRepeat(1), ["prevent"])),
3790
5966
  onMouseup: stopRepeat,
3791
5967
  onMouseleave: stopRepeat
3792
- }, _cache[6] || (_cache[6] = [
3793
- createElementVNode("svg", {
3794
- viewBox: "0 0 12 12",
3795
- width: "8",
3796
- height: "8"
3797
- }, [
3798
- createElementVNode("path", {
3799
- d: "M2 7l4-4 4 4",
3800
- stroke: "currentColor",
3801
- "stroke-width": "1.5",
3802
- fill: "none",
3803
- "stroke-linecap": "round",
3804
- "stroke-linejoin": "round"
3805
- })
3806
- ], -1)
3807
- ]), 40, _hoisted_5$1),
5968
+ }, [
5969
+ createVNode(unref(FIcon$2), null, {
5970
+ default: withCtx(() => [
5971
+ createVNode(unref(ChevronUpOutline))
5972
+ ]),
5973
+ _: 1
5974
+ })
5975
+ ], 40, _hoisted_5$2),
3808
5976
  createElementVNode("button", {
3809
5977
  type: "button",
3810
5978
  class: "f-input-number__stack-btn",
@@ -3813,41 +5981,34 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3813
5981
  onMousedown: _cache[3] || (_cache[3] = withModifiers(($event) => startRepeat(-1), ["prevent"])),
3814
5982
  onMouseup: stopRepeat,
3815
5983
  onMouseleave: stopRepeat
3816
- }, _cache[7] || (_cache[7] = [
3817
- createElementVNode("svg", {
3818
- viewBox: "0 0 12 12",
3819
- width: "8",
3820
- height: "8"
3821
- }, [
3822
- createElementVNode("path", {
3823
- d: "M2 5l4 4 4-4",
3824
- stroke: "currentColor",
3825
- "stroke-width": "1.5",
3826
- fill: "none",
3827
- "stroke-linecap": "round",
3828
- "stroke-linejoin": "round"
3829
- })
3830
- ], -1)
3831
- ]), 40, _hoisted_6$1)
5984
+ }, [
5985
+ createVNode(unref(FIcon$2), null, {
5986
+ default: withCtx(() => [
5987
+ createVNode(unref(ChevronDownOutline))
5988
+ ]),
5989
+ _: 1
5990
+ })
5991
+ ], 40, _hoisted_6$1)
3832
5992
  ])) : createCommentVNode("", true)
3833
5993
  ], 2);
3834
5994
  };
3835
5995
  }
3836
5996
  });
3837
- const _hoisted_1$2 = { class: "f-result__icon" };
3838
- const _hoisted_2$1 = {
5997
+ const FInputNumber = /* @__PURE__ */ _export_sfc$3(_sfc_main$4, [["__scopeId", "data-v-292cd24f"]]);
5998
+ const _hoisted_1$3 = { class: "f-result__icon" };
5999
+ const _hoisted_2$2 = {
3839
6000
  key: 0,
3840
6001
  class: "f-result__code"
3841
6002
  };
3842
- const _hoisted_3$1 = {
6003
+ const _hoisted_3$2 = {
3843
6004
  key: 0,
3844
6005
  class: "f-result__title"
3845
6006
  };
3846
- const _hoisted_4 = {
6007
+ const _hoisted_4$1 = {
3847
6008
  key: 1,
3848
6009
  class: "f-result__subtitle"
3849
6010
  };
3850
- const _hoisted_5 = {
6011
+ const _hoisted_5$1 = {
3851
6012
  key: 2,
3852
6013
  class: "f-result__extra"
3853
6014
  };
@@ -3855,7 +6016,7 @@ const _hoisted_6 = {
3855
6016
  key: 3,
3856
6017
  class: "f-result__content"
3857
6018
  };
3858
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6019
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3859
6020
  __name: "FResult",
3860
6021
  props: {
3861
6022
  status: { default: "info" },
@@ -3881,9 +6042,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3881
6042
  return openBlock(), createElementBlock("div", {
3882
6043
  class: normalizeClass(["f-result", `f-result--${_ctx.status}`])
3883
6044
  }, [
3884
- createElementVNode("div", _hoisted_1$2, [
6045
+ createElementVNode("div", _hoisted_1$3, [
3885
6046
  renderSlot(_ctx.$slots, "icon", {}, () => [
3886
- unref(showCode) ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(_ctx.status), 1)) : (openBlock(), createBlock(FIcon, {
6047
+ unref(showCode) ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(_ctx.status), 1)) : (openBlock(), createBlock(FIcon$3, {
3887
6048
  key: 1,
3888
6049
  size: 72
3889
6050
  }, {
@@ -3894,17 +6055,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3894
6055
  }))
3895
6056
  ], true)
3896
6057
  ]),
3897
- _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
6058
+ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
3898
6059
  renderSlot(_ctx.$slots, "title", {}, () => [
3899
6060
  createTextVNode(toDisplayString(_ctx.title), 1)
3900
6061
  ], true)
3901
6062
  ])) : createCommentVNode("", true),
3902
- _ctx.$slots.subtitle || _ctx.subTitle ? (openBlock(), createElementBlock("div", _hoisted_4, [
6063
+ _ctx.$slots.subtitle || _ctx.subTitle ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
3903
6064
  renderSlot(_ctx.$slots, "subtitle", {}, () => [
3904
6065
  createTextVNode(toDisplayString(_ctx.subTitle), 1)
3905
6066
  ], true)
3906
6067
  ])) : createCommentVNode("", true),
3907
- _ctx.$slots.extra ? (openBlock(), createElementBlock("div", _hoisted_5, [
6068
+ _ctx.$slots.extra ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
3908
6069
  renderSlot(_ctx.$slots, "extra", {}, void 0, true)
3909
6070
  ])) : createCommentVNode("", true),
3910
6071
  _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6, [
@@ -3914,9 +6075,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3914
6075
  };
3915
6076
  }
3916
6077
  });
3917
- const FResult = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1667a865"]]);
3918
- const _hoisted_1$1 = { class: "f-message__content" };
3919
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6078
+ const FResult = /* @__PURE__ */ _export_sfc$3(_sfc_main$3, [["__scopeId", "data-v-1667a865"]]);
6079
+ const _hoisted_1$2 = { class: "f-message__content" };
6080
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3920
6081
  __name: "FMessage",
3921
6082
  props: {
3922
6083
  type: { default: "info" },
@@ -3937,7 +6098,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3937
6098
  info: InformationCircle,
3938
6099
  success: CheckmarkCircle,
3939
6100
  warning: Warning,
3940
- failed: CloseCircle
6101
+ failed: CloseCircle,
6102
+ default: InformationCircle,
6103
+ primary: InformationCircle
3941
6104
  };
3942
6105
  return map[props.type];
3943
6106
  });
@@ -3984,7 +6147,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3984
6147
  onMouseenter: clearTimer,
3985
6148
  onMouseleave: startTimer
3986
6149
  }, [
3987
- _ctx.showIcon ? (openBlock(), createBlock(FIcon, {
6150
+ _ctx.showIcon ? (openBlock(), createBlock(FIcon$3, {
3988
6151
  key: 0,
3989
6152
  class: "f-message__icon"
3990
6153
  }, {
@@ -3993,7 +6156,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3993
6156
  ]),
3994
6157
  _: 1
3995
6158
  })) : createCommentVNode("", true),
3996
- createElementVNode("span", _hoisted_1$1, toDisplayString(_ctx.message), 1),
6159
+ createElementVNode("span", _hoisted_1$2, toDisplayString(_ctx.message), 1),
3997
6160
  _ctx.closable ? (openBlock(), createElementBlock("button", {
3998
6161
  key: 1,
3999
6162
  type: "button",
@@ -4001,7 +6164,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4001
6164
  "aria-label": "close",
4002
6165
  onClick: close
4003
6166
  }, [
4004
- createVNode(FIcon, null, {
6167
+ createVNode(FIcon$3, null, {
4005
6168
  default: withCtx(() => [
4006
6169
  createVNode(unref(Close))
4007
6170
  ]),
@@ -4015,7 +6178,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4015
6178
  };
4016
6179
  }
4017
6180
  });
4018
- const FMessageComp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6332ba18"]]);
6181
+ const FMessageComp = /* @__PURE__ */ _export_sfc$3(_sfc_main$2, [["__scopeId", "data-v-97556afa"]]);
4019
6182
  const GAP$1 = 16;
4020
6183
  const BASE_OFFSET$1 = 20;
4021
6184
  let seed$1 = 0;
@@ -4088,13 +6251,13 @@ FMessage.closeAll = () => {
4088
6251
  (_c = (_b = (_a = item.vnode.component) == null ? void 0 : _a.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
4089
6252
  });
4090
6253
  };
4091
- const _hoisted_1 = { class: "f-notification__body" };
4092
- const _hoisted_2 = {
6254
+ const _hoisted_1$1 = { class: "f-notification__body" };
6255
+ const _hoisted_2$1 = {
4093
6256
  key: 0,
4094
6257
  class: "f-notification__title"
4095
6258
  };
4096
- const _hoisted_3 = { class: "f-notification__content" };
4097
- const _sfc_main = /* @__PURE__ */ defineComponent({
6259
+ const _hoisted_3$1 = { class: "f-notification__content" };
6260
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4098
6261
  __name: "FNotification",
4099
6262
  props: {
4100
6263
  type: { default: "info" },
@@ -4117,7 +6280,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4117
6280
  info: InformationCircle,
4118
6281
  success: CheckmarkCircle,
4119
6282
  warning: Warning,
4120
- failed: CloseCircle
6283
+ failed: CloseCircle,
6284
+ default: InformationCircle,
6285
+ primary: InformationCircle
4121
6286
  };
4122
6287
  return map[props.type];
4123
6288
  });
@@ -4169,7 +6334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4169
6334
  onMouseleave: startTimer,
4170
6335
  onClick: handleClick
4171
6336
  }, [
4172
- _ctx.showIcon ? (openBlock(), createBlock(FIcon, {
6337
+ _ctx.showIcon ? (openBlock(), createBlock(FIcon$3, {
4173
6338
  key: 0,
4174
6339
  class: "f-notification__icon"
4175
6340
  }, {
@@ -4178,9 +6343,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4178
6343
  ]),
4179
6344
  _: 1
4180
6345
  })) : createCommentVNode("", true),
4181
- createElementVNode("div", _hoisted_1, [
4182
- _ctx.title ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
4183
- createElementVNode("p", _hoisted_3, toDisplayString(_ctx.message), 1)
6346
+ createElementVNode("div", _hoisted_1$1, [
6347
+ _ctx.title ? (openBlock(), createElementBlock("p", _hoisted_2$1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
6348
+ createElementVNode("p", _hoisted_3$1, toDisplayString(_ctx.message), 1)
4184
6349
  ]),
4185
6350
  _ctx.closable ? (openBlock(), createElementBlock("button", {
4186
6351
  key: 1,
@@ -4189,7 +6354,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4189
6354
  "aria-label": "close",
4190
6355
  onClick: withModifiers(close, ["stop"])
4191
6356
  }, [
4192
- createVNode(FIcon, null, {
6357
+ createVNode(FIcon$3, null, {
4193
6358
  default: withCtx(() => [
4194
6359
  createVNode(unref(Close))
4195
6360
  ]),
@@ -4203,7 +6368,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4203
6368
  };
4204
6369
  }
4205
6370
  });
4206
- const FNotificationComp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7600a501"]]);
6371
+ const FNotificationComp = /* @__PURE__ */ _export_sfc$3(_sfc_main$1, [["__scopeId", "data-v-0a7315d6"]]);
4207
6372
  const GAP = 16;
4208
6373
  const BASE_OFFSET = 20;
4209
6374
  let seed = 0;
@@ -4292,6 +6457,262 @@ FNotification.closeAll = (position) => {
4292
6457
  });
4293
6458
  });
4294
6459
  };
6460
+ const _hoisted_1 = {
6461
+ key: 0,
6462
+ class: "f-dialog__icon"
6463
+ };
6464
+ const _hoisted_2 = { class: "f-dialog__title" };
6465
+ const _hoisted_3 = { class: "f-dialog__body" };
6466
+ const _hoisted_4 = { key: 0 };
6467
+ const _hoisted_5 = {
6468
+ key: 2,
6469
+ class: "f-dialog__footer"
6470
+ };
6471
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6472
+ __name: "FDialog",
6473
+ props: /* @__PURE__ */ mergeModels({
6474
+ title: { default: "提示" },
6475
+ content: {},
6476
+ width: { default: "500px" },
6477
+ type: { default: "default" },
6478
+ confirmText: { default: "确定" },
6479
+ cancelText: { default: "取消" },
6480
+ showCancel: { type: Boolean, default: true },
6481
+ showClose: { type: Boolean, default: true },
6482
+ closeOnClickModal: { type: Boolean, default: true },
6483
+ closeOnEsc: { type: Boolean, default: true },
6484
+ center: { type: Boolean, default: false },
6485
+ fullscreen: { type: Boolean, default: false },
6486
+ destroyOnClose: { type: Boolean, default: false },
6487
+ beforeClose: {}
6488
+ }, {
6489
+ "modelValue": __spreadValues({ type: Boolean }, { required: true }),
6490
+ "modelModifiers": {}
6491
+ }),
6492
+ emits: /* @__PURE__ */ mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
6493
+ setup(__props, { emit: __emit }) {
6494
+ const props = __props;
6495
+ const emit = __emit;
6496
+ const visible = useModel(__props, "modelValue");
6497
+ const handleClose = () => {
6498
+ visible.value = false;
6499
+ emit("close");
6500
+ };
6501
+ const handleConfirm = () => {
6502
+ emit("confirm");
6503
+ if (props.beforeClose) {
6504
+ props.beforeClose(() => {
6505
+ visible.value = false;
6506
+ });
6507
+ } else {
6508
+ visible.value = false;
6509
+ }
6510
+ };
6511
+ const handleCancel = () => {
6512
+ emit("cancel");
6513
+ handleClose();
6514
+ };
6515
+ const handleOverlayClick = (e) => {
6516
+ if (props.closeOnClickModal && e.target === e.currentTarget) {
6517
+ handleClose();
6518
+ }
6519
+ };
6520
+ const handleKeydown = (e) => {
6521
+ if (props.closeOnEsc && e.key === "Escape") {
6522
+ handleClose();
6523
+ }
6524
+ };
6525
+ onMounted(() => {
6526
+ if (props.closeOnEsc) {
6527
+ window.addEventListener("keydown", handleKeydown);
6528
+ }
6529
+ emit("open");
6530
+ });
6531
+ onBeforeUnmount(() => {
6532
+ if (props.closeOnEsc) {
6533
+ window.removeEventListener("keydown", handleKeydown);
6534
+ }
6535
+ });
6536
+ const iconMap = {
6537
+ info: InformationCircleOutline,
6538
+ success: CheckmarkCircleOutline,
6539
+ warning: WarningOutline,
6540
+ failed: AlertCircleOutline,
6541
+ primary: InformationCircleOutline,
6542
+ default: InformationCircleOutline
6543
+ };
6544
+ const hasIcon = computed(() => props.type && props.type !== "default");
6545
+ return (_ctx, _cache) => {
6546
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
6547
+ createVNode(Transition, { name: "f-dialog-fade" }, {
6548
+ default: withCtx(() => [
6549
+ visible.value ? (openBlock(), createElementBlock("div", {
6550
+ key: 0,
6551
+ class: "f-dialog-overlay",
6552
+ onClick: handleOverlayClick
6553
+ }, [
6554
+ createVNode(Transition, { name: "f-dialog-zoom" }, {
6555
+ default: withCtx(() => [
6556
+ visible.value ? (openBlock(), createElementBlock("div", {
6557
+ key: 0,
6558
+ class: normalizeClass(["f-dialog", [
6559
+ `f-dialog--${_ctx.type}`,
6560
+ {
6561
+ "is-center": _ctx.center,
6562
+ "is-fullscreen": _ctx.fullscreen
6563
+ }
6564
+ ]]),
6565
+ style: normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
6566
+ }, [
6567
+ _ctx.showClose ? (openBlock(), createElementBlock("button", {
6568
+ key: 0,
6569
+ type: "button",
6570
+ class: "f-dialog__close",
6571
+ onClick: handleClose
6572
+ }, [
6573
+ createVNode(FIcon$3, null, {
6574
+ default: withCtx(() => [
6575
+ createVNode(unref(CloseOutline))
6576
+ ]),
6577
+ _: 1
6578
+ })
6579
+ ])) : createCommentVNode("", true),
6580
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("div", {
6581
+ key: 1,
6582
+ class: normalizeClass(["f-dialog__header", { "has-icon": unref(hasIcon) }])
6583
+ }, [
6584
+ renderSlot(_ctx.$slots, "header", {}, () => [
6585
+ unref(hasIcon) ? (openBlock(), createElementBlock("div", _hoisted_1, [
6586
+ createVNode(FIcon$3, null, {
6587
+ default: withCtx(() => [
6588
+ (openBlock(), createBlock(resolveDynamicComponent(iconMap[_ctx.type])))
6589
+ ]),
6590
+ _: 1
6591
+ })
6592
+ ])) : createCommentVNode("", true),
6593
+ createElementVNode("h3", _hoisted_2, toDisplayString(_ctx.title), 1)
6594
+ ], true)
6595
+ ], 2)) : createCommentVNode("", true),
6596
+ createElementVNode("div", _hoisted_3, [
6597
+ renderSlot(_ctx.$slots, "default", {}, () => [
6598
+ _ctx.content ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
6599
+ ], true)
6600
+ ]),
6601
+ _ctx.$slots.footer || _ctx.showCancel ? (openBlock(), createElementBlock("div", _hoisted_5, [
6602
+ renderSlot(_ctx.$slots, "footer", {}, () => [
6603
+ _ctx.showCancel ? (openBlock(), createBlock(FButton, {
6604
+ key: 0,
6605
+ onClick: handleCancel
6606
+ }, {
6607
+ default: withCtx(() => [
6608
+ createTextVNode(toDisplayString(_ctx.cancelText), 1)
6609
+ ]),
6610
+ _: 1
6611
+ })) : createCommentVNode("", true),
6612
+ createVNode(FButton, {
6613
+ type: "primary",
6614
+ onClick: handleConfirm
6615
+ }, {
6616
+ default: withCtx(() => [
6617
+ createTextVNode(toDisplayString(_ctx.confirmText), 1)
6618
+ ]),
6619
+ _: 1
6620
+ })
6621
+ ], true)
6622
+ ])) : createCommentVNode("", true)
6623
+ ], 6)) : createCommentVNode("", true)
6624
+ ]),
6625
+ _: 3
6626
+ })
6627
+ ])) : createCommentVNode("", true)
6628
+ ]),
6629
+ _: 3
6630
+ })
6631
+ ]);
6632
+ };
6633
+ }
6634
+ });
6635
+ const FDialogComp = /* @__PURE__ */ _export_sfc$3(_sfc_main, [["__scopeId", "data-v-991352de"]]);
6636
+ const showDialog = (options) => {
6637
+ return new Promise((resolve) => {
6638
+ const container = document.createElement("div");
6639
+ document.body.appendChild(container);
6640
+ const visible = ref(true);
6641
+ const handleConfirm = () => {
6642
+ cleanup();
6643
+ resolve(true);
6644
+ };
6645
+ const handleCancel = () => {
6646
+ cleanup();
6647
+ resolve(false);
6648
+ };
6649
+ const handleClose = () => {
6650
+ cleanup();
6651
+ resolve(false);
6652
+ };
6653
+ const cleanup = () => {
6654
+ visible.value = false;
6655
+ setTimeout(() => {
6656
+ render(null, container);
6657
+ document.body.removeChild(container);
6658
+ }, 300);
6659
+ };
6660
+ const vnode = h(FDialogComp, __spreadValues({
6661
+ modelValue: visible.value,
6662
+ "onUpdate:modelValue": (val) => {
6663
+ visible.value = val;
6664
+ if (!val) {
6665
+ cleanup();
6666
+ }
6667
+ },
6668
+ onConfirm: handleConfirm,
6669
+ onCancel: handleCancel,
6670
+ onClose: handleClose
6671
+ }, options));
6672
+ render(vnode, container);
6673
+ });
6674
+ };
6675
+ const confirm = (content, title = "确认") => {
6676
+ return showDialog({
6677
+ title,
6678
+ content,
6679
+ type: "warning",
6680
+ showCancel: true,
6681
+ center: true
6682
+ });
6683
+ };
6684
+ const alert = (content, title = "提示", type = "info") => {
6685
+ return showDialog({
6686
+ title,
6687
+ content,
6688
+ type,
6689
+ showCancel: false,
6690
+ confirmText: "知道了",
6691
+ center: true
6692
+ });
6693
+ };
6694
+ const success = (content, title = "成功") => {
6695
+ return alert(content, title, "success");
6696
+ };
6697
+ const warning = (content, title = "警告") => {
6698
+ return alert(content, title, "warning");
6699
+ };
6700
+ const failed = (content, title = "错误") => {
6701
+ return alert(content, title, "failed");
6702
+ };
6703
+ const info = (content, title = "提示") => {
6704
+ return alert(content, title, "info");
6705
+ };
6706
+ const FDialog = (options) => {
6707
+ return showDialog(options);
6708
+ };
6709
+ FDialog.showDialog = showDialog;
6710
+ FDialog.confirm = confirm;
6711
+ FDialog.alert = alert;
6712
+ FDialog.success = success;
6713
+ FDialog.warning = warning;
6714
+ FDialog.failed = failed;
6715
+ FDialog.info = info;
4295
6716
  const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4296
6717
  __proto__: null,
4297
6718
  FAffix,
@@ -4304,21 +6725,21 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
4304
6725
  FCard,
4305
6726
  FCheckbox,
4306
6727
  FCol,
4307
- FCollapse: _sfc_main$9,
4308
- FCollapseItem: _sfc_main$8,
4309
- FColorPicker: _sfc_main$7,
6728
+ FCollapse: _sfc_main$a,
6729
+ FCollapseItem: _sfc_main$9,
6730
+ FColorPicker: _sfc_main$8,
4310
6731
  FContainer,
4311
6732
  FDialog,
4312
6733
  FDivider,
4313
6734
  FDropdown,
4314
6735
  FEditor,
4315
- FEmpty: _sfc_main$6,
6736
+ FEmpty: _sfc_main$7,
4316
6737
  FForm,
4317
6738
  FFormItem,
4318
- FIcon,
6739
+ FIcon: FIcon$3,
4319
6740
  FImage,
4320
6741
  FInput,
4321
- FInputNumber: _sfc_main$3,
6742
+ FInputNumber,
4322
6743
  FLink,
4323
6744
  FLoading,
4324
6745
  FMessage,
@@ -4328,9 +6749,9 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
4328
6749
  FRate,
4329
6750
  FResult,
4330
6751
  FRow,
4331
- FScrollbar: _sfc_main$4,
6752
+ FScrollbar: _sfc_main$5,
4332
6753
  FSelect,
4333
- FSlider: _sfc_main$5,
6754
+ FSlider: _sfc_main$6,
4334
6755
  FSpace,
4335
6756
  FTable,
4336
6757
  FTabs,
@@ -4356,21 +6777,21 @@ export {
4356
6777
  FCard,
4357
6778
  FCheckbox,
4358
6779
  FCol,
4359
- _sfc_main$9 as FCollapse,
4360
- _sfc_main$8 as FCollapseItem,
4361
- _sfc_main$7 as FColorPicker,
6780
+ _sfc_main$a as FCollapse,
6781
+ _sfc_main$9 as FCollapseItem,
6782
+ _sfc_main$8 as FColorPicker,
4362
6783
  FContainer,
4363
6784
  FDialog,
4364
6785
  FDivider,
4365
6786
  FDropdown,
4366
6787
  FEditor,
4367
- _sfc_main$6 as FEmpty,
6788
+ _sfc_main$7 as FEmpty,
4368
6789
  FForm,
4369
6790
  FFormItem,
4370
- FIcon,
6791
+ FIcon$3 as FIcon,
4371
6792
  FImage,
4372
6793
  FInput,
4373
- _sfc_main$3 as FInputNumber,
6794
+ FInputNumber,
4374
6795
  FLink,
4375
6796
  FLoading,
4376
6797
  FMessage,
@@ -4380,9 +6801,9 @@ export {
4380
6801
  FRate,
4381
6802
  FResult,
4382
6803
  FRow,
4383
- _sfc_main$4 as FScrollbar,
6804
+ _sfc_main$5 as FScrollbar,
4384
6805
  FSelect,
4385
- _sfc_main$5 as FSlider,
6806
+ _sfc_main$6 as FSlider,
4386
6807
  FSpace,
4387
6808
  FTable,
4388
6809
  FTabs,