fantasia-ui 0.2.50 → 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.es.js +95 -87
- package/dist/fantasia-ui.umd.js +93 -85
- package/dist/types/global.d.ts +3 -3
- package/dist/types/packages/components/index.d.ts +12 -9
- 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/volar.d.ts +3 -3
- package/package.json +1 -3
package/dist/fantasia-ui.es.js
CHANGED
|
@@ -37,7 +37,7 @@ 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,
|
|
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
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({
|
|
@@ -4790,6 +4790,77 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4790
4790
|
}
|
|
4791
4791
|
});
|
|
4792
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;
|
|
4793
4864
|
const GAP$1 = 16;
|
|
4794
4865
|
const BASE_OFFSET$1 = 20;
|
|
4795
4866
|
let seed$1 = 0;
|
|
@@ -4950,77 +5021,6 @@ FNotification.closeAll = (position) => {
|
|
|
4950
5021
|
});
|
|
4951
5022
|
});
|
|
4952
5023
|
};
|
|
4953
|
-
const showDialog = (options) => {
|
|
4954
|
-
return new Promise((resolve) => {
|
|
4955
|
-
const container = document.createElement("div");
|
|
4956
|
-
document.body.appendChild(container);
|
|
4957
|
-
const visible = ref(true);
|
|
4958
|
-
const handleConfirm = () => {
|
|
4959
|
-
cleanup();
|
|
4960
|
-
resolve(true);
|
|
4961
|
-
};
|
|
4962
|
-
const handleCancel = () => {
|
|
4963
|
-
cleanup();
|
|
4964
|
-
resolve(false);
|
|
4965
|
-
};
|
|
4966
|
-
const cleanup = () => {
|
|
4967
|
-
visible.value = false;
|
|
4968
|
-
render(null, container);
|
|
4969
|
-
document.body.removeChild(container);
|
|
4970
|
-
};
|
|
4971
|
-
const vnode = h(_sfc_main$2, __spreadValues({
|
|
4972
|
-
modelValue: visible.value,
|
|
4973
|
-
"onUpdate:modelValue": (val) => {
|
|
4974
|
-
visible.value = val;
|
|
4975
|
-
if (!val) {
|
|
4976
|
-
cleanup();
|
|
4977
|
-
}
|
|
4978
|
-
},
|
|
4979
|
-
onConfirm: handleConfirm,
|
|
4980
|
-
onCancel: handleCancel
|
|
4981
|
-
}, options));
|
|
4982
|
-
render(vnode, container);
|
|
4983
|
-
});
|
|
4984
|
-
};
|
|
4985
|
-
const confirm = (content, title = "确认") => {
|
|
4986
|
-
return showDialog({
|
|
4987
|
-
title,
|
|
4988
|
-
content,
|
|
4989
|
-
type: "confirm",
|
|
4990
|
-
showCancel: true
|
|
4991
|
-
});
|
|
4992
|
-
};
|
|
4993
|
-
const alert = (content, title = "提示", type = "info") => {
|
|
4994
|
-
return showDialog({
|
|
4995
|
-
title,
|
|
4996
|
-
content,
|
|
4997
|
-
type,
|
|
4998
|
-
showCancel: false,
|
|
4999
|
-
confirmText: "知道了"
|
|
5000
|
-
});
|
|
5001
|
-
};
|
|
5002
|
-
const success = (content, title = "成功") => {
|
|
5003
|
-
return alert(content, title, "success");
|
|
5004
|
-
};
|
|
5005
|
-
const warning = (content, title = "警告") => {
|
|
5006
|
-
return alert(content, title, "warning");
|
|
5007
|
-
};
|
|
5008
|
-
const error = (content, title = "错误") => {
|
|
5009
|
-
return alert(content, title, "error");
|
|
5010
|
-
};
|
|
5011
|
-
const info = (content, title = "提示") => {
|
|
5012
|
-
return alert(content, title, "info");
|
|
5013
|
-
};
|
|
5014
|
-
const FDialog = (options) => {
|
|
5015
|
-
return showDialog(options);
|
|
5016
|
-
};
|
|
5017
|
-
FDialog.showDialog = showDialog;
|
|
5018
|
-
FDialog.confirm = confirm;
|
|
5019
|
-
FDialog.alert = alert;
|
|
5020
|
-
FDialog.success = success;
|
|
5021
|
-
FDialog.warning = warning;
|
|
5022
|
-
FDialog.error = error;
|
|
5023
|
-
FDialog.info = info;
|
|
5024
5024
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5025
5025
|
__proto__: null,
|
|
5026
5026
|
FAffix,
|
|
@@ -5037,8 +5037,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
5037
5037
|
FCollapseItem: _sfc_main$c,
|
|
5038
5038
|
FColorPicker: _sfc_main$b,
|
|
5039
5039
|
FContainer,
|
|
5040
|
-
FDialog,
|
|
5041
|
-
|
|
5040
|
+
FDialog: _sfc_main$2,
|
|
5041
|
+
FDialogAPI: FDialog,
|
|
5042
5042
|
FDivider,
|
|
5043
5043
|
FDropdown,
|
|
5044
5044
|
FEditor,
|
|
@@ -5053,10 +5053,10 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
5053
5053
|
FLoading,
|
|
5054
5054
|
FMarquee,
|
|
5055
5055
|
FMask,
|
|
5056
|
-
FMessage,
|
|
5057
|
-
|
|
5058
|
-
FNotification,
|
|
5059
|
-
|
|
5056
|
+
FMessage: FMessageComp,
|
|
5057
|
+
FMessageAPI: FMessage,
|
|
5058
|
+
FNotification: FNotificationComp,
|
|
5059
|
+
FNotificationAPI: FNotification,
|
|
5060
5060
|
FPagination,
|
|
5061
5061
|
FProgress,
|
|
5062
5062
|
FRadio,
|
|
@@ -5078,11 +5078,16 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
5078
5078
|
FTransfer,
|
|
5079
5079
|
FTreeSelect,
|
|
5080
5080
|
FTypography,
|
|
5081
|
-
FUpload
|
|
5081
|
+
FUpload,
|
|
5082
|
+
dialog: FDialog,
|
|
5083
|
+
message: FMessage,
|
|
5084
|
+
notification: FNotification
|
|
5082
5085
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5083
5086
|
const install = (app) => {
|
|
5084
5087
|
Object.entries(components).forEach(([name, component]) => {
|
|
5085
|
-
|
|
5088
|
+
if (typeof component !== "function" && name.startsWith("F")) {
|
|
5089
|
+
app.component(name, component);
|
|
5090
|
+
}
|
|
5086
5091
|
});
|
|
5087
5092
|
};
|
|
5088
5093
|
export {
|
|
@@ -5100,8 +5105,8 @@ export {
|
|
|
5100
5105
|
_sfc_main$c as FCollapseItem,
|
|
5101
5106
|
_sfc_main$b as FColorPicker,
|
|
5102
5107
|
FContainer,
|
|
5103
|
-
FDialog,
|
|
5104
|
-
|
|
5108
|
+
_sfc_main$2 as FDialog,
|
|
5109
|
+
FDialog as FDialogAPI,
|
|
5105
5110
|
FDivider,
|
|
5106
5111
|
FDropdown,
|
|
5107
5112
|
FEditor,
|
|
@@ -5116,10 +5121,10 @@ export {
|
|
|
5116
5121
|
FLoading,
|
|
5117
5122
|
FMarquee,
|
|
5118
5123
|
FMask,
|
|
5119
|
-
FMessage,
|
|
5120
|
-
|
|
5121
|
-
FNotification,
|
|
5122
|
-
|
|
5124
|
+
FMessageComp as FMessage,
|
|
5125
|
+
FMessage as FMessageAPI,
|
|
5126
|
+
FNotificationComp as FNotification,
|
|
5127
|
+
FNotification as FNotificationAPI,
|
|
5123
5128
|
FPagination,
|
|
5124
5129
|
FProgress,
|
|
5125
5130
|
FRadio,
|
|
@@ -5142,5 +5147,8 @@ export {
|
|
|
5142
5147
|
FTreeSelect,
|
|
5143
5148
|
FTypography,
|
|
5144
5149
|
FUpload,
|
|
5145
|
-
install as default
|
|
5150
|
+
install as default,
|
|
5151
|
+
FDialog as dialog,
|
|
5152
|
+
FMessage as message,
|
|
5153
|
+
FNotification as notification
|
|
5146
5154
|
};
|
package/dist/fantasia-ui.umd.js
CHANGED
|
@@ -4791,6 +4791,77 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4791
4791
|
}
|
|
4792
4792
|
});
|
|
4793
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;
|
|
4794
4865
|
const GAP$1 = 16;
|
|
4795
4866
|
const BASE_OFFSET$1 = 20;
|
|
4796
4867
|
let seed$1 = 0;
|
|
@@ -4951,77 +5022,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4951
5022
|
});
|
|
4952
5023
|
});
|
|
4953
5024
|
};
|
|
4954
|
-
const showDialog = (options) => {
|
|
4955
|
-
return new Promise((resolve) => {
|
|
4956
|
-
const container = document.createElement("div");
|
|
4957
|
-
document.body.appendChild(container);
|
|
4958
|
-
const visible = vue.ref(true);
|
|
4959
|
-
const handleConfirm = () => {
|
|
4960
|
-
cleanup();
|
|
4961
|
-
resolve(true);
|
|
4962
|
-
};
|
|
4963
|
-
const handleCancel = () => {
|
|
4964
|
-
cleanup();
|
|
4965
|
-
resolve(false);
|
|
4966
|
-
};
|
|
4967
|
-
const cleanup = () => {
|
|
4968
|
-
visible.value = false;
|
|
4969
|
-
vue.render(null, container);
|
|
4970
|
-
document.body.removeChild(container);
|
|
4971
|
-
};
|
|
4972
|
-
const vnode = vue.h(_sfc_main$2, __spreadValues({
|
|
4973
|
-
modelValue: visible.value,
|
|
4974
|
-
"onUpdate:modelValue": (val) => {
|
|
4975
|
-
visible.value = val;
|
|
4976
|
-
if (!val) {
|
|
4977
|
-
cleanup();
|
|
4978
|
-
}
|
|
4979
|
-
},
|
|
4980
|
-
onConfirm: handleConfirm,
|
|
4981
|
-
onCancel: handleCancel
|
|
4982
|
-
}, options));
|
|
4983
|
-
vue.render(vnode, container);
|
|
4984
|
-
});
|
|
4985
|
-
};
|
|
4986
|
-
const confirm = (content, title = "确认") => {
|
|
4987
|
-
return showDialog({
|
|
4988
|
-
title,
|
|
4989
|
-
content,
|
|
4990
|
-
type: "confirm",
|
|
4991
|
-
showCancel: true
|
|
4992
|
-
});
|
|
4993
|
-
};
|
|
4994
|
-
const alert = (content, title = "提示", type = "info") => {
|
|
4995
|
-
return showDialog({
|
|
4996
|
-
title,
|
|
4997
|
-
content,
|
|
4998
|
-
type,
|
|
4999
|
-
showCancel: false,
|
|
5000
|
-
confirmText: "知道了"
|
|
5001
|
-
});
|
|
5002
|
-
};
|
|
5003
|
-
const success = (content, title = "成功") => {
|
|
5004
|
-
return alert(content, title, "success");
|
|
5005
|
-
};
|
|
5006
|
-
const warning = (content, title = "警告") => {
|
|
5007
|
-
return alert(content, title, "warning");
|
|
5008
|
-
};
|
|
5009
|
-
const error = (content, title = "错误") => {
|
|
5010
|
-
return alert(content, title, "error");
|
|
5011
|
-
};
|
|
5012
|
-
const info = (content, title = "提示") => {
|
|
5013
|
-
return alert(content, title, "info");
|
|
5014
|
-
};
|
|
5015
|
-
const FDialog = (options) => {
|
|
5016
|
-
return showDialog(options);
|
|
5017
|
-
};
|
|
5018
|
-
FDialog.showDialog = showDialog;
|
|
5019
|
-
FDialog.confirm = confirm;
|
|
5020
|
-
FDialog.alert = alert;
|
|
5021
|
-
FDialog.success = success;
|
|
5022
|
-
FDialog.warning = warning;
|
|
5023
|
-
FDialog.error = error;
|
|
5024
|
-
FDialog.info = info;
|
|
5025
5025
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5026
5026
|
__proto__: null,
|
|
5027
5027
|
FAffix,
|
|
@@ -5038,8 +5038,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5038
5038
|
FCollapseItem: _sfc_main$c,
|
|
5039
5039
|
FColorPicker: _sfc_main$b,
|
|
5040
5040
|
FContainer,
|
|
5041
|
-
FDialog,
|
|
5042
|
-
|
|
5041
|
+
FDialog: _sfc_main$2,
|
|
5042
|
+
FDialogAPI: FDialog,
|
|
5043
5043
|
FDivider,
|
|
5044
5044
|
FDropdown,
|
|
5045
5045
|
FEditor,
|
|
@@ -5054,10 +5054,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5054
5054
|
FLoading,
|
|
5055
5055
|
FMarquee,
|
|
5056
5056
|
FMask,
|
|
5057
|
-
FMessage,
|
|
5058
|
-
|
|
5059
|
-
FNotification,
|
|
5060
|
-
|
|
5057
|
+
FMessage: FMessageComp,
|
|
5058
|
+
FMessageAPI: FMessage,
|
|
5059
|
+
FNotification: FNotificationComp,
|
|
5060
|
+
FNotificationAPI: FNotification,
|
|
5061
5061
|
FPagination,
|
|
5062
5062
|
FProgress,
|
|
5063
5063
|
FRadio,
|
|
@@ -5079,11 +5079,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5079
5079
|
FTransfer,
|
|
5080
5080
|
FTreeSelect,
|
|
5081
5081
|
FTypography,
|
|
5082
|
-
FUpload
|
|
5082
|
+
FUpload,
|
|
5083
|
+
dialog: FDialog,
|
|
5084
|
+
message: FMessage,
|
|
5085
|
+
notification: FNotification
|
|
5083
5086
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5084
5087
|
const install = (app) => {
|
|
5085
5088
|
Object.entries(components).forEach(([name, component]) => {
|
|
5086
|
-
|
|
5089
|
+
if (typeof component !== "function" && name.startsWith("F")) {
|
|
5090
|
+
app.component(name, component);
|
|
5091
|
+
}
|
|
5087
5092
|
});
|
|
5088
5093
|
};
|
|
5089
5094
|
exports2.FAffix = FAffix;
|
|
@@ -5100,8 +5105,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5100
5105
|
exports2.FCollapseItem = _sfc_main$c;
|
|
5101
5106
|
exports2.FColorPicker = _sfc_main$b;
|
|
5102
5107
|
exports2.FContainer = FContainer;
|
|
5103
|
-
exports2.FDialog =
|
|
5104
|
-
exports2.
|
|
5108
|
+
exports2.FDialog = _sfc_main$2;
|
|
5109
|
+
exports2.FDialogAPI = FDialog;
|
|
5105
5110
|
exports2.FDivider = FDivider;
|
|
5106
5111
|
exports2.FDropdown = FDropdown;
|
|
5107
5112
|
exports2.FEditor = FEditor;
|
|
@@ -5116,10 +5121,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5116
5121
|
exports2.FLoading = FLoading;
|
|
5117
5122
|
exports2.FMarquee = FMarquee;
|
|
5118
5123
|
exports2.FMask = FMask;
|
|
5119
|
-
exports2.FMessage =
|
|
5120
|
-
exports2.
|
|
5121
|
-
exports2.FNotification =
|
|
5122
|
-
exports2.
|
|
5124
|
+
exports2.FMessage = FMessageComp;
|
|
5125
|
+
exports2.FMessageAPI = FMessage;
|
|
5126
|
+
exports2.FNotification = FNotificationComp;
|
|
5127
|
+
exports2.FNotificationAPI = FNotification;
|
|
5123
5128
|
exports2.FPagination = FPagination;
|
|
5124
5129
|
exports2.FProgress = FProgress;
|
|
5125
5130
|
exports2.FRadio = FRadio;
|
|
@@ -5143,5 +5148,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
5143
5148
|
exports2.FTypography = FTypography;
|
|
5144
5149
|
exports2.FUpload = FUpload;
|
|
5145
5150
|
exports2.default = install;
|
|
5151
|
+
exports2.dialog = FDialog;
|
|
5152
|
+
exports2.message = FMessage;
|
|
5153
|
+
exports2.notification = FNotification;
|
|
5146
5154
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
5147
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';
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
import type { FDialogFn } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* FDialog 函数式 API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // 基础用法
|
|
7
|
+
* import { dialog } from 'fantasia-ui'
|
|
8
|
+
* dialog.confirm('确认删除吗?')
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // 或使用 FDialogAPI
|
|
12
|
+
* import { FDialogAPI } from 'fantasia-ui'
|
|
13
|
+
* FDialogAPI.alert('操作成功', '提示')
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // 组件用法
|
|
17
|
+
* import { FDialog } from 'fantasia-ui'
|
|
18
|
+
* // 在模板中使用 <FDialog />
|
|
19
|
+
*/
|
|
2
20
|
declare const FDialog: FDialogFn;
|
|
3
21
|
export default FDialog;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
import type { FMessageFn } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* FMessage 函数式 API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // 推荐用法 - 使用小写名称
|
|
7
|
+
* import { message } from 'fantasia-ui'
|
|
8
|
+
* message.success('操作成功')
|
|
9
|
+
* message.error('操作失败')
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // 或使用 FMessageAPI (向后兼容)
|
|
13
|
+
* import { FMessageAPI } from 'fantasia-ui'
|
|
14
|
+
* FMessageAPI.info('这是一条消息')
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 组件用法
|
|
18
|
+
* import { FMessage } from 'fantasia-ui'
|
|
19
|
+
* // 在模板中使用 <FMessage />
|
|
20
|
+
*/
|
|
2
21
|
declare const FMessage: FMessageFn;
|
|
3
22
|
export default FMessage;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
import type { FNotificationFn } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* FNotification 函数式 API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // 推荐用法 - 使用小写名称
|
|
7
|
+
* import { notification } from 'fantasia-ui'
|
|
8
|
+
* notification.success('操作成功')
|
|
9
|
+
* notification.error('操作失败')
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // 或使用 FNotificationAPI (向后兼容)
|
|
13
|
+
* import { FNotificationAPI } from 'fantasia-ui'
|
|
14
|
+
* FNotificationAPI.info('这是一条通知')
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 组件用法
|
|
18
|
+
* import { FNotification } from 'fantasia-ui'
|
|
19
|
+
* // 在模板中使用 <FNotification />
|
|
20
|
+
*/
|
|
2
21
|
declare const FNotification: FNotificationFn;
|
|
3
22
|
export default FNotification;
|
|
@@ -3,4 +3,5 @@ import './styles/base.scss';
|
|
|
3
3
|
declare const install: Plugin;
|
|
4
4
|
export default install;
|
|
5
5
|
export * from './components';
|
|
6
|
-
export { FMessage, FNotification } from './components';
|
|
6
|
+
export { FDialog, FMessage, FNotification } from './components';
|
|
7
|
+
export { dialog, message, notification, FDialogAPI, FMessageAPI, FNotificationAPI } from './components';
|
package/dist/types/volar.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
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fantasia-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.51",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/fantasia-ui.umd.js",
|
|
7
7
|
"module": "dist/fantasia-ui.es.js",
|
|
@@ -69,13 +69,11 @@
|
|
|
69
69
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
70
70
|
"@vue/tsconfig": "^0.7.0",
|
|
71
71
|
"@vueuse/core": "^14.3.0",
|
|
72
|
-
"jsdom": "^30.0.1",
|
|
73
72
|
"sass": "^1.89.0",
|
|
74
73
|
"typescript": "~5.8.3",
|
|
75
74
|
"unplugin-auto-import": "^19.3.0",
|
|
76
75
|
"vite": "^6.3.5",
|
|
77
76
|
"vite-plugin-dts": "^4.5.4",
|
|
78
|
-
"vitest": "^4.1.8",
|
|
79
77
|
"vue": "^3.5.13",
|
|
80
78
|
"vue-tsc": "^2.2.8",
|
|
81
79
|
"vue-docgen-api": "^4.79.2",
|