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.umd.js
CHANGED
|
@@ -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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
4461
|
-
|
|
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(["
|
|
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("
|
|
4470
|
+
emit("cancel");
|
|
4479
4471
|
};
|
|
4480
4472
|
const handleConfirm = () => {
|
|
4481
4473
|
emit("confirm");
|
|
4482
|
-
|
|
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.
|
|
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
|
-
|
|
4520
|
-
|
|
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: "
|
|
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: "
|
|
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.
|
|
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.
|
|
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
|
-
])
|
|
4572
|
-
vue.createElementVNode("h3",
|
|
4573
|
-
]
|
|
4574
|
-
]
|
|
4575
|
-
vue.createElementVNode("div",
|
|
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",
|
|
4578
|
-
]
|
|
4536
|
+
_ctx.content ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5, vue.toDisplayString(_ctx.content), 1)) : vue.createCommentVNode("", true)
|
|
4537
|
+
])
|
|
4579
4538
|
]),
|
|
4580
|
-
|
|
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
|
-
]
|
|
4601
|
-
])
|
|
4602
|
-
],
|
|
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",
|
|
@@ -4833,6 +4791,77 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4833
4791
|
}
|
|
4834
4792
|
});
|
|
4835
4793
|
const FNotificationComp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0a7315d6"]]);
|
|
4794
|
+
const showDialog = (options) => {
|
|
4795
|
+
return new Promise((resolve) => {
|
|
4796
|
+
const container = document.createElement("div");
|
|
4797
|
+
document.body.appendChild(container);
|
|
4798
|
+
const visible = vue.ref(true);
|
|
4799
|
+
const handleConfirm = () => {
|
|
4800
|
+
cleanup();
|
|
4801
|
+
resolve(true);
|
|
4802
|
+
};
|
|
4803
|
+
const handleCancel = () => {
|
|
4804
|
+
cleanup();
|
|
4805
|
+
resolve(false);
|
|
4806
|
+
};
|
|
4807
|
+
const cleanup = () => {
|
|
4808
|
+
visible.value = false;
|
|
4809
|
+
vue.render(null, container);
|
|
4810
|
+
document.body.removeChild(container);
|
|
4811
|
+
};
|
|
4812
|
+
const vnode = vue.h(_sfc_main$2, __spreadValues({
|
|
4813
|
+
modelValue: visible.value,
|
|
4814
|
+
"onUpdate:modelValue": (val) => {
|
|
4815
|
+
visible.value = val;
|
|
4816
|
+
if (!val) {
|
|
4817
|
+
cleanup();
|
|
4818
|
+
}
|
|
4819
|
+
},
|
|
4820
|
+
onConfirm: handleConfirm,
|
|
4821
|
+
onCancel: handleCancel
|
|
4822
|
+
}, options));
|
|
4823
|
+
vue.render(vnode, container);
|
|
4824
|
+
});
|
|
4825
|
+
};
|
|
4826
|
+
const confirm = (content, title = "确认") => {
|
|
4827
|
+
return showDialog({
|
|
4828
|
+
title,
|
|
4829
|
+
content,
|
|
4830
|
+
type: "confirm",
|
|
4831
|
+
showCancel: true
|
|
4832
|
+
});
|
|
4833
|
+
};
|
|
4834
|
+
const alert = (content, title = "提示", type = "info") => {
|
|
4835
|
+
return showDialog({
|
|
4836
|
+
title,
|
|
4837
|
+
content,
|
|
4838
|
+
type,
|
|
4839
|
+
showCancel: false,
|
|
4840
|
+
confirmText: "知道了"
|
|
4841
|
+
});
|
|
4842
|
+
};
|
|
4843
|
+
const success = (content, title = "成功") => {
|
|
4844
|
+
return alert(content, title, "success");
|
|
4845
|
+
};
|
|
4846
|
+
const warning = (content, title = "警告") => {
|
|
4847
|
+
return alert(content, title, "warning");
|
|
4848
|
+
};
|
|
4849
|
+
const error = (content, title = "错误") => {
|
|
4850
|
+
return alert(content, title, "error");
|
|
4851
|
+
};
|
|
4852
|
+
const info = (content, title = "提示") => {
|
|
4853
|
+
return alert(content, title, "info");
|
|
4854
|
+
};
|
|
4855
|
+
const FDialog = (options) => {
|
|
4856
|
+
return showDialog(options);
|
|
4857
|
+
};
|
|
4858
|
+
FDialog.showDialog = showDialog;
|
|
4859
|
+
FDialog.confirm = confirm;
|
|
4860
|
+
FDialog.alert = alert;
|
|
4861
|
+
FDialog.success = success;
|
|
4862
|
+
FDialog.warning = warning;
|
|
4863
|
+
FDialog.error = error;
|
|
4864
|
+
FDialog.info = info;
|
|
4836
4865
|
const GAP$1 = 16;
|
|
4837
4866
|
const BASE_OFFSET$1 = 20;
|
|
4838
4867
|
let seed$1 = 0;
|
|
@@ -4993,86 +5022,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4993
5022
|
});
|
|
4994
5023
|
});
|
|
4995
5024
|
};
|
|
4996
|
-
const showDialog = (options) => {
|
|
4997
|
-
return new Promise((resolve) => {
|
|
4998
|
-
const container = document.createElement("div");
|
|
4999
|
-
document.body.appendChild(container);
|
|
5000
|
-
const visible = vue.ref(true);
|
|
5001
|
-
const handleConfirm = () => {
|
|
5002
|
-
cleanup();
|
|
5003
|
-
resolve(true);
|
|
5004
|
-
};
|
|
5005
|
-
const handleCancel = () => {
|
|
5006
|
-
cleanup();
|
|
5007
|
-
resolve(false);
|
|
5008
|
-
};
|
|
5009
|
-
const handleClose = () => {
|
|
5010
|
-
cleanup();
|
|
5011
|
-
resolve(false);
|
|
5012
|
-
};
|
|
5013
|
-
const cleanup = () => {
|
|
5014
|
-
visible.value = false;
|
|
5015
|
-
setTimeout(() => {
|
|
5016
|
-
vue.render(null, container);
|
|
5017
|
-
document.body.removeChild(container);
|
|
5018
|
-
}, 300);
|
|
5019
|
-
};
|
|
5020
|
-
const vnode = vue.h(FDialogComp, __spreadValues({
|
|
5021
|
-
modelValue: visible.value,
|
|
5022
|
-
"onUpdate:modelValue": (val) => {
|
|
5023
|
-
visible.value = val;
|
|
5024
|
-
if (!val) {
|
|
5025
|
-
cleanup();
|
|
5026
|
-
}
|
|
5027
|
-
},
|
|
5028
|
-
onConfirm: handleConfirm,
|
|
5029
|
-
onCancel: handleCancel,
|
|
5030
|
-
onClose: handleClose
|
|
5031
|
-
}, options));
|
|
5032
|
-
vue.render(vnode, container);
|
|
5033
|
-
});
|
|
5034
|
-
};
|
|
5035
|
-
const confirm = (content, title = "确认") => {
|
|
5036
|
-
return showDialog({
|
|
5037
|
-
title,
|
|
5038
|
-
content,
|
|
5039
|
-
type: "warning",
|
|
5040
|
-
showCancel: true,
|
|
5041
|
-
center: true
|
|
5042
|
-
});
|
|
5043
|
-
};
|
|
5044
|
-
const alert = (content, title = "提示", type = "info") => {
|
|
5045
|
-
return showDialog({
|
|
5046
|
-
title,
|
|
5047
|
-
content,
|
|
5048
|
-
type,
|
|
5049
|
-
showCancel: false,
|
|
5050
|
-
confirmText: "知道了",
|
|
5051
|
-
center: true
|
|
5052
|
-
});
|
|
5053
|
-
};
|
|
5054
|
-
const success = (content, title = "成功") => {
|
|
5055
|
-
return alert(content, title, "success");
|
|
5056
|
-
};
|
|
5057
|
-
const warning = (content, title = "警告") => {
|
|
5058
|
-
return alert(content, title, "warning");
|
|
5059
|
-
};
|
|
5060
|
-
const failed = (content, title = "错误") => {
|
|
5061
|
-
return alert(content, title, "failed");
|
|
5062
|
-
};
|
|
5063
|
-
const info = (content, title = "提示") => {
|
|
5064
|
-
return alert(content, title, "info");
|
|
5065
|
-
};
|
|
5066
|
-
const FDialog = (options) => {
|
|
5067
|
-
return showDialog(options);
|
|
5068
|
-
};
|
|
5069
|
-
FDialog.showDialog = showDialog;
|
|
5070
|
-
FDialog.confirm = confirm;
|
|
5071
|
-
FDialog.alert = alert;
|
|
5072
|
-
FDialog.success = success;
|
|
5073
|
-
FDialog.warning = warning;
|
|
5074
|
-
FDialog.failed = failed;
|
|
5075
|
-
FDialog.info = info;
|
|
5076
5025
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5077
5026
|
__proto__: null,
|
|
5078
5027
|
FAffix,
|
|
@@ -5089,8 +5038,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5089
5038
|
FCollapseItem: _sfc_main$c,
|
|
5090
5039
|
FColorPicker: _sfc_main$b,
|
|
5091
5040
|
FContainer,
|
|
5092
|
-
FDialog,
|
|
5093
|
-
|
|
5041
|
+
FDialog: _sfc_main$2,
|
|
5042
|
+
FDialogAPI: FDialog,
|
|
5094
5043
|
FDivider,
|
|
5095
5044
|
FDropdown,
|
|
5096
5045
|
FEditor,
|
|
@@ -5105,10 +5054,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5105
5054
|
FLoading,
|
|
5106
5055
|
FMarquee,
|
|
5107
5056
|
FMask,
|
|
5108
|
-
FMessage,
|
|
5109
|
-
|
|
5110
|
-
FNotification,
|
|
5111
|
-
|
|
5057
|
+
FMessage: FMessageComp,
|
|
5058
|
+
FMessageAPI: FMessage,
|
|
5059
|
+
FNotification: FNotificationComp,
|
|
5060
|
+
FNotificationAPI: FNotification,
|
|
5112
5061
|
FPagination,
|
|
5113
5062
|
FProgress,
|
|
5114
5063
|
FRadio,
|
|
@@ -5130,11 +5079,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5130
5079
|
FTransfer,
|
|
5131
5080
|
FTreeSelect,
|
|
5132
5081
|
FTypography,
|
|
5133
|
-
FUpload
|
|
5082
|
+
FUpload,
|
|
5083
|
+
dialog: FDialog,
|
|
5084
|
+
message: FMessage,
|
|
5085
|
+
notification: FNotification
|
|
5134
5086
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5135
5087
|
const install = (app) => {
|
|
5136
5088
|
Object.entries(components).forEach(([name, component]) => {
|
|
5137
|
-
|
|
5089
|
+
if (typeof component !== "function" && name.startsWith("F")) {
|
|
5090
|
+
app.component(name, component);
|
|
5091
|
+
}
|
|
5138
5092
|
});
|
|
5139
5093
|
};
|
|
5140
5094
|
exports2.FAffix = FAffix;
|
|
@@ -5151,8 +5105,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5151
5105
|
exports2.FCollapseItem = _sfc_main$c;
|
|
5152
5106
|
exports2.FColorPicker = _sfc_main$b;
|
|
5153
5107
|
exports2.FContainer = FContainer;
|
|
5154
|
-
exports2.FDialog =
|
|
5155
|
-
exports2.
|
|
5108
|
+
exports2.FDialog = _sfc_main$2;
|
|
5109
|
+
exports2.FDialogAPI = FDialog;
|
|
5156
5110
|
exports2.FDivider = FDivider;
|
|
5157
5111
|
exports2.FDropdown = FDropdown;
|
|
5158
5112
|
exports2.FEditor = FEditor;
|
|
@@ -5167,10 +5121,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5167
5121
|
exports2.FLoading = FLoading;
|
|
5168
5122
|
exports2.FMarquee = FMarquee;
|
|
5169
5123
|
exports2.FMask = FMask;
|
|
5170
|
-
exports2.FMessage =
|
|
5171
|
-
exports2.
|
|
5172
|
-
exports2.FNotification =
|
|
5173
|
-
exports2.
|
|
5124
|
+
exports2.FMessage = FMessageComp;
|
|
5125
|
+
exports2.FMessageAPI = FMessage;
|
|
5126
|
+
exports2.FNotification = FNotificationComp;
|
|
5127
|
+
exports2.FNotificationAPI = FNotification;
|
|
5174
5128
|
exports2.FPagination = FPagination;
|
|
5175
5129
|
exports2.FProgress = FProgress;
|
|
5176
5130
|
exports2.FRadio = FRadio;
|
|
@@ -5194,5 +5148,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5194
5148
|
exports2.FTypography = FTypography;
|
|
5195
5149
|
exports2.FUpload = FUpload;
|
|
5196
5150
|
exports2.default = install;
|
|
5151
|
+
exports2.dialog = FDialog;
|
|
5152
|
+
exports2.message = FMessage;
|
|
5153
|
+
exports2.notification = FNotification;
|
|
5197
5154
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
5198
5155
|
});
|
package/dist/types/global.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare module '@vue/runtime-core' {
|
|
|
20
20
|
FTransfer: typeof components.FTransfer
|
|
21
21
|
FCol: typeof components.FCol
|
|
22
22
|
FContainer: typeof components.FContainer
|
|
23
|
-
FDialog: typeof components.
|
|
23
|
+
FDialog: typeof components.FDialog
|
|
24
24
|
FDivider: typeof components.FDivider
|
|
25
25
|
FDropdown: typeof components.FDropdown
|
|
26
26
|
FEditor: typeof components.FEditor
|
|
@@ -55,8 +55,8 @@ declare module '@vue/runtime-core' {
|
|
|
55
55
|
FMask: typeof components.FMask
|
|
56
56
|
FMarquee: typeof components.FMarquee
|
|
57
57
|
FSteps: typeof components.FSteps
|
|
58
|
-
FMessage: typeof components.
|
|
59
|
-
FNotification: typeof components.
|
|
58
|
+
FMessage: typeof components.FMessage
|
|
59
|
+
FNotification: typeof components.FNotification
|
|
60
60
|
FResult: typeof components.FResult
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -48,15 +48,18 @@ export { default as FResult } from './modules/FResult.vue';
|
|
|
48
48
|
export { default as FMask } from './modules/FMask.vue';
|
|
49
49
|
export { default as FMarquee } from './modules/FMarquee.vue';
|
|
50
50
|
export { default as FSteps } from './modules/FSteps.vue';
|
|
51
|
-
export { default as
|
|
52
|
-
export { default as
|
|
53
|
-
export { default as
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
export {
|
|
58
|
-
export {
|
|
59
|
-
export {
|
|
51
|
+
export { default as FDialog } from './modules/FDialog.vue';
|
|
52
|
+
export { default as FMessage } from './modules/FMessage.vue';
|
|
53
|
+
export { default as FNotification } from './modules/FNotification.vue';
|
|
54
|
+
import FDialogAPI from '../composables/FDialog.js';
|
|
55
|
+
import FMessageAPI from '../composables/FMessage.js';
|
|
56
|
+
import FNotificationAPI from '../composables/FNotification.js';
|
|
57
|
+
export { FDialogAPI as dialog };
|
|
58
|
+
export { FMessageAPI as message };
|
|
59
|
+
export { FNotificationAPI as notification };
|
|
60
|
+
export { FDialogAPI };
|
|
61
|
+
export { FMessageAPI };
|
|
62
|
+
export { FNotificationAPI };
|
|
60
63
|
export type { FMessageFn, FMessageOptions, FMessageInstance } from '@/types';
|
|
61
64
|
export type { FNotificationFn, FNotificationOptions, FNotificationInstance } from '@/types';
|
|
62
65
|
export type { FDialogFn, FDialogOptions } from '@/types';
|