fantasia-ui 0.2.49 → 0.2.50

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.
@@ -7552,7 +7552,7 @@ to {
7552
7552
  margin-top: 4px;
7553
7553
  font-size: 12px;
7554
7554
  color: #64748b;
7555
- }.f-dialog-overlay[data-v-b88b4e96] {
7555
+ }.f-dialog-overlay {
7556
7556
  position: fixed;
7557
7557
  top: 0;
7558
7558
  left: 0;
@@ -7567,11 +7567,13 @@ to {
7567
7567
  backdrop-filter: blur(2px);
7568
7568
  transition: background-color 0.25s ease;
7569
7569
  }
7570
- .f-dialog[data-v-b88b4e96] {
7570
+
7571
+ .f-dialog {
7571
7572
  position: relative;
7572
7573
  background: #fff;
7573
7574
  border-radius: 8px;
7574
7575
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
7576
+ width: 500px;
7575
7577
  max-width: 90vw;
7576
7578
  max-height: 90vh;
7577
7579
  display: flex;
@@ -7580,62 +7582,27 @@ to {
7580
7582
  will-change: transform, opacity;
7581
7583
  transform-origin: center;
7582
7584
  }
7583
- .f-dialog.is-fullscreen[data-v-b88b4e96] {
7584
- width: 100% !important;
7585
- height: 100%;
7586
- max-width: 100%;
7587
- max-height: 100%;
7588
- border-radius: 0;
7589
- }
7590
- .f-dialog__close[data-v-b88b4e96] {
7591
- position: absolute;
7592
- top: 16px;
7593
- right: 16px;
7594
- width: 32px;
7595
- height: 32px;
7596
- display: flex;
7597
- align-items: center;
7598
- justify-content: center;
7599
- border: none;
7600
- background: transparent;
7601
- color: #909399;
7602
- cursor: pointer;
7603
- border-radius: 4px;
7604
- transition: all 0.2s;
7605
- z-index: 1;
7606
- }
7607
- .f-dialog__close[data-v-b88b4e96] svg {
7608
- width: 18px;
7609
- height: 18px;
7610
- }
7611
- .f-dialog__close[data-v-b88b4e96]:hover {
7612
- background: #f5f7fa;
7613
- color: #606266;
7614
- }
7615
- .f-dialog__header[data-v-b88b4e96] {
7616
- padding: 20px 20px 16px;
7585
+ .f-dialog__header {
7586
+ padding: 24px 20px 16px;
7617
7587
  display: flex;
7618
7588
  align-items: center;
7619
7589
  gap: 12px;
7620
7590
  border-bottom: 1px solid #e4e7ed;
7621
7591
  }
7622
- .f-dialog__header.has-icon[data-v-b88b4e96] {
7623
- padding-top: 24px;
7624
- }
7625
- .f-dialog__icon[data-v-b88b4e96] {
7592
+ .f-dialog__icon {
7626
7593
  flex-shrink: 0;
7627
- width: 32px;
7628
- height: 32px;
7594
+ width: 28px;
7595
+ height: 28px;
7629
7596
  display: flex;
7630
7597
  align-items: center;
7631
7598
  justify-content: center;
7632
7599
  border-radius: 50%;
7633
7600
  }
7634
- .f-dialog__icon[data-v-b88b4e96] svg {
7635
- width: 24px;
7636
- height: 24px;
7601
+ .f-dialog__icon :deep(svg) {
7602
+ width: 20px;
7603
+ height: 20px;
7637
7604
  }
7638
- .f-dialog__title[data-v-b88b4e96] {
7605
+ .f-dialog__title {
7639
7606
  flex: 1;
7640
7607
  margin: 0;
7641
7608
  font-size: 18px;
@@ -7643,7 +7610,7 @@ to {
7643
7610
  color: #303133;
7644
7611
  line-height: 1.4;
7645
7612
  }
7646
- .f-dialog__body[data-v-b88b4e96] {
7613
+ .f-dialog__body {
7647
7614
  flex: 1;
7648
7615
  padding: 20px;
7649
7616
  color: #606266;
@@ -7651,10 +7618,10 @@ to {
7651
7618
  line-height: 1.6;
7652
7619
  overflow-y: auto;
7653
7620
  }
7654
- .f-dialog__body p[data-v-b88b4e96] {
7621
+ .f-dialog__body p {
7655
7622
  margin: 0;
7656
7623
  }
7657
- .f-dialog__footer[data-v-b88b4e96] {
7624
+ .f-dialog__footer {
7658
7625
  padding: 16px 20px;
7659
7626
  display: flex;
7660
7627
  align-items: center;
@@ -7662,55 +7629,50 @@ to {
7662
7629
  gap: 12px;
7663
7630
  border-top: 1px solid #e4e7ed;
7664
7631
  }
7665
- .f-dialog.is-center .f-dialog__header[data-v-b88b4e96] {
7666
- flex-direction: column;
7667
- text-align: center;
7668
- }
7669
- .f-dialog.is-center .f-dialog__body[data-v-b88b4e96] {
7670
- text-align: center;
7671
- }
7672
- .f-dialog.is-center .f-dialog__footer[data-v-b88b4e96] {
7673
- justify-content: center;
7674
- }
7675
- .f-dialog--info .f-dialog__icon[data-v-b88b4e96] {
7632
+ .f-dialog--info .f-dialog__icon {
7676
7633
  background: #ecf5ff;
7677
7634
  color: #409eff;
7678
7635
  }
7679
- .f-dialog--success .f-dialog__icon[data-v-b88b4e96] {
7636
+ .f-dialog--success .f-dialog__icon {
7680
7637
  background: #f0f9ff;
7681
7638
  color: #67c23a;
7682
7639
  }
7683
- .f-dialog--warning .f-dialog__icon[data-v-b88b4e96] {
7640
+ .f-dialog--warning .f-dialog__icon {
7684
7641
  background: #fef0e6;
7685
7642
  color: #e6a23c;
7686
7643
  }
7687
- .f-dialog--failed .f-dialog__icon[data-v-b88b4e96] {
7644
+ .f-dialog--error .f-dialog__icon {
7688
7645
  background: #fef0f0;
7689
7646
  color: #f56c6c;
7690
7647
  }
7691
- .f-dialog--primary .f-dialog__icon[data-v-b88b4e96] {
7692
- background: #ecf5ff;
7693
- color: #409eff;
7648
+ .f-dialog--confirm .f-dialog__icon {
7649
+ background: #fef0e6;
7650
+ color: #e6a23c;
7694
7651
  }
7695
- .f-dialog-fade-enter-active[data-v-b88b4e96],
7696
- .f-dialog-fade-leave-active[data-v-b88b4e96] {
7652
+
7653
+ .dialog-fade-enter-active,
7654
+ .dialog-fade-leave-active {
7697
7655
  transition: opacity 0.25s ease;
7698
7656
  }
7699
- .f-dialog-fade-enter-from[data-v-b88b4e96],
7700
- .f-dialog-fade-leave-to[data-v-b88b4e96] {
7657
+
7658
+ .dialog-fade-enter-from,
7659
+ .dialog-fade-leave-to {
7701
7660
  opacity: 0;
7702
7661
  }
7703
- .f-dialog-zoom-enter-active[data-v-b88b4e96],
7704
- .f-dialog-zoom-leave-active[data-v-b88b4e96] {
7662
+
7663
+ .dialog-enter-active,
7664
+ .dialog-leave-active {
7705
7665
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
7706
7666
  }
7707
- .f-dialog-zoom-enter-from[data-v-b88b4e96],
7708
- .f-dialog-zoom-leave-to[data-v-b88b4e96] {
7667
+
7668
+ .dialog-enter-from,
7669
+ .dialog-leave-to {
7709
7670
  opacity: 0;
7710
7671
  transform: scale(0.88) translateY(6px);
7711
7672
  }
7712
- .f-dialog-zoom-enter-to[data-v-b88b4e96],
7713
- .f-dialog-zoom-leave-from[data-v-b88b4e96] {
7673
+
7674
+ .dialog-enter-to,
7675
+ .dialog-leave-from {
7714
7676
  opacity: 1;
7715
7677
  transform: scale(1) translateY(0);
7716
7678
  }.f-message[data-v-97556afa] {
@@ -38,7 +38,7 @@ var __async = (__this, __arguments, generator) => {
38
38
  });
39
39
  };
40
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, provide, onMounted, readonly, onBeforeUnmount, reactive, toRefs, createStaticVNode, render, h } from "vue";
41
- import { CloseCircleOutline, EyeOutline, EyeOffOutline, StarOutline, StarHalf, Star, ChevronDownOutline, ChevronBackOutline, EllipsisHorizontal, ChevronForwardOutline, CloseCircle, Close, Person, InformationCircleOutline, WarningOutline, AlertCircleOutline, CheckmarkCircleOutline, CloudUpload, DocumentOutline, RemoveOutline, AddOutline, ChevronUpOutline, InformationCircle, AlertCircle, CheckmarkCircle, CloseOutline, Warning } from "@vicons/ionicons5";
41
+ import { CloseCircleOutline, EyeOutline, EyeOffOutline, StarOutline, StarHalf, Star, ChevronDownOutline, ChevronBackOutline, EllipsisHorizontal, ChevronForwardOutline, CloseCircle, Close, Person, InformationCircleOutline, WarningOutline, AlertCircleOutline, CheckmarkCircleOutline, CloudUpload, DocumentOutline, RemoveOutline, AddOutline, ChevronUpOutline, InformationCircle, AlertCircle, CheckmarkCircle, Warning } from "@vicons/ionicons5";
42
42
  import { useEventListener } from "@vueuse/core";
43
43
  const _sfc_main$Q = /* @__PURE__ */ defineComponent({
44
44
  __name: "FIcon",
@@ -689,7 +689,7 @@ const _hoisted_3$n = {
689
689
  };
690
690
  const _hoisted_4$e = ["value"];
691
691
  const _hoisted_5$b = ["value"];
692
- const _hoisted_6$8 = {
692
+ const _hoisted_6$9 = {
693
693
  key: 3,
694
694
  class: "f-pagination__list"
695
695
  };
@@ -779,7 +779,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
779
779
  ]),
780
780
  _: 1
781
781
  })
782
- ], 2)) : item === "pager" ? (openBlock(), createElementBlock("ul", _hoisted_6$8, [
782
+ ], 2)) : item === "pager" ? (openBlock(), createElementBlock("ul", _hoisted_6$9, [
783
783
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(pages), (page, index) => {
784
784
  return openBlock(), createElementBlock(Fragment, { key: index }, [
785
785
  page === "..." ? (openBlock(), createElementBlock("li", _hoisted_7$5, [
@@ -849,7 +849,7 @@ const _hoisted_5$a = {
849
849
  key: 3,
850
850
  class: "f-card__footer"
851
851
  };
852
- const _hoisted_6$7 = {
852
+ const _hoisted_6$8 = {
853
853
  key: 0,
854
854
  class: "f-card__header"
855
855
  };
@@ -898,7 +898,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
898
898
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
899
899
  ])) : createCommentVNode("", true)
900
900
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
901
- _ctx.$slots.header || _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_6$7, [
901
+ _ctx.$slots.header || _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_6$8, [
902
902
  renderSlot(_ctx.$slots, "header", {}, void 0, true),
903
903
  _ctx.$slots["header-extra"] ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
904
904
  renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
@@ -2322,7 +2322,7 @@ const _hoisted_2$d = { class: "f-transfer__header" };
2322
2322
  const _hoisted_3$d = { class: "f-transfer__list" };
2323
2323
  const _hoisted_4$9 = ["onClick"];
2324
2324
  const _hoisted_5$8 = { class: "f-transfer__actions" };
2325
- const _hoisted_6$6 = ["disabled"];
2325
+ const _hoisted_6$7 = ["disabled"];
2326
2326
  const _hoisted_7$3 = ["disabled"];
2327
2327
  const _hoisted_8$2 = { class: "f-transfer__panel" };
2328
2328
  const _hoisted_9$2 = { class: "f-transfer__header" };
@@ -2402,7 +2402,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2402
2402
  class: "f-transfer__btn",
2403
2403
  disabled: _ctx.disabled || unref(leftList).length === 0,
2404
2404
  onClick: _cache[0] || (_cache[0] = ($event) => moveSelected("right"))
2405
- }, " → ", 8, _hoisted_6$6),
2405
+ }, " → ", 8, _hoisted_6$7),
2406
2406
  createElementVNode("button", {
2407
2407
  type: "button",
2408
2408
  class: "f-transfer__btn",
@@ -2474,7 +2474,7 @@ const _hoisted_2$b = { class: "f-editor__status" };
2474
2474
  const _hoisted_3$b = { class: "f-editor__lines" };
2475
2475
  const _hoisted_4$8 = { class: "f-editor__code-wrapper" };
2476
2476
  const _hoisted_5$7 = ["innerHTML"];
2477
- const _hoisted_6$5 = ["rows", "readonly", "placeholder"];
2477
+ const _hoisted_6$6 = ["rows", "readonly", "placeholder"];
2478
2478
  const LINE_HEIGHT_PX = 17.6;
2479
2479
  const PADDING_TOP_PX = 12;
2480
2480
  const MIN_BODY_HEIGHT = 180;
@@ -2721,7 +2721,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2721
2721
  onClick: updateCursorInfo,
2722
2722
  onKeyup: updateCursorInfo,
2723
2723
  onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur"))
2724
- }, null, 40, _hoisted_6$5), [
2724
+ }, null, 40, _hoisted_6$6), [
2725
2725
  [vModelText, model.value]
2726
2726
  ])
2727
2727
  ])
@@ -2742,7 +2742,7 @@ const _hoisted_4$7 = {
2742
2742
  class: "f-table__col--index"
2743
2743
  };
2744
2744
  const _hoisted_5$6 = { class: "f-table__head" };
2745
- const _hoisted_6$4 = {
2745
+ const _hoisted_6$5 = {
2746
2746
  key: 0,
2747
2747
  class: "f-table__th f-table__th--index"
2748
2748
  };
@@ -2855,7 +2855,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2855
2855
  ]),
2856
2856
  createElementVNode("thead", _hoisted_5$6, [
2857
2857
  createElementVNode("tr", null, [
2858
- _ctx.showIndex ? (openBlock(), createElementBlock("th", _hoisted_6$4, "#")) : createCommentVNode("", true),
2858
+ _ctx.showIndex ? (openBlock(), createElementBlock("th", _hoisted_6$5, "#")) : createCommentVNode("", true),
2859
2859
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (col) => {
2860
2860
  return openBlock(), createElementBlock("th", {
2861
2861
  key: col.key,
@@ -2944,7 +2944,7 @@ const _hoisted_5$5 = {
2944
2944
  key: 1,
2945
2945
  class: "f-upload__button"
2946
2946
  };
2947
- const _hoisted_6$3 = ["accept"];
2947
+ const _hoisted_6$4 = ["accept"];
2948
2948
  const _hoisted_7$1 = {
2949
2949
  key: 2,
2950
2950
  class: "f-upload__file-item"
@@ -3037,7 +3037,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
3037
3037
  accept: _ctx.accept,
3038
3038
  class: "f-upload__input",
3039
3039
  onChange: onFileChange
3040
- }, null, 40, _hoisted_6$3),
3040
+ }, null, 40, _hoisted_6$4),
3041
3041
  renderSlot(_ctx.$slots, "default", {}, () => [
3042
3042
  createElementVNode("span", null, toDisplayString(_ctx.buttonText), 1)
3043
3043
  ], true)
@@ -3236,7 +3236,7 @@ const _hoisted_2$7 = {
3236
3236
  const _hoisted_3$7 = { class: "f-color-picker__sliders" };
3237
3237
  const _hoisted_4$5 = { class: "f-color-picker__slider-group" };
3238
3238
  const _hoisted_5$4 = ["value"];
3239
- const _hoisted_6$2 = {
3239
+ const _hoisted_6$3 = {
3240
3240
  key: 0,
3241
3241
  class: "f-color-picker__predefine"
3242
3242
  };
@@ -3533,7 +3533,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3533
3533
  onChange: handleInputChange,
3534
3534
  onKeydown: _cache[0] || (_cache[0] = withKeys(($event) => $event.target.blur(), ["enter"]))
3535
3535
  }, null, 40, _hoisted_5$4),
3536
- _ctx.predefine.length ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
3536
+ _ctx.predefine.length ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
3537
3537
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.predefine, (color) => {
3538
3538
  return openBlock(), createElementBlock("span", {
3539
3539
  key: color,
@@ -4007,7 +4007,7 @@ const _hoisted_4$3 = {
4007
4007
  class: "f-input-number__stack"
4008
4008
  };
4009
4009
  const _hoisted_5$2 = ["disabled"];
4010
- const _hoisted_6$1 = ["disabled"];
4010
+ const _hoisted_6$2 = ["disabled"];
4011
4011
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4012
4012
  __name: "FInputNumber",
4013
4013
  props: /* @__PURE__ */ mergeModels({
@@ -4218,7 +4218,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4218
4218
  ]),
4219
4219
  _: 1
4220
4220
  })
4221
- ], 40, _hoisted_6$1)
4221
+ ], 40, _hoisted_6$2)
4222
4222
  ])) : createCommentVNode("", true)
4223
4223
  ], 2);
4224
4224
  };
@@ -4242,7 +4242,7 @@ const _hoisted_5$1 = {
4242
4242
  key: 2,
4243
4243
  class: "f-result__extra"
4244
4244
  };
4245
- const _hoisted_6 = {
4245
+ const _hoisted_6$1 = {
4246
4246
  key: 3,
4247
4247
  class: "f-result__content"
4248
4248
  };
@@ -4298,7 +4298,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4298
4298
  _ctx.$slots.extra ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
4299
4299
  renderSlot(_ctx.$slots, "extra", {}, void 0, true)
4300
4300
  ])) : createCommentVNode("", true),
4301
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6, [
4301
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
4302
4302
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
4303
4303
  ])) : createCommentVNode("", true)
4304
4304
  ], 2);
@@ -4437,61 +4437,46 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4437
4437
  const FSteps = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a97e1683"]]);
4438
4438
  const _hoisted_1$2 = {
4439
4439
  key: 0,
4440
- class: "f-dialog__icon"
4441
- };
4442
- const _hoisted_2$1 = { class: "f-dialog__title" };
4443
- const _hoisted_3$1 = { class: "f-dialog__body" };
4444
- const _hoisted_4 = { key: 0 };
4445
- const _hoisted_5 = {
4446
- key: 2,
4447
- class: "f-dialog__footer"
4440
+ class: "f-dialog__header"
4448
4441
  };
4442
+ const _hoisted_2$1 = { class: "f-dialog__icon" };
4443
+ const _hoisted_3$1 = { class: "f-dialog__title" };
4444
+ const _hoisted_4 = { class: "f-dialog__body" };
4445
+ const _hoisted_5 = { key: 0 };
4446
+ const _hoisted_6 = { class: "f-dialog__footer" };
4449
4447
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4450
4448
  __name: "FDialog",
4451
4449
  props: /* @__PURE__ */ mergeModels({
4452
4450
  title: { default: "提示" },
4453
- content: {},
4454
- width: { default: "500px" },
4455
- type: { default: "default" },
4451
+ content: { default: "" },
4452
+ type: { default: "info" },
4456
4453
  confirmText: { default: "确定" },
4457
4454
  cancelText: { default: "取消" },
4458
4455
  showCancel: { type: Boolean, default: true },
4459
- showClose: { type: Boolean, default: true },
4460
- closeOnClickModal: { type: Boolean, default: true },
4461
- closeOnEsc: { type: Boolean, default: true },
4462
- center: { type: Boolean, default: false },
4463
- fullscreen: { type: Boolean, default: false },
4464
- destroyOnClose: { type: Boolean, default: false },
4465
- beforeClose: {}
4456
+ closeOnClickOutside: { type: Boolean, default: true },
4457
+ closeOnEsc: { type: Boolean, default: true }
4466
4458
  }, {
4467
4459
  "modelValue": __spreadValues({ type: Boolean }, { required: true }),
4468
4460
  "modelModifiers": {}
4469
4461
  }),
4470
- emits: /* @__PURE__ */ mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
4462
+ emits: /* @__PURE__ */ mergeModels(["confirm", "cancel"], ["update:modelValue"]),
4471
4463
  setup(__props, { emit: __emit }) {
4472
4464
  const props = __props;
4473
4465
  const emit = __emit;
4474
4466
  const visible = useModel(__props, "modelValue");
4475
4467
  const handleClose = () => {
4476
4468
  visible.value = false;
4477
- emit("close");
4469
+ emit("cancel");
4478
4470
  };
4479
4471
  const handleConfirm = () => {
4480
4472
  emit("confirm");
4481
- if (props.beforeClose) {
4482
- props.beforeClose(() => {
4483
- visible.value = false;
4484
- });
4485
- } else {
4486
- visible.value = false;
4487
- }
4473
+ visible.value = false;
4488
4474
  };
4489
4475
  const handleCancel = () => {
4490
- emit("cancel");
4491
4476
  handleClose();
4492
4477
  };
4493
4478
  const handleOverlayClick = (e) => {
4494
- if (props.closeOnClickModal && e.target === e.currentTarget) {
4479
+ if (props.closeOnClickOutside && e.target === e.currentTarget) {
4495
4480
  handleClose();
4496
4481
  }
4497
4482
  };
@@ -4504,7 +4489,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4504
4489
  if (props.closeOnEsc) {
4505
4490
  window.addEventListener("keydown", handleKeydown);
4506
4491
  }
4507
- emit("open");
4508
4492
  });
4509
4493
  onBeforeUnmount(() => {
4510
4494
  if (props.closeOnEsc) {
@@ -4515,68 +4499,43 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4515
4499
  info: InformationCircleOutline,
4516
4500
  success: CheckmarkCircleOutline,
4517
4501
  warning: WarningOutline,
4518
- failed: AlertCircleOutline,
4519
- primary: InformationCircleOutline,
4520
- default: InformationCircleOutline
4502
+ error: AlertCircleOutline,
4503
+ confirm: WarningOutline
4521
4504
  };
4522
- const hasIcon = computed(() => props.type && props.type !== "default");
4523
4505
  return (_ctx, _cache) => {
4524
4506
  return openBlock(), createBlock(Teleport, { to: "body" }, [
4525
- createVNode(Transition, { name: "f-dialog-fade" }, {
4507
+ createVNode(Transition, { name: "dialog-fade" }, {
4526
4508
  default: withCtx(() => [
4527
4509
  visible.value ? (openBlock(), createElementBlock("div", {
4528
4510
  key: 0,
4529
4511
  class: "f-dialog-overlay",
4530
4512
  onClick: handleOverlayClick
4531
4513
  }, [
4532
- createVNode(Transition, { name: "f-dialog-zoom" }, {
4514
+ createVNode(Transition, { name: "dialog" }, {
4533
4515
  default: withCtx(() => [
4534
4516
  visible.value ? (openBlock(), createElementBlock("div", {
4535
4517
  key: 0,
4536
- class: normalizeClass(["f-dialog", [
4537
- `f-dialog--${_ctx.type}`,
4538
- {
4539
- "is-center": _ctx.center,
4540
- "is-fullscreen": _ctx.fullscreen
4541
- }
4542
- ]]),
4543
- style: normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
4518
+ class: normalizeClass(["f-dialog", `f-dialog--${_ctx.type}`])
4544
4519
  }, [
4545
- _ctx.showClose ? (openBlock(), createElementBlock("button", {
4546
- key: 0,
4547
- type: "button",
4548
- class: "f-dialog__close",
4549
- onClick: handleClose
4550
- }, [
4551
- createVNode(FIcon, null, {
4552
- default: withCtx(() => [
4553
- createVNode(unref(CloseOutline))
4554
- ]),
4555
- _: 1
4556
- })
4557
- ])) : createCommentVNode("", true),
4558
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("div", {
4559
- key: 1,
4560
- class: normalizeClass(["f-dialog__header", { "has-icon": unref(hasIcon) }])
4561
- }, [
4520
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
4562
4521
  renderSlot(_ctx.$slots, "header", {}, () => [
4563
- unref(hasIcon) ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
4522
+ createElementVNode("div", _hoisted_2$1, [
4564
4523
  createVNode(FIcon, null, {
4565
4524
  default: withCtx(() => [
4566
4525
  (openBlock(), createBlock(resolveDynamicComponent(iconMap[_ctx.type])))
4567
4526
  ]),
4568
4527
  _: 1
4569
4528
  })
4570
- ])) : createCommentVNode("", true),
4571
- createElementVNode("h3", _hoisted_2$1, toDisplayString(_ctx.title), 1)
4572
- ], true)
4573
- ], 2)) : createCommentVNode("", true),
4574
- createElementVNode("div", _hoisted_3$1, [
4529
+ ]),
4530
+ createElementVNode("h3", _hoisted_3$1, toDisplayString(_ctx.title), 1)
4531
+ ])
4532
+ ])) : createCommentVNode("", true),
4533
+ createElementVNode("div", _hoisted_4, [
4575
4534
  renderSlot(_ctx.$slots, "default", {}, () => [
4576
- _ctx.content ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
4577
- ], true)
4535
+ _ctx.content ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
4536
+ ])
4578
4537
  ]),
4579
- _ctx.$slots.footer || _ctx.showCancel ? (openBlock(), createElementBlock("div", _hoisted_5, [
4538
+ createElementVNode("div", _hoisted_6, [
4580
4539
  renderSlot(_ctx.$slots, "footer", {}, () => [
4581
4540
  _ctx.showCancel ? (openBlock(), createBlock(FButton, {
4582
4541
  key: 0,
@@ -4596,9 +4555,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4596
4555
  ]),
4597
4556
  _: 1
4598
4557
  })
4599
- ], true)
4600
- ])) : createCommentVNode("", true)
4601
- ], 6)) : createCommentVNode("", true)
4558
+ ])
4559
+ ])
4560
+ ], 2)) : createCommentVNode("", true)
4602
4561
  ]),
4603
4562
  _: 3
4604
4563
  })
@@ -4610,7 +4569,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4610
4569
  };
4611
4570
  }
4612
4571
  });
4613
- const FDialogComp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b88b4e96"]]);
4614
4572
  const _hoisted_1$1 = { class: "f-message__content" };
4615
4573
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4616
4574
  __name: "FMessage",
@@ -5005,18 +4963,12 @@ const showDialog = (options) => {
5005
4963
  cleanup();
5006
4964
  resolve(false);
5007
4965
  };
5008
- const handleClose = () => {
5009
- cleanup();
5010
- resolve(false);
5011
- };
5012
4966
  const cleanup = () => {
5013
4967
  visible.value = false;
5014
- setTimeout(() => {
5015
- render(null, container);
5016
- document.body.removeChild(container);
5017
- }, 300);
4968
+ render(null, container);
4969
+ document.body.removeChild(container);
5018
4970
  };
5019
- const vnode = h(FDialogComp, __spreadValues({
4971
+ const vnode = h(_sfc_main$2, __spreadValues({
5020
4972
  modelValue: visible.value,
5021
4973
  "onUpdate:modelValue": (val) => {
5022
4974
  visible.value = val;
@@ -5025,8 +4977,7 @@ const showDialog = (options) => {
5025
4977
  }
5026
4978
  },
5027
4979
  onConfirm: handleConfirm,
5028
- onCancel: handleCancel,
5029
- onClose: handleClose
4980
+ onCancel: handleCancel
5030
4981
  }, options));
5031
4982
  render(vnode, container);
5032
4983
  });
@@ -5035,9 +4986,8 @@ const confirm = (content, title = "确认") => {
5035
4986
  return showDialog({
5036
4987
  title,
5037
4988
  content,
5038
- type: "warning",
5039
- showCancel: true,
5040
- center: true
4989
+ type: "confirm",
4990
+ showCancel: true
5041
4991
  });
5042
4992
  };
5043
4993
  const alert = (content, title = "提示", type = "info") => {
@@ -5046,8 +4996,7 @@ const alert = (content, title = "提示", type = "info") => {
5046
4996
  content,
5047
4997
  type,
5048
4998
  showCancel: false,
5049
- confirmText: "知道了",
5050
- center: true
4999
+ confirmText: "知道了"
5051
5000
  });
5052
5001
  };
5053
5002
  const success = (content, title = "成功") => {
@@ -5056,8 +5005,8 @@ const success = (content, title = "成功") => {
5056
5005
  const warning = (content, title = "警告") => {
5057
5006
  return alert(content, title, "warning");
5058
5007
  };
5059
- const failed = (content, title = "错误") => {
5060
- return alert(content, title, "failed");
5008
+ const error = (content, title = "错误") => {
5009
+ return alert(content, title, "error");
5061
5010
  };
5062
5011
  const info = (content, title = "提示") => {
5063
5012
  return alert(content, title, "info");
@@ -5070,7 +5019,7 @@ FDialog.confirm = confirm;
5070
5019
  FDialog.alert = alert;
5071
5020
  FDialog.success = success;
5072
5021
  FDialog.warning = warning;
5073
- FDialog.failed = failed;
5022
+ FDialog.error = error;
5074
5023
  FDialog.info = info;
5075
5024
  const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5076
5025
  __proto__: null,
@@ -5089,7 +5038,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
5089
5038
  FColorPicker: _sfc_main$b,
5090
5039
  FContainer,
5091
5040
  FDialog,
5092
- FDialogComponent: FDialogComp,
5041
+ FDialogComponent: _sfc_main$2,
5093
5042
  FDivider,
5094
5043
  FDropdown,
5095
5044
  FEditor,
@@ -5152,7 +5101,7 @@ export {
5152
5101
  _sfc_main$b as FColorPicker,
5153
5102
  FContainer,
5154
5103
  FDialog,
5155
- FDialogComp as FDialogComponent,
5104
+ _sfc_main$2 as FDialogComponent,
5156
5105
  FDivider,
5157
5106
  FDropdown,
5158
5107
  FEditor,
@@ -690,7 +690,7 @@ var __async = (__this, __arguments, generator) => {
690
690
  };
691
691
  const _hoisted_4$e = ["value"];
692
692
  const _hoisted_5$b = ["value"];
693
- const _hoisted_6$8 = {
693
+ const _hoisted_6$9 = {
694
694
  key: 3,
695
695
  class: "f-pagination__list"
696
696
  };
@@ -780,7 +780,7 @@ var __async = (__this, __arguments, generator) => {
780
780
  ]),
781
781
  _: 1
782
782
  })
783
- ], 2)) : item === "pager" ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$8, [
783
+ ], 2)) : item === "pager" ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$9, [
784
784
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(pages), (page, index) => {
785
785
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
786
786
  page === "..." ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_7$5, [
@@ -850,7 +850,7 @@ var __async = (__this, __arguments, generator) => {
850
850
  key: 3,
851
851
  class: "f-card__footer"
852
852
  };
853
- const _hoisted_6$7 = {
853
+ const _hoisted_6$8 = {
854
854
  key: 0,
855
855
  class: "f-card__header"
856
856
  };
@@ -899,7 +899,7 @@ var __async = (__this, __arguments, generator) => {
899
899
  vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
900
900
  ])) : vue.createCommentVNode("", true)
901
901
  ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
902
- _ctx.$slots.header || _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$7, [
902
+ _ctx.$slots.header || _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$8, [
903
903
  vue.renderSlot(_ctx.$slots, "header", {}, void 0, true),
904
904
  _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$4, [
905
905
  vue.renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
@@ -2323,7 +2323,7 @@ var __async = (__this, __arguments, generator) => {
2323
2323
  const _hoisted_3$d = { class: "f-transfer__list" };
2324
2324
  const _hoisted_4$9 = ["onClick"];
2325
2325
  const _hoisted_5$8 = { class: "f-transfer__actions" };
2326
- const _hoisted_6$6 = ["disabled"];
2326
+ const _hoisted_6$7 = ["disabled"];
2327
2327
  const _hoisted_7$3 = ["disabled"];
2328
2328
  const _hoisted_8$2 = { class: "f-transfer__panel" };
2329
2329
  const _hoisted_9$2 = { class: "f-transfer__header" };
@@ -2403,7 +2403,7 @@ var __async = (__this, __arguments, generator) => {
2403
2403
  class: "f-transfer__btn",
2404
2404
  disabled: _ctx.disabled || vue.unref(leftList).length === 0,
2405
2405
  onClick: _cache[0] || (_cache[0] = ($event) => moveSelected("right"))
2406
- }, " → ", 8, _hoisted_6$6),
2406
+ }, " → ", 8, _hoisted_6$7),
2407
2407
  vue.createElementVNode("button", {
2408
2408
  type: "button",
2409
2409
  class: "f-transfer__btn",
@@ -2475,7 +2475,7 @@ var __async = (__this, __arguments, generator) => {
2475
2475
  const _hoisted_3$b = { class: "f-editor__lines" };
2476
2476
  const _hoisted_4$8 = { class: "f-editor__code-wrapper" };
2477
2477
  const _hoisted_5$7 = ["innerHTML"];
2478
- const _hoisted_6$5 = ["rows", "readonly", "placeholder"];
2478
+ const _hoisted_6$6 = ["rows", "readonly", "placeholder"];
2479
2479
  const LINE_HEIGHT_PX = 17.6;
2480
2480
  const PADDING_TOP_PX = 12;
2481
2481
  const MIN_BODY_HEIGHT = 180;
@@ -2722,7 +2722,7 @@ var __async = (__this, __arguments, generator) => {
2722
2722
  onClick: updateCursorInfo,
2723
2723
  onKeyup: updateCursorInfo,
2724
2724
  onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur"))
2725
- }, null, 40, _hoisted_6$5), [
2725
+ }, null, 40, _hoisted_6$6), [
2726
2726
  [vue.vModelText, model.value]
2727
2727
  ])
2728
2728
  ])
@@ -2743,7 +2743,7 @@ var __async = (__this, __arguments, generator) => {
2743
2743
  class: "f-table__col--index"
2744
2744
  };
2745
2745
  const _hoisted_5$6 = { class: "f-table__head" };
2746
- const _hoisted_6$4 = {
2746
+ const _hoisted_6$5 = {
2747
2747
  key: 0,
2748
2748
  class: "f-table__th f-table__th--index"
2749
2749
  };
@@ -2856,7 +2856,7 @@ var __async = (__this, __arguments, generator) => {
2856
2856
  ]),
2857
2857
  vue.createElementVNode("thead", _hoisted_5$6, [
2858
2858
  vue.createElementVNode("tr", null, [
2859
- _ctx.showIndex ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$4, "#")) : vue.createCommentVNode("", true),
2859
+ _ctx.showIndex ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$5, "#")) : vue.createCommentVNode("", true),
2860
2860
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (col) => {
2861
2861
  return vue.openBlock(), vue.createElementBlock("th", {
2862
2862
  key: col.key,
@@ -2945,7 +2945,7 @@ var __async = (__this, __arguments, generator) => {
2945
2945
  key: 1,
2946
2946
  class: "f-upload__button"
2947
2947
  };
2948
- const _hoisted_6$3 = ["accept"];
2948
+ const _hoisted_6$4 = ["accept"];
2949
2949
  const _hoisted_7$1 = {
2950
2950
  key: 2,
2951
2951
  class: "f-upload__file-item"
@@ -3038,7 +3038,7 @@ var __async = (__this, __arguments, generator) => {
3038
3038
  accept: _ctx.accept,
3039
3039
  class: "f-upload__input",
3040
3040
  onChange: onFileChange
3041
- }, null, 40, _hoisted_6$3),
3041
+ }, null, 40, _hoisted_6$4),
3042
3042
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
3043
3043
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.buttonText), 1)
3044
3044
  ], true)
@@ -3237,7 +3237,7 @@ var __async = (__this, __arguments, generator) => {
3237
3237
  const _hoisted_3$7 = { class: "f-color-picker__sliders" };
3238
3238
  const _hoisted_4$5 = { class: "f-color-picker__slider-group" };
3239
3239
  const _hoisted_5$4 = ["value"];
3240
- const _hoisted_6$2 = {
3240
+ const _hoisted_6$3 = {
3241
3241
  key: 0,
3242
3242
  class: "f-color-picker__predefine"
3243
3243
  };
@@ -3534,7 +3534,7 @@ var __async = (__this, __arguments, generator) => {
3534
3534
  onChange: handleInputChange,
3535
3535
  onKeydown: _cache[0] || (_cache[0] = vue.withKeys(($event) => $event.target.blur(), ["enter"]))
3536
3536
  }, null, 40, _hoisted_5$4),
3537
- _ctx.predefine.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
3537
+ _ctx.predefine.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$3, [
3538
3538
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.predefine, (color) => {
3539
3539
  return vue.openBlock(), vue.createElementBlock("span", {
3540
3540
  key: color,
@@ -4008,7 +4008,7 @@ var __async = (__this, __arguments, generator) => {
4008
4008
  class: "f-input-number__stack"
4009
4009
  };
4010
4010
  const _hoisted_5$2 = ["disabled"];
4011
- const _hoisted_6$1 = ["disabled"];
4011
+ const _hoisted_6$2 = ["disabled"];
4012
4012
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
4013
4013
  __name: "FInputNumber",
4014
4014
  props: /* @__PURE__ */ vue.mergeModels({
@@ -4219,7 +4219,7 @@ var __async = (__this, __arguments, generator) => {
4219
4219
  ]),
4220
4220
  _: 1
4221
4221
  })
4222
- ], 40, _hoisted_6$1)
4222
+ ], 40, _hoisted_6$2)
4223
4223
  ])) : vue.createCommentVNode("", true)
4224
4224
  ], 2);
4225
4225
  };
@@ -4243,7 +4243,7 @@ var __async = (__this, __arguments, generator) => {
4243
4243
  key: 2,
4244
4244
  class: "f-result__extra"
4245
4245
  };
4246
- const _hoisted_6 = {
4246
+ const _hoisted_6$1 = {
4247
4247
  key: 3,
4248
4248
  class: "f-result__content"
4249
4249
  };
@@ -4299,7 +4299,7 @@ var __async = (__this, __arguments, generator) => {
4299
4299
  _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
4300
4300
  vue.renderSlot(_ctx.$slots, "extra", {}, void 0, true)
4301
4301
  ])) : vue.createCommentVNode("", true),
4302
- _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
4302
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
4303
4303
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4304
4304
  ])) : vue.createCommentVNode("", true)
4305
4305
  ], 2);
@@ -4438,61 +4438,46 @@ var __async = (__this, __arguments, generator) => {
4438
4438
  const FSteps = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a97e1683"]]);
4439
4439
  const _hoisted_1$2 = {
4440
4440
  key: 0,
4441
- class: "f-dialog__icon"
4442
- };
4443
- const _hoisted_2$1 = { class: "f-dialog__title" };
4444
- const _hoisted_3$1 = { class: "f-dialog__body" };
4445
- const _hoisted_4 = { key: 0 };
4446
- const _hoisted_5 = {
4447
- key: 2,
4448
- class: "f-dialog__footer"
4441
+ class: "f-dialog__header"
4449
4442
  };
4443
+ const _hoisted_2$1 = { class: "f-dialog__icon" };
4444
+ const _hoisted_3$1 = { class: "f-dialog__title" };
4445
+ const _hoisted_4 = { class: "f-dialog__body" };
4446
+ const _hoisted_5 = { key: 0 };
4447
+ const _hoisted_6 = { class: "f-dialog__footer" };
4450
4448
  const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
4451
4449
  __name: "FDialog",
4452
4450
  props: /* @__PURE__ */ vue.mergeModels({
4453
4451
  title: { default: "提示" },
4454
- content: {},
4455
- width: { default: "500px" },
4456
- type: { default: "default" },
4452
+ content: { default: "" },
4453
+ type: { default: "info" },
4457
4454
  confirmText: { default: "确定" },
4458
4455
  cancelText: { default: "取消" },
4459
4456
  showCancel: { type: Boolean, default: true },
4460
- showClose: { type: Boolean, default: true },
4461
- closeOnClickModal: { type: Boolean, default: true },
4462
- closeOnEsc: { type: Boolean, default: true },
4463
- center: { type: Boolean, default: false },
4464
- fullscreen: { type: Boolean, default: false },
4465
- destroyOnClose: { type: Boolean, default: false },
4466
- beforeClose: {}
4457
+ closeOnClickOutside: { type: Boolean, default: true },
4458
+ closeOnEsc: { type: Boolean, default: true }
4467
4459
  }, {
4468
4460
  "modelValue": __spreadValues({ type: Boolean }, { required: true }),
4469
4461
  "modelModifiers": {}
4470
4462
  }),
4471
- emits: /* @__PURE__ */ vue.mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
4463
+ emits: /* @__PURE__ */ vue.mergeModels(["confirm", "cancel"], ["update:modelValue"]),
4472
4464
  setup(__props, { emit: __emit }) {
4473
4465
  const props = __props;
4474
4466
  const emit = __emit;
4475
4467
  const visible = vue.useModel(__props, "modelValue");
4476
4468
  const handleClose = () => {
4477
4469
  visible.value = false;
4478
- emit("close");
4470
+ emit("cancel");
4479
4471
  };
4480
4472
  const handleConfirm = () => {
4481
4473
  emit("confirm");
4482
- if (props.beforeClose) {
4483
- props.beforeClose(() => {
4484
- visible.value = false;
4485
- });
4486
- } else {
4487
- visible.value = false;
4488
- }
4474
+ visible.value = false;
4489
4475
  };
4490
4476
  const handleCancel = () => {
4491
- emit("cancel");
4492
4477
  handleClose();
4493
4478
  };
4494
4479
  const handleOverlayClick = (e) => {
4495
- if (props.closeOnClickModal && e.target === e.currentTarget) {
4480
+ if (props.closeOnClickOutside && e.target === e.currentTarget) {
4496
4481
  handleClose();
4497
4482
  }
4498
4483
  };
@@ -4505,7 +4490,6 @@ var __async = (__this, __arguments, generator) => {
4505
4490
  if (props.closeOnEsc) {
4506
4491
  window.addEventListener("keydown", handleKeydown);
4507
4492
  }
4508
- emit("open");
4509
4493
  });
4510
4494
  vue.onBeforeUnmount(() => {
4511
4495
  if (props.closeOnEsc) {
@@ -4516,68 +4500,43 @@ var __async = (__this, __arguments, generator) => {
4516
4500
  info: ionicons5.InformationCircleOutline,
4517
4501
  success: ionicons5.CheckmarkCircleOutline,
4518
4502
  warning: ionicons5.WarningOutline,
4519
- failed: ionicons5.AlertCircleOutline,
4520
- primary: ionicons5.InformationCircleOutline,
4521
- default: ionicons5.InformationCircleOutline
4503
+ error: ionicons5.AlertCircleOutline,
4504
+ confirm: ionicons5.WarningOutline
4522
4505
  };
4523
- const hasIcon = vue.computed(() => props.type && props.type !== "default");
4524
4506
  return (_ctx, _cache) => {
4525
4507
  return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4526
- vue.createVNode(vue.Transition, { name: "f-dialog-fade" }, {
4508
+ vue.createVNode(vue.Transition, { name: "dialog-fade" }, {
4527
4509
  default: vue.withCtx(() => [
4528
4510
  visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4529
4511
  key: 0,
4530
4512
  class: "f-dialog-overlay",
4531
4513
  onClick: handleOverlayClick
4532
4514
  }, [
4533
- vue.createVNode(vue.Transition, { name: "f-dialog-zoom" }, {
4515
+ vue.createVNode(vue.Transition, { name: "dialog" }, {
4534
4516
  default: vue.withCtx(() => [
4535
4517
  visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4536
4518
  key: 0,
4537
- class: vue.normalizeClass(["f-dialog", [
4538
- `f-dialog--${_ctx.type}`,
4539
- {
4540
- "is-center": _ctx.center,
4541
- "is-fullscreen": _ctx.fullscreen
4542
- }
4543
- ]]),
4544
- style: vue.normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
4519
+ class: vue.normalizeClass(["f-dialog", `f-dialog--${_ctx.type}`])
4545
4520
  }, [
4546
- _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
4547
- key: 0,
4548
- type: "button",
4549
- class: "f-dialog__close",
4550
- onClick: handleClose
4551
- }, [
4552
- vue.createVNode(FIcon, null, {
4553
- default: vue.withCtx(() => [
4554
- vue.createVNode(vue.unref(ionicons5.CloseOutline))
4555
- ]),
4556
- _: 1
4557
- })
4558
- ])) : vue.createCommentVNode("", true),
4559
- _ctx.$slots.header || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
4560
- key: 1,
4561
- class: vue.normalizeClass(["f-dialog__header", { "has-icon": vue.unref(hasIcon) }])
4562
- }, [
4521
+ _ctx.$slots.header || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
4563
4522
  vue.renderSlot(_ctx.$slots, "header", {}, () => [
4564
- vue.unref(hasIcon) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
4523
+ vue.createElementVNode("div", _hoisted_2$1, [
4565
4524
  vue.createVNode(FIcon, null, {
4566
4525
  default: vue.withCtx(() => [
4567
4526
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(iconMap[_ctx.type])))
4568
4527
  ]),
4569
4528
  _: 1
4570
4529
  })
4571
- ])) : vue.createCommentVNode("", true),
4572
- vue.createElementVNode("h3", _hoisted_2$1, vue.toDisplayString(_ctx.title), 1)
4573
- ], true)
4574
- ], 2)) : vue.createCommentVNode("", true),
4575
- vue.createElementVNode("div", _hoisted_3$1, [
4530
+ ]),
4531
+ vue.createElementVNode("h3", _hoisted_3$1, vue.toDisplayString(_ctx.title), 1)
4532
+ ])
4533
+ ])) : vue.createCommentVNode("", true),
4534
+ vue.createElementVNode("div", _hoisted_4, [
4576
4535
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
4577
- _ctx.content ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4, vue.toDisplayString(_ctx.content), 1)) : vue.createCommentVNode("", true)
4578
- ], true)
4536
+ _ctx.content ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5, vue.toDisplayString(_ctx.content), 1)) : vue.createCommentVNode("", true)
4537
+ ])
4579
4538
  ]),
4580
- _ctx.$slots.footer || _ctx.showCancel ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
4539
+ vue.createElementVNode("div", _hoisted_6, [
4581
4540
  vue.renderSlot(_ctx.$slots, "footer", {}, () => [
4582
4541
  _ctx.showCancel ? (vue.openBlock(), vue.createBlock(FButton, {
4583
4542
  key: 0,
@@ -4597,9 +4556,9 @@ var __async = (__this, __arguments, generator) => {
4597
4556
  ]),
4598
4557
  _: 1
4599
4558
  })
4600
- ], true)
4601
- ])) : vue.createCommentVNode("", true)
4602
- ], 6)) : vue.createCommentVNode("", true)
4559
+ ])
4560
+ ])
4561
+ ], 2)) : vue.createCommentVNode("", true)
4603
4562
  ]),
4604
4563
  _: 3
4605
4564
  })
@@ -4611,7 +4570,6 @@ var __async = (__this, __arguments, generator) => {
4611
4570
  };
4612
4571
  }
4613
4572
  });
4614
- const FDialogComp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b88b4e96"]]);
4615
4573
  const _hoisted_1$1 = { class: "f-message__content" };
4616
4574
  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
4617
4575
  __name: "FMessage",
@@ -5006,18 +4964,12 @@ var __async = (__this, __arguments, generator) => {
5006
4964
  cleanup();
5007
4965
  resolve(false);
5008
4966
  };
5009
- const handleClose = () => {
5010
- cleanup();
5011
- resolve(false);
5012
- };
5013
4967
  const cleanup = () => {
5014
4968
  visible.value = false;
5015
- setTimeout(() => {
5016
- vue.render(null, container);
5017
- document.body.removeChild(container);
5018
- }, 300);
4969
+ vue.render(null, container);
4970
+ document.body.removeChild(container);
5019
4971
  };
5020
- const vnode = vue.h(FDialogComp, __spreadValues({
4972
+ const vnode = vue.h(_sfc_main$2, __spreadValues({
5021
4973
  modelValue: visible.value,
5022
4974
  "onUpdate:modelValue": (val) => {
5023
4975
  visible.value = val;
@@ -5026,8 +4978,7 @@ var __async = (__this, __arguments, generator) => {
5026
4978
  }
5027
4979
  },
5028
4980
  onConfirm: handleConfirm,
5029
- onCancel: handleCancel,
5030
- onClose: handleClose
4981
+ onCancel: handleCancel
5031
4982
  }, options));
5032
4983
  vue.render(vnode, container);
5033
4984
  });
@@ -5036,9 +4987,8 @@ var __async = (__this, __arguments, generator) => {
5036
4987
  return showDialog({
5037
4988
  title,
5038
4989
  content,
5039
- type: "warning",
5040
- showCancel: true,
5041
- center: true
4990
+ type: "confirm",
4991
+ showCancel: true
5042
4992
  });
5043
4993
  };
5044
4994
  const alert = (content, title = "提示", type = "info") => {
@@ -5047,8 +4997,7 @@ var __async = (__this, __arguments, generator) => {
5047
4997
  content,
5048
4998
  type,
5049
4999
  showCancel: false,
5050
- confirmText: "知道了",
5051
- center: true
5000
+ confirmText: "知道了"
5052
5001
  });
5053
5002
  };
5054
5003
  const success = (content, title = "成功") => {
@@ -5057,8 +5006,8 @@ var __async = (__this, __arguments, generator) => {
5057
5006
  const warning = (content, title = "警告") => {
5058
5007
  return alert(content, title, "warning");
5059
5008
  };
5060
- const failed = (content, title = "错误") => {
5061
- return alert(content, title, "failed");
5009
+ const error = (content, title = "错误") => {
5010
+ return alert(content, title, "error");
5062
5011
  };
5063
5012
  const info = (content, title = "提示") => {
5064
5013
  return alert(content, title, "info");
@@ -5071,7 +5020,7 @@ var __async = (__this, __arguments, generator) => {
5071
5020
  FDialog.alert = alert;
5072
5021
  FDialog.success = success;
5073
5022
  FDialog.warning = warning;
5074
- FDialog.failed = failed;
5023
+ FDialog.error = error;
5075
5024
  FDialog.info = info;
5076
5025
  const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5077
5026
  __proto__: null,
@@ -5090,7 +5039,7 @@ var __async = (__this, __arguments, generator) => {
5090
5039
  FColorPicker: _sfc_main$b,
5091
5040
  FContainer,
5092
5041
  FDialog,
5093
- FDialogComponent: FDialogComp,
5042
+ FDialogComponent: _sfc_main$2,
5094
5043
  FDivider,
5095
5044
  FDropdown,
5096
5045
  FEditor,
@@ -5152,7 +5101,7 @@ var __async = (__this, __arguments, generator) => {
5152
5101
  exports2.FColorPicker = _sfc_main$b;
5153
5102
  exports2.FContainer = FContainer;
5154
5103
  exports2.FDialog = FDialog;
5155
- exports2.FDialogComponent = FDialogComp;
5104
+ exports2.FDialogComponent = _sfc_main$2;
5156
5105
  exports2.FDivider = FDivider;
5157
5106
  exports2.FDropdown = FDropdown;
5158
5107
  exports2.FEditor = FEditor;
@@ -1,41 +1,34 @@
1
1
  import type { FDialogProps } from '@/types/components';
2
+ import '@/styles/components/f-dialog.scss';
2
3
  type __VLS_Props = FDialogProps;
3
4
  type __VLS_PublicProps = __VLS_Props & {
4
5
  modelValue: boolean;
5
6
  };
6
- declare var __VLS_20: {}, __VLS_29: {}, __VLS_31: {};
7
+ declare var __VLS_13: {}, __VLS_22: {}, __VLS_24: {};
7
8
  type __VLS_Slots = {} & {
8
- header?: (props: typeof __VLS_20) => any;
9
+ header?: (props: typeof __VLS_13) => any;
9
10
  } & {
10
- default?: (props: typeof __VLS_29) => any;
11
+ default?: (props: typeof __VLS_22) => any;
11
12
  } & {
12
- footer?: (props: typeof __VLS_31) => any;
13
+ footer?: (props: typeof __VLS_24) => any;
13
14
  };
14
15
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ confirm: () => any;
15
17
  "update:modelValue": (value: boolean) => any;
16
18
  cancel: () => any;
17
- close: () => any;
18
- confirm: () => any;
19
- open: () => any;
20
19
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
20
+ onConfirm?: () => any;
21
21
  "onUpdate:modelValue"?: (value: boolean) => any;
22
22
  onCancel?: () => any;
23
- onClose?: () => any;
24
- onConfirm?: () => any;
25
- onOpen?: () => any;
26
23
  }>, {
27
- center: boolean;
28
- width: string;
29
- type: import("@/types/components").Type;
24
+ type: import("@/types/components").FDialogType;
30
25
  title: string;
26
+ content: string;
31
27
  confirmText: string;
32
28
  cancelText: string;
33
29
  showCancel: boolean;
34
- showClose: boolean;
35
- closeOnClickModal: boolean;
30
+ closeOnClickOutside: boolean;
36
31
  closeOnEsc: boolean;
37
- fullscreen: boolean;
38
- destroyOnClose: boolean;
39
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
33
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
41
34
  export default _default;
@@ -1,4 +1,7 @@
1
- import type { Type } from "./base";
1
+ /**
2
+ * FDialog 对话框类型
3
+ */
4
+ type FDialogType = 'info' | 'success' | 'warning' | 'error' | 'confirm';
2
5
  /**
3
6
  * FDialog 组件属性
4
7
  */
@@ -7,39 +10,23 @@ interface FDialogProps {
7
10
  title?: string;
8
11
  /** 内容文本 */
9
12
  content?: string;
10
- /** 对话框宽度 */
11
- width?: string;
12
13
  /** 对话框类型 */
13
- type?: Type;
14
+ type?: FDialogType;
14
15
  /** 确认按钮文本 */
15
16
  confirmText?: string;
16
17
  /** 取消按钮文本 */
17
18
  cancelText?: string;
18
19
  /** 是否显示取消按钮 */
19
20
  showCancel?: boolean;
20
- /** 是否显示关闭按钮 */
21
- showClose?: boolean;
22
21
  /** 点击遮罩是否关闭 */
23
- closeOnClickModal?: boolean;
22
+ closeOnClickOutside?: boolean;
24
23
  /** 按 ESC 是否关闭 */
25
24
  closeOnEsc?: boolean;
26
- /** 是否居中布局 */
27
- center?: boolean;
28
- /** 是否全屏显示 */
29
- fullscreen?: boolean;
30
- /** 关闭时销毁内容 */
31
- destroyOnClose?: boolean;
32
- /** 关闭前的回调 */
33
- beforeClose?: (done: () => void) => void;
34
25
  }
35
26
  /**
36
27
  * FDialog 组件事件
37
28
  */
38
29
  interface FDialogEmits {
39
- /** 打开事件 */
40
- open: [];
41
- /** 关闭事件 */
42
- close: [];
43
30
  /** 确认事件 */
44
31
  confirm: [];
45
32
  /** 取消事件 */
@@ -48,22 +35,18 @@ interface FDialogEmits {
48
35
  interface FDialogOptions {
49
36
  title?: string;
50
37
  content?: string;
51
- width?: string;
52
- type?: Type;
38
+ type?: FDialogType;
53
39
  confirmText?: string;
54
40
  cancelText?: string;
55
41
  showCancel?: boolean;
56
- showClose?: boolean;
57
- center?: boolean;
58
- beforeClose?: (done: () => void) => void;
59
42
  }
60
43
  type FDialogFn = ((options: FDialogOptions) => Promise<boolean>) & {
61
44
  showDialog: (options: FDialogOptions) => Promise<boolean>;
62
45
  confirm: (content: string, title?: string) => Promise<boolean>;
63
- alert: (content: string, title?: string, type?: Type) => Promise<boolean>;
46
+ alert: (content: string, title?: string, type?: FDialogType) => Promise<boolean>;
64
47
  success: (content: string, title?: string) => Promise<boolean>;
65
48
  warning: (content: string, title?: string) => Promise<boolean>;
66
- failed: (content: string, title?: string) => Promise<boolean>;
49
+ error: (content: string, title?: string) => Promise<boolean>;
67
50
  info: (content: string, title?: string) => Promise<boolean>;
68
51
  };
69
- export type { FDialogProps, FDialogEmits, FDialogOptions, FDialogFn };
52
+ export type { FDialogProps, FDialogEmits, FDialogOptions, FDialogFn, FDialogType };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fantasia-ui",
3
3
  "private": false,
4
- "version": "0.2.49",
4
+ "version": "0.2.50",
5
5
  "type": "module",
6
6
  "main": "dist/fantasia-ui.umd.js",
7
7
  "module": "dist/fantasia-ui.es.js",