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