@farris/ui-vue 1.2.5 → 1.2.7
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/components/accordion/index.esm.js +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +122 -131
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +216 -223
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +201 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +341 -338
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +3415 -3295
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2719 -2717
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +31 -40
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +578 -584
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +287 -278
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1923 -1908
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +3719 -3604
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +483 -470
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +258 -267
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1452 -1450
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4860 -4657
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4411 -4259
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +763 -741
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +948 -945
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +485 -466
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +437 -426
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +98 -107
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +840 -800
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +757 -760
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +3659 -3432
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +126 -135
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1400 -1379
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +97 -106
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +393 -402
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3531 -3412
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2046 -2044
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12370 -11917
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
- package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-canvas/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/flow-canvas/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as l, computed as y, createVNode as r, Fragment as
|
|
5
|
-
const
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var Te = (t, e, n) => e in t ? Me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var W = (t, e, n) => Te(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { ref as l, computed as y, createVNode as r, Fragment as ee, createTextVNode as Be, defineComponent as ne, watch as Y, onMounted as ae, onUnmounted as le, Teleport as ke, shallowRef as ze, createApp as Ee, nextTick as Re, render as _, h as Se, cloneVNode as He, mergeProps as oe, reactive as A } from "vue";
|
|
5
|
+
const Oe = {
|
|
6
6
|
width: { Type: Number, default: 400 },
|
|
7
7
|
type: { Type: String, default: "info" },
|
|
8
8
|
title: { Type: String, default: "" },
|
|
@@ -12,15 +12,15 @@ const He = {
|
|
|
12
12
|
exceptionInfo: { Type: Object, default: null },
|
|
13
13
|
promptEditorType: { Type: String, default: "text-area" }
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function te() {
|
|
16
16
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
17
17
|
}
|
|
18
|
-
async function
|
|
18
|
+
async function Ie(t) {
|
|
19
19
|
if (!navigator.clipboard)
|
|
20
|
-
throw
|
|
20
|
+
throw te();
|
|
21
21
|
return navigator.clipboard.writeText(t);
|
|
22
22
|
}
|
|
23
|
-
async function
|
|
23
|
+
async function je(t) {
|
|
24
24
|
const e = document.createElement("span");
|
|
25
25
|
e.textContent = t, e.style.whiteSpace = "pre", e.style.webkitUserSelect = "auto", e.style.userSelect = "all", document.body.appendChild(e);
|
|
26
26
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -31,58 +31,58 @@ async function Ie(t) {
|
|
|
31
31
|
} finally {
|
|
32
32
|
n == null || n.removeAllRanges(), window.document.body.removeChild(e);
|
|
33
33
|
}
|
|
34
|
-
if (!f) throw
|
|
34
|
+
if (!f) throw te();
|
|
35
35
|
}
|
|
36
|
-
async function
|
|
36
|
+
async function Fe(t) {
|
|
37
37
|
try {
|
|
38
|
-
await
|
|
38
|
+
await Ie(t);
|
|
39
39
|
} catch (e) {
|
|
40
40
|
try {
|
|
41
|
-
await
|
|
41
|
+
await je(t);
|
|
42
42
|
} catch (n) {
|
|
43
|
-
throw n || e ||
|
|
43
|
+
throw n || e || te();
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Le() {
|
|
48
48
|
async function t(e) {
|
|
49
|
-
await
|
|
49
|
+
await Fe(e);
|
|
50
50
|
}
|
|
51
51
|
return { onCopy: t };
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const f = l(14),
|
|
53
|
+
function De(t, e, n, a) {
|
|
54
|
+
const f = l(14), s = l(140), h = l(""), u = l(a.value.length), d = y(() => a.value), i = y(() => ({
|
|
55
55
|
"font-size": `${f.value}px`,
|
|
56
56
|
height: "100%"
|
|
57
57
|
}));
|
|
58
58
|
function g(T) {
|
|
59
59
|
if (T.currentTarget) {
|
|
60
60
|
const B = T.currentTarget.value || "";
|
|
61
|
-
|
|
61
|
+
u.value = B.length;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
return () => r(
|
|
64
|
+
return () => r(ee, null, [r("textarea", {
|
|
65
65
|
title: "promptMessage",
|
|
66
66
|
name: "promptMessage",
|
|
67
67
|
class: "form-control",
|
|
68
68
|
style: i.value,
|
|
69
69
|
rows: "4",
|
|
70
|
-
maxlength:
|
|
70
|
+
maxlength: s.value,
|
|
71
71
|
onInput: (T) => g(T)
|
|
72
|
-
}, [
|
|
72
|
+
}, [d.value]), r("span", {
|
|
73
73
|
class: "textarea-wordcount",
|
|
74
|
-
title:
|
|
74
|
+
title: h.value,
|
|
75
75
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
76
|
-
}, [
|
|
76
|
+
}, [u.value + " / " + s.value])]);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
const f =
|
|
80
|
-
function
|
|
81
|
-
return
|
|
78
|
+
function Pe(t, e, n, a) {
|
|
79
|
+
const f = De(t, e, n, a), s = /* @__PURE__ */ new Map([["text-area", f]]);
|
|
80
|
+
function h(u) {
|
|
81
|
+
return s.get(u) || null;
|
|
82
82
|
}
|
|
83
|
-
return { getEditorRender:
|
|
83
|
+
return { getEditorRender: h };
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ve() {
|
|
86
86
|
const t = l(!1), e = l("复制成功");
|
|
87
87
|
return {
|
|
88
88
|
feedbackStyle: y(() => {
|
|
@@ -108,12 +108,12 @@ function Pe() {
|
|
|
108
108
|
toShowFeedback: t
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ne(t, e) {
|
|
112
112
|
const n = e.getEditorRender(t.promptEditorType);
|
|
113
113
|
return () => n && n();
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const e = l(3), n = l(480), a = y(() => !!t.value && !!t.value.date), f = y(() => `发生时间 : ${t.value && t.value.date || ""}`),
|
|
115
|
+
function We(t) {
|
|
116
|
+
const e = l(3), n = l(480), a = y(() => !!t.value && !!t.value.date), f = y(() => `发生时间 : ${t.value && t.value.date || ""}`), s = y(() => !!t.value && !!t.value.detail), h = y(() => {
|
|
117
117
|
const x = `${n.value}px`;
|
|
118
118
|
return {
|
|
119
119
|
overflow: "hidden",
|
|
@@ -123,81 +123,81 @@ function Ne(t) {
|
|
|
123
123
|
"-webkit-line-clamp": e.value,
|
|
124
124
|
"max-height": x
|
|
125
125
|
};
|
|
126
|
-
}),
|
|
126
|
+
}), u = y(() => t.value && t.value.detail || ""), d = y(() => !0), i = l(!1), g = l("展开"), T = l("收起"), B = y(() => {
|
|
127
127
|
const x = {
|
|
128
128
|
display: "block",
|
|
129
129
|
color: "#2A87FF"
|
|
130
130
|
};
|
|
131
131
|
return x["text-align"] = i.value ? "" : "right", x;
|
|
132
132
|
});
|
|
133
|
-
function
|
|
133
|
+
function z(x, p) {
|
|
134
134
|
i.value = !i.value, e.value = i.value ? 20 : 3;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function S(x) {
|
|
137
|
+
return z();
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
139
|
+
function O(x) {
|
|
140
|
+
return z();
|
|
141
141
|
}
|
|
142
142
|
return () => r("div", {
|
|
143
143
|
class: "toast-msg-detail"
|
|
144
|
-
}, [a.value && r("div", null, [f.value]),
|
|
144
|
+
}, [a.value && r("div", null, [f.value]), s.value && r("div", {
|
|
145
145
|
id: "exception_error_msg",
|
|
146
146
|
ref: "exceptionMessageRef",
|
|
147
|
-
style:
|
|
148
|
-
}, [
|
|
149
|
-
innerHTML:
|
|
150
|
-
}, null)]),
|
|
147
|
+
style: h.value
|
|
148
|
+
}, [Be("详细信息 : "), r("span", {
|
|
149
|
+
innerHTML: u.value
|
|
150
|
+
}, null)]), d.value && r("span", {
|
|
151
151
|
style: B.value
|
|
152
152
|
}, [i.value && r("span", {
|
|
153
|
-
onClick:
|
|
153
|
+
onClick: S,
|
|
154
154
|
style: "cursor: pointer;"
|
|
155
155
|
}, [T.value]), !i.value && r("span", {
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: O,
|
|
157
157
|
style: "cursor: pointer;"
|
|
158
158
|
}, [g.value])])]);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ae(t) {
|
|
161
161
|
return () => r("p", {
|
|
162
162
|
class: "toast-msg-detail",
|
|
163
163
|
innerHTML: t.value
|
|
164
164
|
}, null);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const f = l(t.exceptionInfo),
|
|
166
|
+
function $e(t, e, n, a) {
|
|
167
|
+
const f = l(t.exceptionInfo), s = y(() => {
|
|
168
168
|
const B = {
|
|
169
169
|
"f-icon": !0
|
|
170
|
-
},
|
|
171
|
-
return B[
|
|
172
|
-
}),
|
|
170
|
+
}, z = `f-icon-${e.value}`;
|
|
171
|
+
return B[z] = !0, B;
|
|
172
|
+
}), h = y(() => n.value || f.value && f.value.message), u = y(() => a.value), d = y(() => !!a.value), i = y(() => !!f.value);
|
|
173
173
|
function g() {
|
|
174
|
-
return i.value ?
|
|
174
|
+
return i.value ? We(f) : d.value ? Ae(u) : () => null;
|
|
175
175
|
}
|
|
176
176
|
const T = g();
|
|
177
|
-
return () => r(
|
|
177
|
+
return () => r(ee, null, [r("div", {
|
|
178
178
|
class: "float-left modal-tips-iconwrap"
|
|
179
179
|
}, [r("span", {
|
|
180
|
-
class:
|
|
180
|
+
class: s.value
|
|
181
181
|
}, null)]), r("div", {
|
|
182
182
|
class: "modal-tips-content"
|
|
183
183
|
}, [r("p", {
|
|
184
184
|
class: "toast-msg-title",
|
|
185
|
-
innerHTML:
|
|
185
|
+
innerHTML: h.value
|
|
186
186
|
}, null), T()])]);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Xe(t, e, n) {
|
|
189
189
|
const {
|
|
190
190
|
onCopy: a
|
|
191
191
|
} = e, {
|
|
192
192
|
toShowFeedback: f
|
|
193
|
-
} = n,
|
|
193
|
+
} = n, s = l("复制成功"), h = l("复制详细信息"), u = l(t.exceptionInfo || {
|
|
194
194
|
date: "",
|
|
195
195
|
message: "",
|
|
196
196
|
detail: ""
|
|
197
|
-
}),
|
|
197
|
+
}), d = y(() => u.value && u.value.detail || "");
|
|
198
198
|
function i(g) {
|
|
199
|
-
a(
|
|
200
|
-
|
|
199
|
+
a(d.value).catch((T) => {
|
|
200
|
+
s.value = "复制失败";
|
|
201
201
|
}).finally(() => {
|
|
202
202
|
f.value = !0, setTimeout(() => {
|
|
203
203
|
f.value = !1;
|
|
@@ -209,50 +209,50 @@ function $e(t, e, n) {
|
|
|
209
209
|
}, [r("span", {
|
|
210
210
|
onClick: i,
|
|
211
211
|
style: "cursor: pointer;"
|
|
212
|
-
}, [
|
|
212
|
+
}, [h.value])]);
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const f = l(t.type),
|
|
216
|
-
function p(
|
|
214
|
+
function Ye(t, e, n, a) {
|
|
215
|
+
const f = l(t.type), s = l([]), h = l(t.exceptionInfo), u = l(t.okButtonText), d = l(t.cancelButtonText), i = l(!0), g = l(!0), T = y(() => !!(s.value && s.value.length)), B = y(() => h.value && h.value.date && h.value.message && h.value.detail), z = y(() => !(s.value && s.value.length) && (u.value || d.value)), S = y(() => g.value && u.value), O = y(() => i.value && d.value), x = Xe(t, n, a);
|
|
216
|
+
function p(E) {
|
|
217
217
|
f.value === "question" && e.emit("reject"), e.emit("close");
|
|
218
218
|
}
|
|
219
|
-
function k(
|
|
219
|
+
function k(E) {
|
|
220
220
|
f.value === "question" && e.emit("accept"), e.emit("close");
|
|
221
221
|
}
|
|
222
222
|
return () => r("div", {
|
|
223
223
|
class: "modal-footer"
|
|
224
|
-
}, [B.value && x(),
|
|
224
|
+
}, [B.value && x(), z.value && O.value && r("button", {
|
|
225
225
|
type: "button",
|
|
226
226
|
class: "btn btn-secondary btn-lg",
|
|
227
227
|
onClick: p
|
|
228
|
-
}, [
|
|
228
|
+
}, [d.value]), z.value && S.value && r("button", {
|
|
229
229
|
type: "button",
|
|
230
230
|
class: "btn btn-primary btn-lg",
|
|
231
231
|
onClick: k
|
|
232
|
-
}, [
|
|
232
|
+
}, [u.value]), T.value && s.value.length && s.value.map((E) => r("button", {
|
|
233
233
|
type: "button",
|
|
234
|
-
onClick:
|
|
235
|
-
class:
|
|
236
|
-
}, [
|
|
237
|
-
class:
|
|
238
|
-
}, null),
|
|
234
|
+
onClick: E.handle,
|
|
235
|
+
class: E.class
|
|
236
|
+
}, [E.iconClass && r("span", {
|
|
237
|
+
class: E.iconClass
|
|
238
|
+
}, null), E.text]))]);
|
|
239
239
|
}
|
|
240
|
-
const J = /* @__PURE__ */
|
|
240
|
+
const J = /* @__PURE__ */ ne({
|
|
241
241
|
name: "FMessageBox",
|
|
242
|
-
props:
|
|
242
|
+
props: Oe,
|
|
243
243
|
emits: ["accept", "reject", "close"],
|
|
244
244
|
setup(t, e) {
|
|
245
|
-
const n = l(t.type), a = l(t.title), f = l(t.detail),
|
|
245
|
+
const n = l(t.type), a = l(t.title), f = l(t.detail), s = y(() => {
|
|
246
246
|
const x = {
|
|
247
247
|
"modal-tips": !0,
|
|
248
248
|
"d-flex": !0,
|
|
249
249
|
"flex-row": !0
|
|
250
250
|
}, p = `messager-type-${n.value}`;
|
|
251
251
|
return x[p] = !0, x;
|
|
252
|
-
}),
|
|
252
|
+
}), h = y(() => {
|
|
253
253
|
const x = {};
|
|
254
254
|
return n.value === "prompt" ? x.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (x.padding = "0.5rem 1.5rem 1rem 1.5rem"), x;
|
|
255
|
-
}),
|
|
255
|
+
}), u = Le(), d = Pe(t, n, a, f), i = Ve(), {
|
|
256
256
|
feedbackStyle: g,
|
|
257
257
|
feedbackMessage: T
|
|
258
258
|
} = i;
|
|
@@ -261,23 +261,23 @@ const J = /* @__PURE__ */ te({
|
|
|
261
261
|
style: g.value
|
|
262
262
|
}, [T.value]);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function z() {
|
|
265
265
|
switch (n.value) {
|
|
266
266
|
case "prompt":
|
|
267
|
-
return
|
|
267
|
+
return Ne(t, d);
|
|
268
268
|
default:
|
|
269
|
-
return
|
|
269
|
+
return $e(t, n, a, f);
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const S = z(), O = Ye(t, e, u, i);
|
|
273
273
|
return () => r("div", {
|
|
274
274
|
class: "farris-messager"
|
|
275
275
|
}, [r("section", {
|
|
276
|
-
class:
|
|
277
|
-
style:
|
|
278
|
-
}, [
|
|
276
|
+
class: s.value,
|
|
277
|
+
style: h.value
|
|
278
|
+
}, [S()]), O(), B()]);
|
|
279
279
|
}
|
|
280
|
-
}),
|
|
280
|
+
}), Ue = {
|
|
281
281
|
/**
|
|
282
282
|
* 自定义类
|
|
283
283
|
*/
|
|
@@ -329,7 +329,7 @@ const J = /* @__PURE__ */ te({
|
|
|
329
329
|
containment: { type: HTMLElement, default: null },
|
|
330
330
|
reiszeable: { type: Boolean, default: !1 },
|
|
331
331
|
draggable: { type: Boolean, default: !1 },
|
|
332
|
-
dragHandle: { type:
|
|
332
|
+
dragHandle: { type: Object, default: null },
|
|
333
333
|
closedCallback: { type: Function, default: null },
|
|
334
334
|
resizeHandle: { type: Function, default: null },
|
|
335
335
|
render: { type: Function, default: null },
|
|
@@ -337,26 +337,26 @@ const J = /* @__PURE__ */ te({
|
|
|
337
337
|
rejectCallback: { type: Function, default: null },
|
|
338
338
|
enableEsc: { type: Boolean, default: !0 }
|
|
339
339
|
};
|
|
340
|
-
class
|
|
340
|
+
class R {
|
|
341
341
|
constructor(e, n) {
|
|
342
342
|
this.x = e, this.y = n;
|
|
343
343
|
}
|
|
344
344
|
static getTransformInfo(e) {
|
|
345
345
|
const a = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
346
346
|
if (a.length >= 6) {
|
|
347
|
-
const f = parseInt(a[4], 10),
|
|
348
|
-
return { x: f, y:
|
|
347
|
+
const f = parseInt(a[4], 10), s = parseInt(a[5], 10);
|
|
348
|
+
return { x: f, y: s };
|
|
349
349
|
}
|
|
350
350
|
return { x: 0, y: 0 };
|
|
351
351
|
}
|
|
352
352
|
static fromEvent(e, n = null) {
|
|
353
353
|
if (this.isMouseEvent(e))
|
|
354
|
-
return new
|
|
354
|
+
return new R(e.clientX, e.clientY);
|
|
355
355
|
if (n === null || e.changedTouches.length === 1)
|
|
356
|
-
return new
|
|
356
|
+
return new R(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
|
|
357
357
|
for (let a = 0; a < e.changedTouches.length; a++)
|
|
358
358
|
if (e.changedTouches[a].target === n)
|
|
359
|
-
return new
|
|
359
|
+
return new R(e.changedTouches[a].clientX, e.changedTouches[a].clientY);
|
|
360
360
|
}
|
|
361
361
|
static isMouseEvent(e) {
|
|
362
362
|
return Object.prototype.toString.apply(e).indexOf("MouseEvent") === 8;
|
|
@@ -365,19 +365,19 @@ class H {
|
|
|
365
365
|
return !!e && "x" in e && "y" in e;
|
|
366
366
|
}
|
|
367
367
|
static getCurrent(e) {
|
|
368
|
-
const n = new
|
|
368
|
+
const n = new R(0, 0);
|
|
369
369
|
if (window) {
|
|
370
370
|
const a = window.getComputedStyle(e);
|
|
371
371
|
if (a) {
|
|
372
|
-
const f = parseInt(a.getPropertyValue("left"), 10),
|
|
373
|
-
n.x = isNaN(f) ? 0 : f, n.y = isNaN(
|
|
372
|
+
const f = parseInt(a.getPropertyValue("left"), 10), s = parseInt(a.getPropertyValue("top"), 10);
|
|
373
|
+
n.x = isNaN(f) ? 0 : f, n.y = isNaN(s) ? 0 : s;
|
|
374
374
|
}
|
|
375
375
|
return n;
|
|
376
376
|
}
|
|
377
377
|
return null;
|
|
378
378
|
}
|
|
379
379
|
static copy(e) {
|
|
380
|
-
return new
|
|
380
|
+
return new R(0, 0).set(e);
|
|
381
381
|
}
|
|
382
382
|
get value() {
|
|
383
383
|
return { x: this.x, y: this.y };
|
|
@@ -401,12 +401,12 @@ class H {
|
|
|
401
401
|
return this.x = e.x, this.y = e.y, this;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
class
|
|
404
|
+
class $ {
|
|
405
405
|
constructor(e, n) {
|
|
406
406
|
this.width = e, this.height = n;
|
|
407
407
|
}
|
|
408
408
|
static getCurrent(e) {
|
|
409
|
-
const n = new
|
|
409
|
+
const n = new $(0, 0);
|
|
410
410
|
if (window) {
|
|
411
411
|
const a = window.getComputedStyle(e);
|
|
412
412
|
return a && (n.width = parseInt(a.getPropertyValue("width"), 10), n.height = parseInt(a.getPropertyValue("height"), 10)), n;
|
|
@@ -414,506 +414,517 @@ class N {
|
|
|
414
414
|
return null;
|
|
415
415
|
}
|
|
416
416
|
static copy(e) {
|
|
417
|
-
return new
|
|
417
|
+
return new $(0, 0).set(e);
|
|
418
418
|
}
|
|
419
419
|
set(e) {
|
|
420
420
|
return this.width = e.width, this.height = e.height, this;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
const n = l(), a = l(), f = l(),
|
|
423
|
+
function qe(t, e) {
|
|
424
|
+
const n = l(), a = l(), f = l(), s = l(), h = l(), u = l(), d = l(), i = l(), g = l(), T = l(), B = l(), z = l(), S = l(t.draggable), O = l(!1);
|
|
425
425
|
function x() {
|
|
426
|
-
const c = a.value || document.body,
|
|
427
|
-
if (!
|
|
426
|
+
const c = a.value || document.body, v = window.getComputedStyle(c);
|
|
427
|
+
if (!v || !n.value)
|
|
428
428
|
return;
|
|
429
|
-
const C =
|
|
430
|
-
|
|
431
|
-
const
|
|
432
|
-
|
|
429
|
+
const C = R.getTransformInfo(n.value), b = {};
|
|
430
|
+
d.value && (b.deltaL = n.value.offsetLeft - d.value.x, b.deltaT = n.value.offsetTop - d.value.y);
|
|
431
|
+
const H = v.getPropertyValue("position");
|
|
432
|
+
b.width = c.clientWidth, b.height = c.clientHeight, b.pr = parseInt(v.getPropertyValue("padding-right"), 10), b.pb = parseInt(v.getPropertyValue("padding-bottom"), 10), b.position = v.getPropertyValue("position"), H === "static" && (c.style.position = "relative"), b.translateX = C.x, b.translateY = C.y, T.value = b;
|
|
433
433
|
}
|
|
434
434
|
function p(c) {
|
|
435
435
|
if (n.value) {
|
|
436
|
-
|
|
437
|
-
const
|
|
436
|
+
s.value = $.getCurrent(n.value), h.value = R.getCurrent(n.value), u.value = s.value ? $.copy(s.value) : null, d.value = h.value ? R.copy(h.value) : null, x();
|
|
437
|
+
const v = c.target.getAttribute("type") || "";
|
|
438
438
|
i.value = {
|
|
439
|
-
n: !!
|
|
440
|
-
s: !!
|
|
441
|
-
w: !!
|
|
442
|
-
e: !!
|
|
439
|
+
n: !!v.match(/n/),
|
|
440
|
+
s: !!v.match(/s/),
|
|
441
|
+
w: !!v.match(/w/),
|
|
442
|
+
e: !!v.match(/e/)
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
function k() {
|
|
447
|
-
var c,
|
|
447
|
+
var c, v, C, b;
|
|
448
448
|
if (n.value) {
|
|
449
|
-
const
|
|
450
|
-
i.value && ((i.value.n || i.value.s) && ((c =
|
|
449
|
+
const H = n.value;
|
|
450
|
+
i.value && ((i.value.n || i.value.s) && ((c = u.value) != null && c.height) && (H.style.height = u.value.height + "px"), (i.value.w || i.value.e) && ((v = u.value) != null && v.width) && (H.style.width = u.value.width + "px"), d.value && ((C = d.value) != null && C.x && (H.style.left = d.value.x + "px"), (b = d.value) != null && b.y && (H.style.top = d.value.y + "px")));
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
const c = t.minHeight ? t.minHeight : 1,
|
|
455
|
-
|
|
453
|
+
function E() {
|
|
454
|
+
const c = t.minHeight ? t.minHeight : 1, v = t.minWidth ? t.minWidth : 1;
|
|
455
|
+
u.value && d.value && i.value && s.value && (u.value.height < c && (u.value.height = c, i.value.n && h.value && (d.value.y = h.value.y + (s.value.height - c))), u.value.width < v && (u.value.width = v, i.value.w && h.value && (d.value.x = h.value.x + (s.value.width - v))), t.maxHeight && u.value.height > t.maxHeight && (u.value.height = t.maxHeight, h.value && i.value.n && (d.value.y = h.value.y + (s.value.height - t.maxHeight))), t.maxWidth && u.value.width > t.maxWidth && (u.value.width = t.maxWidth, i.value.w && h.value && (d.value.x = h.value.x + (s.value.width - t.maxWidth))));
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function V() {
|
|
458
458
|
if (a.value) {
|
|
459
459
|
const c = T.value;
|
|
460
|
-
if (
|
|
461
|
-
const
|
|
462
|
-
i.value.n &&
|
|
460
|
+
if (d.value && u.value && i.value && s.value) {
|
|
461
|
+
const v = c.width - c.pr - c.deltaL - c.translateX - d.value.x, C = c.height - c.pb - c.deltaT - c.translateY - d.value.y;
|
|
462
|
+
i.value.n && d.value.y + c.translateY < 0 && h.value && (d.value.y = -c.translateY, u.value.height = s.value.height + h.value.y + c.translateY), i.value.w && d.value.x + c.translateX < 0 && h.value && (d.value.x = -c.translateX, u.value.width = s.value.width + h.value.x + c.translateX), u.value.width > v && (u.value.width = v), u.value.height > C && (u.value.height = C);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
if (!f.value || !
|
|
466
|
+
function D(c) {
|
|
467
|
+
if (!f.value || !s.value || !h.value || !i.value)
|
|
468
468
|
return;
|
|
469
469
|
c.subtract(f.value);
|
|
470
|
-
const
|
|
471
|
-
i.value.n ? (
|
|
470
|
+
const v = c.x, C = c.y;
|
|
471
|
+
i.value.n ? (d.value.y = h.value.y + C, u.value.height = s.value.height - C) : i.value.s && (u.value.height = s.value.height + C), i.value.e ? u.value.width = s.value.width + v : i.value.w && (u.value.width = s.value.width - v, d.value.x = h.value.x + v), V(), E(), k();
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function m(c) {
|
|
474
474
|
if (!g.value)
|
|
475
475
|
return;
|
|
476
|
-
const
|
|
477
|
-
|
|
476
|
+
const v = R.fromEvent(c);
|
|
477
|
+
v && D(v);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function w() {
|
|
480
480
|
if (n.value) {
|
|
481
481
|
const {
|
|
482
482
|
width: c,
|
|
483
|
-
height:
|
|
483
|
+
height: v,
|
|
484
484
|
x: C,
|
|
485
|
-
y:
|
|
486
|
-
} = n.value.getBoundingClientRect(),
|
|
485
|
+
y: b
|
|
486
|
+
} = n.value.getBoundingClientRect(), H = R.getTransformInfo(n.value);
|
|
487
487
|
return {
|
|
488
488
|
size: {
|
|
489
489
|
width: c,
|
|
490
|
-
height:
|
|
490
|
+
height: v
|
|
491
491
|
},
|
|
492
492
|
position: {
|
|
493
|
-
x: C -
|
|
494
|
-
y:
|
|
493
|
+
x: C - H.x,
|
|
494
|
+
y: b - H.y
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
return null;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function I(c) {
|
|
501
501
|
if (n.value) {
|
|
502
|
-
const
|
|
503
|
-
B.value =
|
|
502
|
+
const v = w();
|
|
503
|
+
B.value = v;
|
|
504
504
|
}
|
|
505
|
-
f.value = void 0,
|
|
505
|
+
f.value = void 0, s.value = null, h.value = null, u.value = null, d.value = null, i.value = null, g.value = null, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", I);
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
document.addEventListener("mousemove",
|
|
507
|
+
function F() {
|
|
508
|
+
document.addEventListener("mousemove", m), document.addEventListener("mouseup", I);
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
c instanceof MouseEvent && c.button === 2 ||
|
|
510
|
+
function j(c) {
|
|
511
|
+
c instanceof MouseEvent && c.button === 2 || S.value && (c.stopPropagation(), c.preventDefault(), f.value = R.fromEvent(c), g.value = c.target, p(c), F());
|
|
512
512
|
}
|
|
513
|
-
function
|
|
514
|
-
return n.value = c, r(
|
|
513
|
+
function L(c) {
|
|
514
|
+
return n.value = c, r(ee, null, [r("div", {
|
|
515
515
|
class: "ng-resizable-handle ng-resizable-n",
|
|
516
516
|
type: "n",
|
|
517
|
-
onMousedown: (
|
|
517
|
+
onMousedown: (v) => j(v)
|
|
518
518
|
}, null), r("div", {
|
|
519
519
|
class: "ng-resizable-handle ng-resizable-e",
|
|
520
520
|
type: "e",
|
|
521
|
-
onMousedown: (
|
|
521
|
+
onMousedown: (v) => j(v)
|
|
522
522
|
}, null), r("div", {
|
|
523
523
|
class: "ng-resizable-handle ng-resizable-s",
|
|
524
524
|
type: "s",
|
|
525
|
-
onMousedown: (
|
|
525
|
+
onMousedown: (v) => j(v)
|
|
526
526
|
}, null), r("div", {
|
|
527
527
|
class: "ng-resizable-handle ng-resizable-w",
|
|
528
528
|
type: "w",
|
|
529
|
-
onMousedown: (
|
|
529
|
+
onMousedown: (v) => j(v)
|
|
530
530
|
}, null), r("div", {
|
|
531
531
|
class: "ng-resizable-handle ng-resizable-ne",
|
|
532
532
|
type: "ne",
|
|
533
|
-
onMousedown: (
|
|
533
|
+
onMousedown: (v) => j(v)
|
|
534
534
|
}, null), r("div", {
|
|
535
535
|
class: "ng-resizable-handle ng-resizable-se ng-resizable-diagonal",
|
|
536
536
|
type: "se",
|
|
537
|
-
onMousedown: (
|
|
537
|
+
onMousedown: (v) => j(v)
|
|
538
538
|
}, null), r("div", {
|
|
539
539
|
class: "ng-resizable-handle ng-resizable-sw",
|
|
540
540
|
type: "sw",
|
|
541
|
-
onMousedown: (
|
|
541
|
+
onMousedown: (v) => j(v)
|
|
542
542
|
}, null), r("div", {
|
|
543
543
|
class: "ng-resizable-handle ng-resizable-nw",
|
|
544
544
|
type: "nw",
|
|
545
|
-
onMousedown: (
|
|
545
|
+
onMousedown: (v) => j(v)
|
|
546
546
|
}, null)]);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
const
|
|
550
|
-
c && (
|
|
551
|
-
size:
|
|
548
|
+
function N(c = !0) {
|
|
549
|
+
const v = a.value || document.body, C = $.getCurrent(v), b = n.value;
|
|
550
|
+
c && (z.value = w(), z.value.transform = b.style.transform), C && b && (u.value = C, b.style.height = u.value.height - 14 + "px", b.style.width = u.value.width - 14 + "px", b.style.left = "7px", b.style.top = "7px", b.style.transform = "", B.value = {
|
|
551
|
+
size: u.value,
|
|
552
552
|
position: {
|
|
553
553
|
x: 0,
|
|
554
554
|
y: 0
|
|
555
555
|
}
|
|
556
|
-
},
|
|
556
|
+
}, S.value = !1, O.value = !0);
|
|
557
557
|
}
|
|
558
558
|
function K() {
|
|
559
|
-
var c,
|
|
560
|
-
if (
|
|
559
|
+
var c, v;
|
|
560
|
+
if (z.value) {
|
|
561
561
|
const C = {
|
|
562
|
-
width:
|
|
563
|
-
height:
|
|
564
|
-
},
|
|
562
|
+
width: z.value.size.width || 0,
|
|
563
|
+
height: z.value.size.height || 0
|
|
564
|
+
}, b = {
|
|
565
565
|
x: (window.innerWidth - C.width) / 2,
|
|
566
566
|
y: (window.innerHeight - C.height) / 2
|
|
567
567
|
};
|
|
568
|
-
(c =
|
|
569
|
-
const
|
|
570
|
-
|
|
568
|
+
(c = u.value) == null || c.set(C), (v = d.value) == null || v.set(b);
|
|
569
|
+
const H = n.value;
|
|
570
|
+
H.style.height = C.height + "px", H.style.width = C.width + "px", H.style.left = `${b.x}px`, H.style.top = `${b.y}px`, H.style.transform = "", B.value = {
|
|
571
571
|
size: C,
|
|
572
|
-
position:
|
|
573
|
-
},
|
|
572
|
+
position: b
|
|
573
|
+
}, S.value = t.draggable, O.value = !1;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
function G() {
|
|
577
577
|
if (n.value) {
|
|
578
|
-
const c =
|
|
578
|
+
const c = $.getCurrent(n.value);
|
|
579
579
|
if (c) {
|
|
580
580
|
const {
|
|
581
|
-
width:
|
|
581
|
+
width: v,
|
|
582
582
|
height: C
|
|
583
583
|
} = c;
|
|
584
|
-
n.value.style.left = `${(window.innerWidth -
|
|
584
|
+
n.value.style.left = `${(window.innerWidth - v) / 2}px`, n.value.style.top = `${(window.innerHeight - C) / 2}px`, n.value.style.transform = "";
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function Q() {
|
|
589
589
|
const c = () => {
|
|
590
|
-
|
|
590
|
+
O.value ? N(!1) : G();
|
|
591
591
|
};
|
|
592
592
|
return window.addEventListener("resize", c), () => {
|
|
593
593
|
window.removeEventListener("resize", c);
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
|
-
const
|
|
596
|
+
const U = Q();
|
|
597
597
|
return {
|
|
598
|
-
renderResizeBar:
|
|
598
|
+
renderResizeBar: L,
|
|
599
599
|
boundingElement: a,
|
|
600
600
|
resizedEventParam: B,
|
|
601
|
-
maximize:
|
|
601
|
+
maximize: N,
|
|
602
602
|
restore: K,
|
|
603
|
-
allowDrag:
|
|
604
|
-
isMaximized:
|
|
605
|
-
unWindowResizeHandle:
|
|
603
|
+
allowDrag: S,
|
|
604
|
+
isMaximized: O,
|
|
605
|
+
unWindowResizeHandle: U
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
const n = l(), a = l(t.draggable), f = l(t.lockAxis),
|
|
610
|
-
function B(
|
|
611
|
-
if (
|
|
608
|
+
function Je(t, e) {
|
|
609
|
+
const n = l(), a = l(t.draggable), f = l(t.lockAxis), s = l(), h = l(), u = l(!1), d = l(new R(0, 0)), i = l(new R(0, 0)), g = l(new R(0, 0)), T = l(new R(0, 0));
|
|
610
|
+
function B(m, w) {
|
|
611
|
+
if (w.tagName === "BUTTON")
|
|
612
612
|
return !1;
|
|
613
|
-
if (
|
|
613
|
+
if (w === m)
|
|
614
614
|
return !0;
|
|
615
|
-
for (const
|
|
616
|
-
if (
|
|
615
|
+
for (const I in w.children)
|
|
616
|
+
if (w.children.hasOwnProperty(I) && B(m, w.children[I]))
|
|
617
617
|
return !0;
|
|
618
618
|
return !1;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
var
|
|
622
|
-
let
|
|
623
|
-
f.value === "x" ? (
|
|
624
|
-
const
|
|
625
|
-
n.value && (n.value.style.transform =
|
|
626
|
-
}
|
|
627
|
-
function
|
|
628
|
-
if (!
|
|
620
|
+
function z() {
|
|
621
|
+
var F, j;
|
|
622
|
+
let m = g.value.x + i.value.x, w = g.value.y + i.value.y;
|
|
623
|
+
f.value === "x" ? (m = ((F = d.value) == null ? void 0 : F.x) || 0, g.value.x = 0) : f.value === "y" && (w = ((j = d.value) == null ? void 0 : j.y) || 0, g.value.y = 0);
|
|
624
|
+
const I = `translate3d(${Math.round(m)}px, ${Math.round(w)}px, 0px)`;
|
|
625
|
+
n.value && (n.value.style.transform = I), T.value.x = m, T.value.y = w;
|
|
626
|
+
}
|
|
627
|
+
function S() {
|
|
628
|
+
if (!h.value || !n.value)
|
|
629
629
|
return null;
|
|
630
|
-
const
|
|
631
|
-
top:
|
|
632
|
-
right:
|
|
633
|
-
bottom:
|
|
634
|
-
left:
|
|
630
|
+
const m = h.value.getBoundingClientRect(), w = n.value.getBoundingClientRect(), I = {
|
|
631
|
+
top: m.top < w.top,
|
|
632
|
+
right: m.right > w.right,
|
|
633
|
+
bottom: m.bottom > w.bottom,
|
|
634
|
+
left: m.left < w.left
|
|
635
635
|
};
|
|
636
|
-
return
|
|
636
|
+
return I.top || (g.value.y -= w.top - m.top), I.bottom || (g.value.y -= w.bottom - m.bottom), I.right || (g.value.x -= w.right - m.right), I.left || (g.value.x -= w.left - m.left), z(), I;
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
638
|
+
function O(m) {
|
|
639
|
+
m && (d.value && m.subtract(d.value), g.value.set(m), z(), S());
|
|
640
640
|
}
|
|
641
|
-
function x(
|
|
642
|
-
|
|
641
|
+
function x(m) {
|
|
642
|
+
u.value && a.value && (m.stopPropagation(), m.preventDefault(), O(R.fromEvent(m, s.value)));
|
|
643
643
|
}
|
|
644
644
|
function p() {
|
|
645
|
-
var
|
|
646
|
-
|
|
645
|
+
var m;
|
|
646
|
+
u.value && (u.value = !1, i.value.add(g.value), g.value.reset(), (m = n.value) == null || m.classList.remove("ng-dragging"), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", p));
|
|
647
647
|
}
|
|
648
648
|
function k() {
|
|
649
|
-
!
|
|
649
|
+
!u.value && s.value && (u.value = !0, s.value.classList.add("ng-dragging"), document.addEventListener("mousemove", x), document.addEventListener("mouseup", p));
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function E() {
|
|
652
652
|
if (n.value) {
|
|
653
|
-
const
|
|
654
|
-
i.value.set(
|
|
653
|
+
const m = R.getTransformInfo(n.value);
|
|
654
|
+
i.value.set(m);
|
|
655
655
|
return;
|
|
656
656
|
}
|
|
657
657
|
i.value.reset();
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
if (
|
|
659
|
+
function V(m) {
|
|
660
|
+
if (m instanceof MouseEvent && m.button === 2)
|
|
661
661
|
return;
|
|
662
|
-
const
|
|
663
|
-
|
|
664
|
-
}
|
|
665
|
-
function
|
|
666
|
-
|
|
662
|
+
const w = m.target || m.srcElement;
|
|
663
|
+
s.value !== void 0 && w && !B(w, s.value) || a.value !== !1 && (m.stopPropagation(), m.preventDefault(), d.value = R.fromEvent(m, n.value), E(), k());
|
|
664
|
+
}
|
|
665
|
+
function D(m, w, I) {
|
|
666
|
+
if (m && a.value && w) {
|
|
667
|
+
if (t.dragHandle) {
|
|
668
|
+
if (t.dragHandle instanceof HTMLElement)
|
|
669
|
+
s.value = t.dragHandle;
|
|
670
|
+
else if (typeof t.dragHandle == "string") {
|
|
671
|
+
const F = w.querySelector(t.dragHandle);
|
|
672
|
+
F && (s.value = F);
|
|
673
|
+
}
|
|
674
|
+
} else
|
|
675
|
+
s.value = m;
|
|
676
|
+
n.value = w, h.value = I, s.value.classList.add("ng-draggable"), s.value.addEventListener("mousedown", V);
|
|
677
|
+
}
|
|
667
678
|
}
|
|
668
679
|
return {
|
|
669
|
-
registerDraggle:
|
|
670
|
-
resetTranslate:
|
|
680
|
+
registerDraggle: D,
|
|
681
|
+
resetTranslate: E
|
|
671
682
|
};
|
|
672
683
|
}
|
|
673
|
-
function
|
|
684
|
+
function Ke(t, e) {
|
|
674
685
|
const n = l(t.enableEsc);
|
|
675
686
|
function a(f) {
|
|
676
687
|
f.key === "Escape" && t.enableEsc && e.emit("esc", { event: f, type: "esc" });
|
|
677
688
|
}
|
|
678
689
|
n.value && document.addEventListener("keydown", a);
|
|
679
690
|
}
|
|
680
|
-
const
|
|
691
|
+
const se = /* @__PURE__ */ ne({
|
|
681
692
|
name: "FModal",
|
|
682
|
-
props:
|
|
693
|
+
props: Ue,
|
|
683
694
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
|
|
684
695
|
setup(t, e) {
|
|
685
|
-
const n = l(t.width || 300), a = l(t.height || 200), f = l(t.modelValue),
|
|
686
|
-
function
|
|
696
|
+
const n = l(t.width || 300), a = l(t.height || 200), f = l(t.modelValue), s = l(""), h = l(t.class), u = l(t.fitContent), d = l(t.showHeader), i = l(""), g = l(t.showCloseButton), T = l(t.showMaxButton), B = l(!1), z = l(""), S = l(""), O = l(""), x = l(t.showButtons), p = l(t.title), k = l(t.reiszeable), E = l(t.containment || null), V = l();
|
|
697
|
+
function D(o, M) {
|
|
687
698
|
f.value = !1, e.emit("update:modelValue", !1), M != null && e.emit(M ? "accept" : "cancel"), e.emit("closed", o);
|
|
688
699
|
}
|
|
689
|
-
const
|
|
700
|
+
const m = [{
|
|
690
701
|
name: "cancel",
|
|
691
702
|
text: "取消",
|
|
692
703
|
class: "btn btn-light",
|
|
693
704
|
handle: (o) => {
|
|
694
|
-
|
|
705
|
+
D(o, !1);
|
|
695
706
|
}
|
|
696
707
|
}, {
|
|
697
708
|
name: "accept",
|
|
698
709
|
text: "确定",
|
|
699
710
|
class: "btn btn-primary",
|
|
700
711
|
handle: (o) => {
|
|
701
|
-
|
|
712
|
+
D(o, !0);
|
|
702
713
|
}
|
|
703
|
-
}],
|
|
704
|
-
renderResizeBar:
|
|
705
|
-
maximize:
|
|
706
|
-
restore:
|
|
714
|
+
}], w = l(t.buttons && t.buttons.length ? t.buttons : m), I = y(() => !!i.value), F = y(() => !!x.value && !!w.value), j = l(), L = l(), N = l(!1), {
|
|
715
|
+
renderResizeBar: K,
|
|
716
|
+
maximize: G,
|
|
717
|
+
restore: Q,
|
|
707
718
|
boundingElement: U,
|
|
708
|
-
resizedEventParam:
|
|
709
|
-
allowDrag:
|
|
710
|
-
unWindowResizeHandle:
|
|
711
|
-
} =
|
|
712
|
-
registerDraggle:
|
|
713
|
-
} =
|
|
714
|
-
|
|
719
|
+
resizedEventParam: c,
|
|
720
|
+
allowDrag: v,
|
|
721
|
+
unWindowResizeHandle: C
|
|
722
|
+
} = qe(t), {
|
|
723
|
+
registerDraggle: b
|
|
724
|
+
} = Je(t);
|
|
725
|
+
Y(() => t.title, (o, M) => {
|
|
715
726
|
o !== M && (p.value = o);
|
|
716
|
-
}),
|
|
727
|
+
}), Y(() => t.modelValue, (o, M) => {
|
|
717
728
|
o !== M && (f.value = o);
|
|
718
|
-
}),
|
|
719
|
-
o !== M && (
|
|
720
|
-
}),
|
|
729
|
+
}), Y(() => t.showHeader, (o, M) => {
|
|
730
|
+
o !== M && (d.value = o);
|
|
731
|
+
}), Y(() => t.showButtons, (o, M) => {
|
|
721
732
|
o !== M && (x.value = o);
|
|
722
|
-
}),
|
|
723
|
-
const
|
|
724
|
-
JSON.stringify(
|
|
733
|
+
}), Y(() => c.value, (o, M) => {
|
|
734
|
+
const X = o || {}, q = M || {};
|
|
735
|
+
JSON.stringify(X) !== JSON.stringify(q) && e.emit("resize", {
|
|
725
736
|
newSize: o,
|
|
726
737
|
oldSize: M
|
|
727
738
|
});
|
|
728
739
|
});
|
|
729
|
-
function
|
|
740
|
+
function H() {
|
|
730
741
|
const o = document.querySelectorAll(".farris-modal").length;
|
|
731
|
-
(!o || o - 1 <= 0) && document.body.classList.remove("modal-open");
|
|
742
|
+
(!o || o - 1 <= 0) && document.body.classList.remove("modal-open"), V.value && V.value.classList.remove("show");
|
|
732
743
|
}
|
|
733
|
-
const
|
|
744
|
+
const Z = y(() => (f.value ? document.body.classList.add("modal-open") : H(), f.value)), ie = y(() => {
|
|
734
745
|
const o = {
|
|
735
746
|
modal: !0,
|
|
736
747
|
"farris-modal": !0,
|
|
737
|
-
fade: !0
|
|
738
|
-
show: S.value
|
|
748
|
+
fade: !0
|
|
739
749
|
};
|
|
740
|
-
return o["f-modal-fitContent"] = !!
|
|
741
|
-
}),
|
|
742
|
-
var
|
|
750
|
+
return o["f-modal-fitContent"] = !!u.value, o.show = !!Z.value, o;
|
|
751
|
+
}), ce = y(() => {
|
|
752
|
+
var X;
|
|
743
753
|
const o = {
|
|
744
754
|
"modal-dialog": !0
|
|
745
|
-
}, M = (
|
|
746
|
-
return M == null || M.reduce((q,
|
|
747
|
-
}),
|
|
755
|
+
}, M = (X = h.value) == null ? void 0 : X.split(" ");
|
|
756
|
+
return M == null || M.reduce((q, Ce) => (q[Ce] = !0, q), o), o;
|
|
757
|
+
}), re = y(() => ({
|
|
748
758
|
position: "absolute",
|
|
749
759
|
top: `${(window.innerHeight - a.value) / 2}px`,
|
|
750
760
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
751
761
|
width: `${n.value}px`,
|
|
752
|
-
height:
|
|
753
|
-
})),
|
|
762
|
+
height: u.value ? "auto" : `${a.value}px`
|
|
763
|
+
})), de = y(() => ({
|
|
754
764
|
"modal-content": !0,
|
|
755
|
-
"modal-content-has-header":
|
|
756
|
-
})),
|
|
765
|
+
"modal-content-has-header": d.value
|
|
766
|
+
})), ve = y(() => {
|
|
757
767
|
const o = {
|
|
758
|
-
display:
|
|
768
|
+
display: d.value ? "" : "none"
|
|
759
769
|
};
|
|
760
|
-
return o["pointer-events"] =
|
|
761
|
-
}),
|
|
770
|
+
return o["pointer-events"] = v.value ? "auto" : "none", o;
|
|
771
|
+
}), fe = y(() => ({
|
|
762
772
|
"f-icon": !0,
|
|
763
773
|
modal_maximize: !0,
|
|
764
|
-
modalrevert:
|
|
765
|
-
})),
|
|
774
|
+
modalrevert: N.value
|
|
775
|
+
})), he = y(() => ({
|
|
766
776
|
"modal-body": !0,
|
|
767
|
-
"f-utils-flex-column":
|
|
777
|
+
"f-utils-flex-column": z.value === "iframe"
|
|
768
778
|
}));
|
|
769
|
-
function
|
|
779
|
+
function me() {
|
|
770
780
|
return {};
|
|
771
781
|
}
|
|
772
|
-
const
|
|
782
|
+
const ge = y(() => {
|
|
773
783
|
const o = {
|
|
774
|
-
textAlgin:
|
|
775
|
-
}, M =
|
|
784
|
+
textAlgin: O.value
|
|
785
|
+
}, M = me();
|
|
776
786
|
return Object.assign(o, M);
|
|
777
787
|
});
|
|
778
|
-
function
|
|
779
|
-
if (o.stopPropagation(),
|
|
780
|
-
|
|
788
|
+
function pe(o) {
|
|
789
|
+
if (o.stopPropagation(), N.value) {
|
|
790
|
+
N.value = !1, Q();
|
|
781
791
|
return;
|
|
782
792
|
}
|
|
783
|
-
|
|
793
|
+
G(), N.value = !0;
|
|
784
794
|
}
|
|
785
|
-
async function
|
|
795
|
+
async function ye(o, M) {
|
|
786
796
|
o.handle && await o.handle(M, o) && e.emit("closed", M);
|
|
787
797
|
}
|
|
788
|
-
function
|
|
789
|
-
o.width && (n.value = o.width), o.height && (a.value = o.height), o.buttons && (
|
|
798
|
+
function we(o) {
|
|
799
|
+
o.width && (n.value = o.width), o.height && (a.value = o.height), o.buttons && (w.value = o.buttons), o.title && (p.value = o.title);
|
|
790
800
|
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}),
|
|
794
|
-
|
|
801
|
+
ae(() => {
|
|
802
|
+
L.value && !E.value && (E.value = L.value.parentElement, U.value = E.value, b(j.value, L.value, U.value)), Z.value && document.body.classList.add("modal-open"), Ke(t, e);
|
|
803
|
+
}), le(() => {
|
|
804
|
+
H(), C && C();
|
|
795
805
|
}), e.expose({
|
|
796
|
-
modalElementRef:
|
|
797
|
-
updateModalOptions:
|
|
798
|
-
close:
|
|
806
|
+
modalElementRef: L,
|
|
807
|
+
updateModalOptions: we,
|
|
808
|
+
close: D
|
|
799
809
|
});
|
|
800
|
-
function
|
|
810
|
+
function xe() {
|
|
801
811
|
return r("ul", null, [B.value && r("li", {
|
|
802
812
|
class: "f-btn-icon f-bare"
|
|
803
813
|
}, [r("span", {
|
|
804
814
|
class: "f-icon modal_minimize"
|
|
805
815
|
}, null)]), T.value && r("li", {
|
|
806
|
-
onClick:
|
|
816
|
+
onClick: pe,
|
|
807
817
|
class: "f-btn-icon f-bare",
|
|
808
818
|
style: "pointer-events: auto;"
|
|
809
819
|
}, [r("span", {
|
|
810
|
-
class:
|
|
820
|
+
class: fe.value
|
|
811
821
|
}, null)]), g.value && r("li", {
|
|
812
822
|
class: "f-btn-icon f-bare",
|
|
813
|
-
onClick: (o) =>
|
|
823
|
+
onClick: (o) => D(o, !1),
|
|
814
824
|
style: "pointer-events: auto;"
|
|
815
825
|
}, [r("span", {
|
|
816
826
|
class: "f-icon modal_close"
|
|
817
827
|
}, null)])]);
|
|
818
828
|
}
|
|
819
|
-
function
|
|
829
|
+
function be() {
|
|
820
830
|
return r("div", {
|
|
821
831
|
class: "modal-footer",
|
|
822
|
-
style:
|
|
823
|
-
}, [
|
|
832
|
+
style: ge.value
|
|
833
|
+
}, [w.value && w.value.map((o) => r("button", {
|
|
824
834
|
name: o.name,
|
|
825
835
|
type: "button",
|
|
826
836
|
class: o.class + (o.iconClass ? " btn-icontext" : ""),
|
|
827
837
|
onClick: (M) => {
|
|
828
|
-
|
|
838
|
+
ye(o, M);
|
|
829
839
|
}
|
|
830
840
|
}, [!!o.iconClass && r("i", {
|
|
831
841
|
class: o.iconClass
|
|
832
842
|
}, null), o.text]))]);
|
|
833
843
|
}
|
|
834
|
-
return () => r(
|
|
844
|
+
return () => r(ke, {
|
|
835
845
|
to: "body"
|
|
836
846
|
}, {
|
|
837
847
|
default: () => {
|
|
838
848
|
var o, M;
|
|
839
|
-
return [
|
|
840
|
-
class: ue.value,
|
|
841
|
-
style: "display: block"
|
|
842
|
-
}, [r("div", {
|
|
843
|
-
id: u.value,
|
|
849
|
+
return [Z.value && r("div", {
|
|
844
850
|
class: ie.value,
|
|
845
|
-
style:
|
|
846
|
-
ref:
|
|
851
|
+
style: "display: block",
|
|
852
|
+
ref: V
|
|
853
|
+
}, [r("div", {
|
|
854
|
+
id: s.value,
|
|
855
|
+
class: ce.value,
|
|
856
|
+
style: re.value,
|
|
857
|
+
ref: L
|
|
847
858
|
}, [r("div", {
|
|
848
|
-
class:
|
|
859
|
+
class: de.value
|
|
849
860
|
}, [r("div", {
|
|
850
|
-
ref:
|
|
861
|
+
ref: j,
|
|
851
862
|
class: "modal-header",
|
|
852
|
-
style:
|
|
863
|
+
style: ve.value
|
|
853
864
|
}, [r("div", {
|
|
854
865
|
class: "modal-title"
|
|
855
|
-
}, [
|
|
866
|
+
}, [I.value && r("span", {
|
|
856
867
|
class: i.value,
|
|
857
868
|
style: "margin-right: 8px"
|
|
858
869
|
}, null), r("span", {
|
|
859
870
|
class: "modal-title-label"
|
|
860
871
|
}, [p.value])]), r("div", {
|
|
861
872
|
class: "actions"
|
|
862
|
-
}, [
|
|
863
|
-
class:
|
|
864
|
-
}, [(M = (o = e.slots).default) == null ? void 0 : M.call(o),
|
|
865
|
-
title:
|
|
873
|
+
}, [xe()])]), r("div", {
|
|
874
|
+
class: he.value
|
|
875
|
+
}, [(M = (o = e.slots).default) == null ? void 0 : M.call(o), z.value === "iframe" && r("iframe", {
|
|
876
|
+
title: s.value,
|
|
866
877
|
class: "f-utils-fill",
|
|
867
878
|
width: "100%",
|
|
868
879
|
frameborder: "0",
|
|
869
|
-
src:
|
|
870
|
-
}, null)]),
|
|
880
|
+
src: S.value
|
|
881
|
+
}, null)]), F.value && be()]), !u.value && k.value && L.value && K(L.value)])])];
|
|
871
882
|
}
|
|
872
883
|
});
|
|
873
884
|
}
|
|
874
885
|
});
|
|
875
|
-
function
|
|
886
|
+
function ue(t) {
|
|
876
887
|
if (t.content && t.content.render)
|
|
877
888
|
return t.content.render;
|
|
878
889
|
if (t.render && typeof t.render == "function")
|
|
879
890
|
return t.render;
|
|
880
891
|
}
|
|
881
|
-
function
|
|
892
|
+
function Ge(t) {
|
|
882
893
|
const e = document.createElement("div");
|
|
883
894
|
e.style.display = "contents";
|
|
884
895
|
const n = Ee({
|
|
885
896
|
setup(a, f) {
|
|
886
|
-
|
|
897
|
+
le(() => {
|
|
887
898
|
document.body.removeChild(e);
|
|
888
899
|
});
|
|
889
|
-
const
|
|
890
|
-
}),
|
|
891
|
-
}),
|
|
892
|
-
}),
|
|
893
|
-
}), x =
|
|
894
|
-
g.value = !1, n.unmount(),
|
|
900
|
+
const s = l(), h = l(t.class || ""), u = l(!!t.showButtons), d = l(!!t.showHeader), i = l(t.showCloseButton == null ? !0 : t.showCloseButton), g = l(!0), T = l(t.title || ""), B = t.acceptCallback || (() => {
|
|
901
|
+
}), z = t.rejectCallback || (() => {
|
|
902
|
+
}), S = t.closedCallback || ((k) => {
|
|
903
|
+
}), O = t.resizeHandle || ((k) => {
|
|
904
|
+
}), x = ue(t), p = (k) => {
|
|
905
|
+
g.value = !1, n.unmount(), S(k);
|
|
895
906
|
};
|
|
896
|
-
return
|
|
907
|
+
return ae(() => {
|
|
897
908
|
}), f.expose({
|
|
898
|
-
modalRef:
|
|
899
|
-
}), () => r(
|
|
900
|
-
ref:
|
|
901
|
-
class:
|
|
909
|
+
modalRef: s
|
|
910
|
+
}), () => r(se, {
|
|
911
|
+
ref: s,
|
|
912
|
+
class: h.value,
|
|
902
913
|
modelValue: g.value,
|
|
903
914
|
"onUpdate:modelValue": (k) => g.value = k,
|
|
904
915
|
title: T.value,
|
|
905
916
|
width: t.width,
|
|
906
917
|
height: t.height,
|
|
907
918
|
buttons: t.buttons,
|
|
908
|
-
"show-header":
|
|
909
|
-
"show-buttons":
|
|
919
|
+
"show-header": d.value,
|
|
920
|
+
"show-buttons": u.value,
|
|
910
921
|
"show-close-button": i.value,
|
|
911
922
|
"show-max-button": !1,
|
|
912
923
|
onAccept: B,
|
|
913
|
-
onCancel:
|
|
924
|
+
onCancel: z,
|
|
914
925
|
fitContent: t.fitContent == null ? !0 : t.fitContent,
|
|
915
926
|
onClosed: p,
|
|
916
|
-
onResize:
|
|
927
|
+
onResize: O
|
|
917
928
|
}, {
|
|
918
929
|
default: () => [x && x(n)]
|
|
919
930
|
});
|
|
@@ -921,14 +932,14 @@ function Ke(t) {
|
|
|
921
932
|
});
|
|
922
933
|
return document.body.appendChild(e), n.mount(e), n;
|
|
923
934
|
}
|
|
924
|
-
class
|
|
935
|
+
class Qe {
|
|
925
936
|
constructor(e) {
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
937
|
+
W(this, "appContext", null);
|
|
938
|
+
W(this, "modalRef", l());
|
|
939
|
+
W(this, "activeModalIndex", l(0));
|
|
940
|
+
W(this, "modalRefs", {});
|
|
941
|
+
W(this, "isUseEscCloseModal", l(!1));
|
|
942
|
+
W(this, "activeModalInstance", y(() => this.modalRefs[this.activeModalIndex.value]));
|
|
932
943
|
this.appContext = e ? e._context : null;
|
|
933
944
|
}
|
|
934
945
|
getCurrentModal() {
|
|
@@ -940,53 +951,53 @@ class Ge {
|
|
|
940
951
|
showButtons: !0,
|
|
941
952
|
showHeader: !0
|
|
942
953
|
}, e);
|
|
943
|
-
return
|
|
954
|
+
return Ge(n);
|
|
944
955
|
}
|
|
945
956
|
open(e) {
|
|
946
957
|
const n = document.createDocumentFragment();
|
|
947
958
|
e.showMaxButton && e.fitContent && (e.showMaxButton = !1);
|
|
948
|
-
const a =
|
|
959
|
+
const a = ze(Object.assign({
|
|
949
960
|
title: "",
|
|
950
961
|
showButtons: !0,
|
|
951
962
|
showHeader: !0
|
|
952
|
-
}, e)), f = l(!0),
|
|
953
|
-
}),
|
|
954
|
-
}),
|
|
955
|
-
}),
|
|
963
|
+
}, e)), f = l(!0), s = a.value.acceptCallback || (() => {
|
|
964
|
+
}), h = a.value.rejectCallback || (() => {
|
|
965
|
+
}), u = a.value.closedCallback || ((p, k) => {
|
|
966
|
+
}), d = a.value.resizeHandle || ((p) => {
|
|
956
967
|
});
|
|
957
968
|
let i;
|
|
958
|
-
const g =
|
|
959
|
-
var
|
|
969
|
+
const g = ue(a.value), T = (p) => {
|
|
970
|
+
var E;
|
|
960
971
|
f.value = !1;
|
|
961
|
-
const k = (
|
|
962
|
-
|
|
972
|
+
const k = (E = p == null ? void 0 : p.target) == null ? void 0 : E.classList.contains("modal_close");
|
|
973
|
+
u(p, this.isUseEscCloseModal.value ? "esc" : k ? "icon" : "button");
|
|
963
974
|
}, B = (p) => {
|
|
964
|
-
T(p), i &&
|
|
965
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value],
|
|
975
|
+
T(p), i && Re(() => {
|
|
976
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], _(null, n), i = null, this.modalRef.value = null, this.modalRefs) {
|
|
966
977
|
const k = Object.keys(this.modalRefs);
|
|
967
978
|
k.length > 0 ? this.activeModalIndex.value = Math.max(...k) : this.activeModalIndex.value = 0;
|
|
968
979
|
}
|
|
969
980
|
this.isUseEscCloseModal.value = !1;
|
|
970
981
|
});
|
|
971
|
-
},
|
|
982
|
+
}, z = (p) => {
|
|
972
983
|
var k;
|
|
973
984
|
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((k = this.activeModalInstance.value) == null || k.close(p == null ? void 0 : p.event));
|
|
974
|
-
},
|
|
985
|
+
}, S = () => r(se, oe({
|
|
975
986
|
ref: this.modalRef,
|
|
976
987
|
modelValue: f.value,
|
|
977
988
|
"onUpdate:modelValue": (p) => f.value = p
|
|
978
989
|
}, a.value, {
|
|
979
|
-
onAccept:
|
|
980
|
-
onCancel:
|
|
990
|
+
onAccept: s,
|
|
991
|
+
onCancel: h,
|
|
981
992
|
onClosed: B,
|
|
982
|
-
onResize:
|
|
983
|
-
onEsc:
|
|
993
|
+
onResize: d,
|
|
994
|
+
onEsc: z
|
|
984
995
|
}), {
|
|
985
996
|
default: () => [g && g()]
|
|
986
997
|
});
|
|
987
998
|
return i = ((p) => {
|
|
988
|
-
const k =
|
|
989
|
-
return k.appContext = this.appContext,
|
|
999
|
+
const k = Se(S, p);
|
|
1000
|
+
return k.appContext = this.appContext, _(k, n), k;
|
|
990
1001
|
})({
|
|
991
1002
|
...a.value
|
|
992
1003
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
@@ -995,7 +1006,7 @@ class Ge {
|
|
|
995
1006
|
a.value = {
|
|
996
1007
|
...a.value,
|
|
997
1008
|
...p
|
|
998
|
-
}, i &&
|
|
1009
|
+
}, i && _(He(i, {
|
|
999
1010
|
...a
|
|
1000
1011
|
}), n);
|
|
1001
1012
|
},
|
|
@@ -1004,13 +1015,13 @@ class Ge {
|
|
|
1004
1015
|
};
|
|
1005
1016
|
}
|
|
1006
1017
|
}
|
|
1007
|
-
class
|
|
1018
|
+
class P {
|
|
1008
1019
|
static show(e) {
|
|
1009
|
-
let n = new
|
|
1010
|
-
const a =
|
|
1020
|
+
let n = new Qe();
|
|
1021
|
+
const a = A({
|
|
1011
1022
|
...e
|
|
1012
|
-
}), f = !1,
|
|
1013
|
-
}),
|
|
1023
|
+
}), f = !1, s = a.type === "error" || a.type === "prompt", h = a.type === "error" ? "错误提示" : a.type === "prompt" && a.title || "", u = a.acceptCallback || (() => {
|
|
1024
|
+
}), d = a.rejectCallback || (() => {
|
|
1014
1025
|
});
|
|
1015
1026
|
let i = null;
|
|
1016
1027
|
const g = () => {
|
|
@@ -1018,51 +1029,51 @@ class L {
|
|
|
1018
1029
|
};
|
|
1019
1030
|
i = n == null ? void 0 : n.open({
|
|
1020
1031
|
class: "modal-message modal-message-type-info",
|
|
1021
|
-
title:
|
|
1032
|
+
title: h,
|
|
1022
1033
|
showButtons: f,
|
|
1023
|
-
showHeader:
|
|
1034
|
+
showHeader: s,
|
|
1024
1035
|
width: a.width || 400,
|
|
1025
1036
|
fitContent: !0,
|
|
1026
1037
|
showMaxButton: !1,
|
|
1027
|
-
render: () => r(J,
|
|
1028
|
-
onAccept:
|
|
1029
|
-
onReject:
|
|
1038
|
+
render: () => r(J, oe(a, {
|
|
1039
|
+
onAccept: u,
|
|
1040
|
+
onReject: d,
|
|
1030
1041
|
onClose: g
|
|
1031
1042
|
}), null)
|
|
1032
1043
|
});
|
|
1033
1044
|
}
|
|
1034
1045
|
static info(e, n) {
|
|
1035
|
-
const a =
|
|
1046
|
+
const a = A({
|
|
1036
1047
|
type: "info",
|
|
1037
1048
|
title: e,
|
|
1038
1049
|
detail: n,
|
|
1039
1050
|
okButtonText: "知道了",
|
|
1040
1051
|
cancelButtonText: ""
|
|
1041
1052
|
});
|
|
1042
|
-
|
|
1053
|
+
P.show(a);
|
|
1043
1054
|
}
|
|
1044
1055
|
static warning(e, n) {
|
|
1045
|
-
const a =
|
|
1056
|
+
const a = A({
|
|
1046
1057
|
type: "warning",
|
|
1047
1058
|
title: e,
|
|
1048
1059
|
detail: n,
|
|
1049
1060
|
okButtonText: "知道了",
|
|
1050
1061
|
cancelButtonText: ""
|
|
1051
1062
|
});
|
|
1052
|
-
|
|
1063
|
+
P.show(a);
|
|
1053
1064
|
}
|
|
1054
1065
|
static success(e, n) {
|
|
1055
|
-
const a =
|
|
1066
|
+
const a = A({
|
|
1056
1067
|
type: "success",
|
|
1057
1068
|
title: e,
|
|
1058
1069
|
detail: n,
|
|
1059
1070
|
okButtonText: "关闭",
|
|
1060
1071
|
cancelButtonText: ""
|
|
1061
1072
|
});
|
|
1062
|
-
|
|
1073
|
+
P.show(a);
|
|
1063
1074
|
}
|
|
1064
1075
|
static error(e, n, a) {
|
|
1065
|
-
const f =
|
|
1076
|
+
const f = A({
|
|
1066
1077
|
width: 500,
|
|
1067
1078
|
type: "error",
|
|
1068
1079
|
okButtonText: "关闭",
|
|
@@ -1073,20 +1084,20 @@ class L {
|
|
|
1073
1084
|
detail: n
|
|
1074
1085
|
}
|
|
1075
1086
|
});
|
|
1076
|
-
|
|
1087
|
+
P.show(f);
|
|
1077
1088
|
}
|
|
1078
1089
|
static prompt(e, n) {
|
|
1079
|
-
const a =
|
|
1090
|
+
const a = A({
|
|
1080
1091
|
type: "prompt",
|
|
1081
1092
|
title: e,
|
|
1082
1093
|
detail: n,
|
|
1083
1094
|
okButtonText: "确定",
|
|
1084
1095
|
cancelButtonText: "取消"
|
|
1085
1096
|
});
|
|
1086
|
-
|
|
1097
|
+
P.show(a);
|
|
1087
1098
|
}
|
|
1088
1099
|
static question(e, n, a, f) {
|
|
1089
|
-
const
|
|
1100
|
+
const s = A({
|
|
1090
1101
|
type: "question",
|
|
1091
1102
|
title: e,
|
|
1092
1103
|
detail: n,
|
|
@@ -1095,15 +1106,15 @@ class L {
|
|
|
1095
1106
|
acceptCallback: a,
|
|
1096
1107
|
rejectCallback: f
|
|
1097
1108
|
});
|
|
1098
|
-
|
|
1109
|
+
P.show(s);
|
|
1099
1110
|
}
|
|
1100
1111
|
}
|
|
1101
1112
|
J.install = (t) => {
|
|
1102
|
-
t.component(J.name, J), t.provide("FMessageBoxService",
|
|
1113
|
+
t.component(J.name, J), t.provide("FMessageBoxService", P);
|
|
1103
1114
|
};
|
|
1104
1115
|
export {
|
|
1105
1116
|
J as FMessageBox,
|
|
1106
|
-
|
|
1117
|
+
P as FMessageBoxService,
|
|
1107
1118
|
J as default,
|
|
1108
|
-
|
|
1119
|
+
Oe as messageBoxProps
|
|
1109
1120
|
};
|