fantasia-ui 0.2.49 → 0.2.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fantasia-ui.css +38 -76
- package/dist/fantasia-ui.es.js +146 -189
- package/dist/fantasia-ui.umd.js +143 -186
- package/dist/types/global.d.ts +3 -3
- package/dist/types/packages/components/index.d.ts +12 -9
- package/dist/types/packages/components/modules/FDialog.vue.d.ts +10 -17
- package/dist/types/packages/composables/FDialog.d.ts +18 -0
- package/dist/types/packages/composables/FMessage.d.ts +19 -0
- package/dist/types/packages/composables/FNotification.d.ts +19 -0
- package/dist/types/packages/index.d.ts +2 -1
- package/dist/types/packages/types/components/modules/f-dialog.d.ts +10 -27
- package/dist/types/volar.d.ts +3 -3
- package/package.json +1 -3
package/dist/fantasia-ui.es.js
CHANGED
|
@@ -37,8 +37,8 @@ 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, inject, createBlock, resolveDynamicComponent, nextTick, onUnmounted, Teleport, withModifiers, withKeys, isRef, vModelText, createTextVNode, TransitionGroup, useSlots, provide, onMounted, readonly, onBeforeUnmount, reactive, toRefs, createStaticVNode,
|
|
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,
|
|
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, h, render } 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, 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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
4460
|
-
|
|
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(["
|
|
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("
|
|
4469
|
+
emit("cancel");
|
|
4478
4470
|
};
|
|
4479
4471
|
const handleConfirm = () => {
|
|
4480
4472
|
emit("confirm");
|
|
4481
|
-
|
|
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.
|
|
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
|
-
|
|
4519
|
-
|
|
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: "
|
|
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: "
|
|
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.
|
|
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
|
-
|
|
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
|
-
])
|
|
4571
|
-
createElementVNode("h3",
|
|
4572
|
-
]
|
|
4573
|
-
]
|
|
4574
|
-
createElementVNode("div",
|
|
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",
|
|
4577
|
-
]
|
|
4535
|
+
_ctx.content ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
|
|
4536
|
+
])
|
|
4578
4537
|
]),
|
|
4579
|
-
|
|
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
|
-
]
|
|
4600
|
-
])
|
|
4601
|
-
],
|
|
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",
|
|
@@ -4832,6 +4790,77 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4832
4790
|
}
|
|
4833
4791
|
});
|
|
4834
4792
|
const FNotificationComp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0a7315d6"]]);
|
|
4793
|
+
const showDialog = (options) => {
|
|
4794
|
+
return new Promise((resolve) => {
|
|
4795
|
+
const container = document.createElement("div");
|
|
4796
|
+
document.body.appendChild(container);
|
|
4797
|
+
const visible = ref(true);
|
|
4798
|
+
const handleConfirm = () => {
|
|
4799
|
+
cleanup();
|
|
4800
|
+
resolve(true);
|
|
4801
|
+
};
|
|
4802
|
+
const handleCancel = () => {
|
|
4803
|
+
cleanup();
|
|
4804
|
+
resolve(false);
|
|
4805
|
+
};
|
|
4806
|
+
const cleanup = () => {
|
|
4807
|
+
visible.value = false;
|
|
4808
|
+
render(null, container);
|
|
4809
|
+
document.body.removeChild(container);
|
|
4810
|
+
};
|
|
4811
|
+
const vnode = h(_sfc_main$2, __spreadValues({
|
|
4812
|
+
modelValue: visible.value,
|
|
4813
|
+
"onUpdate:modelValue": (val) => {
|
|
4814
|
+
visible.value = val;
|
|
4815
|
+
if (!val) {
|
|
4816
|
+
cleanup();
|
|
4817
|
+
}
|
|
4818
|
+
},
|
|
4819
|
+
onConfirm: handleConfirm,
|
|
4820
|
+
onCancel: handleCancel
|
|
4821
|
+
}, options));
|
|
4822
|
+
render(vnode, container);
|
|
4823
|
+
});
|
|
4824
|
+
};
|
|
4825
|
+
const confirm = (content, title = "确认") => {
|
|
4826
|
+
return showDialog({
|
|
4827
|
+
title,
|
|
4828
|
+
content,
|
|
4829
|
+
type: "confirm",
|
|
4830
|
+
showCancel: true
|
|
4831
|
+
});
|
|
4832
|
+
};
|
|
4833
|
+
const alert = (content, title = "提示", type = "info") => {
|
|
4834
|
+
return showDialog({
|
|
4835
|
+
title,
|
|
4836
|
+
content,
|
|
4837
|
+
type,
|
|
4838
|
+
showCancel: false,
|
|
4839
|
+
confirmText: "知道了"
|
|
4840
|
+
});
|
|
4841
|
+
};
|
|
4842
|
+
const success = (content, title = "成功") => {
|
|
4843
|
+
return alert(content, title, "success");
|
|
4844
|
+
};
|
|
4845
|
+
const warning = (content, title = "警告") => {
|
|
4846
|
+
return alert(content, title, "warning");
|
|
4847
|
+
};
|
|
4848
|
+
const error = (content, title = "错误") => {
|
|
4849
|
+
return alert(content, title, "error");
|
|
4850
|
+
};
|
|
4851
|
+
const info = (content, title = "提示") => {
|
|
4852
|
+
return alert(content, title, "info");
|
|
4853
|
+
};
|
|
4854
|
+
const FDialog = (options) => {
|
|
4855
|
+
return showDialog(options);
|
|
4856
|
+
};
|
|
4857
|
+
FDialog.showDialog = showDialog;
|
|
4858
|
+
FDialog.confirm = confirm;
|
|
4859
|
+
FDialog.alert = alert;
|
|
4860
|
+
FDialog.success = success;
|
|
4861
|
+
FDialog.warning = warning;
|
|
4862
|
+
FDialog.error = error;
|
|
4863
|
+
FDialog.info = info;
|
|
4835
4864
|
const GAP$1 = 16;
|
|
4836
4865
|
const BASE_OFFSET$1 = 20;
|
|
4837
4866
|
let seed$1 = 0;
|
|
@@ -4992,86 +5021,6 @@ FNotification.closeAll = (position) => {
|
|
|
4992
5021
|
});
|
|
4993
5022
|
});
|
|
4994
5023
|
};
|
|
4995
|
-
const showDialog = (options) => {
|
|
4996
|
-
return new Promise((resolve) => {
|
|
4997
|
-
const container = document.createElement("div");
|
|
4998
|
-
document.body.appendChild(container);
|
|
4999
|
-
const visible = ref(true);
|
|
5000
|
-
const handleConfirm = () => {
|
|
5001
|
-
cleanup();
|
|
5002
|
-
resolve(true);
|
|
5003
|
-
};
|
|
5004
|
-
const handleCancel = () => {
|
|
5005
|
-
cleanup();
|
|
5006
|
-
resolve(false);
|
|
5007
|
-
};
|
|
5008
|
-
const handleClose = () => {
|
|
5009
|
-
cleanup();
|
|
5010
|
-
resolve(false);
|
|
5011
|
-
};
|
|
5012
|
-
const cleanup = () => {
|
|
5013
|
-
visible.value = false;
|
|
5014
|
-
setTimeout(() => {
|
|
5015
|
-
render(null, container);
|
|
5016
|
-
document.body.removeChild(container);
|
|
5017
|
-
}, 300);
|
|
5018
|
-
};
|
|
5019
|
-
const vnode = h(FDialogComp, __spreadValues({
|
|
5020
|
-
modelValue: visible.value,
|
|
5021
|
-
"onUpdate:modelValue": (val) => {
|
|
5022
|
-
visible.value = val;
|
|
5023
|
-
if (!val) {
|
|
5024
|
-
cleanup();
|
|
5025
|
-
}
|
|
5026
|
-
},
|
|
5027
|
-
onConfirm: handleConfirm,
|
|
5028
|
-
onCancel: handleCancel,
|
|
5029
|
-
onClose: handleClose
|
|
5030
|
-
}, options));
|
|
5031
|
-
render(vnode, container);
|
|
5032
|
-
});
|
|
5033
|
-
};
|
|
5034
|
-
const confirm = (content, title = "确认") => {
|
|
5035
|
-
return showDialog({
|
|
5036
|
-
title,
|
|
5037
|
-
content,
|
|
5038
|
-
type: "warning",
|
|
5039
|
-
showCancel: true,
|
|
5040
|
-
center: true
|
|
5041
|
-
});
|
|
5042
|
-
};
|
|
5043
|
-
const alert = (content, title = "提示", type = "info") => {
|
|
5044
|
-
return showDialog({
|
|
5045
|
-
title,
|
|
5046
|
-
content,
|
|
5047
|
-
type,
|
|
5048
|
-
showCancel: false,
|
|
5049
|
-
confirmText: "知道了",
|
|
5050
|
-
center: true
|
|
5051
|
-
});
|
|
5052
|
-
};
|
|
5053
|
-
const success = (content, title = "成功") => {
|
|
5054
|
-
return alert(content, title, "success");
|
|
5055
|
-
};
|
|
5056
|
-
const warning = (content, title = "警告") => {
|
|
5057
|
-
return alert(content, title, "warning");
|
|
5058
|
-
};
|
|
5059
|
-
const failed = (content, title = "错误") => {
|
|
5060
|
-
return alert(content, title, "failed");
|
|
5061
|
-
};
|
|
5062
|
-
const info = (content, title = "提示") => {
|
|
5063
|
-
return alert(content, title, "info");
|
|
5064
|
-
};
|
|
5065
|
-
const FDialog = (options) => {
|
|
5066
|
-
return showDialog(options);
|
|
5067
|
-
};
|
|
5068
|
-
FDialog.showDialog = showDialog;
|
|
5069
|
-
FDialog.confirm = confirm;
|
|
5070
|
-
FDialog.alert = alert;
|
|
5071
|
-
FDialog.success = success;
|
|
5072
|
-
FDialog.warning = warning;
|
|
5073
|
-
FDialog.failed = failed;
|
|
5074
|
-
FDialog.info = info;
|
|
5075
5024
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5076
5025
|
__proto__: null,
|
|
5077
5026
|
FAffix,
|
|
@@ -5088,8 +5037,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
5088
5037
|
FCollapseItem: _sfc_main$c,
|
|
5089
5038
|
FColorPicker: _sfc_main$b,
|
|
5090
5039
|
FContainer,
|
|
5091
|
-
FDialog,
|
|
5092
|
-
|
|
5040
|
+
FDialog: _sfc_main$2,
|
|
5041
|
+
FDialogAPI: FDialog,
|
|
5093
5042
|
FDivider,
|
|
5094
5043
|
FDropdown,
|
|
5095
5044
|
FEditor,
|
|
@@ -5104,10 +5053,10 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
5104
5053
|
FLoading,
|
|
5105
5054
|
FMarquee,
|
|
5106
5055
|
FMask,
|
|
5107
|
-
FMessage,
|
|
5108
|
-
|
|
5109
|
-
FNotification,
|
|
5110
|
-
|
|
5056
|
+
FMessage: FMessageComp,
|
|
5057
|
+
FMessageAPI: FMessage,
|
|
5058
|
+
FNotification: FNotificationComp,
|
|
5059
|
+
FNotificationAPI: FNotification,
|
|
5111
5060
|
FPagination,
|
|
5112
5061
|
FProgress,
|
|
5113
5062
|
FRadio,
|
|
@@ -5129,11 +5078,16 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
5129
5078
|
FTransfer,
|
|
5130
5079
|
FTreeSelect,
|
|
5131
5080
|
FTypography,
|
|
5132
|
-
FUpload
|
|
5081
|
+
FUpload,
|
|
5082
|
+
dialog: FDialog,
|
|
5083
|
+
message: FMessage,
|
|
5084
|
+
notification: FNotification
|
|
5133
5085
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5134
5086
|
const install = (app) => {
|
|
5135
5087
|
Object.entries(components).forEach(([name, component]) => {
|
|
5136
|
-
|
|
5088
|
+
if (typeof component !== "function" && name.startsWith("F")) {
|
|
5089
|
+
app.component(name, component);
|
|
5090
|
+
}
|
|
5137
5091
|
});
|
|
5138
5092
|
};
|
|
5139
5093
|
export {
|
|
@@ -5151,8 +5105,8 @@ export {
|
|
|
5151
5105
|
_sfc_main$c as FCollapseItem,
|
|
5152
5106
|
_sfc_main$b as FColorPicker,
|
|
5153
5107
|
FContainer,
|
|
5154
|
-
FDialog,
|
|
5155
|
-
|
|
5108
|
+
_sfc_main$2 as FDialog,
|
|
5109
|
+
FDialog as FDialogAPI,
|
|
5156
5110
|
FDivider,
|
|
5157
5111
|
FDropdown,
|
|
5158
5112
|
FEditor,
|
|
@@ -5167,10 +5121,10 @@ export {
|
|
|
5167
5121
|
FLoading,
|
|
5168
5122
|
FMarquee,
|
|
5169
5123
|
FMask,
|
|
5170
|
-
FMessage,
|
|
5171
|
-
|
|
5172
|
-
FNotification,
|
|
5173
|
-
|
|
5124
|
+
FMessageComp as FMessage,
|
|
5125
|
+
FMessage as FMessageAPI,
|
|
5126
|
+
FNotificationComp as FNotification,
|
|
5127
|
+
FNotification as FNotificationAPI,
|
|
5174
5128
|
FPagination,
|
|
5175
5129
|
FProgress,
|
|
5176
5130
|
FRadio,
|
|
@@ -5193,5 +5147,8 @@ export {
|
|
|
5193
5147
|
FTreeSelect,
|
|
5194
5148
|
FTypography,
|
|
5195
5149
|
FUpload,
|
|
5196
|
-
install as default
|
|
5150
|
+
install as default,
|
|
5151
|
+
FDialog as dialog,
|
|
5152
|
+
FMessage as message,
|
|
5153
|
+
FNotification as notification
|
|
5197
5154
|
};
|