@vtj/designer 0.8.142 → 0.8.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +723 -717
- package/package.json +7 -7
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
var qn = Object.defineProperty;
|
2
2
|
var Hn = (u, e, t) => e in u ? qn(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
3
3
|
var $ = (u, e, t) => Hn(u, typeof e != "symbol" ? e + "" : e, t);
|
4
|
-
import { computed as S, unref as n, ref as k, reactive as
|
5
|
-
import { ElNotification as Vt, ElMessageBox as At, ElMessage as
|
4
|
+
import { computed as S, unref as n, ref as k, reactive as Ke, watchEffect as Gn, watch as J, toValue as vt, defineComponent as E, openBlock as p, createElementBlock as j, toDisplayString as F, createVNode as v, withCtx as b, createElementVNode as V, createBlock as y, createCommentVNode as A, createTextVNode as K, readonly as Xn, getCurrentScope as Kn, onScopeDispose as Qn, onMounted as st, nextTick as ke, getCurrentInstance as nn, shallowRef as Ue, toRaw as ln, Fragment as O, renderList as L, normalizeClass as X, resolveDynamicComponent as sn, createSlots as Yn, withDirectives as Pe, vShow as Te, renderSlot as Ce, withModifiers as Je, isRef as gt, mergeProps as ie, normalizeStyle as et, defineAsyncComponent as Zn, h as Oe, inject as Ct, provide as el, normalizeProps as an, guardReactiveProps as on, withKeys as tt, onUnmounted as rn, markRaw as ft, createApp as un, shallowReactive as tl, triggerRef as je, KeepAlive as cn } from "vue";
|
5
|
+
import { ElNotification as Vt, ElMessageBox as At, ElMessage as Qe, ElButton as ae, ElDivider as jt, ElRadioGroup as dn, ElRadioButton as nt, ElButtonGroup as nl, ElDropdown as pn, ElDropdownMenu as mn, ElDropdownItem as ht, ElInput as _e, ElEmpty as oe, ElAlert as Et, ElTooltip as vn, ElTag as ll, ElSwitch as gn, ElTree as Pt, ElRow as bt, ElCol as yt, ElCollapse as sl, ElCollapseItem as al, ElDrawer as fn, ElForm as fe, ElFormItem as hn, ElBreadcrumb as ol, ElBreadcrumbItem as rl, ElLoading as il, ElSelect as ul, ElOption as cl, ElInputNumber as dl, ElColorPicker as pl, ElUpload as ml, ElSlider as vl, ElConfigProvider as gl, ElContainer as Lt, ElHeader as fl, ElAside as Nt, ElMain as hl, ElFooter as bl } from "element-plus";
|
6
6
|
import yl from "element-plus/es/locale/lang/zh-cn";
|
7
7
|
import { XIcon as Se, XDialog as Be, XDialogForm as Ae, XField as T, XPanel as at, XAction as be, XTabs as Dt, XContainer as U, XForm as It, XAttachment as _l, XActionBar as wl, XInputUnit as bn, vResizable as Jt, createDialog as kl } from "@vtj/ui";
|
8
8
|
import { delay as Tt, upperFirstCamelCase as yn, toRawType as dt, cloneDeep as ot, logger as Ve, isPlainObject as Sl, fileToBase64 as xl, merge as Bt, debounce as Cl, arrayToMap as Vl, toArray as Al } from "@vtj/utils";
|
9
|
-
import { isBlock as te, DirectiveModel as _n, createNodeFrom as jl, BUILT_IN_VUE as El, BUILT_IN_VUE_ROUTER as Pl, BUILT_IN_NAME as _t, emitter as ne, EVENT_PROJECT_ACTIVED as wt, EVENT_NODE_CHANGE as
|
10
|
-
import { parseExpression as
|
9
|
+
import { isBlock as te, DirectiveModel as _n, createNodeFrom as jl, BUILT_IN_VUE as El, BUILT_IN_VUE_ROUTER as Pl, BUILT_IN_NAME as _t, emitter as ne, EVENT_PROJECT_ACTIVED as wt, EVENT_NODE_CHANGE as qe, NodeModel as Mt, EVENT_BLOCK_CHANGE as kt, Base as wn, BUILT_IN_LIBRARAY_MAP as Dl, ProjectModel as Il, EVENT_PROJECT_CHANGE as Tl, EVENT_PROJECT_BLOCKS_CHANGE as Bl, EVENT_PROJECT_PAGES_CHANGE as Rl, EVENT_PROJECT_DEPS_CHANGE as $l, EVENT_PROJECT_PUBLISH as Ol, EVENT_PROJECT_FILE_PUBLISH as zl, EVENT_HISTORY_CHANGE as Fl, EVENT_HISTORY_LOAD as Wl, BlockModel as Ut, HistoryModel as Ll } from "@vtj/core";
|
10
|
+
import { parseExpression as He, parseFunction as Nl, JSCodeToString as ze, LIFE_CYCLES_LIST as Jl, DATA_TYPES as Ml, isJSExpression as Ge, ContextMode as kn, parseDeps as Ul, createAssetsCss as ql, createAssetScripts as qt, getRawComponent as Ht, createSchemaApis as Hl, mockCleanup as Gl, mockApis as Xl, Provider as Kl, isJSFunction as Ql } from "@vtj/renderer";
|
11
11
|
import { VtjIconBack as Yl, VtjIconPc as Zl, VtjIconPhone as es, VtjIconPad as ts, VtjIconUndo as ns, VtjIconRedo as ls, VtjIconPreview as ss, VtjIconRefresh as as, VtjIconSetting as Sn, icons as St, ArrowDown as xn, Search as Rt, CopyDocument as os, Back as rs, VtjIconPlus as Cn, EditPen as is, Delete as us, VtjIconSave as cs, ArrowUp as ds, MoreFilled as $t, VtjIconCheck as Vn, VtjIconCopy as An, VtjIconEdit as jn, VtjIconRemove as rt, VtjIconLock as En, VtjIconUnlock as ps, VtjIconInvisible as Pn, VtjIconVisible as ms, VtjIconHome as vs, Files as gs, VtjIconSearch as fs, VtjIconHelp as Dn, VtjIconLayers as In, Rank as hs, VtjIconArrowUp as bs, VtjIconArrowDown as ys, IconDisplayBlock as _s, IconDisplayFlex as ws, IconDisplayInlineBlock as ks, IconDisplayInline as Ss, IconEyeInvisible as xs, IconFlexDirectionrow as Cs, IconFlexDirectionrowReverse as Vs, IconFlexDirectioncolumn as As, IconFlexDirectioncolumnReverse as js, IconFlexJustifyflexStartrow as Es, IconFlexJustifyflexEndrow as Ps, IconFlexJustifycenterrow as Ds, IconFlexJustifyspaceBetweenrow as Is, IconFlexJustifyspaceAroundrow as Ts, IconFlexAlignflexStartrow as Bs, IconFlexAlignflexEndrow as Rs, IconFlexAligncenterrow as $s, IconFlexAlignbaselinerow as Os, IconFlexAlignstretchrow as zs, IconPositionTopLeft as Fs, IconPositionTopRight as Ws, IconPositionBottomLeft as Ls, IconPositionBottomRight as Ns, IconPositionLeft as Js, IconPositionRight as Ms, IconPositionTop as Us, IconPositionBottom as qs, IconPositionAll as Hs, IconTextAlignLeft as Gs, IconTextAlignCenter as Xs, IconTextAlignRight as Ks, IconTextAlignJustify as Qs, IconFontStyleNone as Ys, IconFontStyleItalic as Zs, IconCross as Tn, IconTextDecorationUnderline as ea, IconTextDecorationStrike as ta, IconTextDecorationOverline as na, IconTileXy as la, IconTileX as sa, IconTileY as aa, IconClose as oa, IconBorderAll as ra, IconBorderLeft as ia, IconBorderTop as ua, IconBorderBottom as ca, IconBorderRight as da, IconBorderStyleSolid as pa, IconBorderStyleDashed as ma, IconBorderStyleDotted as va, IconCursorAuto as ga, IconCursorPointer as fa, IconCursorNotAllowed as ha, IconCursorNone as ba, ArrowRight as ya, VtjIconDocument as _a, VtjIconComponents as wa, VtjIconBlock as ka, VtjIconOutline as Sa, VtjIconHistory as xa, VtjIconApi as Ca, VtjIconCategory as Va, VtjIconInfo as Aa, HomeFilled as ja, Plus as Ea, Close as Pa, VtjIconVars as Da, VtjIconSwitch as Ia, Switch as Ta } from "@vtj/icons";
|
12
12
|
import Ba from "mockjs";
|
13
13
|
/**!
|
14
14
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
15
15
|
* @name @vtj/designer
|
16
16
|
* @author CHC chenhuachun1549@dingtalk.com
|
17
|
-
* @version 0.8.
|
17
|
+
* @version 0.8.144
|
18
18
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
19
19
|
*/
|
20
|
-
const Ra = "0.8.
|
20
|
+
const Ra = "0.8.144", Gt = {
|
21
21
|
width: 390,
|
22
22
|
height: 844
|
23
23
|
}, Xt = {
|
@@ -83,7 +83,7 @@ function Ja() {
|
|
83
83
|
}
|
84
84
|
const Ma = (u = []) => u.map((e) => e.name);
|
85
85
|
function Ua() {
|
86
|
-
const u = de(), { components: e, groups: t, componentMap: l } = u.assets, s =
|
86
|
+
const u = de(), { components: e, groups: t, componentMap: l } = u.assets, s = Ke({}), a = S(() => {
|
87
87
|
const m = {};
|
88
88
|
return t.value && t.value.forEach((f) => {
|
89
89
|
m[f.name] = f;
|
@@ -95,8 +95,8 @@ function Ua() {
|
|
95
95
|
})) : []), r = k(o.value[0]?.name), i = k(""), g = S(() => a.value[r.value]);
|
96
96
|
Gn(() => {
|
97
97
|
const m = o.value.reduce(
|
98
|
-
(f,
|
99
|
-
a.value[
|
98
|
+
(f, h) => (f[h.name] = Ma(
|
99
|
+
a.value[h.name].children
|
100
100
|
), f),
|
101
101
|
{}
|
102
102
|
);
|
@@ -208,16 +208,16 @@ function Xa(u, e) {
|
|
208
208
|
const t = k(""), { selected: l, isSelectBlock: s } = xe(), a = S(() => l.value?.model.id), o = S(() => {
|
209
209
|
const i = vt(u), g = vt(e), d = [];
|
210
210
|
if (!i) return d;
|
211
|
-
const m = g?.__contextRefs[a.value || ""],
|
212
|
-
|
211
|
+
const m = g?.__contextRefs[a.value || ""], h = g === m || s.value ? [] : Object.keys(m?.context || {}).filter((R) => !["context", "ref"].includes(R)).map((R) => `this.context.${R}`);
|
212
|
+
h.length && d.push({ title: "上下文", items: h });
|
213
213
|
const c = i.inject.map((R) => `this.${R.name}`);
|
214
214
|
c.length && d.push({ title: "注入", items: c });
|
215
|
-
const
|
215
|
+
const _ = i.props.map(
|
216
216
|
(R) => typeof R == "string" ? `this.props.${R}` : `this.props.${R.name}`
|
217
217
|
);
|
218
|
-
|
219
|
-
const
|
220
|
-
|
218
|
+
_.length && d.push({ title: "属性", items: _ });
|
219
|
+
const w = Object.keys(i.state).map((R) => `this.state.${R}`);
|
220
|
+
w.length && d.push({ title: "状态", items: w });
|
221
221
|
const x = Object.keys(i.computed).map(
|
222
222
|
(R) => `this.${R}.value`
|
223
223
|
);
|
@@ -300,9 +300,9 @@ function Ka(u) {
|
|
300
300
|
] : []), a = S(() => {
|
301
301
|
if (!t.value) return [];
|
302
302
|
const m = l.value || e.assets.componentMap.get(t.value.name);
|
303
|
-
return m ? (m.props || []).map((
|
304
|
-
...
|
305
|
-
value: t.value?.getPropValue(
|
303
|
+
return m ? (m.props || []).map((h) => ({
|
304
|
+
...h,
|
305
|
+
value: t.value?.getPropValue(h.name) ?? h.defaultValue
|
306
306
|
})) : [];
|
307
307
|
}), o = (m) => s.value.some((f) => f.name === m) || a.value.some((f) => f.name === m) || m === "style", r = S(() => t.value ? Object.keys(t.value.props).filter((m) => !o(m)).map((m) => ({
|
308
308
|
name: m,
|
@@ -338,7 +338,7 @@ async function Fe(u) {
|
|
338
338
|
);
|
339
339
|
}
|
340
340
|
function pe(u, e = "success") {
|
341
|
-
return
|
341
|
+
return Qe({
|
342
342
|
message: u,
|
343
343
|
type: e
|
344
344
|
});
|
@@ -359,7 +359,7 @@ function re(u, e, t = !1) {
|
|
359
359
|
let l = !0;
|
360
360
|
const s = Qa(e);
|
361
361
|
try {
|
362
|
-
u.type === "JSExpression" ?
|
362
|
+
u.type === "JSExpression" ? He(u, s, t, !0) : Nl(u, s, t, !0);
|
363
363
|
} catch (a) {
|
364
364
|
l = !1, Vt.error({
|
365
365
|
title: "代码错误",
|
@@ -468,12 +468,12 @@ function no(u) {
|
|
468
468
|
const e = de(), t = S(() => {
|
469
469
|
const c = u.value?.model || null;
|
470
470
|
return te(c) ? null : c;
|
471
|
-
}), l = (c) => S(() => t.value && (t.value.directives || []).find((
|
471
|
+
}), l = (c) => S(() => t.value && (t.value.directives || []).find((_) => _.name === c) || Qt(c)), s = () => S(() => {
|
472
472
|
if (!t.value) return [];
|
473
473
|
const c = e.assets.componentMap.get(t.value.name || "");
|
474
|
-
return (c ? to(c) : []).map((
|
475
|
-
(x) => x.name === "vModel" && x.arg ==
|
476
|
-
) || eo(
|
474
|
+
return (c ? to(c) : []).map((w) => (t.value?.directives || []).find(
|
475
|
+
(x) => x.name === "vModel" && x.arg == w.name
|
476
|
+
) || eo(w.name));
|
477
477
|
}), a = l("vIf"), o = l("vShow"), r = l("vBind"), i = l("vFor"), g = s(), d = {
|
478
478
|
vIf: a,
|
479
479
|
vShow: o,
|
@@ -488,26 +488,26 @@ function no(u) {
|
|
488
488
|
vBind: r,
|
489
489
|
vFor: i,
|
490
490
|
vModels: g,
|
491
|
-
onValueChange: (c,
|
492
|
-
const
|
493
|
-
t.value && (
|
491
|
+
onValueChange: (c, _) => {
|
492
|
+
const w = d[c];
|
493
|
+
t.value && (_ ? (w.value.value = _, t.value.setDirective(w.value)) : (w.value.value = void 0, t.value.removeDirective(w.value)));
|
494
494
|
},
|
495
|
-
onForChange: (c,
|
495
|
+
onForChange: (c, _) => {
|
496
496
|
if (t.value) {
|
497
497
|
if (c === "value") {
|
498
|
-
|
498
|
+
_ ? (i.value.value = _, t.value.setDirective(i.value)) : t.value.removeDirective(i.value);
|
499
499
|
return;
|
500
500
|
}
|
501
501
|
(c === "item" || c === "index") && (i.value.iterator = {
|
502
502
|
...i.value.iterator,
|
503
|
-
[c]:
|
503
|
+
[c]: _ || void 0
|
504
504
|
}, t.value.setDirective(i.value));
|
505
505
|
}
|
506
506
|
},
|
507
|
-
onModelChange: (c,
|
507
|
+
onModelChange: (c, _) => {
|
508
508
|
if (!t.value) return;
|
509
|
-
const
|
510
|
-
x && (
|
509
|
+
const w = parseInt(c), x = g.value[w];
|
510
|
+
x && (_ ? (x.value = _, t.value.setDirective(x)) : (x.value = void 0, t.value.removeDirective(x)));
|
511
511
|
}
|
512
512
|
};
|
513
513
|
}
|
@@ -566,7 +566,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
566
566
|
round: "",
|
567
567
|
onClick: o
|
568
568
|
}, {
|
569
|
-
default:
|
569
|
+
default: b(() => [
|
570
570
|
v(n(Yl), { class: "v-switcher-widget__back" }),
|
571
571
|
V("span", null, F(s.value), 1),
|
572
572
|
a.value ? (p(), y(n(jt), {
|
@@ -596,12 +596,12 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
596
596
|
modelValue: r.value,
|
597
597
|
"onUpdate:modelValue": g[0] || (g[0] = (d) => r.value = d)
|
598
598
|
}, {
|
599
|
-
default:
|
599
|
+
default: b(() => [
|
600
600
|
v(n(nt), {
|
601
601
|
label: "pc",
|
602
602
|
value: "pc"
|
603
603
|
}, {
|
604
|
-
default:
|
604
|
+
default: b(() => [
|
605
605
|
v(n(Zl))
|
606
606
|
]),
|
607
607
|
_: 1
|
@@ -610,7 +610,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
610
610
|
label: "mobile",
|
611
611
|
value: "mobile"
|
612
612
|
}, {
|
613
|
-
default:
|
613
|
+
default: b(() => [
|
614
614
|
v(n(es))
|
615
615
|
]),
|
616
616
|
_: 1
|
@@ -619,7 +619,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
619
619
|
label: "pad",
|
620
620
|
value: "pad"
|
621
621
|
}, {
|
622
|
-
default:
|
622
|
+
default: b(() => [
|
623
623
|
v(n(ts))
|
624
624
|
]),
|
625
625
|
_: 1
|
@@ -629,14 +629,14 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
629
629
|
}, 8, ["modelValue"]),
|
630
630
|
A("", !0),
|
631
631
|
v(n(nl), null, {
|
632
|
-
default:
|
632
|
+
default: b(() => [
|
633
633
|
v(n(ae), {
|
634
634
|
type: "default",
|
635
635
|
size: "small",
|
636
636
|
onClick: n(s),
|
637
637
|
disabled: n(o) || !!t.preview
|
638
638
|
}, {
|
639
|
-
default:
|
639
|
+
default: b(() => [
|
640
640
|
v(n(ns))
|
641
641
|
]),
|
642
642
|
_: 1
|
@@ -647,7 +647,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
647
647
|
onClick: n(l),
|
648
648
|
disabled: n(a) || !!t.preview
|
649
649
|
}, {
|
650
|
-
default:
|
650
|
+
default: b(() => [
|
651
651
|
v(n(ls))
|
652
652
|
]),
|
653
653
|
_: 1
|
@@ -695,7 +695,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
695
695
|
size: "small",
|
696
696
|
title: "预览"
|
697
697
|
}, {
|
698
|
-
default:
|
698
|
+
default: b(() => [
|
699
699
|
v(n(ss))
|
700
700
|
]),
|
701
701
|
_: 1
|
@@ -706,7 +706,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
706
706
|
size: "small",
|
707
707
|
title: "刷新"
|
708
708
|
}, {
|
709
|
-
default:
|
709
|
+
default: b(() => [
|
710
710
|
v(n(as))
|
711
711
|
]),
|
712
712
|
_: 1
|
@@ -717,7 +717,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
717
717
|
title: "页面设置",
|
718
718
|
onClick: a
|
719
719
|
}, {
|
720
|
-
default:
|
720
|
+
default: b(() => [
|
721
721
|
v(n(Sn))
|
722
722
|
]),
|
723
723
|
_: 1
|
@@ -730,17 +730,17 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
730
730
|
onClick: r,
|
731
731
|
onCommand: i
|
732
732
|
}, {
|
733
|
-
dropdown:
|
733
|
+
dropdown: b(() => [
|
734
734
|
v(n(mn), null, {
|
735
|
-
default:
|
735
|
+
default: b(() => [
|
736
736
|
v(n(ht), { command: "current" }, {
|
737
|
-
default:
|
737
|
+
default: b(() => d[0] || (d[0] = [
|
738
738
|
K("发布页面")
|
739
739
|
])),
|
740
740
|
_: 1
|
741
741
|
}),
|
742
742
|
v(n(ht), { command: "project" }, {
|
743
|
-
default:
|
743
|
+
default: b(() => d[1] || (d[1] = [
|
744
744
|
K("整站发布")
|
745
745
|
])),
|
746
746
|
_: 1
|
@@ -749,7 +749,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
749
749
|
_: 1
|
750
750
|
})
|
751
751
|
]),
|
752
|
-
default:
|
752
|
+
default: b(() => [
|
753
753
|
d[2] || (d[2] = V("span", null, "发布", -1))
|
754
754
|
]),
|
755
755
|
_: 1
|
@@ -760,7 +760,7 @@ const so = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
760
760
|
function Ot(u) {
|
761
761
|
return Kn() ? (Qn(u), !0) : !1;
|
762
762
|
}
|
763
|
-
function
|
763
|
+
function We(u) {
|
764
764
|
return typeof u == "function" ? u() : n(u);
|
765
765
|
}
|
766
766
|
const it = typeof window < "u" && typeof document < "u";
|
@@ -801,7 +801,7 @@ function Co(u, e, t = {}) {
|
|
801
801
|
function i(...g) {
|
802
802
|
o(), s.value = !0, a = setTimeout(() => {
|
803
803
|
s.value = !1, a = null, u(...g);
|
804
|
-
},
|
804
|
+
}, We(e));
|
805
805
|
}
|
806
806
|
return l && (s.value = !0, it && i()), Ot(r), {
|
807
807
|
isPending: Xn(s),
|
@@ -809,27 +809,27 @@ function Co(u, e, t = {}) {
|
|
809
809
|
stop: r
|
810
810
|
};
|
811
811
|
}
|
812
|
+
const ut = it ? window : void 0, On = it ? window.navigator : void 0;
|
812
813
|
function ye(u) {
|
813
814
|
var e;
|
814
|
-
const t =
|
815
|
+
const t = We(u);
|
815
816
|
return (e = t?.$el) != null ? e : t;
|
816
817
|
}
|
817
|
-
|
818
|
-
function Je(...u) {
|
818
|
+
function Me(...u) {
|
819
819
|
let e, t, l, s;
|
820
820
|
if (typeof u[0] == "string" || Array.isArray(u[0]) ? ([t, l, s] = u, e = ut) : [e, t, l, s] = u, !e)
|
821
821
|
return lt;
|
822
822
|
Array.isArray(t) || (t = [t]), Array.isArray(l) || (l = [l]);
|
823
823
|
const a = [], o = () => {
|
824
824
|
a.forEach((d) => d()), a.length = 0;
|
825
|
-
}, r = (d, m, f,
|
826
|
-
() => [ye(e),
|
825
|
+
}, r = (d, m, f, h) => (d.addEventListener(m, f, h), () => d.removeEventListener(m, f, h)), i = J(
|
826
|
+
() => [ye(e), We(s)],
|
827
827
|
([d, m]) => {
|
828
828
|
if (o(), !d)
|
829
829
|
return;
|
830
830
|
const f = yo(m) ? { ...m } : m;
|
831
831
|
a.push(
|
832
|
-
...t.flatMap((
|
832
|
+
...t.flatMap((h) => l.map((c) => r(d, h, c, f)))
|
833
833
|
);
|
834
834
|
},
|
835
835
|
{ immediate: !0, flush: "post" }
|
@@ -843,39 +843,45 @@ function Vo(u, e, t = {}) {
|
|
843
843
|
const { window: l = ut, ignore: s = [], capture: a = !0, detectIframe: o = !1 } = t;
|
844
844
|
if (!l)
|
845
845
|
return lt;
|
846
|
-
_o && !Yt && (Yt = !0, Array.from(l.document.body.children).forEach((
|
846
|
+
_o && !Yt && (Yt = !0, Array.from(l.document.body.children).forEach((h) => h.addEventListener("click", lt)), l.document.documentElement.addEventListener("click", lt));
|
847
847
|
let r = !0;
|
848
|
-
const i = (
|
849
|
-
if (typeof
|
850
|
-
return Array.from(l.document.querySelectorAll(
|
848
|
+
const i = (h) => We(s).some((c) => {
|
849
|
+
if (typeof c == "string")
|
850
|
+
return Array.from(l.document.querySelectorAll(c)).some((_) => _ === h.target || h.composedPath().includes(_));
|
851
851
|
{
|
852
|
-
const
|
853
|
-
return
|
852
|
+
const _ = ye(c);
|
853
|
+
return _ && (h.target === _ || h.composedPath().includes(_));
|
854
854
|
}
|
855
|
-
}),
|
856
|
-
|
857
|
-
|
858
|
-
if (
|
859
|
-
|
860
|
-
|
861
|
-
return;
|
862
|
-
}
|
863
|
-
e(f);
|
855
|
+
}), g = (h) => {
|
856
|
+
const c = ye(u);
|
857
|
+
if (!(!c || c === h.target || h.composedPath().includes(c))) {
|
858
|
+
if (h.detail === 0 && (r = !i(h)), !r) {
|
859
|
+
r = !0;
|
860
|
+
return;
|
864
861
|
}
|
862
|
+
e(h);
|
863
|
+
}
|
864
|
+
};
|
865
|
+
let d = !1;
|
866
|
+
const m = [
|
867
|
+
Me(l, "click", (h) => {
|
868
|
+
d || (d = !0, setTimeout(() => {
|
869
|
+
d = !1;
|
870
|
+
}, 0), g(h));
|
865
871
|
}, { passive: !0, capture: a }),
|
866
|
-
|
867
|
-
const
|
868
|
-
r = !i(
|
872
|
+
Me(l, "pointerdown", (h) => {
|
873
|
+
const c = ye(u);
|
874
|
+
r = !i(h) && !!(c && !h.composedPath().includes(c));
|
869
875
|
}, { passive: !0 }),
|
870
|
-
o &&
|
876
|
+
o && Me(l, "blur", (h) => {
|
871
877
|
setTimeout(() => {
|
872
|
-
var
|
873
|
-
const
|
874
|
-
((
|
878
|
+
var c;
|
879
|
+
const _ = ye(u);
|
880
|
+
((c = l.document.activeElement) == null ? void 0 : c.tagName) === "IFRAME" && !_?.contains(l.document.activeElement) && e(h);
|
875
881
|
}, 0);
|
876
882
|
})
|
877
883
|
].filter(Boolean);
|
878
|
-
return () =>
|
884
|
+
return () => m.forEach((h) => h());
|
879
885
|
}
|
880
886
|
function Ao() {
|
881
887
|
const u = k(!1), e = nn();
|
@@ -891,11 +897,11 @@ function Zt(u, e = {}) {
|
|
891
897
|
const {
|
892
898
|
controls: t = !1,
|
893
899
|
navigator: l = On
|
894
|
-
} = e, s = zt(() => l && "permissions" in l), a =
|
900
|
+
} = e, s = zt(() => l && "permissions" in l), a = Ue(), o = typeof u == "string" ? { name: u } : u, r = Ue(), i = () => {
|
895
901
|
var d, m;
|
896
902
|
r.value = (m = (d = a.value) == null ? void 0 : d.state) != null ? m : "prompt";
|
897
903
|
};
|
898
|
-
|
904
|
+
Me(a, "change", i);
|
899
905
|
const g = ko(async () => {
|
900
906
|
if (s.value) {
|
901
907
|
if (!a.value)
|
@@ -924,20 +930,20 @@ function zn(u = {}) {
|
|
924
930
|
copiedDuring: s = 1500,
|
925
931
|
legacy: a = !1
|
926
932
|
} = u, o = zt(() => e && "clipboard" in e), r = Zt("clipboard-read"), i = Zt("clipboard-write"), g = S(() => o.value || a), d = k(""), m = k(!1), f = Co(() => m.value = !1, s);
|
927
|
-
function
|
933
|
+
function h() {
|
928
934
|
o.value && x(r.value) ? e.clipboard.readText().then((C) => {
|
929
935
|
d.value = C;
|
930
|
-
}) : d.value =
|
936
|
+
}) : d.value = w();
|
931
937
|
}
|
932
|
-
g.value && t &&
|
933
|
-
async function c(C =
|
934
|
-
g.value && C != null && (o.value && x(i.value) ? await e.clipboard.writeText(C) :
|
938
|
+
g.value && t && Me(["copy", "cut"], h);
|
939
|
+
async function c(C = We(l)) {
|
940
|
+
g.value && C != null && (o.value && x(i.value) ? await e.clipboard.writeText(C) : _(C), d.value = C, m.value = !0, f.start());
|
935
941
|
}
|
936
|
-
function
|
942
|
+
function _(C) {
|
937
943
|
const I = document.createElement("textarea");
|
938
944
|
I.value = C ?? "", I.style.position = "absolute", I.style.opacity = "0", document.body.appendChild(I), I.select(), document.execCommand("copy"), I.remove();
|
939
945
|
}
|
940
|
-
function
|
946
|
+
function w() {
|
941
947
|
var C, I, z;
|
942
948
|
return (z = (I = (C = document?.getSelection) == null ? void 0 : C.call(document)) == null ? void 0 : I.toString()) != null ? z : "";
|
943
949
|
}
|
@@ -957,7 +963,7 @@ function jo(u, e, t = {}) {
|
|
957
963
|
const o = zt(() => l && "ResizeObserver" in l), r = () => {
|
958
964
|
a && (a.disconnect(), a = void 0);
|
959
965
|
}, i = S(() => {
|
960
|
-
const m =
|
966
|
+
const m = We(u);
|
961
967
|
return Array.isArray(m) ? m.map((f) => ye(f)) : [ye(m)];
|
962
968
|
}), g = J(
|
963
969
|
i,
|
@@ -977,7 +983,7 @@ function jo(u, e, t = {}) {
|
|
977
983
|
stop: d
|
978
984
|
};
|
979
985
|
}
|
980
|
-
function
|
986
|
+
function Xe(u, e = { width: 0, height: 0 }, t = {}) {
|
981
987
|
const { window: l = ut, box: s = "content-box" } = t, a = S(() => {
|
982
988
|
var m, f;
|
983
989
|
return (f = (m = ye(u)) == null ? void 0 : m.namespaceURI) == null ? void 0 : f.includes("svg");
|
@@ -986,14 +992,14 @@ function Ge(u, e = { width: 0, height: 0 }, t = {}) {
|
|
986
992
|
([m]) => {
|
987
993
|
const f = s === "border-box" ? m.borderBoxSize : s === "content-box" ? m.contentBoxSize : m.devicePixelContentBoxSize;
|
988
994
|
if (l && a.value) {
|
989
|
-
const
|
990
|
-
if (
|
991
|
-
const c =
|
995
|
+
const h = ye(u);
|
996
|
+
if (h) {
|
997
|
+
const c = h.getBoundingClientRect();
|
992
998
|
o.value = c.width, r.value = c.height;
|
993
999
|
}
|
994
1000
|
} else if (f) {
|
995
|
-
const
|
996
|
-
o.value =
|
1001
|
+
const h = Array.isArray(f) ? f : [f];
|
1002
|
+
o.value = h.reduce((c, { inlineSize: _ }) => c + _, 0), r.value = h.reduce((c, { blockSize: _ }) => c + _, 0);
|
997
1003
|
} else
|
998
1004
|
o.value = m.contentRect.width, r.value = m.contentRect.height;
|
999
1005
|
},
|
@@ -1030,10 +1036,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1030
1036
|
const t = u, l = e, s = k(!1), a = k(t.modelValue), o = k(""), r = S(
|
1031
1037
|
() => St[t.modelValue] || t.modelValue
|
1032
1038
|
), i = S(() => {
|
1033
|
-
const
|
1034
|
-
return o.value ?
|
1035
|
-
}), g = (
|
1036
|
-
a.value =
|
1039
|
+
const h = Object.entries(St);
|
1040
|
+
return o.value ? h.filter((c) => c[0].toLowerCase().includes(o.value)) : h;
|
1041
|
+
}), g = (h) => {
|
1042
|
+
a.value = h;
|
1037
1043
|
}, d = () => {
|
1038
1044
|
l("change", a.value), l("update:modelValue", a.value), s.value = !1;
|
1039
1045
|
}, m = () => {
|
@@ -1041,7 +1047,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1041
1047
|
}, f = () => {
|
1042
1048
|
s.value = !0;
|
1043
1049
|
};
|
1044
|
-
return (
|
1050
|
+
return (h, c) => (p(), j("div", Eo, [
|
1045
1051
|
v(n(_e), {
|
1046
1052
|
size: t.size,
|
1047
1053
|
readonly: "",
|
@@ -1050,7 +1056,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1050
1056
|
"suffix-icon": n(xn),
|
1051
1057
|
onFocus: f
|
1052
1058
|
}, {
|
1053
|
-
prepend:
|
1059
|
+
prepend: b(() => [
|
1054
1060
|
v(n(Se), { icon: r.value }, null, 8, ["icon"])
|
1055
1061
|
]),
|
1056
1062
|
_: 1
|
@@ -1064,36 +1070,36 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1064
1070
|
submit: "",
|
1065
1071
|
clear: "",
|
1066
1072
|
modelValue: s.value,
|
1067
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
1073
|
+
"onUpdate:modelValue": c[1] || (c[1] = (_) => s.value = _),
|
1068
1074
|
onSubmit: d
|
1069
1075
|
}, {
|
1070
|
-
extra:
|
1076
|
+
extra: b(() => [
|
1071
1077
|
v(n(ae), {
|
1072
1078
|
size: "default",
|
1073
1079
|
type: "warning",
|
1074
1080
|
onClick: m
|
1075
1081
|
}, {
|
1076
|
-
default:
|
1082
|
+
default: b(() => c[2] || (c[2] = [
|
1077
1083
|
K(" 清除绑定 ")
|
1078
1084
|
])),
|
1079
1085
|
_: 1
|
1080
1086
|
})
|
1081
1087
|
]),
|
1082
|
-
default:
|
1088
|
+
default: b(() => [
|
1083
1089
|
V("div", Po, [
|
1084
1090
|
v(n(_e), {
|
1085
1091
|
size: t.size,
|
1086
1092
|
"prefix-icon": n(Rt),
|
1087
1093
|
clearable: "",
|
1088
1094
|
modelValue: o.value,
|
1089
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
1095
|
+
"onUpdate:modelValue": c[0] || (c[0] = (_) => o.value = _),
|
1090
1096
|
placeholder: "请输入查询关键字"
|
1091
1097
|
}, null, 8, ["size", "prefix-icon", "modelValue"]),
|
1092
1098
|
V("div", Do, [
|
1093
|
-
(p(!0), j(O, null, L(i.value, (
|
1094
|
-
icon:
|
1095
|
-
onClick: (
|
1096
|
-
class: X({ "is-active": a.value ===
|
1099
|
+
(p(!0), j(O, null, L(i.value, (_) => (p(), y(n(Se), {
|
1100
|
+
icon: _[1],
|
1101
|
+
onClick: (w) => g(_[0]),
|
1102
|
+
class: X({ "is-active": a.value === _[0] })
|
1097
1103
|
}, null, 8, ["icon", "onClick", "class"]))), 256)),
|
1098
1104
|
i.value.length === 0 ? (p(), y(n(oe), { key: 0 })) : A("", !0)
|
1099
1105
|
])
|
@@ -1125,7 +1131,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1125
1131
|
], r = (m) => {
|
1126
1132
|
a.value && (a.value.name = yn(m));
|
1127
1133
|
}, i = async (m) => t.value?.existPageName(m.name, [m.id]) ? (le("页面名称已存在,请更换"), !1) : (e.item ? t.value?.updatePage(m) : t.value?.createPage(m, e.parentId), !0), { copy: g } = zn({}), d = (m) => {
|
1128
|
-
g(m),
|
1134
|
+
g(m), Qe.success({
|
1129
1135
|
message: "已经复制到粘贴板"
|
1130
1136
|
});
|
1131
1137
|
};
|
@@ -1137,7 +1143,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1137
1143
|
model: a.value,
|
1138
1144
|
"submit-method": i
|
1139
1145
|
}, {
|
1140
|
-
default:
|
1146
|
+
default: b(() => [
|
1141
1147
|
v(n(T), {
|
1142
1148
|
name: "dir",
|
1143
1149
|
label: "类型",
|
@@ -1152,13 +1158,13 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1152
1158
|
label: "路由",
|
1153
1159
|
disabled: ""
|
1154
1160
|
}, {
|
1155
|
-
editor:
|
1161
|
+
editor: b(() => [
|
1156
1162
|
v(n(Et), { closable: !1 }, {
|
1157
|
-
default:
|
1163
|
+
default: b(() => [
|
1158
1164
|
K(F(`/page/${a.value.id}`) + " ", 1),
|
1159
1165
|
v(n(Se), {
|
1160
1166
|
icon: n(os),
|
1161
|
-
onClick: f[0] || (f[0] = (
|
1167
|
+
onClick: f[0] || (f[0] = (h) => d(`/page/${a.value.id}`))
|
1162
1168
|
}, null, 8, ["icon"])
|
1163
1169
|
]),
|
1164
1170
|
_: 1
|
@@ -1183,10 +1189,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1183
1189
|
label: "菜单图标",
|
1184
1190
|
editor: "none"
|
1185
1191
|
}, {
|
1186
|
-
editor:
|
1192
|
+
editor: b(() => [
|
1187
1193
|
v(Fn, {
|
1188
1194
|
modelValue: a.value.icon,
|
1189
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
1195
|
+
"onUpdate:modelValue": f[1] || (f[1] = (h) => a.value.icon = h),
|
1190
1196
|
size: "default"
|
1191
1197
|
}, null, 8, ["modelValue"])
|
1192
1198
|
]),
|
@@ -1239,7 +1245,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1239
1245
|
content: o.label,
|
1240
1246
|
"show-after": 600
|
1241
1247
|
}, {
|
1242
|
-
default:
|
1248
|
+
default: b(() => [
|
1243
1249
|
V("div", {
|
1244
1250
|
class: X(["v-apps-region__icon", s.value]),
|
1245
1251
|
onClick: a
|
@@ -1286,19 +1292,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1286
1292
|
onClick: t.collapsable ? () => {
|
1287
1293
|
s.value = !s.value;
|
1288
1294
|
} : void 0
|
1289
|
-
} : null), f = (
|
1290
|
-
s.value =
|
1295
|
+
} : null), f = (h) => {
|
1296
|
+
s.value = h;
|
1291
1297
|
};
|
1292
|
-
return (
|
1298
|
+
return (h, c) => (p(), y(n(at), {
|
1293
1299
|
class: X(["v-panel", a.value]),
|
1294
1300
|
border: !1,
|
1295
1301
|
header: m.value,
|
1296
1302
|
fit: ""
|
1297
1303
|
}, Yn({
|
1298
|
-
actions:
|
1304
|
+
actions: b(() => [
|
1299
1305
|
t.plus ? (p(), y(n(be), {
|
1300
1306
|
key: 0,
|
1301
|
-
size:
|
1307
|
+
size: h.$attrs.size,
|
1302
1308
|
mode: "icon",
|
1303
1309
|
icon: n(Cn),
|
1304
1310
|
background: "hover",
|
@@ -1307,7 +1313,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1307
1313
|
}, null, 8, ["size", "icon"])) : A("", !0),
|
1308
1314
|
t.edit ? (p(), y(n(be), {
|
1309
1315
|
key: 1,
|
1310
|
-
size:
|
1316
|
+
size: h.$attrs.size,
|
1311
1317
|
mode: "icon",
|
1312
1318
|
icon: n(is),
|
1313
1319
|
background: "hover",
|
@@ -1316,7 +1322,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1316
1322
|
}, null, 8, ["size", "icon"])) : A("", !0),
|
1317
1323
|
t.remove ? (p(), y(n(be), {
|
1318
1324
|
key: 2,
|
1319
|
-
size:
|
1325
|
+
size: h.$attrs.size,
|
1320
1326
|
mode: "icon",
|
1321
1327
|
icon: n(us),
|
1322
1328
|
background: "hover",
|
@@ -1325,7 +1331,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1325
1331
|
}, null, 8, ["size", "icon"])) : A("", !0),
|
1326
1332
|
t.save ? (p(), y(n(be), {
|
1327
1333
|
key: 3,
|
1328
|
-
size:
|
1334
|
+
size: h.$attrs.size,
|
1329
1335
|
mode: "icon",
|
1330
1336
|
icon: n(cs),
|
1331
1337
|
background: "hover",
|
@@ -1334,37 +1340,37 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1334
1340
|
}, null, 8, ["size", "icon"])) : A("", !0),
|
1335
1341
|
t.collapsable ? Pe((p(), y(n(be), {
|
1336
1342
|
key: 4,
|
1337
|
-
size:
|
1343
|
+
size: h.$attrs.size,
|
1338
1344
|
mode: "icon",
|
1339
1345
|
icon: n(xn),
|
1340
1346
|
background: "hover",
|
1341
1347
|
title: "展开",
|
1342
|
-
onClick: c[0] || (c[0] = (
|
1348
|
+
onClick: c[0] || (c[0] = (_) => f(!1))
|
1343
1349
|
}, null, 8, ["size", "icon"])), [
|
1344
1350
|
[Te, s.value]
|
1345
1351
|
]) : A("", !0),
|
1346
1352
|
t.collapsable ? Pe((p(), y(n(be), {
|
1347
1353
|
key: 5,
|
1348
|
-
size:
|
1354
|
+
size: h.$attrs.size,
|
1349
1355
|
mode: "icon",
|
1350
1356
|
icon: n(ds),
|
1351
1357
|
background: "hover",
|
1352
1358
|
title: "收起",
|
1353
|
-
onClick: c[1] || (c[1] = (
|
1359
|
+
onClick: c[1] || (c[1] = (_) => f(!0))
|
1354
1360
|
}, null, 8, ["size", "icon"])), [
|
1355
1361
|
[Te, !s.value]
|
1356
1362
|
]) : A("", !0),
|
1357
|
-
Ce(
|
1363
|
+
Ce(h.$slots, "actions")
|
1358
1364
|
]),
|
1359
|
-
default:
|
1360
|
-
Ce(
|
1365
|
+
default: b(() => [
|
1366
|
+
Ce(h.$slots, "default")
|
1361
1367
|
]),
|
1362
1368
|
_: 2
|
1363
1369
|
}, [
|
1364
|
-
|
1370
|
+
h.$slots.footer ? {
|
1365
1371
|
name: "footer",
|
1366
|
-
fn:
|
1367
|
-
Ce(
|
1372
|
+
fn: b(() => [
|
1373
|
+
Ce(h.$slots, "footer")
|
1368
1374
|
]),
|
1369
1375
|
key: "0"
|
1370
1376
|
} : void 0
|
@@ -1413,7 +1419,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1413
1419
|
fit: "",
|
1414
1420
|
radius: !1
|
1415
1421
|
}, {
|
1416
|
-
header:
|
1422
|
+
header: b(() => [
|
1417
1423
|
V("div", To, [
|
1418
1424
|
v(n(Dt), {
|
1419
1425
|
class: "v-tabs__tabs",
|
@@ -1439,7 +1445,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1439
1445
|
menus: t.menus,
|
1440
1446
|
onCommand: a
|
1441
1447
|
}, {
|
1442
|
-
item:
|
1448
|
+
item: b(({ item: d }) => [
|
1443
1449
|
V("span", null, [
|
1444
1450
|
t.checkable ? (p(), y(n(Vn), {
|
1445
1451
|
key: 0,
|
@@ -1456,7 +1462,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1456
1462
|
])) : A("", !0)
|
1457
1463
|
])
|
1458
1464
|
]),
|
1459
|
-
default:
|
1465
|
+
default: b(() => [
|
1460
1466
|
Ce(i.$slots, "default")
|
1461
1467
|
]),
|
1462
1468
|
_: 3
|
@@ -1562,12 +1568,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1562
1568
|
align: "center",
|
1563
1569
|
onClick: i
|
1564
1570
|
}, {
|
1565
|
-
default:
|
1571
|
+
default: b(() => [
|
1566
1572
|
v(n(U), {
|
1567
1573
|
class: "v-item__title",
|
1568
1574
|
align: "center"
|
1569
1575
|
}, {
|
1570
|
-
default:
|
1576
|
+
default: b(() => [
|
1571
1577
|
Ce(d.$slots, "default", {}, () => [
|
1572
1578
|
d.icon ? (p(), y(n(Se), {
|
1573
1579
|
key: 0,
|
@@ -1579,7 +1585,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1579
1585
|
size: "small",
|
1580
1586
|
type: l.tagType
|
1581
1587
|
}, {
|
1582
|
-
default:
|
1588
|
+
default: b(() => [
|
1583
1589
|
K(F(l.tag), 1)
|
1584
1590
|
]),
|
1585
1591
|
_: 1
|
@@ -1596,10 +1602,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1596
1602
|
}),
|
1597
1603
|
v(n(U), {
|
1598
1604
|
class: "v-item__actions",
|
1599
|
-
onClick: m[1] || (m[1] =
|
1605
|
+
onClick: m[1] || (m[1] = Je(() => {
|
1600
1606
|
}, ["stop"]))
|
1601
1607
|
}, {
|
1602
|
-
default:
|
1608
|
+
default: b(() => [
|
1603
1609
|
(p(!0), j(O, null, L(o.value, (f) => (p(), y(n(be), {
|
1604
1610
|
name: f.name,
|
1605
1611
|
title: f.label,
|
@@ -1608,7 +1614,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1608
1614
|
background: "none",
|
1609
1615
|
type: "info",
|
1610
1616
|
icon: f.icon,
|
1611
|
-
onClick: (
|
1617
|
+
onClick: (h) => g(f.name)
|
1612
1618
|
}, null, 8, ["name", "title", "icon", "onClick"]))), 256)),
|
1613
1619
|
l.switch ? (p(), y(n(gn), {
|
1614
1620
|
key: 0,
|
@@ -1664,7 +1670,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1664
1670
|
justify: "center",
|
1665
1671
|
align: "center"
|
1666
1672
|
}, {
|
1667
|
-
default:
|
1673
|
+
default: b(() => [
|
1668
1674
|
V("span", zo, F(t.name), 1),
|
1669
1675
|
V("span", Fo, F(t.title), 1)
|
1670
1676
|
]),
|
@@ -1676,7 +1682,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1676
1682
|
justify: "flex-end",
|
1677
1683
|
align: "center"
|
1678
1684
|
}, {
|
1679
|
-
default:
|
1685
|
+
default: b(() => [
|
1680
1686
|
v(n(Se), {
|
1681
1687
|
icon: n(jn),
|
1682
1688
|
onClick: s
|
@@ -1704,24 +1710,24 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1704
1710
|
const t = u, l = e, s = ["$provider", "$apis", "$components", "context"], a = (d) => {
|
1705
1711
|
const m = d.value, f = dt(m);
|
1706
1712
|
return f === "Object" || f === "Module" ? Object.keys(m || {}).length === 0 : f === "Array" ? m.length === 0 : !0;
|
1707
|
-
}, o = (d, m = "this") => typeof d == "object" ? Array.isArray(d) ? d.map((
|
1708
|
-
const
|
1713
|
+
}, o = (d, m = "this") => typeof d == "object" ? Array.isArray(d) ? d.map((h, c) => {
|
1714
|
+
const _ = `[${c}]`;
|
1709
1715
|
return {
|
1710
|
-
label:
|
1711
|
-
value:
|
1712
|
-
type: dt(
|
1713
|
-
path: `${m}${
|
1716
|
+
label: _,
|
1717
|
+
value: h,
|
1718
|
+
type: dt(h),
|
1719
|
+
path: `${m}${_}`
|
1714
1720
|
};
|
1715
|
-
}) : Ya(d).map((
|
1716
|
-
const c = d[
|
1721
|
+
}) : Ya(d).map((h) => {
|
1722
|
+
const c = d[h];
|
1717
1723
|
return {
|
1718
|
-
label:
|
1724
|
+
label: h,
|
1719
1725
|
value: c,
|
1720
1726
|
type: dt(c),
|
1721
|
-
path: `${m}.${
|
1727
|
+
path: `${m}.${h}`
|
1722
1728
|
};
|
1723
1729
|
}).filter(
|
1724
|
-
(
|
1730
|
+
(h) => !h.label.startsWith("__") && !s.includes(h.label)
|
1725
1731
|
) : [], r = (d, m) => {
|
1726
1732
|
if (d.level === 0)
|
1727
1733
|
m(o(t.context));
|
@@ -1742,16 +1748,16 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1742
1748
|
"expand-on-click-node": !1,
|
1743
1749
|
props: { isLeaf: a }
|
1744
1750
|
}, {
|
1745
|
-
default:
|
1751
|
+
default: b(({ data: f }) => [
|
1746
1752
|
v(ce, {
|
1747
1753
|
title: f.label,
|
1748
1754
|
subtitle: f.type,
|
1749
1755
|
"subtitle-cls": f.type,
|
1750
1756
|
clickable: "",
|
1751
|
-
onClick: (
|
1757
|
+
onClick: (h) => g(f),
|
1752
1758
|
background: "",
|
1753
1759
|
actions: ["copy"],
|
1754
|
-
onAction: (
|
1760
|
+
onAction: (h) => i(f),
|
1755
1761
|
grow: "",
|
1756
1762
|
small: ""
|
1757
1763
|
}, null, 8, ["title", "subtitle", "subtitle-cls", "onClick", "onAction"])
|
@@ -1796,14 +1802,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1796
1802
|
l("update:modelValue", !1), l("close");
|
1797
1803
|
}, f = () => {
|
1798
1804
|
l("unbind");
|
1799
|
-
},
|
1805
|
+
}, h = () => {
|
1800
1806
|
m();
|
1801
1807
|
}, c = async () => {
|
1802
1808
|
g.value?.submit();
|
1803
|
-
}, w = (x) => {
|
1804
|
-
l("pick", x);
|
1805
1809
|
}, _ = (x) => {
|
1806
|
-
|
1810
|
+
l("pick", x);
|
1811
|
+
}, w = (x) => {
|
1812
|
+
o(x), Qe.success({
|
1807
1813
|
message: "已经复制到粘贴板"
|
1808
1814
|
});
|
1809
1815
|
};
|
@@ -1819,32 +1825,32 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1819
1825
|
minimizable: !1,
|
1820
1826
|
onClose: m
|
1821
1827
|
}, {
|
1822
|
-
default:
|
1828
|
+
default: b(() => [
|
1823
1829
|
v(n(U), {
|
1824
1830
|
fit: "",
|
1825
1831
|
direction: "row",
|
1826
1832
|
overflow: "hidden"
|
1827
1833
|
}, {
|
1828
|
-
default:
|
1834
|
+
default: b(() => [
|
1829
1835
|
v(n(U), {
|
1830
1836
|
width: "30%",
|
1831
1837
|
height: "100%"
|
1832
1838
|
}, {
|
1833
|
-
default:
|
1839
|
+
default: b(() => [
|
1834
1840
|
v(ct, {
|
1835
1841
|
class: "v-binder__tabs",
|
1836
1842
|
items: r,
|
1837
1843
|
modelValue: i.value,
|
1838
1844
|
"onUpdate:modelValue": C[1] || (C[1] = (I) => i.value = I)
|
1839
1845
|
}, {
|
1840
|
-
default:
|
1846
|
+
default: b(() => [
|
1841
1847
|
v(n(U), {
|
1842
1848
|
class: "v-binder__tab-content",
|
1843
1849
|
fit: "",
|
1844
1850
|
padding: "",
|
1845
1851
|
flex: !1
|
1846
1852
|
}, {
|
1847
|
-
default:
|
1853
|
+
default: b(() => [
|
1848
1854
|
Pe(V("div", null, [
|
1849
1855
|
v(n(_e), {
|
1850
1856
|
modelValue: n(a),
|
@@ -1856,7 +1862,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1856
1862
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
1857
1863
|
(p(!0), j(O, null, L(n(s), (I) => (p(), j("div", null, [
|
1858
1864
|
v(n(jt), { "border-style": "dotted" }, {
|
1859
|
-
default:
|
1865
|
+
default: b(() => [
|
1860
1866
|
K(F(I.title), 1)
|
1861
1867
|
]),
|
1862
1868
|
_: 2
|
@@ -1866,8 +1872,8 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1866
1872
|
background: "",
|
1867
1873
|
actions: ["copy"],
|
1868
1874
|
small: "",
|
1869
|
-
onClick: (R) =>
|
1870
|
-
onAction: (R) =>
|
1875
|
+
onClick: (R) => _(z),
|
1876
|
+
onAction: (R) => w(z)
|
1871
1877
|
}, null, 8, ["title", "onClick", "onAction"]))), 256))
|
1872
1878
|
]))), 256)),
|
1873
1879
|
n(s).length ? A("", !0) : (p(), y(n(oe), { key: 0 }))
|
@@ -1876,8 +1882,8 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1876
1882
|
]),
|
1877
1883
|
Pe(v(Lo, {
|
1878
1884
|
context: t.context,
|
1879
|
-
onCopy:
|
1880
|
-
onPick:
|
1885
|
+
onCopy: w,
|
1886
|
+
onPick: _
|
1881
1887
|
}, null, 8, ["context"]), [
|
1882
1888
|
[Te, i.value === "viewer"]
|
1883
1889
|
])
|
@@ -1895,18 +1901,18 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1895
1901
|
header: null,
|
1896
1902
|
border: !1
|
1897
1903
|
}, {
|
1898
|
-
footer:
|
1904
|
+
footer: b(() => [
|
1899
1905
|
v(n(U), { justify: "space-between" }, {
|
1900
|
-
default:
|
1906
|
+
default: b(() => [
|
1901
1907
|
v(n(U), null, {
|
1902
|
-
default:
|
1908
|
+
default: b(() => [
|
1903
1909
|
x.unbindEnabled ? (p(), y(n(ae), {
|
1904
1910
|
key: 0,
|
1905
1911
|
type: "warning",
|
1906
1912
|
size: "default",
|
1907
1913
|
onClick: f
|
1908
1914
|
}, {
|
1909
|
-
default:
|
1915
|
+
default: b(() => C[2] || (C[2] = [
|
1910
1916
|
K(" 移除绑定 ")
|
1911
1917
|
])),
|
1912
1918
|
_: 1
|
@@ -1915,13 +1921,13 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1915
1921
|
_: 1
|
1916
1922
|
}),
|
1917
1923
|
v(n(U), null, {
|
1918
|
-
default:
|
1924
|
+
default: b(() => [
|
1919
1925
|
v(n(ae), {
|
1920
1926
|
type: "default",
|
1921
1927
|
size: "default",
|
1922
|
-
onClick:
|
1928
|
+
onClick: h
|
1923
1929
|
}, {
|
1924
|
-
default:
|
1930
|
+
default: b(() => C[3] || (C[3] = [
|
1925
1931
|
K(" 取消 ")
|
1926
1932
|
])),
|
1927
1933
|
_: 1
|
@@ -1931,7 +1937,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1931
1937
|
size: "default",
|
1932
1938
|
onClick: c
|
1933
1939
|
}, {
|
1934
|
-
default:
|
1940
|
+
default: b(() => C[4] || (C[4] = [
|
1935
1941
|
K(" 确定 ")
|
1936
1942
|
])),
|
1937
1943
|
_: 1
|
@@ -1943,7 +1949,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1943
1949
|
_: 1
|
1944
1950
|
})
|
1945
1951
|
]),
|
1946
|
-
default:
|
1952
|
+
default: b(() => [
|
1947
1953
|
v(n(It), {
|
1948
1954
|
ref_key: "formRef",
|
1949
1955
|
ref: g,
|
@@ -1955,7 +1961,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1955
1961
|
rules: t.rules,
|
1956
1962
|
"submit-method": d
|
1957
1963
|
}, {
|
1958
|
-
default:
|
1964
|
+
default: b(() => [
|
1959
1965
|
Ce(x.$slots, "default")
|
1960
1966
|
]),
|
1961
1967
|
_: 3
|
@@ -1991,7 +1997,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
1991
1997
|
cancel: "",
|
1992
1998
|
onSubmit: r
|
1993
1999
|
}, i.$attrs), {
|
1994
|
-
default:
|
2000
|
+
default: b(() => [
|
1995
2001
|
v(n(Et), {
|
1996
2002
|
title: "该组件支持多个插槽,请选择放置到其中一个",
|
1997
2003
|
type: "warning",
|
@@ -2004,14 +2010,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2004
2010
|
gap: "",
|
2005
2011
|
wrap: "wrap"
|
2006
2012
|
}, {
|
2007
|
-
default:
|
2013
|
+
default: b(() => [
|
2008
2014
|
(p(!0), j(O, null, L(t.slots, (d, m) => (p(), y(n(U), {
|
2009
2015
|
class: X(["v-slots-picker__item", { "is-active": d.name === s.value?.name }]),
|
2010
2016
|
grow: "",
|
2011
2017
|
flex: !1,
|
2012
2018
|
onClick: (f) => o(d)
|
2013
2019
|
}, {
|
2014
|
-
default:
|
2020
|
+
default: b(() => [
|
2015
2021
|
V("span", No, "#" + F(m + 1), 1),
|
2016
2022
|
K(" " + F(d.name), 1)
|
2017
2023
|
]),
|
@@ -2061,38 +2067,38 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2061
2067
|
setup(u) {
|
2062
2068
|
const { project: e, engine: t } = Re(), l = S(() => e.value?.pages || []), { current: s } = ue(), a = k(!1), o = k(), r = k(), i = () => {
|
2063
2069
|
r.value = void 0, o.value = void 0, a.value = !0;
|
2064
|
-
}, g = async (
|
2065
|
-
const { name: c, modelValue:
|
2066
|
-
if (c === "add" && (o.value = void 0, r.value =
|
2067
|
-
if (
|
2068
|
-
const C = e.value?.getPage(
|
2070
|
+
}, g = async (h) => {
|
2071
|
+
const { name: c, modelValue: _ } = h, { data: w, node: x } = _;
|
2072
|
+
if (c === "add" && (o.value = void 0, r.value = w.id, a.value = !0), c === "edit" && (o.value = ot(w), r.value = void 0, a.value = !0), c === "remove") {
|
2073
|
+
if (w.dir) {
|
2074
|
+
const C = e.value?.getPage(w.id);
|
2069
2075
|
if (C && C.children?.length) {
|
2070
2076
|
le("请先删除子页面");
|
2071
2077
|
return;
|
2072
2078
|
}
|
2073
2079
|
}
|
2074
|
-
e.value?.removePage(
|
2080
|
+
e.value?.removePage(w.id);
|
2075
2081
|
}
|
2076
2082
|
if (c === "copy") {
|
2077
2083
|
const C = x.parent?.data.id;
|
2078
|
-
e.value?.clonePage(
|
2084
|
+
e.value?.clonePage(w, C);
|
2079
2085
|
}
|
2080
|
-
c === "home" && (e.value?.setHomepage(
|
2081
|
-
}, d = async (
|
2082
|
-
|
2083
|
-
}, m = (
|
2086
|
+
c === "home" && (e.value?.setHomepage(w.id), pe("设置主页成功", "success"));
|
2087
|
+
}, d = async (h) => {
|
2088
|
+
h.raw && pe("这是源码模式页面,不能低代码设计", "warning"), h.dir || h.raw ? t.project.value?.deactivate() : t.project.value?.active(h);
|
2089
|
+
}, m = (h, c, _) => _ === "inner" ? !!c.data.dir : !0, f = () => {
|
2084
2090
|
e.value?.update({
|
2085
2091
|
pages: vt(l)
|
2086
2092
|
});
|
2087
2093
|
};
|
2088
|
-
return (
|
2094
|
+
return (h, c) => (p(), y(n(H), {
|
2089
2095
|
class: "v-pages-widget",
|
2090
2096
|
title: "页面管理",
|
2091
2097
|
plus: "",
|
2092
2098
|
subtitle: "(共 0 条)",
|
2093
2099
|
onPlus: i
|
2094
2100
|
}, {
|
2095
|
-
default:
|
2101
|
+
default: b(() => [
|
2096
2102
|
v(n(Pt), {
|
2097
2103
|
data: l.value,
|
2098
2104
|
"node-key": "id",
|
@@ -2101,18 +2107,18 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2101
2107
|
"allow-drop": m,
|
2102
2108
|
onNodeDrop: f
|
2103
2109
|
}, {
|
2104
|
-
default:
|
2110
|
+
default: b(({ data: _, node: w }) => [
|
2105
2111
|
v(n(ce), {
|
2106
2112
|
class: "v-pages-widget__item",
|
2107
|
-
icon: n(St)[
|
2108
|
-
title:
|
2109
|
-
subtitle:
|
2110
|
-
"model-value": { data:
|
2111
|
-
actions:
|
2113
|
+
icon: n(St)[_.icon],
|
2114
|
+
title: _.title,
|
2115
|
+
subtitle: _.name,
|
2116
|
+
"model-value": { data: _, node: w },
|
2117
|
+
actions: _.dir ? ["add", "edit", "remove"] : _.raw ? ["home", "edit", "remove"] : ["home", "copy", "edit", "remove"],
|
2112
2118
|
onAction: g,
|
2113
|
-
onClick: (x) => d(
|
2114
|
-
active: n(s)?.id ===
|
2115
|
-
tag: n(e)?.homepage ===
|
2119
|
+
onClick: (x) => d(_),
|
2120
|
+
active: n(s)?.id === _.id,
|
2121
|
+
tag: n(e)?.homepage === _.id ? "主页" : void 0,
|
2116
2122
|
"tag-type": "success",
|
2117
2123
|
grow: "",
|
2118
2124
|
small: "",
|
@@ -2125,7 +2131,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2125
2131
|
a.value ? (p(), y(Io, {
|
2126
2132
|
key: 0,
|
2127
2133
|
modelValue: a.value,
|
2128
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
2134
|
+
"onUpdate:modelValue": c[0] || (c[0] = (_) => a.value = _),
|
2129
2135
|
item: o.value,
|
2130
2136
|
"parent-id": r.value
|
2131
2137
|
}, null, 8, ["modelValue", "item", "parent-id"])) : A("", !0)
|
@@ -2165,7 +2171,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2165
2171
|
o.value = i(I);
|
2166
2172
|
}
|
2167
2173
|
});
|
2168
|
-
const
|
2174
|
+
const h = () => {
|
2169
2175
|
if (!m.value || Array.isArray(m.value) && m.value.length === 0)
|
2170
2176
|
return le("请选择文件"), !1;
|
2171
2177
|
const C = (t.attachment?.accept || "").toLowerCase().split(",");
|
@@ -2174,10 +2180,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2174
2180
|
return C.includes(B);
|
2175
2181
|
}) ? !0 : (le(`只支持 ${C.join(",")} 文件`), !1) : !0;
|
2176
2182
|
}, c = () => {
|
2177
|
-
|
2178
|
-
}, w = () => {
|
2179
|
-
m.value = [], l("change", void 0), l("update:modelValue", void 0), r.value = !1;
|
2183
|
+
h() && (l("change", f.value), l("update:modelValue", f.value), r.value = !1);
|
2180
2184
|
}, _ = () => {
|
2185
|
+
m.value = [], l("change", void 0), l("update:modelValue", void 0), r.value = !1;
|
2186
|
+
}, w = () => {
|
2181
2187
|
r.value = !0;
|
2182
2188
|
}, x = (C) => {
|
2183
2189
|
C.name && a.value?.id && s.service.removeStaticFile(C.name, a.value?.id);
|
@@ -2185,7 +2191,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2185
2191
|
return (C, I) => (p(), j("div", Uo, [
|
2186
2192
|
v(n(_e), ie({
|
2187
2193
|
readonly: "",
|
2188
|
-
onFocus:
|
2194
|
+
onFocus: w,
|
2189
2195
|
"model-value": t.modelValue,
|
2190
2196
|
"suffix-icon": n(gs)
|
2191
2197
|
}, C.$attrs), null, 16, ["model-value", "suffix-icon"]),
|
@@ -2200,19 +2206,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2200
2206
|
submit: "",
|
2201
2207
|
onSubmit: c
|
2202
2208
|
}, {
|
2203
|
-
extra:
|
2209
|
+
extra: b(() => [
|
2204
2210
|
v(n(ae), {
|
2205
2211
|
type: "warning",
|
2206
2212
|
size: "default",
|
2207
|
-
onClick:
|
2213
|
+
onClick: _
|
2208
2214
|
}, {
|
2209
|
-
default:
|
2215
|
+
default: b(() => I[3] || (I[3] = [
|
2210
2216
|
K(" 清除 ")
|
2211
2217
|
])),
|
2212
2218
|
_: 1
|
2213
2219
|
})
|
2214
2220
|
]),
|
2215
|
-
default:
|
2221
|
+
default: b(() => [
|
2216
2222
|
v(n(_l), ie({
|
2217
2223
|
size: "small",
|
2218
2224
|
"list-type": "list",
|
@@ -2273,7 +2279,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2273
2279
|
return ".json";
|
2274
2280
|
if (o.value?.fromType === "Plugin")
|
2275
2281
|
return ".js,.css,.json";
|
2276
|
-
}),
|
2282
|
+
}), h = S(() => o.value?.fromType === "Plugin"), c = async (D) => {
|
2277
2283
|
const B = D, P = l.project.value;
|
2278
2284
|
if (!P) return !1;
|
2279
2285
|
if (D.id)
|
@@ -2286,9 +2292,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2286
2292
|
else
|
2287
2293
|
return le(`名称【${B.name}】已经存在,请更换名称`), !1;
|
2288
2294
|
return !0;
|
2289
|
-
},
|
2295
|
+
}, _ = () => {
|
2290
2296
|
o.value = m(), i.value = !0;
|
2291
|
-
},
|
2297
|
+
}, w = (D) => {
|
2292
2298
|
o.value = ot(D), i.value = !0;
|
2293
2299
|
}, x = (D) => {
|
2294
2300
|
l.project.value?.removeBlock(D.id);
|
@@ -2308,19 +2314,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2308
2314
|
title: "区块管理",
|
2309
2315
|
subtitle: d.value,
|
2310
2316
|
plus: "",
|
2311
|
-
onPlus:
|
2317
|
+
onPlus: _
|
2312
2318
|
}, {
|
2313
|
-
default:
|
2319
|
+
default: b(() => [
|
2314
2320
|
v(n(bt), {
|
2315
2321
|
wrap: "wrap",
|
2316
2322
|
gutter: 5
|
2317
2323
|
}, {
|
2318
|
-
default:
|
2324
|
+
default: b(() => [
|
2319
2325
|
(p(!0), j(O, null, L(n(t), (P) => (p(), y(n(yt), {
|
2320
2326
|
key: P.id,
|
2321
2327
|
span: n(e)
|
2322
2328
|
}, {
|
2323
|
-
default:
|
2329
|
+
default: b(() => [
|
2324
2330
|
v(n(xt), {
|
2325
2331
|
name: P.name,
|
2326
2332
|
title: P.title,
|
@@ -2328,7 +2334,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2328
2334
|
editable: !P.preset,
|
2329
2335
|
tag: a[P.fromType || "Schema"]?.label,
|
2330
2336
|
tagType: a[P.fromType || "Schema"]?.type,
|
2331
|
-
onEdit: (G) =>
|
2337
|
+
onEdit: (G) => w(P),
|
2332
2338
|
onRemove: (G) => x(P),
|
2333
2339
|
onClick: (G) => I(P),
|
2334
2340
|
draggable: n(r)?.id !== P.id,
|
@@ -2352,7 +2358,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2352
2358
|
"form-props": { tooltipMessage: !1 },
|
2353
2359
|
"submit-method": c
|
2354
2360
|
}, {
|
2355
|
-
default:
|
2361
|
+
default: b(() => [
|
2356
2362
|
v(n(T), {
|
2357
2363
|
name: "fromType",
|
2358
2364
|
label: "类型",
|
@@ -2389,7 +2395,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2389
2395
|
label: "资源文件",
|
2390
2396
|
required: "",
|
2391
2397
|
editor: Wt,
|
2392
|
-
props: { attachment: { accept: f.value, multiple:
|
2398
|
+
props: { attachment: { accept: f.value, multiple: h.value } }
|
2393
2399
|
}, null, 8, ["props"])) : A("", !0)
|
2394
2400
|
]),
|
2395
2401
|
_: 1
|
@@ -2417,16 +2423,16 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2417
2423
|
title: "组件库",
|
2418
2424
|
body: { flex: !0, direction: "column" }
|
2419
2425
|
}, {
|
2420
|
-
default:
|
2426
|
+
default: b(() => [
|
2421
2427
|
V("div", Ho, [
|
2422
2428
|
v(n(_e), {
|
2423
2429
|
modelValue: n(r),
|
2424
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
2430
|
+
"onUpdate:modelValue": f[0] || (f[0] = (h) => gt(r) ? r.value = h : null),
|
2425
2431
|
placeholder: "搜索组件",
|
2426
2432
|
clearable: "",
|
2427
2433
|
size: "small"
|
2428
2434
|
}, {
|
2429
|
-
prefix:
|
2435
|
+
prefix: b(() => [
|
2430
2436
|
v(n(fs))
|
2431
2437
|
]),
|
2432
2438
|
_: 1
|
@@ -2437,17 +2443,17 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2437
2443
|
wrap: "wrap",
|
2438
2444
|
gutter: 5
|
2439
2445
|
}, {
|
2440
|
-
default:
|
2441
|
-
(p(!0), j(O, null, L(n(i), (
|
2446
|
+
default: b(() => [
|
2447
|
+
(p(!0), j(O, null, L(n(i), (h) => (p(), y(n(yt), {
|
2442
2448
|
span: n(e),
|
2443
|
-
key:
|
2449
|
+
key: h.name
|
2444
2450
|
}, {
|
2445
|
-
default:
|
2451
|
+
default: b(() => [
|
2446
2452
|
v(n(xt), {
|
2447
|
-
name:
|
2448
|
-
title:
|
2453
|
+
name: h.name,
|
2454
|
+
title: h.label || h.name,
|
2449
2455
|
draggable: "",
|
2450
|
-
onDragstart: (c) => g(
|
2456
|
+
onDragstart: (c) => g(h),
|
2451
2457
|
onDragend: d
|
2452
2458
|
}, null, 8, ["name", "title", "onDragstart"])
|
2453
2459
|
]),
|
@@ -2461,38 +2467,38 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2461
2467
|
key: 1,
|
2462
2468
|
items: n(l),
|
2463
2469
|
modelValue: n(s),
|
2464
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
2470
|
+
"onUpdate:modelValue": f[2] || (f[2] = (h) => gt(s) ? s.value = h : null)
|
2465
2471
|
}, {
|
2466
|
-
default:
|
2472
|
+
default: b(() => [
|
2467
2473
|
V("div", Xo, [
|
2468
2474
|
n(a) ? (p(), y(n(sl), {
|
2469
2475
|
key: 0,
|
2470
2476
|
modelValue: n(o)[n(s)],
|
2471
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
2477
|
+
"onUpdate:modelValue": f[1] || (f[1] = (h) => n(o)[n(s)] = h)
|
2472
2478
|
}, {
|
2473
|
-
default:
|
2474
|
-
(p(!0), j(O, null, L(n(a).children, (
|
2475
|
-
key:
|
2476
|
-
name:
|
2477
|
-
title: `${
|
2479
|
+
default: b(() => [
|
2480
|
+
(p(!0), j(O, null, L(n(a).children, (h) => (p(), y(n(al), {
|
2481
|
+
key: h.name,
|
2482
|
+
name: h.name,
|
2483
|
+
title: `${h.label} (${h.count})`
|
2478
2484
|
}, {
|
2479
|
-
default:
|
2480
|
-
|
2485
|
+
default: b(() => [
|
2486
|
+
h.components ? (p(), y(n(bt), {
|
2481
2487
|
key: 0,
|
2482
2488
|
wrap: "wrap",
|
2483
2489
|
gutter: 5
|
2484
2490
|
}, {
|
2485
|
-
default:
|
2486
|
-
(p(!0), j(O, null, L(
|
2491
|
+
default: b(() => [
|
2492
|
+
(p(!0), j(O, null, L(h.components, (c) => (p(), y(n(yt), {
|
2487
2493
|
span: n(e),
|
2488
2494
|
key: c.name
|
2489
2495
|
}, {
|
2490
|
-
default:
|
2496
|
+
default: b(() => [
|
2491
2497
|
v(n(xt), {
|
2492
2498
|
name: c.name,
|
2493
2499
|
title: c.label || c.name,
|
2494
2500
|
draggable: "",
|
2495
|
-
onDragstart: (
|
2501
|
+
onDragstart: (_) => g(c),
|
2496
2502
|
onDragend: d
|
2497
2503
|
}, null, 8, ["name", "title", "onDragstart"])
|
2498
2504
|
]),
|
@@ -2575,7 +2581,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2575
2581
|
return !1;
|
2576
2582
|
const P = e.assets.componentMap.get(B.model.name);
|
2577
2583
|
return P ? (t.value?.setDragging(P), !0) : !1;
|
2578
|
-
},
|
2584
|
+
}, h = async (D, B, P) => {
|
2579
2585
|
const G = B.data, W = {
|
2580
2586
|
prev: "top",
|
2581
2587
|
next: "bottom",
|
@@ -2596,11 +2602,11 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2596
2602
|
return;
|
2597
2603
|
}
|
2598
2604
|
t.value?.setSelected(B), t.value?.setHover(null);
|
2599
|
-
},
|
2605
|
+
}, _ = async (D, B, P) => {
|
2600
2606
|
const G = D.data, me = B.data;
|
2601
2607
|
if (te(me.model)) {
|
2602
|
-
const
|
2603
|
-
delete
|
2608
|
+
const Le = G.model;
|
2609
|
+
delete Le.slot, s.value?.move(Le, void 0, "inner"), t.value?.setDropping(null), t.value?.setDragging(null);
|
2604
2610
|
return;
|
2605
2611
|
}
|
2606
2612
|
const W = me.model, q = { before: "left", after: "right" }[P] || "inner";
|
@@ -2608,7 +2614,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2608
2614
|
W,
|
2609
2615
|
q
|
2610
2616
|
)) {
|
2611
|
-
t.value?.setDropping(null), d(),
|
2617
|
+
t.value?.setDropping(null), d(), Qe.warning({
|
2612
2618
|
message: `${G.model.name}不能放置到该位置`
|
2613
2619
|
}), t.value?.setDragging(null);
|
2614
2620
|
return;
|
@@ -2617,12 +2623,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2617
2623
|
P === "inner" ? W : W.parent
|
2618
2624
|
);
|
2619
2625
|
if ($e !== null) {
|
2620
|
-
const
|
2621
|
-
|
2626
|
+
const Le = G.model;
|
2627
|
+
Le.slot = $e, s.value?.move(Le, W, q);
|
2622
2628
|
} else
|
2623
2629
|
d();
|
2624
2630
|
t.value?.setDropping(null), t.value?.setDragging(null), e.simulator.refresh();
|
2625
|
-
},
|
2631
|
+
}, w = (D) => {
|
2626
2632
|
if (D.type === "slot") {
|
2627
2633
|
t.value?.setHover(null);
|
2628
2634
|
return;
|
@@ -2668,7 +2674,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2668
2674
|
class: "v-outline-widget",
|
2669
2675
|
title: "大纲树"
|
2670
2676
|
}, {
|
2671
|
-
default:
|
2677
|
+
default: b(() => [
|
2672
2678
|
(p(), y(n(Pt), {
|
2673
2679
|
key: n(e).changed.value,
|
2674
2680
|
data: a.value,
|
@@ -2679,14 +2685,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2679
2685
|
"current-node-key": m.value,
|
2680
2686
|
"highlight-current": !0,
|
2681
2687
|
"expand-on-click-node": !1,
|
2682
|
-
"allow-drop":
|
2688
|
+
"allow-drop": h,
|
2683
2689
|
"allow-drag": f,
|
2684
2690
|
onCurrentChange: c,
|
2685
|
-
onNodeDrop:
|
2691
|
+
onNodeDrop: _,
|
2686
2692
|
onNodeDragStart: C,
|
2687
2693
|
onNodeDragEnd: I
|
2688
2694
|
}, {
|
2689
|
-
default:
|
2695
|
+
default: b(({ data: P, node: G }) => [
|
2690
2696
|
v(n(ce), {
|
2691
2697
|
class: X(["v-outline-widget__item", {
|
2692
2698
|
"is-locked": P.model.locked,
|
@@ -2705,7 +2711,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2705
2711
|
subtitle: P.type,
|
2706
2712
|
actions: o(P.model, P.type),
|
2707
2713
|
onAction: R,
|
2708
|
-
onMouseenter: (me) =>
|
2714
|
+
onMouseenter: (me) => w(P),
|
2709
2715
|
onMouseleave: x
|
2710
2716
|
}, null, 8, ["class", "active", "model-value", "icon", "title", "subtitle", "actions", "onMouseenter"])
|
2711
2717
|
]),
|
@@ -2731,7 +2737,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2731
2737
|
remove: !!n(l),
|
2732
2738
|
onRemove: o
|
2733
2739
|
}, {
|
2734
|
-
default:
|
2740
|
+
default: b(() => [
|
2735
2741
|
n(l) === 0 ? (p(), y(n(oe), {
|
2736
2742
|
key: 0,
|
2737
2743
|
"image-size": 50
|
@@ -2815,7 +2821,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2815
2821
|
], t = Ct("currentModel", null);
|
2816
2822
|
return (l, s) => (p(), j("div", null, [
|
2817
2823
|
v(n(U), { justify: "space-between" }, {
|
2818
|
-
default:
|
2824
|
+
default: b(() => [
|
2819
2825
|
v(n(T), {
|
2820
2826
|
name: "settings.loading",
|
2821
2827
|
size: "small",
|
@@ -2863,7 +2869,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2863
2869
|
label: "请求头配置",
|
2864
2870
|
tip: "支持 JSExpression 或 JSFunction"
|
2865
2871
|
}, {
|
2866
|
-
editor:
|
2872
|
+
editor: b(() => [
|
2867
2873
|
v(n(se), {
|
2868
2874
|
dark: "",
|
2869
2875
|
height: "260px",
|
@@ -2925,7 +2931,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2925
2931
|
editor: "switch"
|
2926
2932
|
}, null, 8, ["disabled"]),
|
2927
2933
|
v(n(U), { justify: "space-between" }, {
|
2928
|
-
default:
|
2934
|
+
default: b(() => [
|
2929
2935
|
o[1] || (o[1] = V("span", null, "模拟数据模板", -1)),
|
2930
2936
|
v(n(be), {
|
2931
2937
|
icon: n(Dn),
|
@@ -2941,7 +2947,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2941
2947
|
name: "mockTemplate.value",
|
2942
2948
|
label: " "
|
2943
2949
|
}, {
|
2944
|
-
editor:
|
2950
|
+
editor: b(() => [
|
2945
2951
|
v(n(se), {
|
2946
2952
|
dark: "",
|
2947
2953
|
height: l.value.mock ? "330px" : "280px",
|
@@ -2981,57 +2987,57 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
2981
2987
|
const d = S(() => o.value?.method === "jsonp");
|
2982
2988
|
J(
|
2983
2989
|
() => e.model,
|
2984
|
-
(
|
2985
|
-
o.value = Object.assign({},
|
2990
|
+
(_) => {
|
2991
|
+
o.value = Object.assign({}, _ || {}), l.value = "base";
|
2986
2992
|
},
|
2987
2993
|
{
|
2988
2994
|
immediate: !0
|
2989
2995
|
}
|
2990
2996
|
), J(l, async () => {
|
2991
|
-
a.value?.formRef.validate(async (
|
2992
|
-
|
2997
|
+
a.value?.formRef.validate(async (_) => {
|
2998
|
+
_ || (await ke(), l.value = "base");
|
2993
2999
|
});
|
2994
3000
|
});
|
2995
3001
|
const m = () => {
|
2996
3002
|
s.value?.cancel();
|
2997
3003
|
}, f = () => {
|
2998
3004
|
a.value?.submit();
|
2999
|
-
},
|
3005
|
+
}, h = async (_) => e.project?.existApiName(
|
3000
3006
|
o.value.name,
|
3001
3007
|
e.model ? [o.value.id] : []
|
3002
3008
|
) ? (le(`API名称 [ ${o.value.name} ] 已存在`), !1) : o.value.headers && !re(o.value.headers, window) || o.value.mockTemplate && !re(o.value.mockTemplate, window) ? !1 : (e.project?.setApi(o.value), s.value?.close(), !0), c = () => {
|
3003
3009
|
if (o.value.mockTemplate) {
|
3004
|
-
const
|
3010
|
+
const _ = He(
|
3005
3011
|
o.value.mockTemplate,
|
3006
3012
|
{},
|
3007
3013
|
!0
|
3008
|
-
), { url:
|
3009
|
-
|
3010
|
-
url:
|
3014
|
+
), { url: w, method: x } = o.value, C = Ba.mock(
|
3015
|
+
_({
|
3016
|
+
url: w,
|
3011
3017
|
type: x
|
3012
3018
|
})
|
3013
3019
|
);
|
3014
3020
|
i.value = JSON.stringify(C, null, 2), r.value = !0;
|
3015
3021
|
}
|
3016
3022
|
};
|
3017
|
-
return (
|
3023
|
+
return (_, w) => (p(), y(n(Be), {
|
3018
3024
|
ref_key: "dialogRef",
|
3019
3025
|
ref: s,
|
3020
3026
|
title: t.value,
|
3021
3027
|
width: "1000px",
|
3022
3028
|
height: "600px"
|
3023
3029
|
}, {
|
3024
|
-
default:
|
3030
|
+
default: b(() => [
|
3025
3031
|
v(n(U), { fit: "" }, {
|
3026
|
-
default:
|
3032
|
+
default: b(() => [
|
3027
3033
|
v(n(U), {
|
3028
3034
|
width: "100px",
|
3029
3035
|
shrink: !1
|
3030
3036
|
}, {
|
3031
|
-
default:
|
3037
|
+
default: b(() => [
|
3032
3038
|
v(n(Dt), {
|
3033
3039
|
modelValue: l.value,
|
3034
|
-
"onUpdate:modelValue":
|
3040
|
+
"onUpdate:modelValue": w[0] || (w[0] = (x) => l.value = x),
|
3035
3041
|
items: g,
|
3036
3042
|
"tab-position": "left",
|
3037
3043
|
border: "",
|
@@ -3048,9 +3054,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3048
3054
|
shrink: !0,
|
3049
3055
|
fit: ""
|
3050
3056
|
}, {
|
3051
|
-
footer:
|
3057
|
+
footer: b(() => [
|
3052
3058
|
v(n(U), { justify: "space-between" }, {
|
3053
|
-
default:
|
3059
|
+
default: b(() => [
|
3054
3060
|
V("div", null, [
|
3055
3061
|
l.value === "mock" ? (p(), y(n(ae), {
|
3056
3062
|
key: 0,
|
@@ -3058,7 +3064,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3058
3064
|
type: "warning",
|
3059
3065
|
onClick: c
|
3060
3066
|
}, {
|
3061
|
-
default:
|
3067
|
+
default: b(() => w[2] || (w[2] = [
|
3062
3068
|
K(" 预览 ")
|
3063
3069
|
])),
|
3064
3070
|
_: 1
|
@@ -3066,7 +3072,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3066
3072
|
]),
|
3067
3073
|
V("div", null, [
|
3068
3074
|
v(n(ae), { onClick: m }, {
|
3069
|
-
default:
|
3075
|
+
default: b(() => w[3] || (w[3] = [
|
3070
3076
|
K("取消")
|
3071
3077
|
])),
|
3072
3078
|
_: 1
|
@@ -3075,7 +3081,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3075
3081
|
type: "primary",
|
3076
3082
|
onClick: f
|
3077
3083
|
}, {
|
3078
|
-
default:
|
3084
|
+
default: b(() => w[4] || (w[4] = [
|
3079
3085
|
K("保存")
|
3080
3086
|
])),
|
3081
3087
|
_: 1
|
@@ -3085,7 +3091,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3085
3091
|
_: 1
|
3086
3092
|
})
|
3087
3093
|
]),
|
3088
|
-
default:
|
3094
|
+
default: b(() => [
|
3089
3095
|
v(n(It), {
|
3090
3096
|
ref_key: "formRef",
|
3091
3097
|
ref: a,
|
@@ -3093,9 +3099,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3093
3099
|
labelPosition: "top",
|
3094
3100
|
tooltipMessage: !1,
|
3095
3101
|
model: o.value,
|
3096
|
-
submitMethod:
|
3102
|
+
submitMethod: h
|
3097
3103
|
}, {
|
3098
|
-
default:
|
3104
|
+
default: b(() => [
|
3099
3105
|
Pe(v(Zo, null, null, 512), [
|
3100
3106
|
[Te, l.value === "base"]
|
3101
3107
|
]),
|
@@ -3116,13 +3122,13 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3116
3122
|
key: 0,
|
3117
3123
|
class: "v-drawer",
|
3118
3124
|
modelValue: r.value,
|
3119
|
-
"onUpdate:modelValue":
|
3125
|
+
"onUpdate:modelValue": w[1] || (w[1] = (x) => r.value = x),
|
3120
3126
|
title: "模拟数据结果",
|
3121
3127
|
direction: "btt",
|
3122
3128
|
"append-to-body": "",
|
3123
3129
|
size: "80%"
|
3124
3130
|
}, {
|
3125
|
-
default:
|
3131
|
+
default: b(() => [
|
3126
3132
|
v(n(se), {
|
3127
3133
|
"model-value": i.value,
|
3128
3134
|
border: "",
|
@@ -3143,7 +3149,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3143
3149
|
setup(u) {
|
3144
3150
|
const e = k(!1), t = k(null), l = k(""), s = k(!1), a = S(() => {
|
3145
3151
|
const f = o.value?.apis || [];
|
3146
|
-
return l.value ? f.filter((
|
3152
|
+
return l.value ? f.filter((h) => h.name.includes(l.value) || h.label?.includes(l.value) || h.url.includes(l.value)) : f;
|
3147
3153
|
}), { project: o } = Re(), r = () => ({
|
3148
3154
|
id: "",
|
3149
3155
|
method: "get",
|
@@ -3187,18 +3193,18 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3187
3193
|
}, m = (f) => {
|
3188
3194
|
s.value = !0, t.value = ot(f), e.value = !0;
|
3189
3195
|
};
|
3190
|
-
return (f,
|
3196
|
+
return (f, h) => (p(), y(n(H), {
|
3191
3197
|
class: "v-apis-widget",
|
3192
3198
|
title: "API管理",
|
3193
3199
|
plus: "",
|
3194
3200
|
onPlus: i
|
3195
3201
|
}, {
|
3196
|
-
default:
|
3202
|
+
default: b(() => [
|
3197
3203
|
V("div", ar, [
|
3198
3204
|
v(n(_e), {
|
3199
3205
|
size: "small",
|
3200
3206
|
modelValue: l.value,
|
3201
|
-
"onUpdate:modelValue":
|
3207
|
+
"onUpdate:modelValue": h[0] || (h[0] = (c) => l.value = c),
|
3202
3208
|
"prefix-icon": n(Rt),
|
3203
3209
|
placeholder: "搜索API",
|
3204
3210
|
clearable: ""
|
@@ -3214,7 +3220,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3214
3220
|
"tag-type": g[c.method || "get"],
|
3215
3221
|
background: "",
|
3216
3222
|
actions: ["edit", "remove"],
|
3217
|
-
onClick: (
|
3223
|
+
onClick: (_) => m(c),
|
3218
3224
|
onAction: d
|
3219
3225
|
}, null, 8, ["title", "subtitle", "model-value", "tag", "tag-type", "onClick"]))), 128)),
|
3220
3226
|
a.value.length === 0 ? (p(), y(n(oe), {
|
@@ -3223,7 +3229,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3223
3229
|
})) : A("", !0),
|
3224
3230
|
v(sr, {
|
3225
3231
|
modelValue: e.value,
|
3226
|
-
"onUpdate:modelValue":
|
3232
|
+
"onUpdate:modelValue": h[1] || (h[1] = (c) => e.value = c),
|
3227
3233
|
model: t.value,
|
3228
3234
|
project: n(o)
|
3229
3235
|
}, null, 8, ["modelValue", "model", "project"])
|
@@ -3246,38 +3252,38 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3246
3252
|
urls: c.urls.join(`
|
3247
3253
|
`)
|
3248
3254
|
}, l.value = !0;
|
3249
|
-
},
|
3250
|
-
|
3255
|
+
}, h = (c, _) => {
|
3256
|
+
_.name === "edit" && (a.value = {
|
3251
3257
|
...c,
|
3252
3258
|
enabled: !0,
|
3253
3259
|
official: !1,
|
3254
3260
|
urls: c.urls.join(`
|
3255
3261
|
`)
|
3256
|
-
}, s.value = !1, l.value = !0),
|
3262
|
+
}, s.value = !1, l.value = !0), _.name === "remove" && t.project.value?.removeDeps(c);
|
3257
3263
|
};
|
3258
|
-
return (c,
|
3264
|
+
return (c, _) => (p(), y(n(H), {
|
3259
3265
|
class: "v-deps-widget",
|
3260
3266
|
title: "依赖管理",
|
3261
3267
|
plus: "",
|
3262
3268
|
onPlus: m
|
3263
3269
|
}, {
|
3264
|
-
default:
|
3265
|
-
(p(!0), j(O, null, L(n(e), (
|
3266
|
-
key:
|
3267
|
-
title:
|
3268
|
-
subtitle:
|
3269
|
-
actions: r(
|
3270
|
+
default: b(() => [
|
3271
|
+
(p(!0), j(O, null, L(n(e), (w) => (p(), y(n(ce), {
|
3272
|
+
key: w.package,
|
3273
|
+
title: w.package,
|
3274
|
+
subtitle: w.version,
|
3275
|
+
actions: r(w),
|
3270
3276
|
background: "",
|
3271
|
-
switch: i(
|
3272
|
-
modelValue:
|
3273
|
-
"onUpdate:modelValue": (x) =>
|
3274
|
-
onSwitch: (x) => d(
|
3275
|
-
onClick: (x) => f(
|
3276
|
-
onAction: (x) =>
|
3277
|
+
switch: i(w),
|
3278
|
+
modelValue: w.enabled,
|
3279
|
+
"onUpdate:modelValue": (x) => w.enabled = x,
|
3280
|
+
onSwitch: (x) => d(w),
|
3281
|
+
onClick: (x) => f(w),
|
3282
|
+
onAction: (x) => h(w, x)
|
3277
3283
|
}, null, 8, ["title", "subtitle", "actions", "switch", "modelValue", "onUpdate:modelValue", "onSwitch", "onClick", "onAction"]))), 128)),
|
3278
3284
|
v(n(Ae), {
|
3279
3285
|
modelValue: l.value,
|
3280
|
-
"onUpdate:modelValue":
|
3286
|
+
"onUpdate:modelValue": _[0] || (_[0] = (w) => l.value = w),
|
3281
3287
|
width: "600px",
|
3282
3288
|
height: "500px",
|
3283
3289
|
title: o.value,
|
@@ -3288,7 +3294,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3288
3294
|
tooltipMessage: !1
|
3289
3295
|
}
|
3290
3296
|
}, {
|
3291
|
-
default:
|
3297
|
+
default: b(() => [
|
3292
3298
|
v(n(T), {
|
3293
3299
|
name: "package",
|
3294
3300
|
label: "包名",
|
@@ -3411,12 +3417,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3411
3417
|
inheritAttrs: !1,
|
3412
3418
|
__name: "index",
|
3413
3419
|
setup(u, { expose: e }) {
|
3414
|
-
const t = k(), l = k(), { width: s, height: a } =
|
3420
|
+
const t = k(), l = k(), { width: s, height: a } = Xe(t), { dependencies: o, engine: r, apis: i, meta: g } = Bn(), { current: d, isEmpty: m } = ue(), f = S(() => r.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc"), h = S(() => r.project.value?.config || {}), { designer: c, hover: _, dropping: w, selected: x } = qa(
|
3415
3421
|
l,
|
3416
3422
|
o,
|
3417
3423
|
i,
|
3418
3424
|
g,
|
3419
|
-
|
3425
|
+
h
|
3420
3426
|
), C = (R) => {
|
3421
3427
|
const D = R.type, B = R.model;
|
3422
3428
|
if (d.value)
|
@@ -3462,27 +3468,27 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3462
3468
|
width: n(s),
|
3463
3469
|
height: n(a)
|
3464
3470
|
}, {
|
3465
|
-
default:
|
3471
|
+
default: b(() => [
|
3466
3472
|
V("iframe", {
|
3467
3473
|
ref_key: "iframe",
|
3468
3474
|
ref: l,
|
3469
3475
|
frameborder: "0"
|
3470
3476
|
}, null, 512),
|
3471
|
-
n(
|
3477
|
+
n(w) ? (p(), j("div", {
|
3472
3478
|
key: 0,
|
3473
3479
|
class: X(["v-designer__dropping", "is-inner"]),
|
3474
|
-
style: et(n(
|
3480
|
+
style: et(n(w).style)
|
3475
3481
|
}, null, 4)) : A("", !0),
|
3476
|
-
n(
|
3482
|
+
n(_) ? (p(), j("div", {
|
3477
3483
|
key: 1,
|
3478
3484
|
class: "v-designer__hover",
|
3479
|
-
style: et(n(
|
3485
|
+
style: et(n(_).style)
|
3480
3486
|
}, [
|
3481
3487
|
V("span", {
|
3482
|
-
class: X(`is-${n(
|
3488
|
+
class: X(`is-${n(_).position}`)
|
3483
3489
|
}, [
|
3484
|
-
K(F(n(
|
3485
|
-
V("i", null, F(n(
|
3490
|
+
K(F(n(_).model.name) + ": ", 1),
|
3491
|
+
V("i", null, F(n(_).model.id), 1)
|
3486
3492
|
], 2)
|
3487
3493
|
], 4)) : A("", !0),
|
3488
3494
|
n(x) ? (p(), j("div", {
|
@@ -3528,8 +3534,8 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3528
3534
|
() => o.value ? `编辑${e.title}` : `新增${e.title}`
|
3529
3535
|
), i = () => {
|
3530
3536
|
o.value = !1, a.value = e.createEmpty(), s.value = !0;
|
3531
|
-
}, g = (c,
|
3532
|
-
switch (
|
3537
|
+
}, g = (c, _) => {
|
3538
|
+
switch (_.name) {
|
3533
3539
|
case "edit":
|
3534
3540
|
m(c);
|
3535
3541
|
break;
|
@@ -3543,10 +3549,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3543
3549
|
o.value = !0, a.value = {
|
3544
3550
|
...c
|
3545
3551
|
}, s.value = !0;
|
3546
|
-
}, f = async (c) => e.submit(c, o.value),
|
3552
|
+
}, f = async (c) => e.submit(c, o.value), h = () => {
|
3547
3553
|
l.value?.itemRef.validate();
|
3548
3554
|
};
|
3549
|
-
return (c,
|
3555
|
+
return (c, _) => (p(), y(n(H), {
|
3550
3556
|
title: e.title,
|
3551
3557
|
class: "v-sub-panel",
|
3552
3558
|
size: "small",
|
@@ -3554,13 +3560,13 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3554
3560
|
plus: "",
|
3555
3561
|
onPlus: i
|
3556
3562
|
}, {
|
3557
|
-
default:
|
3558
|
-
(p(!0), j(O, null, L(c.list, (
|
3559
|
-
title: e.itemTitle(
|
3563
|
+
default: b(() => [
|
3564
|
+
(p(!0), j(O, null, L(c.list, (w) => (p(), y(n(ce), {
|
3565
|
+
title: e.itemTitle(w),
|
3560
3566
|
border: "",
|
3561
3567
|
actions: ["edit", "remove"],
|
3562
|
-
onAction: (x) => g(
|
3563
|
-
onClick: (x) => m(
|
3568
|
+
onAction: (x) => g(w, x),
|
3569
|
+
onClick: (x) => m(w)
|
3564
3570
|
}, null, 8, ["title", "onAction", "onClick"]))), 256)),
|
3565
3571
|
c.list.length ? A("", !0) : (p(), y(n(oe), {
|
3566
3572
|
key: 0,
|
@@ -3568,7 +3574,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3568
3574
|
})),
|
3569
3575
|
v(n(Ft), {
|
3570
3576
|
modelValue: s.value,
|
3571
|
-
"onUpdate:modelValue":
|
3577
|
+
"onUpdate:modelValue": _[1] || (_[1] = (w) => s.value = w),
|
3572
3578
|
title: r.value,
|
3573
3579
|
"submit-method": f,
|
3574
3580
|
model: a.value,
|
@@ -3576,7 +3582,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3576
3582
|
context: c.context,
|
3577
3583
|
onPick: d
|
3578
3584
|
}, {
|
3579
|
-
default:
|
3585
|
+
default: b(() => [
|
3580
3586
|
Ce(c.$slots, "fields", an(on({ model: a.value, isEdit: o.value, nameLabel: c.nameLabel, valueLabel: c.valueLabel })), () => [
|
3581
3587
|
v(n(T), {
|
3582
3588
|
name: "name",
|
@@ -3592,15 +3598,15 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3592
3598
|
label: c.valueLabel,
|
3593
3599
|
required: ""
|
3594
3600
|
}, {
|
3595
|
-
editor:
|
3601
|
+
editor: b(() => [
|
3596
3602
|
v(n(se), {
|
3597
3603
|
ref_key: "editorRef",
|
3598
3604
|
ref: t,
|
3599
3605
|
dark: "",
|
3600
3606
|
height: "100%",
|
3601
3607
|
modelValue: a.value.value,
|
3602
|
-
"onUpdate:modelValue":
|
3603
|
-
onBlur:
|
3608
|
+
"onUpdate:modelValue": _[0] || (_[0] = (w) => a.value.value = w),
|
3609
|
+
onBlur: h
|
3604
3610
|
}, null, 8, ["modelValue"])
|
3605
3611
|
]),
|
3606
3612
|
_: 1
|
@@ -3743,7 +3749,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3743
3749
|
remove: a,
|
3744
3750
|
submit: o
|
3745
3751
|
}, {
|
3746
|
-
fields:
|
3752
|
+
fields: b(({ model: g, nameLabel: d, isEdit: m, valueLabel: f }) => [
|
3747
3753
|
v(n(T), {
|
3748
3754
|
name: "name",
|
3749
3755
|
label: d,
|
@@ -3758,13 +3764,13 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3758
3764
|
label: f,
|
3759
3765
|
required: ""
|
3760
3766
|
}, {
|
3761
|
-
editor:
|
3767
|
+
editor: b(() => [
|
3762
3768
|
v(n(se), {
|
3763
3769
|
ref: "editorRef",
|
3764
3770
|
dark: "",
|
3765
3771
|
height: "100%",
|
3766
3772
|
modelValue: g.value,
|
3767
|
-
"onUpdate:modelValue": (
|
3773
|
+
"onUpdate:modelValue": (h) => g.value = h
|
3768
3774
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
3769
3775
|
]),
|
3770
3776
|
_: 2
|
@@ -3819,14 +3825,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3819
3825
|
itemTitle: s,
|
3820
3826
|
grow: ""
|
3821
3827
|
}, {
|
3822
|
-
fields:
|
3828
|
+
fields: b(({ model: g, nameLabel: d, valueLabel: m }) => [
|
3823
3829
|
v(n(T), {
|
3824
3830
|
class: "v-binder__editor",
|
3825
3831
|
name: "source",
|
3826
3832
|
label: d,
|
3827
3833
|
required: ""
|
3828
3834
|
}, {
|
3829
|
-
editor:
|
3835
|
+
editor: b(() => [
|
3830
3836
|
v(n(se), {
|
3831
3837
|
dark: "",
|
3832
3838
|
height: "100%",
|
@@ -3842,7 +3848,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3842
3848
|
label: m,
|
3843
3849
|
required: ""
|
3844
3850
|
}, {
|
3845
|
-
editor:
|
3851
|
+
editor: b(() => [
|
3846
3852
|
v(n(se), {
|
3847
3853
|
dark: "",
|
3848
3854
|
height: "100%",
|
@@ -3879,7 +3885,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3879
3885
|
direction: "column",
|
3880
3886
|
fit: ""
|
3881
3887
|
}, {
|
3882
|
-
default:
|
3888
|
+
default: b(() => [
|
3883
3889
|
v(dr, {
|
3884
3890
|
current: n(e),
|
3885
3891
|
context: n(t)
|
@@ -3930,16 +3936,16 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3930
3936
|
size: "small",
|
3931
3937
|
fit: !1
|
3932
3938
|
}, {
|
3933
|
-
default:
|
3939
|
+
default: b(() => [
|
3934
3940
|
v(n(fe), {
|
3935
3941
|
class: "v-properties-widget__form",
|
3936
3942
|
size: "small",
|
3937
3943
|
"label-position": "right",
|
3938
3944
|
"label-width": r.value,
|
3939
|
-
onKeydown: g[0] || (g[0] = tt(
|
3945
|
+
onKeydown: g[0] || (g[0] = tt(Je(() => {
|
3940
3946
|
}, ["prevent", "stop"]), ["enter"]))
|
3941
3947
|
}, {
|
3942
|
-
default:
|
3948
|
+
default: b(() => [
|
3943
3949
|
(p(!0), j(O, null, L(t.items, (d) => (p(), y(n(M), ie({ ref_for: !0 }, d, {
|
3944
3950
|
key: `${d.name}_${t.node.id}`,
|
3945
3951
|
current: t.current,
|
@@ -3968,14 +3974,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3968
3974
|
addCustom: g,
|
3969
3975
|
removeCustom: d,
|
3970
3976
|
isExist: m
|
3971
|
-
} = Ka(l), f = k(!1),
|
3972
|
-
f.value = !0,
|
3977
|
+
} = Ka(l), f = k(!1), h = k(), c = () => {
|
3978
|
+
f.value = !0, h.value = {
|
3973
3979
|
name: ""
|
3974
3980
|
};
|
3975
|
-
},
|
3981
|
+
}, _ = async (x) => {
|
3976
3982
|
const C = Object.keys(s.value?.props || {});
|
3977
3983
|
return !m(x.name) && !C.includes(x.name) ? (g(x.name), !0) : (le("已存在该属性名称"), !1);
|
3978
|
-
},
|
3984
|
+
}, w = async (x) => {
|
3979
3985
|
await Fe("确定删除?") && d(x);
|
3980
3986
|
};
|
3981
3987
|
return (x, C) => n(e) ? (p(), y(n(U), {
|
@@ -3984,7 +3990,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
3984
3990
|
direction: "column",
|
3985
3991
|
fit: ""
|
3986
3992
|
}, {
|
3987
|
-
default:
|
3993
|
+
default: b(() => [
|
3988
3994
|
n(s) ? (p(), y(mt, {
|
3989
3995
|
key: 0,
|
3990
3996
|
title: "通用属性",
|
@@ -4015,7 +4021,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4015
4021
|
plus: "",
|
4016
4022
|
grow: "",
|
4017
4023
|
onPlus: c,
|
4018
|
-
onRemove:
|
4024
|
+
onRemove: w
|
4019
4025
|
}, null, 8, ["current", "context", "node", "items", "onChange"])) : A("", !0),
|
4020
4026
|
v(n(Ae), {
|
4021
4027
|
modelValue: f.value,
|
@@ -4023,11 +4029,11 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4023
4029
|
title: "新增自定义属性",
|
4024
4030
|
width: "400px",
|
4025
4031
|
height: "150px",
|
4026
|
-
"submit-method":
|
4032
|
+
"submit-method": _,
|
4027
4033
|
formProps: { tooltipMessage: !1 },
|
4028
|
-
model:
|
4034
|
+
model: h.value
|
4029
4035
|
}, {
|
4030
|
-
default:
|
4036
|
+
default: b(() => [
|
4031
4037
|
v(n(T), {
|
4032
4038
|
name: "name",
|
4033
4039
|
label: "属性名称",
|
@@ -4053,7 +4059,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4053
4059
|
value: {}
|
4054
4060
|
},
|
4055
4061
|
setup(u) {
|
4056
|
-
const e = u, t = k(), l =
|
4062
|
+
const e = u, t = k(), l = Ke({
|
4057
4063
|
type: "JSExpression",
|
4058
4064
|
value: e.value
|
4059
4065
|
}), s = (a) => {
|
@@ -4067,14 +4073,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4067
4073
|
model: l,
|
4068
4074
|
onPick: s
|
4069
4075
|
}, {
|
4070
|
-
default:
|
4076
|
+
default: b(() => [
|
4071
4077
|
v(n(T), {
|
4072
4078
|
class: "v-binder__editor",
|
4073
4079
|
name: "value",
|
4074
4080
|
label: "绑定内容 [ JSExpression ]",
|
4075
4081
|
required: ""
|
4076
4082
|
}, {
|
4077
|
-
editor:
|
4083
|
+
editor: b(() => [
|
4078
4084
|
v(n(se), {
|
4079
4085
|
ref_key: "editorRef",
|
4080
4086
|
ref: t,
|
@@ -4100,7 +4106,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4100
4106
|
event: {}
|
4101
4107
|
},
|
4102
4108
|
setup(u) {
|
4103
|
-
const e = u, t = k(), s =
|
4109
|
+
const e = u, t = k(), s = Ke({
|
4104
4110
|
name: e.name,
|
4105
4111
|
...e.event,
|
4106
4112
|
modifiers: Object.keys(e.event?.modifiers || {}),
|
@@ -4122,7 +4128,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4122
4128
|
model: s,
|
4123
4129
|
onPick: o
|
4124
4130
|
}, {
|
4125
|
-
default:
|
4131
|
+
default: b(() => [
|
4126
4132
|
v(n(T), {
|
4127
4133
|
name: "modifiers",
|
4128
4134
|
label: "事件修饰符",
|
@@ -4135,7 +4141,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4135
4141
|
label: "事件处理函数 [ JSFunction ]",
|
4136
4142
|
required: ""
|
4137
4143
|
}, {
|
4138
|
-
editor:
|
4144
|
+
editor: b(() => [
|
4139
4145
|
v(n(se), {
|
4140
4146
|
ref_key: "editorRef",
|
4141
4147
|
ref: t,
|
@@ -4161,48 +4167,48 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4161
4167
|
}), i = k(!1), g = (c) => {
|
4162
4168
|
r.value = ot(c), i.value = !0;
|
4163
4169
|
}, d = async (c) => {
|
4164
|
-
const
|
4170
|
+
const _ = {
|
4165
4171
|
...c,
|
4166
4172
|
modifiers: c.modifiers.reduce((x, C) => (x[C] = !0, x), {})
|
4167
4173
|
};
|
4168
|
-
return re(
|
4174
|
+
return re(_.handler, t.value, !0) ? ((l.value?.model).setEvent(_), !0) : !1;
|
4169
4175
|
}, m = async (c) => {
|
4170
|
-
const
|
4171
|
-
c.name && (
|
4176
|
+
const _ = l.value?.model;
|
4177
|
+
c.name && (_.removeEvent(c.name), i.value = !1);
|
4172
4178
|
}, f = async () => {
|
4173
4179
|
r.value.name && await Fe("确定要删除该事件吗?") && m(r.value);
|
4174
|
-
},
|
4175
|
-
const { name:
|
4176
|
-
|
4180
|
+
}, h = (c) => {
|
4181
|
+
const { name: _, modelValue: w } = c;
|
4182
|
+
_ === "edit" && g(w), _ === "remove" && m(w);
|
4177
4183
|
};
|
4178
|
-
return (c,
|
4184
|
+
return (c, _) => (p(), y(n(U), {
|
4179
4185
|
class: "v-events-widget",
|
4180
4186
|
direction: "column",
|
4181
4187
|
fit: ""
|
4182
4188
|
}, {
|
4183
|
-
default:
|
4189
|
+
default: b(() => [
|
4184
4190
|
v(n(H), {
|
4185
4191
|
title: "组件事件",
|
4186
4192
|
class: "v-sub-panel",
|
4187
4193
|
size: "small",
|
4188
4194
|
fit: !1
|
4189
4195
|
}, {
|
4190
|
-
default:
|
4196
|
+
default: b(() => [
|
4191
4197
|
n(o).length ? A("", !0) : (p(), y(n(oe), {
|
4192
4198
|
key: 0,
|
4193
4199
|
"image-size": 50,
|
4194
4200
|
description: "该组件无自带事件"
|
4195
4201
|
})),
|
4196
|
-
(p(!0), j(O, null, L(n(o), (
|
4197
|
-
key: `component_${
|
4198
|
-
title:
|
4199
|
-
"model-value":
|
4202
|
+
(p(!0), j(O, null, L(n(o), (w) => (p(), y(n(ce), {
|
4203
|
+
key: `component_${w.name}`,
|
4204
|
+
title: w.name,
|
4205
|
+
"model-value": w,
|
4200
4206
|
border: "",
|
4201
4207
|
small: "",
|
4202
|
-
actions:
|
4203
|
-
active: !!
|
4204
|
-
onClick: (x) => g(
|
4205
|
-
onAction:
|
4208
|
+
actions: w.event ? ["edit", "remove"] : ["edit"],
|
4209
|
+
active: !!w.event,
|
4210
|
+
onClick: (x) => g(w),
|
4211
|
+
onAction: h
|
4206
4212
|
}, null, 8, ["title", "model-value", "actions", "active", "onClick"]))), 128))
|
4207
4213
|
]),
|
4208
4214
|
_: 1
|
@@ -4213,17 +4219,17 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4213
4219
|
size: "small",
|
4214
4220
|
fit: !1
|
4215
4221
|
}, {
|
4216
|
-
default:
|
4217
|
-
(p(!0), j(O, null, L(n(s), (
|
4218
|
-
key: `mouse_${
|
4219
|
-
title:
|
4220
|
-
"model-value":
|
4222
|
+
default: b(() => [
|
4223
|
+
(p(!0), j(O, null, L(n(s), (w) => (p(), y(n(ce), {
|
4224
|
+
key: `mouse_${w.name}`,
|
4225
|
+
title: w.name,
|
4226
|
+
"model-value": w,
|
4221
4227
|
border: "",
|
4222
4228
|
small: "",
|
4223
|
-
actions:
|
4224
|
-
active: !!
|
4225
|
-
onClick: (x) => g(
|
4226
|
-
onAction:
|
4229
|
+
actions: w.event ? ["edit", "remove"] : ["edit"],
|
4230
|
+
active: !!w.event,
|
4231
|
+
onClick: (x) => g(w),
|
4232
|
+
onAction: h
|
4227
4233
|
}, null, 8, ["title", "model-value", "actions", "active", "onClick"]))), 128))
|
4228
4234
|
]),
|
4229
4235
|
_: 1
|
@@ -4235,17 +4241,17 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4235
4241
|
grow: "",
|
4236
4242
|
fit: !1
|
4237
4243
|
}, {
|
4238
|
-
default:
|
4239
|
-
(p(!0), j(O, null, L(n(a), (
|
4240
|
-
key: `keyboard_${
|
4241
|
-
title:
|
4242
|
-
"model-value":
|
4244
|
+
default: b(() => [
|
4245
|
+
(p(!0), j(O, null, L(n(a), (w) => (p(), y(n(ce), {
|
4246
|
+
key: `keyboard_${w.name}`,
|
4247
|
+
title: w.name,
|
4248
|
+
"model-value": w,
|
4243
4249
|
border: "",
|
4244
4250
|
small: "",
|
4245
|
-
actions:
|
4246
|
-
active: !!
|
4247
|
-
onClick: (x) => g(
|
4248
|
-
onAction:
|
4251
|
+
actions: w.event ? ["edit", "remove"] : ["edit"],
|
4252
|
+
active: !!w.event,
|
4253
|
+
onClick: (x) => g(w),
|
4254
|
+
onAction: h
|
4249
4255
|
}, null, 8, ["title", "model-value", "actions", "active", "onClick"]))), 128))
|
4250
4256
|
]),
|
4251
4257
|
_: 1
|
@@ -4253,7 +4259,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4253
4259
|
i.value ? (p(), y(n(yr), {
|
4254
4260
|
key: 0,
|
4255
4261
|
modelValue: i.value,
|
4256
|
-
"onUpdate:modelValue":
|
4262
|
+
"onUpdate:modelValue": _[0] || (_[0] = (w) => i.value = w),
|
4257
4263
|
context: n(t),
|
4258
4264
|
current: n(e),
|
4259
4265
|
name: r.value.name,
|
@@ -4283,7 +4289,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4283
4289
|
save: "",
|
4284
4290
|
onSave: a
|
4285
4291
|
}, {
|
4286
|
-
default:
|
4292
|
+
default: b(() => [
|
4287
4293
|
v(n(se), {
|
4288
4294
|
ref_key: "editorRef",
|
4289
4295
|
ref: t,
|
@@ -4310,27 +4316,27 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4310
4316
|
onValueChange: g,
|
4311
4317
|
onForChange: d,
|
4312
4318
|
onModelChange: m
|
4313
|
-
} = no(l), f = (
|
4314
|
-
return (
|
4319
|
+
} = no(l), f = (h) => h.arg ? typeof h.arg == "string" ? h.arg : He(h.arg, {}) : "modelValue";
|
4320
|
+
return (h, c) => (p(), y(n(U), {
|
4315
4321
|
class: "v-directives-widget",
|
4316
4322
|
direction: "column",
|
4317
4323
|
fit: ""
|
4318
4324
|
}, {
|
4319
|
-
default:
|
4325
|
+
default: b(() => [
|
4320
4326
|
v(n(H), {
|
4321
4327
|
class: "v-sub-panel",
|
4322
4328
|
title: "内置指令",
|
4323
4329
|
size: "small",
|
4324
4330
|
fit: !1
|
4325
4331
|
}, {
|
4326
|
-
default:
|
4332
|
+
default: b(() => [
|
4327
4333
|
v(n(fe), {
|
4328
4334
|
size: "small",
|
4329
4335
|
"label-width": "80px",
|
4330
|
-
onKeydown: c[0] || (c[0] = tt(
|
4336
|
+
onKeydown: c[0] || (c[0] = tt(Je(() => {
|
4331
4337
|
}, ["prevent", "stop"]), ["enter"]))
|
4332
4338
|
}, {
|
4333
|
-
default:
|
4339
|
+
default: b(() => [
|
4334
4340
|
v(n(M), {
|
4335
4341
|
name: "vIf",
|
4336
4342
|
label: "v-if",
|
@@ -4370,14 +4376,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4370
4376
|
size: "small",
|
4371
4377
|
fit: !1
|
4372
4378
|
}, {
|
4373
|
-
default:
|
4379
|
+
default: b(() => [
|
4374
4380
|
v(n(fe), {
|
4375
4381
|
size: "small",
|
4376
4382
|
"label-width": "80px",
|
4377
|
-
onKeydown: c[1] || (c[1] = tt(
|
4383
|
+
onKeydown: c[1] || (c[1] = tt(Je(() => {
|
4378
4384
|
}, ["prevent", "stop"]), ["enter"]))
|
4379
4385
|
}, {
|
4380
|
-
default:
|
4386
|
+
default: b(() => [
|
4381
4387
|
v(n(M), {
|
4382
4388
|
name: "value",
|
4383
4389
|
label: "循环数据",
|
@@ -4424,31 +4430,31 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4424
4430
|
fit: !1,
|
4425
4431
|
grow: ""
|
4426
4432
|
}, {
|
4427
|
-
default:
|
4428
|
-
(p(!0), j(O, null, L(n(i), (
|
4433
|
+
default: b(() => [
|
4434
|
+
(p(!0), j(O, null, L(n(i), (_, w) => (p(), y(n(H), {
|
4429
4435
|
card: "",
|
4430
4436
|
border: "",
|
4431
4437
|
class: "v-sub-panel",
|
4432
4438
|
size: "small",
|
4433
|
-
title: `v-model: ${f(
|
4439
|
+
title: `v-model: ${f(_)}`,
|
4434
4440
|
body: { grow: !1 },
|
4435
4441
|
fit: !1
|
4436
4442
|
}, {
|
4437
|
-
default:
|
4443
|
+
default: b(() => [
|
4438
4444
|
v(n(fe), {
|
4439
4445
|
size: "small",
|
4440
4446
|
"label-width": "60px",
|
4441
|
-
onKeydown: c[2] || (c[2] = tt(
|
4447
|
+
onKeydown: c[2] || (c[2] = tt(Je(() => {
|
4442
4448
|
}, ["prevent", "stop"]), ["enter"]))
|
4443
4449
|
}, {
|
4444
|
-
default:
|
4450
|
+
default: b(() => [
|
4445
4451
|
v(n(M), {
|
4446
|
-
name:
|
4452
|
+
name: w.toString(),
|
4447
4453
|
label: "绑定变量",
|
4448
4454
|
setters: "ExpressionSetter",
|
4449
4455
|
current: n(e),
|
4450
4456
|
context: n(t),
|
4451
|
-
value:
|
4457
|
+
value: _.value,
|
4452
4458
|
onChange: n(m)
|
4453
4459
|
}, null, 8, ["name", "current", "context", "value", "onChange"])
|
4454
4460
|
]),
|
@@ -4503,7 +4509,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4503
4509
|
"form-props": { tooltipMessage: !1 },
|
4504
4510
|
"submit-method": a
|
4505
4511
|
}, {
|
4506
|
-
default:
|
4512
|
+
default: b(() => [
|
4507
4513
|
v(n(T), {
|
4508
4514
|
name: "name",
|
4509
4515
|
label: "属性名称",
|
@@ -4533,7 +4539,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4533
4539
|
label: "默认值",
|
4534
4540
|
editor: "none"
|
4535
4541
|
}, {
|
4536
|
-
default:
|
4542
|
+
default: b(() => [
|
4537
4543
|
v(n(se), {
|
4538
4544
|
modelValue: l.value.default.value,
|
4539
4545
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => l.value.default.value = i),
|
@@ -4567,7 +4573,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4567
4573
|
"form-props": { tooltipMessage: !1 },
|
4568
4574
|
"submit-method": a
|
4569
4575
|
}, {
|
4570
|
-
default:
|
4576
|
+
default: b(() => [
|
4571
4577
|
v(n(T), {
|
4572
4578
|
name: "name",
|
4573
4579
|
label: "事件名称",
|
@@ -4622,7 +4628,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4622
4628
|
"form-props": { tooltipMessage: !1 },
|
4623
4629
|
"submit-method": a
|
4624
4630
|
}, {
|
4625
|
-
default:
|
4631
|
+
default: b(() => [
|
4626
4632
|
v(n(T), {
|
4627
4633
|
name: "name",
|
4628
4634
|
label: "插槽名称",
|
@@ -4687,7 +4693,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4687
4693
|
"form-props": { tooltipMessage: !1 },
|
4688
4694
|
"submit-method": s
|
4689
4695
|
}, {
|
4690
|
-
default:
|
4696
|
+
default: b(() => [
|
4691
4697
|
v(n(T), {
|
4692
4698
|
name: "name",
|
4693
4699
|
label: "注入名称",
|
@@ -4709,7 +4715,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4709
4715
|
label: "默认值",
|
4710
4716
|
editor: "none"
|
4711
4717
|
}, {
|
4712
|
-
default:
|
4718
|
+
default: b(() => [
|
4713
4719
|
v(n(se), {
|
4714
4720
|
modelValue: l.value.default.value,
|
4715
4721
|
"onUpdate:modelValue": o[0] || (o[0] = (r) => l.value.default.value = r),
|
@@ -4727,9 +4733,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4727
4733
|
name: "DefinedWidget",
|
4728
4734
|
__name: "index",
|
4729
4735
|
setup(u) {
|
4730
|
-
const { current: e, context: t } = ue(), l = S(() => (e.value?.props || []).map((W) => typeof W == "string" ? { name: W } : W)), s = S(() => (e.value?.emits || []).map((W) => typeof W == "string" ? { name: W, params: [] } : W)), a = S(() => (e.value?.slots || []).map((W) => typeof W == "string" ? { name: W, params: [] } : W)), o = S(() => e.value?.inject || []), r = k(!1), i = k(), g = k(!1), d = k(), m = k(!1), f = k(),
|
4736
|
+
const { current: e, context: t } = ue(), l = S(() => (e.value?.props || []).map((W) => typeof W == "string" ? { name: W } : W)), s = S(() => (e.value?.emits || []).map((W) => typeof W == "string" ? { name: W, params: [] } : W)), a = S(() => (e.value?.slots || []).map((W) => typeof W == "string" ? { name: W, params: [] } : W)), o = S(() => e.value?.inject || []), r = k(!1), i = k(), g = k(!1), d = k(), m = k(!1), f = k(), h = k(!1), c = k(), _ = () => {
|
4731
4737
|
i.value = void 0, r.value = !0;
|
4732
|
-
},
|
4738
|
+
}, w = (W) => {
|
4733
4739
|
const { name: q, modelValue: N } = W;
|
4734
4740
|
q === "edit" && x(N), q === "remove" && e.value?.removeProp(N);
|
4735
4741
|
}, x = (W) => {
|
@@ -4749,9 +4755,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4749
4755
|
const { name: q, modelValue: N } = W;
|
4750
4756
|
q === "edit" && D(N), q === "remove" && e.value?.removeSlot(N.name);
|
4751
4757
|
}, P = () => {
|
4752
|
-
c.value = void 0,
|
4758
|
+
c.value = void 0, h.value = !0;
|
4753
4759
|
}, G = (W) => {
|
4754
|
-
c.value = W,
|
4760
|
+
c.value = W, h.value = !0;
|
4755
4761
|
}, me = (W) => {
|
4756
4762
|
const { name: q, modelValue: N } = W;
|
4757
4763
|
q === "edit" && G(N), q === "remove" && e.value?.removeInject(N);
|
@@ -4762,23 +4768,23 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4762
4768
|
direction: "column",
|
4763
4769
|
fit: ""
|
4764
4770
|
}, {
|
4765
|
-
default:
|
4771
|
+
default: b(() => [
|
4766
4772
|
v(n(H), {
|
4767
4773
|
class: "v-sub-panel",
|
4768
4774
|
title: "定义属性",
|
4769
4775
|
size: "small",
|
4770
4776
|
plus: "",
|
4771
4777
|
fit: !1,
|
4772
|
-
onPlus:
|
4778
|
+
onPlus: _
|
4773
4779
|
}, {
|
4774
|
-
default:
|
4780
|
+
default: b(() => [
|
4775
4781
|
(p(!0), j(O, null, L(l.value, (N) => (p(), y(n(ce), {
|
4776
4782
|
"model-value": N,
|
4777
4783
|
title: N.name,
|
4778
4784
|
border: "",
|
4779
4785
|
actions: ["edit", "remove"],
|
4780
4786
|
onClick: ($e) => x(N),
|
4781
|
-
onAction:
|
4787
|
+
onAction: w
|
4782
4788
|
}, null, 8, ["model-value", "title", "onClick"]))), 256)),
|
4783
4789
|
l.value.length ? A("", !0) : (p(), y(n(oe), {
|
4784
4790
|
key: 0,
|
@@ -4803,7 +4809,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4803
4809
|
fit: !1,
|
4804
4810
|
onPlus: C
|
4805
4811
|
}, {
|
4806
|
-
default:
|
4812
|
+
default: b(() => [
|
4807
4813
|
(p(!0), j(O, null, L(s.value, (N) => (p(), y(n(ce), {
|
4808
4814
|
"model-value": N,
|
4809
4815
|
title: N.name,
|
@@ -4835,7 +4841,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4835
4841
|
fit: !1,
|
4836
4842
|
onPlus: R
|
4837
4843
|
}, {
|
4838
|
-
default:
|
4844
|
+
default: b(() => [
|
4839
4845
|
(p(!0), j(O, null, L(a.value, (N) => (p(), y(n(ce), {
|
4840
4846
|
"model-value": N,
|
4841
4847
|
title: N.name,
|
@@ -4868,7 +4874,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4868
4874
|
grow: "",
|
4869
4875
|
onPlus: P
|
4870
4876
|
}, {
|
4871
|
-
default:
|
4877
|
+
default: b(() => [
|
4872
4878
|
(p(!0), j(O, null, L(o.value, (N) => (p(), y(n(ce), {
|
4873
4879
|
"model-value": N,
|
4874
4880
|
title: N.name,
|
@@ -4881,10 +4887,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4881
4887
|
key: 0,
|
4882
4888
|
"image-size": 50
|
4883
4889
|
})),
|
4884
|
-
|
4890
|
+
h.value ? (p(), y(Vr, {
|
4885
4891
|
key: 1,
|
4886
|
-
modelValue:
|
4887
|
-
"onUpdate:modelValue": q[3] || (q[3] = (N) =>
|
4892
|
+
modelValue: h.value,
|
4893
|
+
"onUpdate:modelValue": q[3] || (q[3] = (N) => h.value = N),
|
4888
4894
|
current: n(e),
|
4889
4895
|
context: n(t),
|
4890
4896
|
item: c.value
|
@@ -4941,27 +4947,27 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4941
4947
|
})`
|
4942
4948
|
}
|
4943
4949
|
}, e.item)
|
4944
|
-
), r = k(!1), i = k(""), g = k(!1), d = S(() => o.value.type === "api" ? l.value.map((
|
4945
|
-
label:
|
4946
|
-
value:
|
4947
|
-
data:
|
4948
|
-
})) : o.value.type === "meta" ? s.value.map((
|
4949
|
-
label:
|
4950
|
-
value:
|
4951
|
-
data:
|
4952
|
-
})) : []), m = S(() => e.item ? "编辑数据源" : "新增数据源"), f = (
|
4950
|
+
), r = k(!1), i = k(""), g = k(!1), d = S(() => o.value.type === "api" ? l.value.map((w) => ({
|
4951
|
+
label: w.label || "",
|
4952
|
+
value: w.id,
|
4953
|
+
data: w
|
4954
|
+
})) : o.value.type === "meta" ? s.value.map((w) => ({
|
4955
|
+
label: w.title || "",
|
4956
|
+
value: w.id,
|
4957
|
+
data: w
|
4958
|
+
})) : []), m = S(() => e.item ? "编辑数据源" : "新增数据源"), f = (w) => {
|
4953
4959
|
o.value.ref = "", o.value.name = "", o.value.label = "";
|
4954
|
-
},
|
4960
|
+
}, h = (w) => {
|
4955
4961
|
if (o.value.type === "api") {
|
4956
|
-
const x = l.value.find((C) => C.id ===
|
4962
|
+
const x = l.value.find((C) => C.id === w);
|
4957
4963
|
x && (o.value.name = x.name, o.value.label = x.label || "");
|
4958
4964
|
}
|
4959
4965
|
if (o.value.type === "meta") {
|
4960
|
-
const x = s.value.find((C) => C.id ===
|
4966
|
+
const x = s.value.find((C) => C.id === w);
|
4961
4967
|
x && (o.value.name = x.code, o.value.label = x.title || "");
|
4962
4968
|
}
|
4963
|
-
}, c = async (
|
4964
|
-
const { transform: x, test: C, name: I } =
|
4969
|
+
}, c = async (w) => {
|
4970
|
+
const { transform: x, test: C, name: I } = w;
|
4965
4971
|
if (!e.current) return !1;
|
4966
4972
|
if (!e.item && e.current.dataSources[I])
|
4967
4973
|
return le(`名称【${I}】已经存在,请更换名称`), !1;
|
@@ -4969,14 +4975,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4969
4975
|
if (!re(x, e.context, !0))
|
4970
4976
|
return !1;
|
4971
4977
|
} else
|
4972
|
-
|
4978
|
+
w.transform = void 0;
|
4973
4979
|
if (C?.value) {
|
4974
4980
|
if (!re(C, e.context, !0))
|
4975
4981
|
return !1;
|
4976
4982
|
} else
|
4977
|
-
|
4978
|
-
return e.current?.setDataSource(
|
4979
|
-
},
|
4983
|
+
w.test = void 0;
|
4984
|
+
return e.current?.setDataSource(w), !0;
|
4985
|
+
}, _ = async () => {
|
4980
4986
|
if (!e.context) return;
|
4981
4987
|
if (!o.value.ref) {
|
4982
4988
|
le("请先选择API");
|
@@ -4993,9 +4999,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
4993
4999
|
if (R)
|
4994
5000
|
return await R.apply(R, z);
|
4995
5001
|
Ve.warn(`API【${o.value.ref}】不存在`);
|
4996
|
-
}, C =
|
5002
|
+
}, C = He(o.value.test, {
|
4997
5003
|
runApi: x
|
4998
|
-
}), I = o.value.transform?.value ?
|
5004
|
+
}), I = o.value.transform?.value ? He(o.value.transform, {}, !0) : (z) => z;
|
4999
5005
|
r.value = !0;
|
5000
5006
|
try {
|
5001
5007
|
const z = await C();
|
@@ -5005,7 +5011,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5005
5011
|
}
|
5006
5012
|
r.value = !1, g.value = !0;
|
5007
5013
|
};
|
5008
|
-
return (
|
5014
|
+
return (w, x) => (p(), y(n(Ae), {
|
5009
5015
|
width: "1000px",
|
5010
5016
|
height: "700px",
|
5011
5017
|
title: m.value,
|
@@ -5013,19 +5019,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5013
5019
|
"form-props": { tooltipMessage: !1 },
|
5014
5020
|
"submit-method": c
|
5015
5021
|
}, {
|
5016
|
-
extra:
|
5022
|
+
extra: b(() => [
|
5017
5023
|
v(n(ae), {
|
5018
5024
|
loading: r.value,
|
5019
5025
|
type: "warning",
|
5020
|
-
onClick:
|
5026
|
+
onClick: _
|
5021
5027
|
}, {
|
5022
|
-
default:
|
5028
|
+
default: b(() => x[3] || (x[3] = [
|
5023
5029
|
K(" 运行测试用例 ")
|
5024
5030
|
])),
|
5025
5031
|
_: 1
|
5026
5032
|
}, 8, ["loading"])
|
5027
5033
|
]),
|
5028
|
-
default:
|
5034
|
+
default: b(() => [
|
5029
5035
|
v(n(T), {
|
5030
5036
|
name: "type",
|
5031
5037
|
label: "数据类型",
|
@@ -5044,9 +5050,9 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5044
5050
|
disabled: !!e.item,
|
5045
5051
|
options: d.value,
|
5046
5052
|
props: { filterable: !0 },
|
5047
|
-
onChange:
|
5053
|
+
onChange: h
|
5048
5054
|
}, {
|
5049
|
-
option:
|
5055
|
+
option: b(({ option: C }) => [
|
5050
5056
|
K(F(C.label) + " ", 1),
|
5051
5057
|
V("i", null, "[ " + F(C.data.name || C.data.code) + " ]", 1)
|
5052
5058
|
]),
|
@@ -5073,7 +5079,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5073
5079
|
label: "转换函数",
|
5074
5080
|
editor: "none"
|
5075
5081
|
}, {
|
5076
|
-
default:
|
5082
|
+
default: b(() => [
|
5077
5083
|
v(n(se), {
|
5078
5084
|
modelValue: o.value.transform.value,
|
5079
5085
|
"onUpdate:modelValue": x[0] || (x[0] = (C) => o.value.transform.value = C),
|
@@ -5088,7 +5094,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5088
5094
|
label: "测试用例",
|
5089
5095
|
editor: "none"
|
5090
5096
|
}, {
|
5091
|
-
default:
|
5097
|
+
default: b(() => [
|
5092
5098
|
v(n(se), {
|
5093
5099
|
modelValue: o.value.test.value,
|
5094
5100
|
"onUpdate:modelValue": x[1] || (x[1] = (C) => o.value.test.value = C),
|
@@ -5108,7 +5114,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5108
5114
|
"append-to-body": "",
|
5109
5115
|
size: "80%"
|
5110
5116
|
}, {
|
5111
|
-
default:
|
5117
|
+
default: b(() => [
|
5112
5118
|
v(n(se), {
|
5113
5119
|
"model-value": i.value,
|
5114
5120
|
border: "",
|
@@ -5146,7 +5152,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5146
5152
|
direction: "column",
|
5147
5153
|
fit: ""
|
5148
5154
|
}, {
|
5149
|
-
default:
|
5155
|
+
default: b(() => [
|
5150
5156
|
v(n(H), {
|
5151
5157
|
title: "请求方法",
|
5152
5158
|
class: "v-sub-panel",
|
@@ -5154,7 +5160,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5154
5160
|
plus: "",
|
5155
5161
|
onPlus: r
|
5156
5162
|
}, {
|
5157
|
-
default:
|
5163
|
+
default: b(() => [
|
5158
5164
|
(p(!0), j(O, null, L(a.value, (f) => (p(), y(n(ce), {
|
5159
5165
|
border: "",
|
5160
5166
|
title: f.name,
|
@@ -5164,7 +5170,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5164
5170
|
tag: f.type.toUpperCase(),
|
5165
5171
|
"tag-type": o(f.type),
|
5166
5172
|
onAction: g,
|
5167
|
-
onClick: (
|
5173
|
+
onClick: (h) => i(f)
|
5168
5174
|
}, null, 8, ["title", "subtitle", "model-value", "tag", "tag-type", "onClick"]))), 256)),
|
5169
5175
|
a.value.length ? A("", !0) : (p(), y(n(oe), {
|
5170
5176
|
key: 0,
|
@@ -5322,12 +5328,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5322
5328
|
fit: !1,
|
5323
5329
|
collapsable: ""
|
5324
5330
|
}, {
|
5325
|
-
default:
|
5331
|
+
default: b(() => [
|
5326
5332
|
v(n(fe), {
|
5327
5333
|
size: "small",
|
5328
5334
|
"label-width": "80px"
|
5329
5335
|
}, {
|
5330
|
-
default:
|
5336
|
+
default: b(() => [
|
5331
5337
|
v(n(M), {
|
5332
5338
|
name: "display",
|
5333
5339
|
label: "排布",
|
@@ -5410,7 +5416,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5410
5416
|
save: "",
|
5411
5417
|
onSave: o
|
5412
5418
|
}, {
|
5413
|
-
default:
|
5419
|
+
default: b(() => [
|
5414
5420
|
v(n(se), {
|
5415
5421
|
ref_key: "editorRef",
|
5416
5422
|
ref: t,
|
@@ -5437,16 +5443,16 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5437
5443
|
Vo(o, () => {
|
5438
5444
|
s("close");
|
5439
5445
|
});
|
5440
|
-
const g = (
|
5441
|
-
r.value = typeof
|
5442
|
-
}, d = (
|
5443
|
-
i.value =
|
5446
|
+
const g = (h) => {
|
5447
|
+
r.value = typeof h == "number" ? `${h}px` : "auto", d(r.value);
|
5448
|
+
}, d = (h) => {
|
5449
|
+
i.value = h === "auto" ? void 0 : "px";
|
5444
5450
|
}, m = () => {
|
5445
5451
|
r.value ? (s("update:modelValue", r.value), s("submit", l.name, r.value), s("close")) : le("请输入有效值", "提示");
|
5446
5452
|
}, f = () => {
|
5447
5453
|
r.value = void 0, s("update:modelValue", r.value), s("submit", l.name, void 0), s("close");
|
5448
5454
|
};
|
5449
|
-
return (
|
5455
|
+
return (h, c) => (p(), j("div", Ir, [
|
5450
5456
|
c[4] || (c[4] = V("div", { class: "v-spacing-input__modal" }, null, -1)),
|
5451
5457
|
V("div", Tr, [
|
5452
5458
|
v(n(U), {
|
@@ -5455,12 +5461,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5455
5461
|
ref: o,
|
5456
5462
|
direction: "column"
|
5457
5463
|
}, {
|
5458
|
-
default:
|
5464
|
+
default: b(() => [
|
5459
5465
|
v(n(U), null, {
|
5460
|
-
default:
|
5466
|
+
default: b(() => [
|
5461
5467
|
v(n(bn), {
|
5462
5468
|
modelValue: r.value,
|
5463
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
5469
|
+
"onUpdate:modelValue": c[0] || (c[0] = (_) => r.value = _),
|
5464
5470
|
size: "small",
|
5465
5471
|
"with-unit": !!i.value,
|
5466
5472
|
unit: i.value,
|
@@ -5471,15 +5477,15 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5471
5477
|
_: 1
|
5472
5478
|
}),
|
5473
5479
|
v(n(U), null, {
|
5474
|
-
default:
|
5480
|
+
default: b(() => [
|
5475
5481
|
a.value ? (p(), y(n(U), {
|
5476
5482
|
key: 0,
|
5477
5483
|
class: "v-spacing-input__auto",
|
5478
5484
|
width: "20%"
|
5479
5485
|
}, {
|
5480
|
-
default:
|
5486
|
+
default: b(() => [
|
5481
5487
|
V("span", {
|
5482
|
-
onClick: c[1] || (c[1] = (
|
5488
|
+
onClick: c[1] || (c[1] = (_) => g("auto"))
|
5483
5489
|
}, "auto")
|
5484
5490
|
]),
|
5485
5491
|
_: 1
|
@@ -5490,10 +5496,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5490
5496
|
align: "center",
|
5491
5497
|
wrap: "wrap"
|
5492
5498
|
}, {
|
5493
|
-
default:
|
5494
|
-
(p(), j(O, null, L(t, (
|
5495
|
-
onClick: (
|
5496
|
-
}, F(
|
5499
|
+
default: b(() => [
|
5500
|
+
(p(), j(O, null, L(t, (_) => V("span", {
|
5501
|
+
onClick: (w) => g(_)
|
5502
|
+
}, F(_), 9, Br)), 64))
|
5497
5503
|
]),
|
5498
5504
|
_: 1
|
5499
5505
|
})
|
@@ -5501,7 +5507,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5501
5507
|
_: 1
|
5502
5508
|
}),
|
5503
5509
|
v(n(U), null, {
|
5504
|
-
default:
|
5510
|
+
default: b(() => [
|
5505
5511
|
v(n(ae), {
|
5506
5512
|
size: "small",
|
5507
5513
|
type: "primary",
|
@@ -5509,7 +5515,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5509
5515
|
style: { width: "100%" },
|
5510
5516
|
onClick: m
|
5511
5517
|
}, {
|
5512
|
-
default:
|
5518
|
+
default: b(() => c[2] || (c[2] = [
|
5513
5519
|
K(" 确定 ")
|
5514
5520
|
])),
|
5515
5521
|
_: 1
|
@@ -5520,7 +5526,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5520
5526
|
style: { width: "100%" },
|
5521
5527
|
onClick: f
|
5522
5528
|
}, {
|
5523
|
-
default:
|
5529
|
+
default: b(() => c[3] || (c[3] = [
|
5524
5530
|
K(" 重置 ")
|
5525
5531
|
])),
|
5526
5532
|
_: 1
|
@@ -5551,19 +5557,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5551
5557
|
setStyle: { type: Function }
|
5552
5558
|
},
|
5553
5559
|
setup(u) {
|
5554
|
-
const e = u, t = k(), l = k(), { width: s, height: a } =
|
5560
|
+
const e = u, t = k(), l = k(), { width: s, height: a } = Xe(t), { width: o, height: r } = Xe(l), i = k(!1), g = k(), d = k(), m = () => {
|
5555
5561
|
i.value = !1, g.value = void 0, d.value = void 0;
|
5556
|
-
}, f = (
|
5557
|
-
g.value =
|
5562
|
+
}, f = (h) => {
|
5563
|
+
g.value = h, d.value = e.styleJson[h], i.value = !0;
|
5558
5564
|
};
|
5559
|
-
return (
|
5565
|
+
return (h, c) => (p(), y(n(H), {
|
5560
5566
|
title: "间距",
|
5561
5567
|
class: "v-sub-panel",
|
5562
5568
|
size: "small",
|
5563
5569
|
fit: !1,
|
5564
5570
|
collapsable: ""
|
5565
5571
|
}, {
|
5566
|
-
default:
|
5572
|
+
default: b(() => [
|
5567
5573
|
V("div", {
|
5568
5574
|
class: "v-style-widget__spacing",
|
5569
5575
|
ref_key: "container",
|
@@ -5592,7 +5598,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5592
5598
|
"data-automation-id": "margin-top-button",
|
5593
5599
|
"aria-label": "Margin top button",
|
5594
5600
|
class: "tb-path-color",
|
5595
|
-
onClick: c[0] || (c[0] = (
|
5601
|
+
onClick: c[0] || (c[0] = (_) => f("margin-top"))
|
5596
5602
|
}, null, 8, zr)
|
5597
5603
|
])
|
5598
5604
|
]),
|
@@ -5610,7 +5616,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5610
5616
|
"data-automation-id": "margin-right-button",
|
5611
5617
|
"aria-label": "Margin right button",
|
5612
5618
|
class: "lr-path-color",
|
5613
|
-
onClick: c[1] || (c[1] = (
|
5619
|
+
onClick: c[1] || (c[1] = (_) => f("margin-right"))
|
5614
5620
|
}, null, 8, Fr)
|
5615
5621
|
])
|
5616
5622
|
]),
|
@@ -5628,7 +5634,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5628
5634
|
"data-automation-id": "margin-bottom-button",
|
5629
5635
|
"aria-label": "Margin bottom button",
|
5630
5636
|
class: "tb-path-color",
|
5631
|
-
onClick: c[2] || (c[2] = (
|
5637
|
+
onClick: c[2] || (c[2] = (_) => f("margin-bottom"))
|
5632
5638
|
}, null, 8, Wr)
|
5633
5639
|
])
|
5634
5640
|
]),
|
@@ -5646,7 +5652,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5646
5652
|
"data-automation-id": "margin-left-button",
|
5647
5653
|
"aria-label": "Margin left button",
|
5648
5654
|
class: "lr-path-color",
|
5649
|
-
onClick: c[3] || (c[3] = (
|
5655
|
+
onClick: c[3] || (c[3] = (_) => f("margin-left"))
|
5650
5656
|
}, null, 8, Lr)
|
5651
5657
|
])
|
5652
5658
|
]),
|
@@ -5701,19 +5707,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5701
5707
|
], 8, Or)) : A("", !0),
|
5702
5708
|
V("div", {
|
5703
5709
|
class: X(["spacing-edit margin-top", { "is-setting": e.styleJson["margin-top"] }]),
|
5704
|
-
onClick: c[4] || (c[4] = (
|
5710
|
+
onClick: c[4] || (c[4] = (_) => f("margin-top"))
|
5705
5711
|
}, F(e.styleJson["margin-top"] || "-"), 3),
|
5706
5712
|
V("div", {
|
5707
5713
|
class: X(["spacing-edit margin-right", { "is-setting": e.styleJson["margin-right"] }]),
|
5708
|
-
onClick: c[5] || (c[5] = (
|
5714
|
+
onClick: c[5] || (c[5] = (_) => f("margin-right"))
|
5709
5715
|
}, F(e.styleJson["margin-right"] || "-"), 3),
|
5710
5716
|
V("div", {
|
5711
5717
|
class: X(["spacing-edit margin-bottom", { "is-setting": e.styleJson["margin-bottom"] }]),
|
5712
|
-
onClick: c[6] || (c[6] = (
|
5718
|
+
onClick: c[6] || (c[6] = (_) => f("margin-bottom"))
|
5713
5719
|
}, F(e.styleJson["margin-bottom"] || "-"), 3),
|
5714
5720
|
V("div", {
|
5715
5721
|
class: X(["spacing-edit margin-left", { "is-setting": e.styleJson["margin-left"] }]),
|
5716
|
-
onClick: c[7] || (c[7] = (
|
5722
|
+
onClick: c[7] || (c[7] = (_) => f("margin-left"))
|
5717
5723
|
}, F(e.styleJson["margin-left"] || "-"), 3)
|
5718
5724
|
]),
|
5719
5725
|
V("div", {
|
@@ -5742,7 +5748,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5742
5748
|
"data-automation-id": "padding-top-button",
|
5743
5749
|
"aria-label": "Padding top button",
|
5744
5750
|
class: "tb-path-color",
|
5745
|
-
onClick: c[8] || (c[8] = (
|
5751
|
+
onClick: c[8] || (c[8] = (_) => f("padding-top"))
|
5746
5752
|
}, null, 8, Xr)
|
5747
5753
|
])
|
5748
5754
|
]),
|
@@ -5760,7 +5766,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5760
5766
|
"data-automation-id": "padding-right-button",
|
5761
5767
|
"aria-label": "Padding right button",
|
5762
5768
|
class: "lr-path-color",
|
5763
|
-
onClick: c[9] || (c[9] = (
|
5769
|
+
onClick: c[9] || (c[9] = (_) => f("padding-right"))
|
5764
5770
|
}, null, 8, Kr)
|
5765
5771
|
])
|
5766
5772
|
]),
|
@@ -5778,7 +5784,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5778
5784
|
"data-automation-id": "padding-bottom-button",
|
5779
5785
|
"aria-label": "Padding bottom button",
|
5780
5786
|
class: "tb-path-color",
|
5781
|
-
onClick: c[10] || (c[10] = (
|
5787
|
+
onClick: c[10] || (c[10] = (_) => f("padding-bottom"))
|
5782
5788
|
}, null, 8, Qr)
|
5783
5789
|
])
|
5784
5790
|
]),
|
@@ -5796,7 +5802,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5796
5802
|
"data-automation-id": "padding-left-button",
|
5797
5803
|
"aria-label": "Padding left button",
|
5798
5804
|
class: "lr-path-color",
|
5799
|
-
onClick: c[11] || (c[11] = (
|
5805
|
+
onClick: c[11] || (c[11] = (_) => f("padding-left"))
|
5800
5806
|
}, null, 8, Yr)
|
5801
5807
|
])
|
5802
5808
|
]),
|
@@ -5851,19 +5857,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5851
5857
|
], 8, Gr)) : A("", !0),
|
5852
5858
|
V("div", {
|
5853
5859
|
class: X(["spacing-edit padding-top", { "is-setting": e.styleJson["padding-top"] }]),
|
5854
|
-
onClick: c[12] || (c[12] = (
|
5860
|
+
onClick: c[12] || (c[12] = (_) => f("padding-top"))
|
5855
5861
|
}, F(e.styleJson["padding-top"] || "-"), 3),
|
5856
5862
|
V("div", {
|
5857
5863
|
class: X(["spacing-edit padding-right", { "is-setting": e.styleJson["padding-right"] }]),
|
5858
|
-
onClick: c[13] || (c[13] = (
|
5864
|
+
onClick: c[13] || (c[13] = (_) => f("padding-right"))
|
5859
5865
|
}, F(e.styleJson["padding-right"] || "-"), 3),
|
5860
5866
|
V("div", {
|
5861
5867
|
class: X(["spacing-edit padding-bottom", { "is-setting": e.styleJson["padding-bottom"] }]),
|
5862
|
-
onClick: c[14] || (c[14] = (
|
5868
|
+
onClick: c[14] || (c[14] = (_) => f("padding-bottom"))
|
5863
5869
|
}, F(e.styleJson["padding-bottom"] || "-"), 3),
|
5864
5870
|
V("div", {
|
5865
5871
|
class: X(["spacing-edit padding-left", { "is-setting": e.styleJson["padding-left"] }]),
|
5866
|
-
onClick: c[15] || (c[15] = (
|
5872
|
+
onClick: c[15] || (c[15] = (_) => f("padding-left"))
|
5867
5873
|
}, F(e.styleJson["padding-left"] || "-"), 3)
|
5868
5874
|
], 512),
|
5869
5875
|
(p(), j("svg", ai, c[17] || (c[17] = [
|
@@ -5893,7 +5899,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5893
5899
|
key: 0,
|
5894
5900
|
name: g.value,
|
5895
5901
|
modelValue: d.value,
|
5896
|
-
"onUpdate:modelValue": c[16] || (c[16] = (
|
5902
|
+
"onUpdate:modelValue": c[16] || (c[16] = (_) => d.value = _),
|
5897
5903
|
onClose: m,
|
5898
5904
|
onSubmit: e.setStyle
|
5899
5905
|
}, null, 8, ["name", "modelValue", "onSubmit"])) : A("", !0)
|
@@ -5971,14 +5977,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
5971
5977
|
fit: !1,
|
5972
5978
|
collapsable: ""
|
5973
5979
|
}, {
|
5974
|
-
default:
|
5980
|
+
default: b(() => [
|
5975
5981
|
v(n(fe), {
|
5976
5982
|
class: "v-style-widget__sizing",
|
5977
5983
|
size: "small",
|
5978
5984
|
"label-width": "60px",
|
5979
5985
|
inline: ""
|
5980
5986
|
}, {
|
5981
|
-
default:
|
5987
|
+
default: b(() => [
|
5982
5988
|
(p(), j(O, null, L(s, (r) => v(n(M), {
|
5983
5989
|
name: r.name,
|
5984
5990
|
label: r.label,
|
@@ -6002,7 +6008,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6002
6008
|
setStyle: { type: Function }
|
6003
6009
|
},
|
6004
6010
|
setup(u) {
|
6005
|
-
const e = u, t = k(), { width: l, height: s } =
|
6011
|
+
const e = u, t = k(), { width: l, height: s } = Xe(t), a = k(!1), o = k(), r = k(), i = [
|
6006
6012
|
{ label: "静态", value: "static" },
|
6007
6013
|
{ label: "相对", value: "relative" },
|
6008
6014
|
{ label: "绝对", value: "absolute" },
|
@@ -6018,25 +6024,25 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6018
6024
|
{ label: "上", svg: Us, value: "auto 0% 0% 0%" },
|
6019
6025
|
{ label: "下", svg: qs, value: "0% 0% auto 0%" },
|
6020
6026
|
{ label: "填充", svg: Hs, value: "0% 0% 0% 0%" }
|
6021
|
-
], d = S(() => (e.styleJson.inset || "").split(" ")), m = (
|
6022
|
-
o.value =
|
6027
|
+
], d = S(() => (e.styleJson.inset || "").split(" ")), m = (h) => {
|
6028
|
+
o.value = h, r.value = e.styleJson[h], a.value = !0;
|
6023
6029
|
}, f = () => {
|
6024
6030
|
a.value = !1, o.value = void 0, r.value = void 0;
|
6025
6031
|
};
|
6026
|
-
return (
|
6032
|
+
return (h, c) => (p(), y(n(H), {
|
6027
6033
|
title: "定位",
|
6028
6034
|
class: "v-sub-panel",
|
6029
6035
|
size: "small",
|
6030
6036
|
fit: !1,
|
6031
6037
|
collapsable: ""
|
6032
6038
|
}, {
|
6033
|
-
default:
|
6039
|
+
default: b(() => [
|
6034
6040
|
V("div", ui, [
|
6035
6041
|
v(n(fe), {
|
6036
6042
|
"label-width": "60px",
|
6037
6043
|
size: "small"
|
6038
6044
|
}, {
|
6039
|
-
default:
|
6045
|
+
default: b(() => [
|
6040
6046
|
v(n(M), {
|
6041
6047
|
name: "position",
|
6042
6048
|
label: "定位",
|
@@ -6056,7 +6062,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6056
6062
|
onChange: e.setStyle
|
6057
6063
|
}, null, 8, ["value", "onChange"]),
|
6058
6064
|
v(n(hn), { label: " " }, {
|
6059
|
-
default:
|
6065
|
+
default: b(() => [
|
6060
6066
|
V("div", ci, [
|
6061
6067
|
V("div", {
|
6062
6068
|
ref_key: "inner",
|
@@ -6084,7 +6090,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6084
6090
|
"data-automation-id": "padding-top-button",
|
6085
6091
|
"aria-label": "Padding top button",
|
6086
6092
|
class: "tb-path-color",
|
6087
|
-
onClick: c[0] || (c[0] = (
|
6093
|
+
onClick: c[0] || (c[0] = (_) => m("top"))
|
6088
6094
|
}, null, 8, pi)
|
6089
6095
|
])
|
6090
6096
|
]),
|
@@ -6102,7 +6108,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6102
6108
|
"data-automation-id": "padding-right-button",
|
6103
6109
|
"aria-label": "Padding right button",
|
6104
6110
|
class: "lr-path-color",
|
6105
|
-
onClick: c[1] || (c[1] = (
|
6111
|
+
onClick: c[1] || (c[1] = (_) => m("right"))
|
6106
6112
|
}, null, 8, mi)
|
6107
6113
|
])
|
6108
6114
|
]),
|
@@ -6120,7 +6126,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6120
6126
|
"data-automation-id": "padding-bottom-button",
|
6121
6127
|
"aria-label": "Padding bottom button",
|
6122
6128
|
class: "tb-path-color",
|
6123
|
-
onClick: c[2] || (c[2] = (
|
6129
|
+
onClick: c[2] || (c[2] = (_) => m("bottom"))
|
6124
6130
|
}, null, 8, vi)
|
6125
6131
|
])
|
6126
6132
|
]),
|
@@ -6138,7 +6144,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6138
6144
|
"data-automation-id": "padding-left-button",
|
6139
6145
|
"aria-label": "Padding left button",
|
6140
6146
|
class: "lr-path-color",
|
6141
|
-
onClick: c[3] || (c[3] = (
|
6147
|
+
onClick: c[3] || (c[3] = (_) => m("left"))
|
6142
6148
|
}, null, 8, gi)
|
6143
6149
|
])
|
6144
6150
|
]),
|
@@ -6193,19 +6199,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6193
6199
|
], 8, di)) : A("", !0),
|
6194
6200
|
V("div", {
|
6195
6201
|
class: X(["spacing-edit padding-top", { "is-setting": e.styleJson.top }]),
|
6196
|
-
onClick: c[4] || (c[4] = (
|
6202
|
+
onClick: c[4] || (c[4] = (_) => m("top"))
|
6197
6203
|
}, F(e.styleJson.top || d.value[0] || "-"), 3),
|
6198
6204
|
V("div", {
|
6199
6205
|
class: X(["spacing-edit padding-right", { "is-setting": e.styleJson.right }]),
|
6200
|
-
onClick: c[5] || (c[5] = (
|
6206
|
+
onClick: c[5] || (c[5] = (_) => m("right"))
|
6201
6207
|
}, F(e.styleJson.right || d.value[1] || "-"), 3),
|
6202
6208
|
V("div", {
|
6203
6209
|
class: X(["spacing-edit padding-bottom", { "is-setting": e.styleJson.bottom }]),
|
6204
|
-
onClick: c[6] || (c[6] = (
|
6210
|
+
onClick: c[6] || (c[6] = (_) => m("bottom"))
|
6205
6211
|
}, F(e.styleJson.bottom || d.value[2] || "-"), 3),
|
6206
6212
|
V("div", {
|
6207
6213
|
class: X(["spacing-edit padding-left", { "is-setting": e.styleJson.left }]),
|
6208
|
-
onClick: c[7] || (c[7] = (
|
6214
|
+
onClick: c[7] || (c[7] = (_) => m("left"))
|
6209
6215
|
}, F(e.styleJson.left || d.value[3] || "-"), 3)
|
6210
6216
|
], 512),
|
6211
6217
|
a.value ? (p(), y(Ln, {
|
@@ -6213,7 +6219,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6213
6219
|
auto: "",
|
6214
6220
|
name: o.value,
|
6215
6221
|
modelValue: r.value,
|
6216
|
-
"onUpdate:modelValue": c[8] || (c[8] = (
|
6222
|
+
"onUpdate:modelValue": c[8] || (c[8] = (_) => r.value = _),
|
6217
6223
|
onClose: f,
|
6218
6224
|
onSubmit: e.setStyle
|
6219
6225
|
}, null, 8, ["name", "modelValue", "onSubmit"])) : A("", !0)
|
@@ -6313,14 +6319,14 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6313
6319
|
fit: !1,
|
6314
6320
|
collapsable: ""
|
6315
6321
|
}, {
|
6316
|
-
default:
|
6322
|
+
default: b(() => [
|
6317
6323
|
v(n(fe), {
|
6318
6324
|
class: "v-style-widget__texting",
|
6319
6325
|
size: "small",
|
6320
6326
|
"label-width": "60px",
|
6321
6327
|
inline: ""
|
6322
6328
|
}, {
|
6323
|
-
default:
|
6329
|
+
default: b(() => [
|
6324
6330
|
(p(), j(O, null, L(t, (i) => v(n(M), {
|
6325
6331
|
name: i.name,
|
6326
6332
|
label: i.label,
|
@@ -6337,7 +6343,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6337
6343
|
size: "small",
|
6338
6344
|
"label-width": "60px"
|
6339
6345
|
}, {
|
6340
|
-
default:
|
6346
|
+
default: b(() => [
|
6341
6347
|
v(n(M), {
|
6342
6348
|
name: "color",
|
6343
6349
|
label: "颜色",
|
@@ -6418,12 +6424,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6418
6424
|
fit: !1,
|
6419
6425
|
collapsable: ""
|
6420
6426
|
}, {
|
6421
|
-
default:
|
6427
|
+
default: b(() => [
|
6422
6428
|
v(n(fe), {
|
6423
6429
|
"label-width": "60px",
|
6424
6430
|
size: "small"
|
6425
6431
|
}, {
|
6426
|
-
default:
|
6432
|
+
default: b(() => [
|
6427
6433
|
v(n(M), {
|
6428
6434
|
name: "background-image",
|
6429
6435
|
label: "图片",
|
@@ -6530,12 +6536,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6530
6536
|
fit: !1,
|
6531
6537
|
collapsable: ""
|
6532
6538
|
}, {
|
6533
|
-
default:
|
6539
|
+
default: b(() => [
|
6534
6540
|
v(n(fe), {
|
6535
6541
|
"label-width": "60px",
|
6536
6542
|
size: "small"
|
6537
6543
|
}, {
|
6538
|
-
default:
|
6544
|
+
default: b(() => [
|
6539
6545
|
v(n(M), {
|
6540
6546
|
name: "border-radius",
|
6541
6547
|
label: "圆角",
|
@@ -6648,12 +6654,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6648
6654
|
fit: !1,
|
6649
6655
|
collapsable: ""
|
6650
6656
|
}, {
|
6651
|
-
default:
|
6657
|
+
default: b(() => [
|
6652
6658
|
v(n(fe), {
|
6653
6659
|
"label-width": "60px",
|
6654
6660
|
size: "small"
|
6655
6661
|
}, {
|
6656
|
-
default:
|
6662
|
+
default: b(() => [
|
6657
6663
|
v(n(M), {
|
6658
6664
|
name: "opacity",
|
6659
6665
|
label: "透明度",
|
@@ -6711,7 +6717,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6711
6717
|
direction: "column",
|
6712
6718
|
fit: ""
|
6713
6719
|
}, {
|
6714
|
-
default:
|
6720
|
+
default: b(() => [
|
6715
6721
|
(p(), y(Pr, {
|
6716
6722
|
key: `Layout${l.value?.id}`,
|
6717
6723
|
"style-json": s.value,
|
@@ -6763,12 +6769,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6763
6769
|
path: { type: Function }
|
6764
6770
|
},
|
6765
6771
|
setup(u, { expose: e }) {
|
6766
|
-
const t = u, l = k(), s = k(Symbol()), { current: a, engine: o } = ue(), { width: r, height: i } =
|
6772
|
+
const t = u, l = k(), s = k(Symbol()), { current: a, engine: o } = ue(), { width: r, height: i } = Xe(l), g = S(() => a.value && t.path ? t.path(a.value) : null), d = S(() => o.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc");
|
6767
6773
|
return e({
|
6768
6774
|
refresh: () => {
|
6769
6775
|
s.value = Symbol();
|
6770
6776
|
}
|
6771
|
-
}), (f,
|
6777
|
+
}), (f, h) => (p(), j("div", {
|
6772
6778
|
ref_key: "container",
|
6773
6779
|
ref: l,
|
6774
6780
|
class: "v-previewer",
|
@@ -6779,7 +6785,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6779
6785
|
width: n(r),
|
6780
6786
|
height: n(i)
|
6781
6787
|
}, {
|
6782
|
-
default:
|
6788
|
+
default: b(() => [
|
6783
6789
|
g.value ? (p(), j("iframe", {
|
6784
6790
|
key: 0,
|
6785
6791
|
ref: "iframe",
|
@@ -6806,12 +6812,12 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6806
6812
|
class: "v-nodepath-widget",
|
6807
6813
|
"separator-icon": n(ya)
|
6808
6814
|
}, {
|
6809
|
-
default:
|
6815
|
+
default: b(() => [
|
6810
6816
|
(p(!0), j(O, null, L(l.value, (i) => (p(), y(n(rl), {
|
6811
6817
|
onClick: (g) => s(i),
|
6812
6818
|
onMouseover: (g) => a(i)
|
6813
6819
|
}, {
|
6814
|
-
default:
|
6820
|
+
default: b(() => [
|
6815
6821
|
K(F(i.name), 1)
|
6816
6822
|
]),
|
6817
6823
|
_: 2
|
@@ -6847,7 +6853,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6847
6853
|
save: "",
|
6848
6854
|
onSave: a
|
6849
6855
|
}, {
|
6850
|
-
default:
|
6856
|
+
default: b(() => [
|
6851
6857
|
v(n(se), {
|
6852
6858
|
ref_key: "editorRef",
|
6853
6859
|
ref: t,
|
@@ -6885,7 +6891,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6885
6891
|
size: "small",
|
6886
6892
|
fit: ""
|
6887
6893
|
}, {
|
6888
|
-
default:
|
6894
|
+
default: b(() => [
|
6889
6895
|
v(n(se), {
|
6890
6896
|
ref_key: "editorRef",
|
6891
6897
|
ref: l,
|
@@ -6928,7 +6934,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6928
6934
|
ref_key: "panel",
|
6929
6935
|
ref: l
|
6930
6936
|
}, {
|
6931
|
-
default:
|
6937
|
+
default: b(() => [
|
6932
6938
|
(p(), j("iframe", {
|
6933
6939
|
key: a.value,
|
6934
6940
|
ref: "frame",
|
@@ -6962,7 +6968,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6962
6968
|
class: "v-project-config-widget",
|
6963
6969
|
title: "项目配置"
|
6964
6970
|
}, {
|
6965
|
-
default:
|
6971
|
+
default: b(() => [
|
6966
6972
|
n(e) ? (p(), y(n(It), {
|
6967
6973
|
key: 0,
|
6968
6974
|
footer: !1,
|
@@ -6971,7 +6977,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
6971
6977
|
model: n(e).config,
|
6972
6978
|
onChange: t
|
6973
6979
|
}, {
|
6974
|
-
default:
|
6980
|
+
default: b(() => [
|
6975
6981
|
v(n(T), {
|
6976
6982
|
label: "站点名称",
|
6977
6983
|
name: "title"
|
@@ -7896,7 +7902,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
7896
7902
|
setup(u, { emit: e }) {
|
7897
7903
|
const t = (i = "") => ({
|
7898
7904
|
type: "JSExpression",
|
7899
|
-
value:
|
7905
|
+
value: Ge(i) ? i.value : i
|
7900
7906
|
}), l = u, s = e, a = (i) => re(i, l.context, !0), o = k(t(l.modelValue).value);
|
7901
7907
|
J(
|
7902
7908
|
() => l.modelValue,
|
@@ -7920,10 +7926,10 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
7920
7926
|
"onUpdate:modelValue": g[0] || (g[0] = (d) => o.value = d),
|
7921
7927
|
onChange: r
|
7922
7928
|
}, {
|
7923
|
-
prefix:
|
7929
|
+
prefix: b(() => [
|
7924
7930
|
K(F(Xi))
|
7925
7931
|
]),
|
7926
|
-
suffix:
|
7932
|
+
suffix: b(() => [
|
7927
7933
|
K(F(Ki))
|
7928
7934
|
]),
|
7929
7935
|
_: 1
|
@@ -7938,7 +7944,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
7938
7944
|
setup(u) {
|
7939
7945
|
const e = u;
|
7940
7946
|
return (t, l) => (p(), y(n(ul), ie({ clearable: "" }, t.$attrs), {
|
7941
|
-
default:
|
7947
|
+
default: b(() => [
|
7942
7948
|
(p(!0), j(O, null, L(e.options, (s) => (p(), y(n(cl), ie({
|
7943
7949
|
key: s.label,
|
7944
7950
|
ref_for: !0
|
@@ -7955,7 +7961,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
7955
7961
|
},
|
7956
7962
|
emits: ["change"],
|
7957
7963
|
setup(u, { emit: e }) {
|
7958
|
-
const t = u, l = e, s = S(() =>
|
7964
|
+
const t = u, l = e, s = S(() => Ge(t.modelValue) ? void 0 : Number(t.modelValue || 0)), a = (o) => {
|
7959
7965
|
l("change", o);
|
7960
7966
|
};
|
7961
7967
|
return (o, r) => (p(), y(n(dl), ie({
|
@@ -7982,7 +7988,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
7982
7988
|
const t = u, l = k(), s = k(
|
7983
7989
|
typeof t.modelValue == "object" ? JSON.stringify(t.modelValue, null, 2) : void 0
|
7984
7990
|
), a = S(() => !!s.value), o = k(!1), r = e, i = (f) => {
|
7985
|
-
let
|
7991
|
+
let h = !0;
|
7986
7992
|
try {
|
7987
7993
|
const c = JSON.parse(f);
|
7988
7994
|
if (t.type === "Array" && !Array.isArray(c))
|
@@ -7992,24 +7998,24 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
7992
7998
|
if (typeof c != "object")
|
7993
7999
|
throw new Error(`"${f}" is not a ${t.type}`);
|
7994
8000
|
} catch (c) {
|
7995
|
-
|
8001
|
+
h = !1, Vt.error({
|
7996
8002
|
title: "代码错误",
|
7997
8003
|
message: c?.message || c
|
7998
8004
|
});
|
7999
8005
|
}
|
8000
|
-
return
|
8006
|
+
return h;
|
8001
8007
|
}, g = () => {
|
8002
8008
|
const f = l.value?.getEditor();
|
8003
8009
|
if (f) {
|
8004
|
-
const
|
8005
|
-
i(
|
8010
|
+
const h = f.getValue();
|
8011
|
+
i(h) && (s.value = h, r("change", JSON.parse(h)), o.value = !1);
|
8006
8012
|
}
|
8007
8013
|
}, d = () => {
|
8008
8014
|
s.value = "", r("change", void 0), o.value = !1;
|
8009
8015
|
}, m = () => {
|
8010
8016
|
o.value = !0;
|
8011
8017
|
};
|
8012
|
-
return (f,
|
8018
|
+
return (f, h) => (p(), j("div", {
|
8013
8019
|
class: X(["v-json-setter", { "is-active": a.value }])
|
8014
8020
|
}, [
|
8015
8021
|
v(n(_e), ie({
|
@@ -8021,7 +8027,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8021
8027
|
o.value ? (p(), y(n(Be), {
|
8022
8028
|
key: 0,
|
8023
8029
|
modelValue: o.value,
|
8024
|
-
"onUpdate:modelValue":
|
8030
|
+
"onUpdate:modelValue": h[0] || (h[0] = (c) => o.value = c),
|
8025
8031
|
title: t.type,
|
8026
8032
|
width: "1000px",
|
8027
8033
|
height: "600px",
|
@@ -8031,19 +8037,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8031
8037
|
onSubmit: g,
|
8032
8038
|
onClear: d
|
8033
8039
|
}, {
|
8034
|
-
extra:
|
8040
|
+
extra: b(() => [
|
8035
8041
|
v(n(ae), {
|
8036
8042
|
type: "warning",
|
8037
8043
|
onClick: d,
|
8038
8044
|
size: "default"
|
8039
8045
|
}, {
|
8040
|
-
default:
|
8046
|
+
default: b(() => h[1] || (h[1] = [
|
8041
8047
|
K(" 清除 ")
|
8042
8048
|
])),
|
8043
8049
|
_: 1
|
8044
8050
|
})
|
8045
8051
|
]),
|
8046
|
-
default:
|
8052
|
+
default: b(() => [
|
8047
8053
|
v(n(se), {
|
8048
8054
|
ref_key: "codeEditor",
|
8049
8055
|
ref: l,
|
@@ -8071,11 +8077,11 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8071
8077
|
const t = u, l = k(), s = k(t.modelValue.value), a = k(!1), o = S(() => !!s.value), r = e, i = () => {
|
8072
8078
|
const m = l.value?.getEditor();
|
8073
8079
|
if (m) {
|
8074
|
-
const f = m.getValue(),
|
8080
|
+
const f = m.getValue(), h = {
|
8075
8081
|
type: "JSFunction",
|
8076
8082
|
value: f
|
8077
8083
|
};
|
8078
|
-
re(
|
8084
|
+
re(h, {}) && (s.value = f, r("change", h), a.value = !1);
|
8079
8085
|
}
|
8080
8086
|
}, g = () => {
|
8081
8087
|
s.value = "", r("change", void 0), a.value = !1;
|
@@ -8094,7 +8100,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8094
8100
|
a.value ? (p(), y(n(Be), {
|
8095
8101
|
key: 0,
|
8096
8102
|
modelValue: a.value,
|
8097
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
8103
|
+
"onUpdate:modelValue": f[0] || (f[0] = (h) => a.value = h),
|
8098
8104
|
title: "JSFunction",
|
8099
8105
|
width: "1000px",
|
8100
8106
|
height: "600px",
|
@@ -8104,19 +8110,19 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8104
8110
|
onSubmit: i,
|
8105
8111
|
onClear: g
|
8106
8112
|
}, {
|
8107
|
-
extra:
|
8113
|
+
extra: b(() => [
|
8108
8114
|
v(n(ae), {
|
8109
8115
|
type: "warning",
|
8110
8116
|
onClick: g,
|
8111
8117
|
size: "default"
|
8112
8118
|
}, {
|
8113
|
-
default:
|
8119
|
+
default: b(() => f[1] || (f[1] = [
|
8114
8120
|
K(" 清除 ")
|
8115
8121
|
])),
|
8116
8122
|
_: 1
|
8117
8123
|
})
|
8118
8124
|
]),
|
8119
|
-
default:
|
8125
|
+
default: b(() => [
|
8120
8126
|
v(n(se), {
|
8121
8127
|
ref_key: "codeEditor",
|
8122
8128
|
ref: l,
|
@@ -8141,13 +8147,13 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8141
8147
|
class: "v-radio-setter",
|
8142
8148
|
size: "small"
|
8143
8149
|
}, t.$attrs), {
|
8144
|
-
default:
|
8150
|
+
default: b(() => [
|
8145
8151
|
(p(!0), j(O, null, L(e.options, (s) => (p(), y(n(nt), {
|
8146
8152
|
label: s.label,
|
8147
8153
|
value: s.value,
|
8148
8154
|
title: s.label
|
8149
8155
|
}, {
|
8150
|
-
default:
|
8156
|
+
default: b(() => [
|
8151
8157
|
s.svg ? (p(), y(n(Se), {
|
8152
8158
|
key: 0,
|
8153
8159
|
src: s.svg
|
@@ -8234,7 +8240,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8234
8240
|
setup(u, { emit: e }) {
|
8235
8241
|
const t = u, l = e, s = k([]), a = S(() => s.value.length < t.limit), o = (i) => i.type.includes("image") ? (xl(i).then((g) => {
|
8236
8242
|
s.value = [{ name: i.name, url: g }];
|
8237
|
-
}), !1) : (
|
8243
|
+
}), !1) : (Qe.error("只能上传图片"), !1), r = () => {
|
8238
8244
|
s.value = [];
|
8239
8245
|
};
|
8240
8246
|
return J(
|
@@ -8259,7 +8265,7 @@ const Eo = { class: "v-icon-setter" }, Po = { class: "v-icon-setter__content" },
|
|
8259
8265
|
"auto-upload": !0,
|
8260
8266
|
"on-remove": r
|
8261
8267
|
}, i.$attrs), {
|
8262
|
-
default:
|
8268
|
+
default: b(() => [
|
8263
8269
|
V("span", ou, [
|
8264
8270
|
v(n(Se), { icon: n(Ea) }, null, 8, ["icon"])
|
8265
8271
|
])
|
@@ -8641,7 +8647,7 @@ class hu {
|
|
8641
8647
|
return Object.values(this.setters).filter((l) => l.type === e).map((l) => l.name);
|
8642
8648
|
}
|
8643
8649
|
}
|
8644
|
-
const
|
8650
|
+
const Ne = new hu();
|
8645
8651
|
class bu {
|
8646
8652
|
constructor() {
|
8647
8653
|
$(this, "window");
|
@@ -8732,8 +8738,8 @@ class _u {
|
|
8732
8738
|
constructor(e, t, l, s) {
|
8733
8739
|
$(this, "proxied", {});
|
8734
8740
|
$(this, "document", null);
|
8735
|
-
$(this, "hover",
|
8736
|
-
$(this, "dropping",
|
8741
|
+
$(this, "hover", Ue(null));
|
8742
|
+
$(this, "dropping", Ue(null));
|
8737
8743
|
$(this, "selected", k(null));
|
8738
8744
|
$(this, "dragging", null);
|
8739
8745
|
$(this, "draggingNode", null);
|
@@ -8757,7 +8763,7 @@ class _u {
|
|
8757
8763
|
), ne.on(
|
8758
8764
|
wt,
|
8759
8765
|
this.bind(this.onActiveChange, "onActiveChange")
|
8760
|
-
), ne.on(
|
8766
|
+
), ne.on(qe, this.bind(this.onViewChange, "onViewChange")), J(
|
8761
8767
|
this.devtools.isOpen,
|
8762
8768
|
(l) => {
|
8763
8769
|
l && this.cleanHelper();
|
@@ -8782,7 +8788,7 @@ class _u {
|
|
8782
8788
|
wt,
|
8783
8789
|
this.bind(this.onActiveChange, "onActiveChange")
|
8784
8790
|
), ne.off(
|
8785
|
-
|
8791
|
+
qe,
|
8786
8792
|
this.bind(this.onViewChange, "onViewChange")
|
8787
8793
|
);
|
8788
8794
|
}
|
@@ -9000,8 +9006,8 @@ class _u {
|
|
9000
9006
|
return !1;
|
9001
9007
|
const r = s.assets.componentMap, i = t !== "inner" && e.parent || e, g = await s.assets.getBlockMaterial(i.from) || r.get(i.name);
|
9002
9008
|
if (!g) return !1;
|
9003
|
-
const { parentIncludes: d = !0, name: m } = l, { childIncludes: f = !0 } = g,
|
9004
|
-
return
|
9009
|
+
const { parentIncludes: d = !0, name: m } = l, { childIncludes: f = !0 } = g, h = d === !0 || Array.isArray(d) && d.includes(i.name), c = f === !0 || Array.isArray(f) && f.includes(m);
|
9010
|
+
return h && c;
|
9005
9011
|
}
|
9006
9012
|
dispose() {
|
9007
9013
|
const { contentWindow: e, document: t } = this;
|
@@ -9062,7 +9068,7 @@ class wu {
|
|
9062
9068
|
} catch (f) {
|
9063
9069
|
le(f.message || "未知错误", "运行时错误"), console.error(f);
|
9064
9070
|
}
|
9065
|
-
this.context = d, ne.on(
|
9071
|
+
this.context = d, ne.on(qe, this.nodeChange), ne.on(kt, this.blockChange);
|
9066
9072
|
}
|
9067
9073
|
dispose() {
|
9068
9074
|
if (this.app) {
|
@@ -9070,7 +9076,7 @@ class wu {
|
|
9070
9076
|
const e = this.app._container;
|
9071
9077
|
e && e.parentNode && (e.parentNode.removeChild(e), this.app._container = null), this.app = null;
|
9072
9078
|
}
|
9073
|
-
this.dsl = null, this.context = null, ne.off(
|
9079
|
+
this.dsl = null, this.context = null, ne.off(qe, this.nodeChange), ne.off(kt, this.blockChange);
|
9074
9080
|
}
|
9075
9081
|
updateChild(e, t) {
|
9076
9082
|
const l = t.children || t.nodes || [];
|
@@ -9096,7 +9102,7 @@ class ku extends wn {
|
|
9096
9102
|
super();
|
9097
9103
|
$(this, "contentWindow", null);
|
9098
9104
|
$(this, "renderer", null);
|
9099
|
-
$(this, "designer",
|
9105
|
+
$(this, "designer", Ue(null));
|
9100
9106
|
$(this, "engine");
|
9101
9107
|
$(this, "materialPath");
|
9102
9108
|
$(this, "rendered", k(Symbol()));
|
@@ -9175,43 +9181,43 @@ class ku extends wn {
|
|
9175
9181
|
this.renderer?.dispose(), this.renderer = null;
|
9176
9182
|
const o = this.contentWindow, { assets: r, service: i, current: g, provider: d } = this.engine, m = d.materials || {}, f = [];
|
9177
9183
|
for (const c of l) {
|
9178
|
-
const
|
9179
|
-
f.push(
|
9184
|
+
const _ = m[c] ? (await m[c]()).default : o[c];
|
9185
|
+
f.push(_);
|
9180
9186
|
}
|
9181
9187
|
r.load(f);
|
9182
|
-
const
|
9188
|
+
const h = this.createEnv(
|
9183
9189
|
t,
|
9184
9190
|
s,
|
9185
9191
|
f,
|
9186
9192
|
a
|
9187
9193
|
);
|
9188
|
-
this.devtools.init(o, this.engine), this.renderer = new wu(
|
9194
|
+
this.devtools.init(o, this.engine), this.renderer = new wu(h, i, d, this.designer.value), g.value && (this.renderer.render(g.value), this.rendered.value = Symbol()), this.triggerReady();
|
9189
9195
|
}
|
9190
9196
|
createEnv(t = [], l = {}, s = [], a = {}) {
|
9191
9197
|
const o = this.contentWindow, { engine: r } = this, { project: i, assets: g, provider: d } = r, m = t.reduce((I, z) => (I[z] = o[z], I), {}), f = {};
|
9192
9198
|
Object.entries(a).forEach(([I, z]) => {
|
9193
9199
|
f[I] = o[z];
|
9194
9200
|
});
|
9195
|
-
const
|
9201
|
+
const h = {}, { groups: c, componentMap: _ } = g;
|
9196
9202
|
for (const I of c.value) {
|
9197
9203
|
const z = I.names || [];
|
9198
9204
|
if (I.name === _t)
|
9199
9205
|
z.forEach((R) => {
|
9200
|
-
const D =
|
9201
|
-
G && D && (
|
9206
|
+
const D = _.get(R), B = D?.package || "", P = Dl[B], G = m[P];
|
9207
|
+
G && D && (h[R] = Ht(D, G));
|
9202
9208
|
});
|
9203
9209
|
else {
|
9204
9210
|
const R = m[l[I.library || ""]];
|
9205
9211
|
R && z.forEach((D) => {
|
9206
|
-
const B =
|
9207
|
-
B ?
|
9212
|
+
const B = _.get(D);
|
9213
|
+
B ? h[D] = Ht(B, R) : h[D] = R[D];
|
9208
9214
|
});
|
9209
9215
|
}
|
9210
9216
|
}
|
9211
|
-
const { adapter:
|
9217
|
+
const { adapter: w, globals: x } = d, C = Hl(
|
9212
9218
|
i.value?.apis,
|
9213
9219
|
i.value?.meta,
|
9214
|
-
|
9220
|
+
w
|
9215
9221
|
);
|
9216
9222
|
return Gl(), i.value?.config?.mock && Xl(i.value?.apis), {
|
9217
9223
|
window: o,
|
@@ -9219,7 +9225,7 @@ class ku extends wn {
|
|
9219
9225
|
VueRouter: o.VueRouter,
|
9220
9226
|
library: m,
|
9221
9227
|
materials: s,
|
9222
|
-
components:
|
9228
|
+
components: h,
|
9223
9229
|
container: o.document.body,
|
9224
9230
|
apis: C,
|
9225
9231
|
globals: x,
|
@@ -9261,9 +9267,9 @@ class Su {
|
|
9261
9267
|
const { categories: s, components: a, label: o, name: r, library: i } = l;
|
9262
9268
|
if (!s || !a)
|
9263
9269
|
continue;
|
9264
|
-
const g = a.filter((
|
9265
|
-
(
|
9266
|
-
), m = d.reduce((
|
9270
|
+
const g = a.filter((h) => !!h.package).map((h) => h.name), d = s.map(
|
9271
|
+
(h) => this.getCateoryComponents(h, a)
|
9272
|
+
), m = d.reduce((h, c) => c.count + h, 0), f = {
|
9267
9273
|
name: l.name,
|
9268
9274
|
label: o || r,
|
9269
9275
|
count: m,
|
@@ -9293,12 +9299,12 @@ class Su {
|
|
9293
9299
|
l.name = t || l.name;
|
9294
9300
|
const { id: s, name: a, slots: o, props: r, emits: i } = l, g = (m) => {
|
9295
9301
|
const f = Array.isArray(m) ? m : [m];
|
9296
|
-
let
|
9302
|
+
let h = [];
|
9297
9303
|
for (const c of f)
|
9298
|
-
|
9299
|
-
|
9304
|
+
h = h.concat(
|
9305
|
+
Ne.getByType(c)
|
9300
9306
|
);
|
9301
|
-
return
|
9307
|
+
return h;
|
9302
9308
|
}, d = {
|
9303
9309
|
id: s,
|
9304
9310
|
name: a,
|
@@ -9382,7 +9388,7 @@ class ic extends wn {
|
|
9382
9388
|
Ve.warn("VTJEngine constructor param [ container ] is undefined");
|
9383
9389
|
}
|
9384
9390
|
bindEvents() {
|
9385
|
-
ne.on(Tl, (t) => this.saveProject(t)), ne.on(Bl, (t) => this.saveBlockFile(t)), ne.on(Rl, (t) => this.saveBlockFile(t)), ne.on($l, () => this.saveMaterials()), ne.on(wt, (t) => this.activeFile(t)), ne.on(Ol, () => this.publish()), ne.on(zl, () => this.publishCurrent()), ne.on(kt, (t) => this.changeFile(t)), ne.on(
|
9391
|
+
ne.on(Tl, (t) => this.saveProject(t)), ne.on(Bl, (t) => this.saveBlockFile(t)), ne.on(Rl, (t) => this.saveBlockFile(t)), ne.on($l, () => this.saveMaterials()), ne.on(wt, (t) => this.activeFile(t)), ne.on(Ol, () => this.publish()), ne.on(zl, () => this.publishCurrent()), ne.on(kt, (t) => this.changeFile(t)), ne.on(qe, () => this.changeCurrentFile()), ne.on(Fl, (t) => this.saveHistory(t)), ne.on(Wl, (t) => this.loadHistory(t));
|
9386
9392
|
}
|
9387
9393
|
async activeFile(t) {
|
9388
9394
|
await ke();
|
@@ -9654,7 +9660,7 @@ const Ee = E({
|
|
9654
9660
|
type: [String, Object, Array],
|
9655
9661
|
required: !0,
|
9656
9662
|
default() {
|
9657
|
-
return [
|
9663
|
+
return [Ne.defaultSetter];
|
9658
9664
|
}
|
9659
9665
|
},
|
9660
9666
|
options: {
|
@@ -9703,8 +9709,8 @@ const Ee = E({
|
|
9703
9709
|
defaultSetter() {
|
9704
9710
|
const { value: u, computedSetters: e } = this;
|
9705
9711
|
let t = typeof u;
|
9706
|
-
t === "Object" && (Array.isArray(u) ? t = "Array" :
|
9707
|
-
const l =
|
9712
|
+
t === "Object" && (Array.isArray(u) ? t = "Array" : Ge(u) ? t = "Object" : Ql(u) && (t = "Function"));
|
9713
|
+
const l = Ne.getByType(t) || [];
|
9708
9714
|
return l.length ? (e.find((s) => l.includes(s.name)) || e[0])?.name : e[0]?.name;
|
9709
9715
|
}
|
9710
9716
|
},
|
@@ -9743,7 +9749,7 @@ const Ee = E({
|
|
9743
9749
|
emits: ["change", "remove"],
|
9744
9750
|
methods: {
|
9745
9751
|
getSetter(u) {
|
9746
|
-
return typeof u == "string" ?
|
9752
|
+
return typeof u == "string" ? Ne.get(u) || Ne.defaultSetter : u;
|
9747
9753
|
},
|
9748
9754
|
changeValue(u) {
|
9749
9755
|
this.$emit("change", this.name, u);
|
@@ -9782,30 +9788,30 @@ const Ee = E({
|
|
9782
9788
|
onEnd(C, I) {
|
9783
9789
|
a.value = I.elementWidth.value;
|
9784
9790
|
}
|
9785
|
-
}, i = k(), g = k(), d = k(), m = k(), f = k(),
|
9791
|
+
}, i = k(), g = k(), d = k(), m = k(), f = k(), h = k(), c = k(), _ = k(), w = k(!1), x = k(!1);
|
9786
9792
|
return e({
|
9787
9793
|
brand: i,
|
9788
9794
|
toolbar: g,
|
9789
9795
|
actions: d,
|
9790
9796
|
apps: m,
|
9791
9797
|
workspace: f,
|
9792
|
-
settings:
|
9798
|
+
settings: h,
|
9793
9799
|
status: c,
|
9794
|
-
collapsed:
|
9800
|
+
collapsed: w,
|
9795
9801
|
settable: x,
|
9796
9802
|
leftWidth: s,
|
9797
9803
|
rightWidth: a,
|
9798
|
-
preview:
|
9804
|
+
preview: _,
|
9799
9805
|
isPreview: l
|
9800
9806
|
}), (C, I) => (p(), y(n(gl), { locale: n(yl) }, {
|
9801
|
-
default:
|
9807
|
+
default: b(() => [
|
9802
9808
|
v(n(Lt), { class: "v-skeleton" }, {
|
9803
|
-
default:
|
9809
|
+
default: b(() => [
|
9804
9810
|
v(n(fl), {
|
9805
9811
|
class: "v-skeleton__header",
|
9806
9812
|
height: C.headerHeight
|
9807
9813
|
}, {
|
9808
|
-
default:
|
9814
|
+
default: b(() => [
|
9809
9815
|
v(n(Ee), {
|
9810
9816
|
ref_key: "brand",
|
9811
9817
|
ref: i,
|
@@ -9826,15 +9832,15 @@ const Ee = E({
|
|
9826
9832
|
_: 1
|
9827
9833
|
}, 8, ["height"]),
|
9828
9834
|
v(n(Lt), { class: "v-skeleton__wrapper" }, {
|
9829
|
-
default:
|
9835
|
+
default: b(() => [
|
9830
9836
|
l.value ? A("", !0) : Pe((p(), y(n(Nt), {
|
9831
9837
|
key: 0,
|
9832
9838
|
width: t.leftWidth,
|
9833
9839
|
class: X(["v-skeleton__left", {
|
9834
|
-
"is-collapsed":
|
9840
|
+
"is-collapsed": w.value
|
9835
9841
|
}])
|
9836
9842
|
}, {
|
9837
|
-
default:
|
9843
|
+
default: b(() => [
|
9838
9844
|
v(n(Ee), {
|
9839
9845
|
ref_key: "apps",
|
9840
9846
|
ref: m,
|
@@ -9846,11 +9852,11 @@ const Ee = E({
|
|
9846
9852
|
[n(Jt), o]
|
9847
9853
|
]),
|
9848
9854
|
v(n(hl), { class: "v-skeleton__main" }, {
|
9849
|
-
default:
|
9855
|
+
default: b(() => [
|
9850
9856
|
l.value ? (p(), y(n(Ee), {
|
9851
9857
|
key: 0,
|
9852
9858
|
ref_key: "preview",
|
9853
|
-
ref:
|
9859
|
+
ref: _,
|
9854
9860
|
region: "Preview",
|
9855
9861
|
preview: l.value
|
9856
9862
|
}, null, 8, ["preview"])) : A("", !0),
|
@@ -9869,10 +9875,10 @@ const Ee = E({
|
|
9869
9875
|
width: t.rightWidth,
|
9870
9876
|
class: "v-skeleton__right"
|
9871
9877
|
}, {
|
9872
|
-
default:
|
9878
|
+
default: b(() => [
|
9873
9879
|
v(n(Ee), {
|
9874
9880
|
ref_key: "settings",
|
9875
|
-
ref:
|
9881
|
+
ref: h,
|
9876
9882
|
region: "Settings"
|
9877
9883
|
}, null, 512)
|
9878
9884
|
]),
|
@@ -9889,7 +9895,7 @@ const Ee = E({
|
|
9889
9895
|
class: "v-skeleton__footer",
|
9890
9896
|
height: C.footerHeight
|
9891
9897
|
}, {
|
9892
|
-
default:
|
9898
|
+
default: b(() => [
|
9893
9899
|
v(n(Ee), {
|
9894
9900
|
ref_key: "status",
|
9895
9901
|
ref: c,
|
@@ -9927,7 +9933,7 @@ const Ee = E({
|
|
9927
9933
|
setup(u, { emit: e }) {
|
9928
9934
|
const t = u, l = e, s = k(!1), a = k(""), o = k(
|
9929
9935
|
t.setters.find((x) => x.name === t.defaultSetter) || t.setters[0]
|
9930
|
-
), r = k(t.value), i = S(() => !!
|
9936
|
+
), r = k(t.value), i = S(() => !!Ge(r.value)), g = {
|
9931
9937
|
[o.value.name]: r.value
|
9932
9938
|
}, d = (x) => {
|
9933
9939
|
g[o.value.name] = r.value, o.value = x, r.value = g[x.name] ?? void 0, m(r.value);
|
@@ -9949,11 +9955,11 @@ const Ee = E({
|
|
9949
9955
|
l("change", x);
|
9950
9956
|
}, f = () => {
|
9951
9957
|
l("remove", t.name);
|
9952
|
-
},
|
9953
|
-
s.value = !0, a.value =
|
9958
|
+
}, h = () => {
|
9959
|
+
s.value = !0, a.value = Ge(r.value) ? r.value.value : "";
|
9954
9960
|
}, c = () => {
|
9955
9961
|
s.value = !1, a.value = "";
|
9956
|
-
},
|
9962
|
+
}, _ = async (x) => re(x, t.context, !0) ? (g[o.value.name] = r.value, r.value = x, l("change", x), !0) : !1, w = async () => {
|
9957
9963
|
await Fe("确定要解除绑定吗?") && (c(), r.value = void 0, l("change", void 0));
|
9958
9964
|
};
|
9959
9965
|
return (x, C) => (p(), y(n(hn), {
|
@@ -9961,13 +9967,13 @@ const Ee = E({
|
|
9961
9967
|
size: "small",
|
9962
9968
|
"label-positon": "left"
|
9963
9969
|
}, {
|
9964
|
-
label:
|
9970
|
+
label: b(() => [
|
9965
9971
|
t.title ? (p(), y(n(vn), {
|
9966
9972
|
key: 0,
|
9967
9973
|
placement: "top-start",
|
9968
9974
|
content: t.title
|
9969
9975
|
}, {
|
9970
|
-
default:
|
9976
|
+
default: b(() => [
|
9971
9977
|
K(F(t.label || t.name), 1)
|
9972
9978
|
]),
|
9973
9979
|
_: 1
|
@@ -9976,7 +9982,7 @@ const Ee = E({
|
|
9976
9982
|
title: t.name
|
9977
9983
|
}, F(t.label || t.name), 9, Vu))
|
9978
9984
|
]),
|
9979
|
-
default:
|
9985
|
+
default: b(() => [
|
9980
9986
|
V("div", Au, [
|
9981
9987
|
o.value ? (p(), j("div", ju, [
|
9982
9988
|
i.value ? A("", !0) : (p(), y(sn(o.value.component), ie({
|
@@ -9996,10 +10002,10 @@ const Ee = E({
|
|
9996
10002
|
disabled: "",
|
9997
10003
|
"model-value": "JSExpression"
|
9998
10004
|
}, {
|
9999
|
-
prefix:
|
10005
|
+
prefix: b(() => [
|
10000
10006
|
K(F(Pu))
|
10001
10007
|
]),
|
10002
|
-
suffix:
|
10008
|
+
suffix: b(() => [
|
10003
10009
|
K(F(Du))
|
10004
10010
|
]),
|
10005
10011
|
_: 1
|
@@ -10008,7 +10014,7 @@ const Ee = E({
|
|
10008
10014
|
V("div", Eu, [
|
10009
10015
|
t.variable ? (p(), y(n(Da), {
|
10010
10016
|
key: 0,
|
10011
|
-
onClick:
|
10017
|
+
onClick: h,
|
10012
10018
|
class: X(["v-icon-vars", { "is-active": i.value }]),
|
10013
10019
|
title: "绑定变量"
|
10014
10020
|
}, null, 8, ["class"])) : A("", !0),
|
@@ -10019,14 +10025,14 @@ const Ee = E({
|
|
10019
10025
|
"popper-class": "v-setter-switch",
|
10020
10026
|
onCommand: d
|
10021
10027
|
}, {
|
10022
|
-
dropdown:
|
10028
|
+
dropdown: b(() => [
|
10023
10029
|
v(n(mn), null, {
|
10024
|
-
default:
|
10030
|
+
default: b(() => [
|
10025
10031
|
(p(!0), j(O, null, L(t.setters, (I) => (p(), y(n(ht), {
|
10026
10032
|
command: I,
|
10027
10033
|
key: I.name
|
10028
10034
|
}, {
|
10029
|
-
default:
|
10035
|
+
default: b(() => [
|
10030
10036
|
v(n(Vn), {
|
10031
10037
|
class: X({
|
10032
10038
|
"is-placeholder": I.name !== o.value.name
|
@@ -10040,7 +10046,7 @@ const Ee = E({
|
|
10040
10046
|
_: 1
|
10041
10047
|
})
|
10042
10048
|
]),
|
10043
|
-
default:
|
10049
|
+
default: b(() => [
|
10044
10050
|
v(n(Ia), { title: "切换设置器" })
|
10045
10051
|
]),
|
10046
10052
|
_: 1
|
@@ -10059,8 +10065,8 @@ const Ee = E({
|
|
10059
10065
|
value: a.value,
|
10060
10066
|
modelValue: s.value,
|
10061
10067
|
"onUpdate:modelValue": C[1] || (C[1] = (I) => s.value = I),
|
10062
|
-
submitMethod:
|
10063
|
-
onUnbind:
|
10068
|
+
submitMethod: _,
|
10069
|
+
onUnbind: w
|
10064
10070
|
}, null, 8, ["current", "context", "value", "modelValue"])) : A("", !0)
|
10065
10071
|
]),
|
10066
10072
|
_: 1
|
@@ -10167,41 +10173,41 @@ const Ee = E({
|
|
10167
10173
|
widgets: s,
|
10168
10174
|
widgetsRef: a,
|
10169
10175
|
setActive: (c) => {
|
10170
|
-
const
|
10171
|
-
g.value =
|
10176
|
+
const _ = o.value.find((w) => w.name === c);
|
10177
|
+
g.value = _, d.value = _;
|
10172
10178
|
}
|
10173
|
-
}), (c,
|
10179
|
+
}), (c, _) => (p(), j("div", Lu, [
|
10174
10180
|
V("div", Nu, [
|
10175
10181
|
V("div", Ju, [
|
10176
|
-
(p(!0), j(O, null, L(o.value, (
|
10177
|
-
key: `icon-${
|
10178
|
-
icon:
|
10179
|
-
label:
|
10180
|
-
active: g.value?.name ===
|
10181
|
-
open: d.value?.name ===
|
10182
|
-
onClick: (x) => m(
|
10182
|
+
(p(!0), j(O, null, L(o.value, (w) => (p(), y(n(en), {
|
10183
|
+
key: `icon-${w.name}`,
|
10184
|
+
icon: w.icon,
|
10185
|
+
label: w.label,
|
10186
|
+
active: g.value?.name === w.name,
|
10187
|
+
open: d.value?.name === w.name,
|
10188
|
+
onClick: (x) => m(w)
|
10183
10189
|
}, null, 8, ["icon", "label", "active", "open", "onClick"]))), 128))
|
10184
10190
|
]),
|
10185
10191
|
V("div", Mu, [
|
10186
|
-
(p(!0), j(O, null, L(r.value, (
|
10187
|
-
key: `icon-${
|
10188
|
-
icon:
|
10189
|
-
label:
|
10190
|
-
onClick: (x) => f(
|
10192
|
+
(p(!0), j(O, null, L(r.value, (w) => (p(), y(n(en), {
|
10193
|
+
key: `icon-${w.name}`,
|
10194
|
+
icon: w.icon,
|
10195
|
+
label: w.label,
|
10196
|
+
onClick: (x) => f(w)
|
10191
10197
|
}, null, 8, ["icon", "label", "onClick"]))), 128))
|
10192
10198
|
])
|
10193
10199
|
]),
|
10194
10200
|
V("div", Uu, [
|
10195
|
-
(p(!0), j(O, null, L(o.value, (
|
10196
|
-
key:
|
10201
|
+
(p(!0), j(O, null, L(o.value, (w) => (p(), y(cn, {
|
10202
|
+
key: w.name
|
10197
10203
|
}, [
|
10198
|
-
g.value?.name ===
|
10204
|
+
g.value?.name === w.name ? (p(), y(n(Ie), {
|
10199
10205
|
key: 0,
|
10200
10206
|
ref_for: !0,
|
10201
10207
|
ref_key: "widgetsRef",
|
10202
10208
|
ref: a,
|
10203
10209
|
region: c.region,
|
10204
|
-
widget:
|
10210
|
+
widget: w
|
10205
10211
|
}, null, 8, ["region", "widget"])) : A("", !0)
|
10206
10212
|
], 1024))), 128))
|
10207
10213
|
])
|
@@ -10214,7 +10220,7 @@ const Ee = E({
|
|
10214
10220
|
region: {}
|
10215
10221
|
},
|
10216
10222
|
setup(u, { expose: e }) {
|
10217
|
-
const t = u, { widgets: l, widgetsRef: s } = De(t.region), a =
|
10223
|
+
const t = u, { widgets: l, widgetsRef: s } = De(t.region), a = Ke(
|
10218
10224
|
l.value.map((c) => ({
|
10219
10225
|
name: c.name,
|
10220
10226
|
command: c.name,
|
@@ -10227,22 +10233,22 @@ const Ee = E({
|
|
10227
10233
|
), o = S(() => a?.filter((c) => !c.closable || c.checked)), r = S(() => a.map((c) => ({
|
10228
10234
|
...c,
|
10229
10235
|
disabled: !c.closable
|
10230
|
-
}))), i = k(o.value[0]?.name), g = S(() => a.find((
|
10231
|
-
const
|
10232
|
-
|
10236
|
+
}))), i = k(o.value[0]?.name), g = S(() => a.find((_) => _.name === i.value)?.props || {}), d = (c) => {
|
10237
|
+
const _ = a.find((w) => w.name === c);
|
10238
|
+
_ && (_.checked = !1), i.value === c && (i.value = o.value[0]?.name);
|
10233
10239
|
}, m = (c) => {
|
10234
|
-
const
|
10235
|
-
|
10236
|
-
}, f = (c,
|
10237
|
-
const
|
10238
|
-
|
10239
|
-
},
|
10240
|
+
const _ = a.find((w) => w.name === c.name);
|
10241
|
+
_ && _.closable && (_.checked = !_.checked, _.checked && (i.value = _.name), !_.checked && i.value === _.name && (i.value = o.value[0]?.name));
|
10242
|
+
}, f = (c, _ = {}) => {
|
10243
|
+
const w = a.find((x) => x.name === c);
|
10244
|
+
w && (w.props = Object.assign({}, w.props, _), w.checked = !0, i.value = w.name);
|
10245
|
+
}, h = (c) => {
|
10240
10246
|
if (s.value) {
|
10241
|
-
const
|
10242
|
-
if (!
|
10247
|
+
const _ = s.value[0]?.widgetRef;
|
10248
|
+
if (!_) return;
|
10243
10249
|
switch (c.name) {
|
10244
10250
|
case "home":
|
10245
|
-
|
10251
|
+
_.refresh();
|
10246
10252
|
break;
|
10247
10253
|
}
|
10248
10254
|
}
|
@@ -10252,28 +10258,28 @@ const Ee = E({
|
|
10252
10258
|
widgets: l,
|
10253
10259
|
widgetsRef: s,
|
10254
10260
|
openTab: f
|
10255
|
-
}), (c,
|
10261
|
+
}), (c, _) => (p(), y(n(ct), {
|
10256
10262
|
class: "v-workspace-region",
|
10257
10263
|
items: o.value,
|
10258
10264
|
menus: r.value,
|
10259
10265
|
modelValue: i.value,
|
10260
|
-
"onUpdate:modelValue":
|
10266
|
+
"onUpdate:modelValue": _[0] || (_[0] = (w) => i.value = w),
|
10261
10267
|
checkable: "",
|
10262
10268
|
onRemove: d,
|
10263
10269
|
onCommand: m,
|
10264
|
-
onActionClick:
|
10270
|
+
onActionClick: h
|
10265
10271
|
}, {
|
10266
|
-
default:
|
10267
|
-
(p(!0), j(O, null, L(n(l), (
|
10268
|
-
key:
|
10272
|
+
default: b(() => [
|
10273
|
+
(p(!0), j(O, null, L(n(l), (w) => (p(), j(O, {
|
10274
|
+
key: w.name
|
10269
10275
|
}, [
|
10270
|
-
i.value ===
|
10276
|
+
i.value === w.name ? (p(), y(n(Ie), {
|
10271
10277
|
key: 0,
|
10272
10278
|
ref_for: !0,
|
10273
10279
|
ref_key: "widgetsRef",
|
10274
10280
|
ref: s,
|
10275
10281
|
region: c.region,
|
10276
|
-
widget: { ...
|
10282
|
+
widget: { ...w, props: g.value }
|
10277
10283
|
}, null, 8, ["region", "widget"])) : A("", !0)
|
10278
10284
|
], 64))), 128))
|
10279
10285
|
]),
|
@@ -10289,22 +10295,22 @@ const Ee = E({
|
|
10289
10295
|
setup(u, { expose: e }) {
|
10290
10296
|
const t = u, l = de(), { current: s } = ue(), { selected: a, isSelectBlock: o } = xe(), r = S(
|
10291
10297
|
() => o.value ? he.Block : he.Node
|
10292
|
-
), { widgets: i, widgetsRef: g } = De(t.region, r), d = k(), m = k(!1), f = S(() => i.value.map((
|
10293
|
-
name:
|
10294
|
-
label:
|
10295
|
-
actions:
|
10298
|
+
), { widgets: i, widgetsRef: g } = De(t.region, r), d = k(), m = k(!1), f = S(() => i.value.map((w) => ({
|
10299
|
+
name: w.name,
|
10300
|
+
label: w.label,
|
10301
|
+
actions: w.name === "Style" ? [
|
10296
10302
|
{
|
10297
10303
|
name: "switch",
|
10298
10304
|
icon: Ta,
|
10299
10305
|
background: "hover"
|
10300
10306
|
}
|
10301
10307
|
] : void 0
|
10302
|
-
}))),
|
10303
|
-
const
|
10304
|
-
return
|
10308
|
+
}))), h = S(() => {
|
10309
|
+
const w = a.value?.model;
|
10310
|
+
return w ? l.assets.componentMap.get(w.name)?.doc : null;
|
10305
10311
|
});
|
10306
|
-
J(s, (
|
10307
|
-
l.skeleton?.settable(!!
|
10312
|
+
J(s, (w) => {
|
10313
|
+
l.skeleton?.settable(!!w);
|
10308
10314
|
}), J(
|
10309
10315
|
r,
|
10310
10316
|
() => {
|
@@ -10315,25 +10321,25 @@ const Ee = E({
|
|
10315
10321
|
m.value = !1;
|
10316
10322
|
});
|
10317
10323
|
const c = () => {
|
10318
|
-
if (
|
10319
|
-
const
|
10320
|
-
|
10321
|
-
url:
|
10324
|
+
if (h.value) {
|
10325
|
+
const w = l.skeleton?.getRegion("Workspace");
|
10326
|
+
w && w.regionRef.openTab("Docs", {
|
10327
|
+
url: h.value
|
10322
10328
|
});
|
10323
10329
|
}
|
10324
|
-
},
|
10325
|
-
|
10330
|
+
}, _ = (w) => {
|
10331
|
+
w.name === "switch" && (m.value = !m.value);
|
10326
10332
|
};
|
10327
10333
|
return e({
|
10328
10334
|
widgets: i,
|
10329
10335
|
widgetsRef: g
|
10330
|
-
}), (
|
10336
|
+
}), (w, x) => n(s) ? (p(), y(n(U), {
|
10331
10337
|
key: 0,
|
10332
10338
|
class: "v-settings-region",
|
10333
10339
|
fit: "",
|
10334
10340
|
direction: "column"
|
10335
10341
|
}, {
|
10336
|
-
default:
|
10342
|
+
default: b(() => [
|
10337
10343
|
n(a) ? (p(), y(n(U), {
|
10338
10344
|
key: 0,
|
10339
10345
|
flex: "",
|
@@ -10341,9 +10347,9 @@ const Ee = E({
|
|
10341
10347
|
align: "center",
|
10342
10348
|
class: "v-settings-region__header"
|
10343
10349
|
}, {
|
10344
|
-
default:
|
10350
|
+
default: b(() => [
|
10345
10351
|
v(n(U), { class: "v-settings-region__title" }, {
|
10346
|
-
default:
|
10352
|
+
default: b(() => [
|
10347
10353
|
v(n(In)),
|
10348
10354
|
V("span", null, [
|
10349
10355
|
K(F(n(a)?.model.name) + ": ", 1),
|
@@ -10352,8 +10358,8 @@ const Ee = E({
|
|
10352
10358
|
]),
|
10353
10359
|
_: 1
|
10354
10360
|
}),
|
10355
|
-
|
10356
|
-
default:
|
10361
|
+
h.value ? (p(), y(n(U), { key: 0 }, {
|
10362
|
+
default: b(() => [
|
10357
10363
|
v(n(be), {
|
10358
10364
|
onClick: c,
|
10359
10365
|
icon: n(Dn),
|
@@ -10371,16 +10377,16 @@ const Ee = E({
|
|
10371
10377
|
grow: "",
|
10372
10378
|
padding: !1
|
10373
10379
|
}, {
|
10374
|
-
default:
|
10380
|
+
default: b(() => [
|
10375
10381
|
v(n(ct), {
|
10376
10382
|
items: f.value,
|
10377
10383
|
modelValue: d.value,
|
10378
10384
|
"onUpdate:modelValue": x[0] || (x[0] = (C) => d.value = C),
|
10379
10385
|
stretch: "",
|
10380
10386
|
body: { padding: !1 },
|
10381
|
-
onActionClick:
|
10387
|
+
onActionClick: _
|
10382
10388
|
}, {
|
10383
|
-
default:
|
10389
|
+
default: b(() => [
|
10384
10390
|
(p(!0), j(O, null, L(n(i), (C) => (p(), j(O, {
|
10385
10391
|
key: C.name
|
10386
10392
|
}, [
|
@@ -10389,7 +10395,7 @@ const Ee = E({
|
|
10389
10395
|
ref_for: !0,
|
10390
10396
|
ref_key: "widgetsRef",
|
10391
10397
|
ref: g,
|
10392
|
-
region:
|
10398
|
+
region: w.region,
|
10393
10399
|
widget: n(Bt)({ props: { isStyleCodeMode: m.value } }, C)
|
10394
10400
|
}, null, 8, ["region", "widget"])) : A("", !0)
|
10395
10401
|
], 64))), 128))
|
@@ -10441,7 +10447,7 @@ const Ee = E({
|
|
10441
10447
|
region: {}
|
10442
10448
|
},
|
10443
10449
|
setup(u, { expose: e }) {
|
10444
|
-
const t = u, { widgets: l, widgetsRef: s } = De(t.region), a =
|
10450
|
+
const t = u, { widgets: l, widgetsRef: s } = De(t.region), a = Ke(
|
10445
10451
|
l.value.map((i) => ({
|
10446
10452
|
name: i.name,
|
10447
10453
|
command: i.name,
|
@@ -10460,7 +10466,7 @@ const Ee = E({
|
|
10460
10466
|
modelValue: r.value,
|
10461
10467
|
"onUpdate:modelValue": g[0] || (g[0] = (d) => r.value = d)
|
10462
10468
|
}, {
|
10463
|
-
default:
|
10469
|
+
default: b(() => [
|
10464
10470
|
(p(!0), j(O, null, L(n(l), (d) => (p(), y(cn, {
|
10465
10471
|
key: d.name
|
10466
10472
|
}, [
|
@@ -10541,7 +10547,7 @@ export {
|
|
10541
10547
|
le as notify,
|
10542
10548
|
Qa as proxyContext,
|
10543
10549
|
tn as regions,
|
10544
|
-
|
10550
|
+
Ne as setterManager,
|
10545
10551
|
ee as setters,
|
10546
10552
|
de as useEngine,
|
10547
10553
|
Mn as widgetManager,
|