@vtj/designer 0.9.4 → 0.9.6
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 +158 -158
- package/package.json +7 -7
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
var pl = Object.defineProperty;
|
2
2
|
var ml = (i, t, e) => t in i ? pl(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
3
3
|
var F = (i, t, e) => ml(i, typeof t != "symbol" ? t + "" : t, e);
|
4
|
-
import { computed as C, unref as n, ref as x, reactive as He, watchEffect as vl, watch as q, toValue as
|
5
|
-
import { ElNotification as Nt, ElMessageBox as
|
4
|
+
import { computed as C, unref as n, ref as x, reactive as He, watchEffect as vl, watch as q, toValue as Tt, defineComponent as P, openBlock as c, createElementBlock as E, toDisplayString as L, createVNode as m, withCtx as y, createElementVNode as A, createBlock as w, createCommentVNode as D, createTextVNode as U, mergeProps as ue, h as Oe, readonly as gl, getCurrentScope as fl, onScopeDispose as hl, onMounted as ht, nextTick as Ce, getCurrentInstance as fn, shallowRef as Ye, toRaw as hn, Fragment as z, renderList as W, normalizeClass as K, defineAsyncComponent as bl, resolveDynamicComponent as bn, createSlots as yl, withDirectives as Ee, vShow as Ne, renderSlot as Ve, withModifiers as Re, isRef as $t, normalizeStyle as ut, inject as Wt, provide as _l, withKeys as Ue, normalizeProps as yn, guardReactiveProps as _n, onUnmounted as wn, markRaw as Rt, createApp as kn, shallowReactive as wl, triggerRef as Te, KeepAlive as Sn } from "vue";
|
5
|
+
import { ElNotification as Nt, ElMessageBox as De, ElMessage as Pe, ElButton as te, ElDivider as bt, ElRadioGroup as xn, ElRadioButton as ct, ElButtonGroup as kl, ElImage as Cn, ElDropdown as Vn, ElDropdownMenu as An, ElDropdownItem as dt, ElInput as ye, ElEmpty as ie, ElAlert as jn, ElTooltip as En, ElTag as Dn, ElSwitch as Pn, ElTree as Mt, ElCollapse as yt, ElCollapseItem as _t, ElRow as mt, ElCol as vt, ElDrawer as In, ElForm as be, ElFormItem as Tn, ElBreadcrumb as Sl, ElBreadcrumbItem as xl, ElLoading as Cl, ElAvatar as $n, vLoading as Vl, ElSelect as Al, ElOption as jl, ElInputNumber as El, ElColorPicker as Dl, ElUpload as Pl, ElSlider as Il, ElConfigProvider as Tl, ElContainer as tn, ElHeader as $l, ElAside as nn, ElMain as Rl, ElFooter as Bl } from "element-plus";
|
6
6
|
import Ol from "element-plus/es/locale/lang/zh-cn";
|
7
|
-
import { XDialogForm as
|
8
|
-
import { jsonp as Je, groupBy as kt, dataURLtoBlob as Ll, delay as qt, upperFirstCamelCase as On, toRawType as jt, cloneDeep as lt, logger as
|
9
|
-
import { isBlock as le, DirectiveModel as zn, createNodeFrom as ql, BUILT_IN_VUE as Hl, BUILT_IN_VUE_ROUTER as Gl, BUILT_IN_NAME as
|
7
|
+
import { XDialogForm as Ae, XField as $, createDialog as Rn, XIcon as ze, XDialog as Fe, XPanel as wt, XAction as ge, XTabs as Jt, XContainer as G, XForm as Ut, XAttachment as zl, XActionBar as Fl, XInputUnit as Bn, vResizable as ln } from "@vtj/ui";
|
8
|
+
import { jsonp as Je, groupBy as kt, dataURLtoBlob as Ll, delay as qt, upperFirstCamelCase as On, toRawType as jt, cloneDeep as lt, logger as Ie, isPlainObject as Wl, fileToBase64 as Nl, merge as Ht, debounce as Ml, arrayToMap as Jl, toArray as Ul } from "@vtj/utils";
|
9
|
+
import { isBlock as le, DirectiveModel as zn, createNodeFrom as ql, BUILT_IN_VUE as Hl, BUILT_IN_VUE_ROUTER as Gl, BUILT_IN_NAME as Bt, emitter as oe, EVENT_PROJECT_ACTIVED as Ot, EVENT_NODE_CHANGE as Ze, NodeModel as an, EVENT_BLOCK_CHANGE as zt, Base as Fn, BUILT_IN_LIBRARAY_MAP as Kl, ProjectModel as Xl, EVENT_PROJECT_CHANGE as Ql, EVENT_PROJECT_BLOCKS_CHANGE as Yl, EVENT_PROJECT_PAGES_CHANGE as Zl, EVENT_PROJECT_DEPS_CHANGE as ea, EVENT_PROJECT_PUBLISH as ta, EVENT_PROJECT_FILE_PUBLISH as na, EVENT_HISTORY_CHANGE as la, EVENT_HISTORY_LOAD as aa, EVENT_PROJECT_GEN_SOURCE as sa, BlockModel as sn, HistoryModel as oa } from "@vtj/core";
|
10
10
|
import { parseExpression as et, parseFunction as ra, BUILT_IN_DIRECTIVES as ia, JSCodeToString as qe, LIFE_CYCLES_LIST as ua, DATA_TYPES as ca, createMock as da, isJSExpression as tt, ContextMode as Ln, parseDeps as pa, createAssetsCss as ma, createAssetScripts as on, getRawComponent as rn, createSchemaApis as va, mockCleanup as ga, mockApis as fa, Provider as ha, isJSFunction as ba } from "@vtj/renderer";
|
11
|
-
import { VtjIconBack as ya, VtjIconPc as _a, VtjIconPhone as wa, VtjIconPad as ka, VtjIconUndo as Sa, VtjIconRedo as xa, VtjIconTemplate as gt, VtjIconPreview as Ca, VtjIconRefresh as Wn, VtjIconSetting as Nn, Download as
|
11
|
+
import { VtjIconBack as ya, VtjIconPc as _a, VtjIconPhone as wa, VtjIconPad as ka, VtjIconUndo as Sa, VtjIconRedo as xa, VtjIconTemplate as gt, VtjIconPreview as Ca, VtjIconRefresh as Wn, VtjIconSetting as Nn, Download as Ft, VtjIconPublish as Va, VtjIconProject as Aa, icons as Lt, ArrowDown as Mn, Search as at, CopyDocument as ja, Back as Ea, VtjIconPlus as Jn, EditPen as Da, Delete as Un, VtjIconSave as Pa, ArrowUp as Ia, MoreFilled as st, VtjIconCheck as qn, VtjIconCopy as Gt, VtjIconEdit as Hn, VtjIconRemove as St, VtjIconLock as Gn, VtjIconUnlock as Ta, VtjIconInvisible as Kn, VtjIconVisible as $a, VtjIconHome as Ra, VtjIconShare as Ba, VtjIconComponents as Xn, Files as Oa, VtjIconSearch as za, VtjIconHelp as Qn, VtjIconLayers as Yn, Rank as Fa, VtjIconArrowUp as La, VtjIconArrowDown as Wa, IconDisplayBlock as Na, IconDisplayFlex as Ma, IconDisplayInlineBlock as Ja, IconDisplayInline as Ua, IconEyeInvisible as qa, IconFlexDirectionrow as Ha, IconFlexDirectionrowReverse as Ga, IconFlexDirectioncolumn as Ka, IconFlexDirectioncolumnReverse as Xa, IconFlexJustifyflexStartrow as Qa, IconFlexJustifyflexEndrow as Ya, IconFlexJustifycenterrow as Za, IconFlexJustifyspaceBetweenrow as es, IconFlexJustifyspaceAroundrow as ts, IconFlexAlignflexStartrow as ns, IconFlexAlignflexEndrow as ls, IconFlexAligncenterrow as as, IconFlexAlignbaselinerow as ss, IconFlexAlignstretchrow as os, IconPositionTopLeft as rs, IconPositionTopRight as is, IconPositionBottomLeft as us, IconPositionBottomRight as cs, IconPositionLeft as ds, IconPositionRight as ps, IconPositionTop as ms, IconPositionBottom as vs, IconPositionAll as gs, IconTextAlignLeft as fs, IconTextAlignCenter as hs, IconTextAlignRight as bs, IconTextAlignJustify as ys, IconFontStyleNone as _s, IconFontStyleItalic as ws, IconCross as Zn, IconTextDecorationUnderline as ks, IconTextDecorationStrike as Ss, IconTextDecorationOverline as xs, IconTileXy as Cs, IconTileX as Vs, IconTileY as As, IconClose as js, IconBorderAll as Es, IconBorderLeft as Ds, IconBorderTop as Ps, IconBorderBottom as Is, IconBorderRight as Ts, IconBorderStyleSolid as $s, IconBorderStyleDashed as Rs, IconBorderStyleDotted as Bs, IconCursorAuto as Os, IconCursorPointer as zs, IconCursorNotAllowed as Fs, IconCursorNone as Ls, ArrowRight as Ws, UserFilled as el, VtjIconDocument as Ns, VtjIconBlock as Ms, VtjIconOutline as Js, VtjIconHistory as Us, VtjIconApi as qs, VtjIconCategory as Hs, HomeFilled as Gs, Plus as Ks, Close as Xs, VtjIconVars as Qs, VtjIconSwitch as Ys, Switch as Zs } from "@vtj/icons";
|
12
12
|
import eo from "html2canvas";
|
13
13
|
import to from "mockjs";
|
14
14
|
/**!
|
15
15
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
16
16
|
* @name @vtj/designer
|
17
17
|
* @author CHC chenhuachun1549@dingtalk.com
|
18
|
-
* @version 0.9.
|
18
|
+
* @version 0.9.6
|
19
19
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
20
20
|
*/
|
21
|
-
const no = "0.9.
|
21
|
+
const no = "0.9.6", un = {
|
22
22
|
width: 390,
|
23
23
|
height: 844
|
24
24
|
}, cn = {
|
25
25
|
width: 1024,
|
26
26
|
height: 768
|
27
|
-
},
|
27
|
+
}, je = /^[A-Za-z_$][\:\w_-]*$/, lo = /(\d+)\.(\d+)\.(\d+)/, ao = [
|
28
28
|
"click",
|
29
29
|
"dblclick",
|
30
30
|
"mouseenter",
|
@@ -194,7 +194,7 @@ function Et(i, t) {
|
|
194
194
|
position: fo(t.rect, i !== "selected")
|
195
195
|
};
|
196
196
|
}
|
197
|
-
function
|
197
|
+
function xe() {
|
198
198
|
const i = ce(), t = C(
|
199
199
|
() => i.simulator.designer.value
|
200
200
|
), e = C(() => t.value?.selected.value), l = C(() => le(e.value?.model));
|
@@ -206,8 +206,8 @@ function Ce() {
|
|
206
206
|
};
|
207
207
|
}
|
208
208
|
function bo(i, t) {
|
209
|
-
const e = x(""), { selected: l, isSelectBlock: a } =
|
210
|
-
const u =
|
209
|
+
const e = x(""), { selected: l, isSelectBlock: a } = xe(), o = C(() => l.value?.model.id), s = C(() => {
|
210
|
+
const u = Tt(i), f = Tt(t), g = [];
|
211
211
|
if (!u) return g;
|
212
212
|
const v = f?.__contextRefs[o.value || ""], _ = f === v || a.value ? [] : Object.keys(v?.context || {}).filter((R) => !["context", "ref"].includes(R)).map((R) => `this.context.${R}`);
|
213
213
|
_.length && g.push({ title: "上下文", items: _ });
|
@@ -334,12 +334,12 @@ function re(i, t = "提示") {
|
|
334
334
|
});
|
335
335
|
}
|
336
336
|
async function Me(i) {
|
337
|
-
return await
|
337
|
+
return await De.confirm(i, "提示", { type: "warning" }).catch(
|
338
338
|
() => !1
|
339
339
|
);
|
340
340
|
}
|
341
341
|
function de(i, t = "success") {
|
342
|
-
return
|
342
|
+
return Pe({
|
343
343
|
message: i,
|
344
344
|
type: t
|
345
345
|
});
|
@@ -602,20 +602,20 @@ function Ao() {
|
|
602
602
|
const _ = i.current.value, d = i.project.value;
|
603
603
|
if (!d) return;
|
604
604
|
if (!_) {
|
605
|
-
|
605
|
+
Pe.warning({
|
606
606
|
message: "设计区无文件,请先打开页面或区块"
|
607
607
|
});
|
608
608
|
return;
|
609
609
|
}
|
610
610
|
const h = await o(p);
|
611
611
|
if (!h)
|
612
|
-
return await
|
612
|
+
return await De.alert("模板不可用,可能该模板没发布过版本", {
|
613
613
|
type: "error",
|
614
614
|
title: "提示"
|
615
615
|
});
|
616
616
|
const b = _.toDsl(), { id: S, name: k } = b, V = { ...h, id: S, name: k }, j = d.currentFile;
|
617
617
|
i.onSaveBlockFileFinish(() => {
|
618
|
-
_.update(V),
|
618
|
+
_.update(V), Pe.success({
|
619
619
|
message: "模板已加载完成"
|
620
620
|
});
|
621
621
|
}), j && (j.market = {
|
@@ -806,13 +806,13 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
806
806
|
});
|
807
807
|
const u = C(() => t.canvas ? t.canvas.toDataURL("image/png") : null), f = async () => {
|
808
808
|
if (!u.value)
|
809
|
-
return await
|
809
|
+
return await De.alert("截图失败,无法完成发布", {
|
810
810
|
title: "提示",
|
811
811
|
type: "error"
|
812
812
|
}), !1;
|
813
813
|
const g = Ll(u.value), { dsl: v, id: p } = t;
|
814
814
|
let _;
|
815
|
-
r.value && (_ = await
|
815
|
+
r.value && (_ = await De.confirm(
|
816
816
|
"该模板已存在,请确认您的操作是更新模板还是新建",
|
817
817
|
{
|
818
818
|
type: "warning",
|
@@ -829,14 +829,14 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
829
829
|
category: "",
|
830
830
|
version: "",
|
831
831
|
...s
|
832
|
-
}, h = await l(d).catch((b) => (
|
832
|
+
}, h = await l(d).catch((b) => (Pe.error({
|
833
833
|
message: b.message || b || "未知错误"
|
834
834
|
}), !1));
|
835
|
-
return h && (
|
835
|
+
return h && (Pe.success({
|
836
836
|
message: "发布模板成功!"
|
837
837
|
}), o.skeleton?.getWidget("Templates")?.widgetRef.refreshTemplates()), !!h;
|
838
838
|
};
|
839
|
-
return (g, v) => (c(), w(n(
|
839
|
+
return (g, v) => (c(), w(n(Ae), {
|
840
840
|
width: "600px",
|
841
841
|
height: "760px",
|
842
842
|
icon: n(gt),
|
@@ -861,7 +861,7 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
861
861
|
name: "name",
|
862
862
|
required: "",
|
863
863
|
rules: {
|
864
|
-
pattern: n(
|
864
|
+
pattern: n(je),
|
865
865
|
message: "名称格式不正确,要求英文字母大写驼峰格式"
|
866
866
|
}
|
867
867
|
}, null, 8, ["rules"]),
|
@@ -932,7 +932,7 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
932
932
|
coder: { type: Boolean, default: !1 }
|
933
933
|
},
|
934
934
|
setup(i) {
|
935
|
-
const t = i, { engine: e, designer: l } =
|
935
|
+
const t = i, { engine: e, designer: l } = xe(), { isLogined: a, toRemoteAuth: o } = xt(), s = x(!1), r = x(!1), u = x(), f = () => {
|
936
936
|
e.current.value ? (s.value ? e.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (l.value?.setSelected(null), e.simulator.refresh()), de("刷新完成", "success")) : de("请先打开文件", "warning");
|
937
937
|
}, g = async () => {
|
938
938
|
e.current.value ? (s.value && (e.skeleton?.closePreview(), s.value = !1, await qt(1e3)), l.value?.setSelected(e.current.value)) : de("请先打开文件", "warning");
|
@@ -967,7 +967,7 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
967
967
|
dsl: e.current.value?.toDsl()
|
968
968
|
}, r.value = !0;
|
969
969
|
} else
|
970
|
-
await
|
970
|
+
await De.confirm(
|
971
971
|
"发布到模板需登录系统,您还没登录或登录已过期,请重新登录!",
|
972
972
|
"提示",
|
973
973
|
{
|
@@ -998,7 +998,7 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
998
998
|
width: "600px",
|
999
999
|
height: "200px",
|
1000
1000
|
title: "出码",
|
1001
|
-
icon:
|
1001
|
+
icon: Ft,
|
1002
1002
|
content: Oe(Jo, { link: S })
|
1003
1003
|
});
|
1004
1004
|
};
|
@@ -1042,7 +1042,7 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1042
1042
|
t.coder ? (c(), w(n(te), {
|
1043
1043
|
key: 2,
|
1044
1044
|
onClick: h,
|
1045
|
-
icon: n(
|
1045
|
+
icon: n(Ft),
|
1046
1046
|
size: "small",
|
1047
1047
|
type: "success"
|
1048
1048
|
}, {
|
@@ -1121,6 +1121,9 @@ const jo = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1121
1121
|
function Qt(i) {
|
1122
1122
|
return fl() ? (hl(i), !0) : !1;
|
1123
1123
|
}
|
1124
|
+
function Be(i) {
|
1125
|
+
return typeof i == "function" ? i() : n(i);
|
1126
|
+
}
|
1124
1127
|
const Ct = typeof window < "u" && typeof document < "u";
|
1125
1128
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
1126
1129
|
const Ho = Object.prototype.toString, Go = (i) => Ho.call(i) === "[object Object]", pt = () => {
|
@@ -1142,11 +1145,8 @@ function Qo(i) {
|
|
1142
1145
|
function Yo(i) {
|
1143
1146
|
return fn();
|
1144
1147
|
}
|
1145
|
-
function Lt(i) {
|
1146
|
-
return Array.isArray(i) ? i : [i];
|
1147
|
-
}
|
1148
1148
|
function Zo(i, t = !0, e) {
|
1149
|
-
Yo() ? ht(i, e) : t ? i() :
|
1149
|
+
Yo() ? ht(i, e) : t ? i() : Ce(i);
|
1150
1150
|
}
|
1151
1151
|
function er(i, t, e = {}) {
|
1152
1152
|
const {
|
@@ -1162,7 +1162,7 @@ function er(i, t, e = {}) {
|
|
1162
1162
|
function u(...f) {
|
1163
1163
|
s(), a.value = !0, o = setTimeout(() => {
|
1164
1164
|
a.value = !1, o = null, i(...f);
|
1165
|
-
},
|
1165
|
+
}, Be(t));
|
1166
1166
|
}
|
1167
1167
|
return l && (a.value = !0, Ct && u()), Qt(r), {
|
1168
1168
|
isPending: gl(a),
|
@@ -1173,18 +1173,18 @@ function er(i, t, e = {}) {
|
|
1173
1173
|
const Vt = Ct ? window : void 0, ll = Ct ? window.navigator : void 0;
|
1174
1174
|
function Se(i) {
|
1175
1175
|
var t;
|
1176
|
-
const e =
|
1176
|
+
const e = Be(i);
|
1177
1177
|
return (t = e?.$el) != null ? t : e;
|
1178
1178
|
}
|
1179
1179
|
function Qe(...i) {
|
1180
1180
|
let t, e, l, a;
|
1181
1181
|
if (typeof i[0] == "string" || Array.isArray(i[0]) ? ([e, l, a] = i, t = Vt) : [t, e, l, a] = i, !t)
|
1182
1182
|
return pt;
|
1183
|
-
e
|
1183
|
+
Array.isArray(e) || (e = [e]), Array.isArray(l) || (l = [l]);
|
1184
1184
|
const o = [], s = () => {
|
1185
1185
|
o.forEach((g) => g()), o.length = 0;
|
1186
1186
|
}, r = (g, v, p, _) => (g.addEventListener(v, p, _), () => g.removeEventListener(v, p, _)), u = q(
|
1187
|
-
() => [Se(t),
|
1187
|
+
() => [Se(t), Be(a)],
|
1188
1188
|
([g, v]) => {
|
1189
1189
|
if (s(), !g)
|
1190
1190
|
return;
|
@@ -1206,7 +1206,7 @@ function tr(i, t, e = {}) {
|
|
1206
1206
|
return pt;
|
1207
1207
|
Ko && !pn && (pn = !0, Array.from(l.document.body.children).forEach((h) => h.addEventListener("click", pt)), l.document.documentElement.addEventListener("click", pt));
|
1208
1208
|
let r = !0;
|
1209
|
-
const u = (h) =>
|
1209
|
+
const u = (h) => Be(a).some((b) => {
|
1210
1210
|
if (typeof b == "string")
|
1211
1211
|
return Array.from(l.document.querySelectorAll(b)).some((S) => S === h.target || h.composedPath().includes(S));
|
1212
1212
|
{
|
@@ -1215,11 +1215,11 @@ function tr(i, t, e = {}) {
|
|
1215
1215
|
}
|
1216
1216
|
});
|
1217
1217
|
function f(h) {
|
1218
|
-
const b =
|
1218
|
+
const b = Be(h);
|
1219
1219
|
return b && b.$.subTree.shapeFlag === 16;
|
1220
1220
|
}
|
1221
1221
|
function g(h, b) {
|
1222
|
-
const S =
|
1222
|
+
const S = Be(h), k = S.$.subTree && S.$.subTree.children;
|
1223
1223
|
return k == null || !Array.isArray(k) ? !1 : k.some((V) => V.el === b.target || b.composedPath().includes(V.el));
|
1224
1224
|
}
|
1225
1225
|
const v = (h) => {
|
@@ -1299,14 +1299,14 @@ function al(i = {}) {
|
|
1299
1299
|
source: l,
|
1300
1300
|
copiedDuring: a = 1500,
|
1301
1301
|
legacy: o = !1
|
1302
|
-
} = i, s = Yt(() => t && "clipboard" in t), r = mn("clipboard-read"), u = mn("clipboard-write"), f = C(() => s.value || o), g = x(""), v = x(!1), p = er(() => v.value = !1, a
|
1302
|
+
} = i, s = Yt(() => t && "clipboard" in t), r = mn("clipboard-read"), u = mn("clipboard-write"), f = C(() => s.value || o), g = x(""), v = x(!1), p = er(() => v.value = !1, a);
|
1303
1303
|
function _() {
|
1304
1304
|
s.value && S(r.value) ? t.clipboard.readText().then((k) => {
|
1305
1305
|
g.value = k;
|
1306
1306
|
}) : g.value = b();
|
1307
1307
|
}
|
1308
1308
|
f.value && e && Qe(["copy", "cut"], _);
|
1309
|
-
async function d(k =
|
1309
|
+
async function d(k = Be(l)) {
|
1310
1310
|
f.value && k != null && (s.value && S(u.value) ? await t.clipboard.writeText(k) : h(k), g.value = k, v.value = !0, p.start());
|
1311
1311
|
}
|
1312
1312
|
function h(k) {
|
@@ -1333,7 +1333,7 @@ function lr(i, t, e = {}) {
|
|
1333
1333
|
const s = Yt(() => l && "ResizeObserver" in l), r = () => {
|
1334
1334
|
o && (o.disconnect(), o = void 0);
|
1335
1335
|
}, u = C(() => {
|
1336
|
-
const v =
|
1336
|
+
const v = Be(i);
|
1337
1337
|
return Array.isArray(v) ? v.map((p) => Se(p)) : [Se(v)];
|
1338
1338
|
}), f = q(
|
1339
1339
|
u,
|
@@ -1368,7 +1368,7 @@ function nt(i, t = { width: 0, height: 0 }, e = {}) {
|
|
1368
1368
|
s.value = d.width, r.value = d.height;
|
1369
1369
|
}
|
1370
1370
|
} else if (p) {
|
1371
|
-
const _ =
|
1371
|
+
const _ = Array.isArray(p) ? p : [p];
|
1372
1372
|
s.value = _.reduce((d, { inlineSize: h }) => d + h, 0), r.value = _.reduce((d, { blockSize: h }) => d + h, 0);
|
1373
1373
|
} else
|
1374
1374
|
s.value = v.contentRect.width, r.value = v.contentRect.height;
|
@@ -1404,9 +1404,9 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1404
1404
|
emits: ["change", "update:modelValue"],
|
1405
1405
|
setup(i, { emit: t }) {
|
1406
1406
|
const e = i, l = t, a = x(!1), o = x(e.modelValue), s = x(""), r = C(
|
1407
|
-
() =>
|
1407
|
+
() => Lt[e.modelValue] || e.modelValue
|
1408
1408
|
), u = C(() => {
|
1409
|
-
const _ = Object.entries(
|
1409
|
+
const _ = Object.entries(Lt);
|
1410
1410
|
return s.value ? _.filter((d) => d[0].toLowerCase().includes(s.value)) : _;
|
1411
1411
|
}), f = (_) => {
|
1412
1412
|
o.value = _;
|
@@ -1499,7 +1499,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1499
1499
|
parentId: {}
|
1500
1500
|
},
|
1501
1501
|
setup(i) {
|
1502
|
-
const t = i, { project: e, engine: l } = Ge(), { designer: a } =
|
1502
|
+
const t = i, { project: e, engine: l } = Ge(), { designer: a } = xe(), o = C(() => t.item ? "编辑页面" : "新增页面"), s = () => ({
|
1503
1503
|
dir: !1,
|
1504
1504
|
name: "",
|
1505
1505
|
title: "",
|
@@ -1527,11 +1527,11 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1527
1527
|
], g = (d) => {
|
1528
1528
|
r.value && (r.value.name = On(d));
|
1529
1529
|
}, v = async (d) => e.value?.existPageName(d.name, [d.id]) ? (re("页面名称已存在,请更换"), !1) : (t.item ? (e.value?.updatePage(d), a.value?.setSelected(null), l.simulator.refresh()) : e.value?.createPage(d, t.parentId), !0), { copy: p } = al({}), _ = (d) => {
|
1530
|
-
p(d),
|
1530
|
+
p(d), Pe.success({
|
1531
1531
|
message: "已经复制到粘贴板"
|
1532
1532
|
});
|
1533
1533
|
};
|
1534
|
-
return (d, h) => (c(), w(n(
|
1534
|
+
return (d, h) => (c(), w(n(Ae), {
|
1535
1535
|
title: o.value,
|
1536
1536
|
width: "800px",
|
1537
1537
|
height: "700px",
|
@@ -1575,7 +1575,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1575
1575
|
label: "名称",
|
1576
1576
|
required: "",
|
1577
1577
|
onChange: g,
|
1578
|
-
rules: { pattern: n(
|
1578
|
+
rules: { pattern: n(je), message: "名称格式不正确" }
|
1579
1579
|
}, null, 8, ["rules"]),
|
1580
1580
|
m(n($), {
|
1581
1581
|
name: "title",
|
@@ -1799,7 +1799,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1799
1799
|
title: "保存",
|
1800
1800
|
onClick: v
|
1801
1801
|
}, null, 8, ["size", "icon"])) : D("", !0),
|
1802
|
-
e.collapsable ?
|
1802
|
+
e.collapsable ? Ee((c(), w(n(ge), {
|
1803
1803
|
key: 5,
|
1804
1804
|
size: h.$attrs.size,
|
1805
1805
|
mode: "icon",
|
@@ -1810,7 +1810,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1810
1810
|
}, null, 8, ["size", "icon"])), [
|
1811
1811
|
[Ne, a.value]
|
1812
1812
|
]) : D("", !0),
|
1813
|
-
e.collapsable ?
|
1813
|
+
e.collapsable ? Ee((c(), w(n(ge), {
|
1814
1814
|
key: 6,
|
1815
1815
|
size: h.$attrs.size,
|
1816
1816
|
mode: "icon",
|
@@ -1821,17 +1821,17 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1821
1821
|
}, null, 8, ["size", "icon"])), [
|
1822
1822
|
[Ne, !a.value]
|
1823
1823
|
]) : D("", !0),
|
1824
|
-
|
1824
|
+
Ve(h.$slots, "actions")
|
1825
1825
|
]),
|
1826
1826
|
default: y(() => [
|
1827
|
-
|
1827
|
+
Ve(h.$slots, "default")
|
1828
1828
|
]),
|
1829
1829
|
_: 2
|
1830
1830
|
}, [
|
1831
1831
|
h.$slots.footer ? {
|
1832
1832
|
name: "footer",
|
1833
1833
|
fn: y(() => [
|
1834
|
-
|
1834
|
+
Ve(h.$slots, "footer")
|
1835
1835
|
]),
|
1836
1836
|
key: "0"
|
1837
1837
|
} : void 0
|
@@ -1924,7 +1924,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
1924
1924
|
])
|
1925
1925
|
]),
|
1926
1926
|
default: y(() => [
|
1927
|
-
|
1927
|
+
Ve(u.$slots, "default")
|
1928
1928
|
]),
|
1929
1929
|
_: 3
|
1930
1930
|
}));
|
@@ -2026,7 +2026,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2026
2026
|
})), f = () => {
|
2027
2027
|
a("click", l.modelValue);
|
2028
2028
|
}, g = async (p) => {
|
2029
|
-
p === "remove" ? await
|
2029
|
+
p === "remove" ? await De.confirm("确定删除吗?", "提示", {
|
2030
2030
|
type: "warning"
|
2031
2031
|
}).catch(() => !1) && a("action", {
|
2032
2032
|
name: p,
|
@@ -2057,7 +2057,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2057
2057
|
align: "center"
|
2058
2058
|
}, {
|
2059
2059
|
default: y(() => [
|
2060
|
-
|
2060
|
+
Ve(p.$slots, "default", {}, () => [
|
2061
2061
|
p.icon ? (c(), w(n(ze), {
|
2062
2062
|
key: 0,
|
2063
2063
|
icon: p.icon
|
@@ -2088,13 +2088,13 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2088
2088
|
}),
|
2089
2089
|
m(n(G), {
|
2090
2090
|
class: "v-item__wrapper",
|
2091
|
-
onClick: _[2] || (_[2] =
|
2091
|
+
onClick: _[2] || (_[2] = Re(() => {
|
2092
2092
|
}, ["stop"]))
|
2093
2093
|
}, {
|
2094
2094
|
default: y(() => [
|
2095
2095
|
m(n(G), {
|
2096
2096
|
class: "v-item__actions",
|
2097
|
-
onClick: _[1] || (_[1] =
|
2097
|
+
onClick: _[1] || (_[1] = Re(() => {
|
2098
2098
|
}, ["stop"]))
|
2099
2099
|
}, {
|
2100
2100
|
default: y(() => [
|
@@ -2115,7 +2115,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2115
2115
|
class: "v-item__switch",
|
2116
2116
|
size: "small"
|
2117
2117
|
}, null, 8, ["modelValue"])) : D("", !0),
|
2118
|
-
|
2118
|
+
Ve(p.$slots, "status")
|
2119
2119
|
]),
|
2120
2120
|
_: 3
|
2121
2121
|
}),
|
@@ -2172,7 +2172,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2172
2172
|
}, s = () => {
|
2173
2173
|
l("copy");
|
2174
2174
|
}, r = async () => {
|
2175
|
-
await
|
2175
|
+
await De.confirm("确认删除?", "提示", {
|
2176
2176
|
type: "warning"
|
2177
2177
|
}).catch(() => !1) && l("remove");
|
2178
2178
|
}, u = (p) => {
|
@@ -2197,7 +2197,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2197
2197
|
align: "center"
|
2198
2198
|
}, {
|
2199
2199
|
default: y(() => [
|
2200
|
-
|
2200
|
+
Ve(p.$slots, "default", {}, () => [
|
2201
2201
|
A("span", vr, L(e.name), 1),
|
2202
2202
|
A("span", gr, L(e.title), 1)
|
2203
2203
|
])
|
@@ -2339,7 +2339,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2339
2339
|
}, h = (S) => {
|
2340
2340
|
l("pick", S);
|
2341
2341
|
}, b = (S) => {
|
2342
|
-
s(S),
|
2342
|
+
s(S), Pe.success({
|
2343
2343
|
message: "已经复制到粘贴板"
|
2344
2344
|
});
|
2345
2345
|
};
|
@@ -2381,10 +2381,10 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2381
2381
|
flex: !1
|
2382
2382
|
}, {
|
2383
2383
|
default: y(() => [
|
2384
|
-
|
2384
|
+
Ee(A("div", null, [
|
2385
2385
|
m(n(ye), {
|
2386
2386
|
modelValue: n(o),
|
2387
|
-
"onUpdate:modelValue": k[0] || (k[0] = (V) =>
|
2387
|
+
"onUpdate:modelValue": k[0] || (k[0] = (V) => $t(o) ? o.value = V : null),
|
2388
2388
|
size: "small",
|
2389
2389
|
clearable: "",
|
2390
2390
|
"prefix-icon": n(at),
|
@@ -2410,7 +2410,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2410
2410
|
], 512), [
|
2411
2411
|
[Ne, u.value === "normal"]
|
2412
2412
|
]),
|
2413
|
-
|
2413
|
+
Ee(m(hr, {
|
2414
2414
|
context: e.context,
|
2415
2415
|
onCopy: b,
|
2416
2416
|
onPick: h
|
@@ -2492,7 +2492,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2492
2492
|
"submit-method": g
|
2493
2493
|
}, {
|
2494
2494
|
default: y(() => [
|
2495
|
-
|
2495
|
+
Ve(S.$slots, "default")
|
2496
2496
|
]),
|
2497
2497
|
_: 3
|
2498
2498
|
}, 8, ["model", "rules"])
|
@@ -2588,7 +2588,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2588
2588
|
class: K(["v-viewport", e.value]),
|
2589
2589
|
style: ut(a.value)
|
2590
2590
|
}, [
|
2591
|
-
|
2591
|
+
Ve(o.$slots, "default")
|
2592
2592
|
], 6));
|
2593
2593
|
}
|
2594
2594
|
}), _r = /* @__PURE__ */ P({
|
@@ -2642,7 +2642,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2642
2642
|
}
|
2643
2643
|
}, _ = (h, b, S) => S === "inner" ? !!b.data.dir : !0, d = () => {
|
2644
2644
|
t.value?.update({
|
2645
|
-
pages:
|
2645
|
+
pages: Tt(l)
|
2646
2646
|
});
|
2647
2647
|
};
|
2648
2648
|
return (h, b) => (c(), w(n(J), {
|
@@ -2664,7 +2664,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2664
2664
|
default: y(({ data: S, node: k }) => [
|
2665
2665
|
m(n(ve), {
|
2666
2666
|
class: "v-pages-widget__item",
|
2667
|
-
icon: n(
|
2667
|
+
icon: n(Lt)[S.icon],
|
2668
2668
|
title: S.title,
|
2669
2669
|
subtitle: S.name,
|
2670
2670
|
"model-value": { data: S, node: k },
|
@@ -2946,7 +2946,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2946
2946
|
key: 0,
|
2947
2947
|
description: "找不到符合条件的区块"
|
2948
2948
|
})),
|
2949
|
-
m(n(
|
2949
|
+
m(n(Ae), {
|
2950
2950
|
modelValue: d.value,
|
2951
2951
|
"onUpdate:modelValue": Y[1] || (Y[1] = (se) => d.value = se),
|
2952
2952
|
title: h.value,
|
@@ -2972,7 +2972,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
2972
2972
|
tip: "名称为英文驼峰格式",
|
2973
2973
|
rules: {
|
2974
2974
|
message: "名称格式错误",
|
2975
|
-
pattern: n(
|
2975
|
+
pattern: n(je)
|
2976
2976
|
},
|
2977
2977
|
onChange: Q
|
2978
2978
|
}, null, 8, ["rules"]),
|
@@ -3032,7 +3032,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3032
3032
|
A("div", Cr, [
|
3033
3033
|
m(n(ye), {
|
3034
3034
|
modelValue: n(r),
|
3035
|
-
"onUpdate:modelValue": p[0] || (p[0] = (_) =>
|
3035
|
+
"onUpdate:modelValue": p[0] || (p[0] = (_) => $t(r) ? r.value = _ : null),
|
3036
3036
|
placeholder: "搜索组件",
|
3037
3037
|
clearable: "",
|
3038
3038
|
size: "small"
|
@@ -3072,7 +3072,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3072
3072
|
key: 1,
|
3073
3073
|
items: n(l),
|
3074
3074
|
modelValue: n(a),
|
3075
|
-
"onUpdate:modelValue": p[2] || (p[2] = (_) =>
|
3075
|
+
"onUpdate:modelValue": p[2] || (p[2] = (_) => $t(a) ? a.value = _ : null)
|
3076
3076
|
}, {
|
3077
3077
|
default: y(() => [
|
3078
3078
|
A("div", Ar, [
|
@@ -3130,7 +3130,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3130
3130
|
name: "OutlineWidget",
|
3131
3131
|
__name: "index",
|
3132
3132
|
setup(i) {
|
3133
|
-
const { engine: t, designer: e, selected: l } =
|
3133
|
+
const { engine: t, designer: e, selected: l } = xe(), { current: a } = me(), o = x([]), s = (I, T) => {
|
3134
3134
|
if (T === "slot") return [];
|
3135
3135
|
if (le(I))
|
3136
3136
|
return I.locked ? ["unlock"] : ["lock"];
|
@@ -3179,7 +3179,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3179
3179
|
}
|
3180
3180
|
];
|
3181
3181
|
}, g = async () => {
|
3182
|
-
o.value = f(), l.value?.model && (await
|
3182
|
+
o.value = f(), l.value?.model && (await Ce(), e.value?.setSelected(l.value.model));
|
3183
3183
|
}, v = C(() => l.value?.model.id), p = (I) => {
|
3184
3184
|
const T = I.data;
|
3185
3185
|
if (T.type === "slot" || le(T.model) || T.model.locked || T.model.name === "template")
|
@@ -3219,7 +3219,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3219
3219
|
N,
|
3220
3220
|
H
|
3221
3221
|
)) {
|
3222
|
-
e.value?.setDropping(null), g(),
|
3222
|
+
e.value?.setDropping(null), g(), Pe.warning({
|
3223
3223
|
message: `${Q.model.name}不能放置到该位置`
|
3224
3224
|
}), e.value?.setDragging(null);
|
3225
3225
|
return;
|
@@ -3391,7 +3391,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3391
3391
|
name: "name",
|
3392
3392
|
label: "接口名称",
|
3393
3393
|
required: "",
|
3394
|
-
rules: { pattern: n(
|
3394
|
+
rules: { pattern: n(je), message: "名称格式不正确" }
|
3395
3395
|
}, null, 8, ["rules"]),
|
3396
3396
|
m(n($), {
|
3397
3397
|
name: "label",
|
@@ -3596,7 +3596,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3596
3596
|
}
|
3597
3597
|
), q(l, async () => {
|
3598
3598
|
o.value?.formRef.validate(async (h) => {
|
3599
|
-
h || (await
|
3599
|
+
h || (await Ce(), l.value = "base");
|
3600
3600
|
});
|
3601
3601
|
});
|
3602
3602
|
const v = () => {
|
@@ -3703,7 +3703,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3703
3703
|
submitMethod: _
|
3704
3704
|
}, {
|
3705
3705
|
default: y(() => [
|
3706
|
-
|
3706
|
+
Ee(m(Pr, { categories: h.categories }, null, 8, ["categories"]), [
|
3707
3707
|
[Ne, l.value === "base"]
|
3708
3708
|
]),
|
3709
3709
|
l.value === "settings" ? (c(), E("div", Rr, [
|
@@ -3898,7 +3898,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3898
3898
|
onClick: (S) => p(b),
|
3899
3899
|
onAction: (S) => _(b, S)
|
3900
3900
|
}, null, 8, ["title", "subtitle", "actions", "switch", "modelValue", "onUpdate:modelValue", "onSwitch", "onClick", "onAction"]))), 128)),
|
3901
|
-
m(n(
|
3901
|
+
m(n(Ae), {
|
3902
3902
|
modelValue: l.value,
|
3903
3903
|
"onUpdate:modelValue": h[1] || (h[1] = (b) => l.value = b),
|
3904
3904
|
width: "600px",
|
@@ -3934,7 +3934,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
3934
3934
|
editor: "textarea",
|
3935
3935
|
props: { rows: 3 },
|
3936
3936
|
tip: "多个资源可以换行输入",
|
3937
|
-
onKeyup: h[0] || (h[0] = Ue(
|
3937
|
+
onKeyup: h[0] || (h[0] = Ue(Re(() => {
|
3938
3938
|
}, ["stop"]), ["enter"])),
|
3939
3939
|
required: ""
|
3940
3940
|
}),
|
@@ -4202,7 +4202,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4202
4202
|
onPick: g
|
4203
4203
|
}, {
|
4204
4204
|
default: y(() => [
|
4205
|
-
|
4205
|
+
Ve(d.$slots, "fields", yn(_n({ model: o.value, isEdit: s.value, nameLabel: d.nameLabel, valueLabel: d.valueLabel })), () => [
|
4206
4206
|
m(n($), {
|
4207
4207
|
name: "name",
|
4208
4208
|
label: d.nameLabel,
|
@@ -4561,7 +4561,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4561
4561
|
size: "small",
|
4562
4562
|
"label-position": "right",
|
4563
4563
|
"label-width": r.value,
|
4564
|
-
onKeydown: f[0] || (f[0] = Ue(
|
4564
|
+
onKeydown: f[0] || (f[0] = Ue(Re(() => {
|
4565
4565
|
}, ["prevent", "stop"]), ["enter"]))
|
4566
4566
|
}, {
|
4567
4567
|
default: y(() => [
|
@@ -4584,7 +4584,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4584
4584
|
name: "PropertiesWidget",
|
4585
4585
|
__name: "index",
|
4586
4586
|
setup(i) {
|
4587
|
-
const { current: t, context: e } = me(), { selected: l } =
|
4587
|
+
const { current: t, context: e } = me(), { selected: l } = xe(), {
|
4588
4588
|
node: a,
|
4589
4589
|
commonProps: o,
|
4590
4590
|
change: s,
|
@@ -4642,7 +4642,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4642
4642
|
onPlus: d,
|
4643
4643
|
onRemove: b
|
4644
4644
|
}, null, 8, ["current", "context", "node", "items", "onChange"])) : D("", !0),
|
4645
|
-
m(n(
|
4645
|
+
m(n(Ae), {
|
4646
4646
|
modelValue: p.value,
|
4647
4647
|
"onUpdate:modelValue": k[0] || (k[0] = (V) => p.value = V),
|
4648
4648
|
title: "新增自定义属性",
|
@@ -4659,7 +4659,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4659
4659
|
required: "",
|
4660
4660
|
rules: {
|
4661
4661
|
message: "名称格式错误",
|
4662
|
-
pattern: n(
|
4662
|
+
pattern: n(je)
|
4663
4663
|
}
|
4664
4664
|
}, null, 8, ["rules"])
|
4665
4665
|
]),
|
@@ -4780,7 +4780,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4780
4780
|
name: "EventsWidget",
|
4781
4781
|
__name: "index",
|
4782
4782
|
setup(i) {
|
4783
|
-
const { current: t, context: e } = me(), { selected: l } =
|
4783
|
+
const { current: t, context: e } = me(), { selected: l } = xe(), { mouseEventList: a, keyboardEventList: o, componentEventList: s } = ko(l), r = x({
|
4784
4784
|
name: "",
|
4785
4785
|
event: void 0
|
4786
4786
|
}), u = x(!1), f = (d) => {
|
@@ -4926,7 +4926,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4926
4926
|
name: "DirectivesWidget",
|
4927
4927
|
__name: "index",
|
4928
4928
|
setup(i) {
|
4929
|
-
const { current: t, context: e } = me(), { selected: l } =
|
4929
|
+
const { current: t, context: e } = me(), { selected: l } = xe(), {
|
4930
4930
|
vIf: a,
|
4931
4931
|
vShow: o,
|
4932
4932
|
vBind: s,
|
@@ -4957,7 +4957,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
4957
4957
|
m(n(be), {
|
4958
4958
|
size: "small",
|
4959
4959
|
"label-width": "80px",
|
4960
|
-
onKeydown: V[0] || (V[0] = Ue(
|
4960
|
+
onKeydown: V[0] || (V[0] = Ue(Re(() => {
|
4961
4961
|
}, ["prevent", "stop"]), ["enter"]))
|
4962
4962
|
}, {
|
4963
4963
|
default: y(() => [
|
@@ -5013,7 +5013,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5013
5013
|
m(n(be), {
|
5014
5014
|
size: "small",
|
5015
5015
|
"label-width": "80px",
|
5016
|
-
onKeydown: V[1] || (V[1] = Ue(
|
5016
|
+
onKeydown: V[1] || (V[1] = Ue(Re(() => {
|
5017
5017
|
}, ["prevent", "stop"]), ["enter"]))
|
5018
5018
|
}, {
|
5019
5019
|
default: y(() => [
|
@@ -5076,7 +5076,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5076
5076
|
m(n(be), {
|
5077
5077
|
size: "small",
|
5078
5078
|
"label-width": "60px",
|
5079
|
-
onKeydown: V[2] || (V[2] = Ue(
|
5079
|
+
onKeydown: V[2] || (V[2] = Ue(Re(() => {
|
5080
5080
|
}, ["prevent", "stop"]), ["enter"]))
|
5081
5081
|
}, {
|
5082
5082
|
default: y(() => [
|
@@ -5129,7 +5129,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5129
5129
|
m(n(be), {
|
5130
5130
|
size: "small",
|
5131
5131
|
"label-width": "60px",
|
5132
|
-
onKeydown: V[3] || (V[3] = Ue(
|
5132
|
+
onKeydown: V[3] || (V[3] = Ue(Re(() => {
|
5133
5133
|
}, ["prevent", "stop"]), ["enter"]))
|
5134
5134
|
}, {
|
5135
5135
|
default: y(() => [
|
@@ -5209,7 +5209,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5209
5209
|
const r = s.default;
|
5210
5210
|
return r && !pe(r, t.context, !0) ? !1 : (t.current.setProp(s), !0);
|
5211
5211
|
};
|
5212
|
-
return (s, r) => (c(), w(n(
|
5212
|
+
return (s, r) => (c(), w(n(Ae), {
|
5213
5213
|
title: e.value,
|
5214
5214
|
width: "800px",
|
5215
5215
|
height: "500px",
|
@@ -5226,7 +5226,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5226
5226
|
disabled: !!t.item,
|
5227
5227
|
rules: {
|
5228
5228
|
message: "名称格式错误",
|
5229
|
-
pattern: n(
|
5229
|
+
pattern: n(je)
|
5230
5230
|
}
|
5231
5231
|
}, null, 8, ["disabled", "rules"]),
|
5232
5232
|
m(n($), {
|
@@ -5271,7 +5271,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5271
5271
|
},
|
5272
5272
|
setup(i) {
|
5273
5273
|
const t = i, e = C(() => t.item ? "编辑定义事件" : "新增定义事件"), l = x(t.item), a = async (o) => (t.item && t.current.removeEmit(t.item.name, !0), t.current.setEmit(o), !0);
|
5274
|
-
return (o, s) => (c(), w(n(
|
5274
|
+
return (o, s) => (c(), w(n(Ae), {
|
5275
5275
|
title: e.value,
|
5276
5276
|
width: "600px",
|
5277
5277
|
height: "200px",
|
@@ -5287,7 +5287,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5287
5287
|
disabled: !!t.item,
|
5288
5288
|
rules: {
|
5289
5289
|
message: "名称格式错误",
|
5290
|
-
pattern: n(
|
5290
|
+
pattern: n(je)
|
5291
5291
|
}
|
5292
5292
|
}, null, 8, ["disabled", "rules"]),
|
5293
5293
|
m(n($), {
|
@@ -5323,7 +5323,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5323
5323
|
},
|
5324
5324
|
setup(i) {
|
5325
5325
|
const t = i, e = C(() => t.item ? "编辑定义插槽" : "新增定义插槽"), l = x(t.item), a = async (o) => (t.item && t.current.removeSlot(t.item.name, !0), t.current.setSlot(o), !0);
|
5326
|
-
return (o, s) => (c(), w(n(
|
5326
|
+
return (o, s) => (c(), w(n(Ae), {
|
5327
5327
|
title: e.value,
|
5328
5328
|
width: "600px",
|
5329
5329
|
height: "200px",
|
@@ -5339,7 +5339,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5339
5339
|
required: "",
|
5340
5340
|
rules: {
|
5341
5341
|
message: "名称格式错误",
|
5342
|
-
pattern: n(
|
5342
|
+
pattern: n(je)
|
5343
5343
|
}
|
5344
5344
|
}, null, 8, ["disabled", "rules"]),
|
5345
5345
|
m(n($), {
|
@@ -5387,7 +5387,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5387
5387
|
const s = o.default;
|
5388
5388
|
return s && !pe(s, t.context, !0) ? !1 : (t.current.setInject(o), !0);
|
5389
5389
|
};
|
5390
|
-
return (o, s) => (c(), w(n(
|
5390
|
+
return (o, s) => (c(), w(n(Ae), {
|
5391
5391
|
title: e.value,
|
5392
5392
|
width: "800px",
|
5393
5393
|
height: "500px",
|
@@ -5404,7 +5404,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5404
5404
|
disabled: !!t.item,
|
5405
5405
|
rules: {
|
5406
5406
|
message: "名称格式错误",
|
5407
|
-
pattern: n(
|
5407
|
+
pattern: n(je)
|
5408
5408
|
}
|
5409
5409
|
}, null, 8, ["disabled", "rules"]),
|
5410
5410
|
m(n($), {
|
@@ -5719,7 +5719,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5719
5719
|
let T = t.context?.$apis[s.value.ref];
|
5720
5720
|
if (T)
|
5721
5721
|
return await T.apply(T, I);
|
5722
|
-
|
5722
|
+
Ie.warn(`API【${s.value.ref}】不存在`);
|
5723
5723
|
}
|
5724
5724
|
}, j = et(s.value.test, {
|
5725
5725
|
runApi: V
|
@@ -5729,11 +5729,11 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5729
5729
|
const I = await j();
|
5730
5730
|
u.value = JSON.stringify(await R(I), null, 2);
|
5731
5731
|
} catch (I) {
|
5732
|
-
|
5732
|
+
Ie.error(I);
|
5733
5733
|
}
|
5734
5734
|
r.value = !1, f.value = !0;
|
5735
5735
|
};
|
5736
|
-
return (k, V) => (c(), w(n(
|
5736
|
+
return (k, V) => (c(), w(n(Ae), {
|
5737
5737
|
width: "1000px",
|
5738
5738
|
height: "700px",
|
5739
5739
|
title: v.value,
|
@@ -5789,7 +5789,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
5789
5789
|
disabled: !!t.item,
|
5790
5790
|
rules: {
|
5791
5791
|
message: "名称格式错误",
|
5792
|
-
pattern: n(
|
5792
|
+
pattern: n(je)
|
5793
5793
|
}
|
5794
5794
|
}, null, 8, ["disabled", "rules"]),
|
5795
5795
|
m(n($), {
|
@@ -6133,7 +6133,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
6133
6133
|
name: "StyleWidget",
|
6134
6134
|
__name: "JsonMode",
|
6135
6135
|
setup(i) {
|
6136
|
-
const { selected: t } =
|
6136
|
+
const { selected: t } = xe(), e = x(), l = C(() => {
|
6137
6137
|
const r = t.value?.model || null;
|
6138
6138
|
return le(r) ? null : r;
|
6139
6139
|
}), a = C(
|
@@ -7443,7 +7443,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
7443
7443
|
isStyleCodeMode: { type: Boolean }
|
7444
7444
|
},
|
7445
7445
|
setup(i) {
|
7446
|
-
const t = i, { selected: e } =
|
7446
|
+
const t = i, { selected: e } = xe(), l = C(() => {
|
7447
7447
|
const s = e.value?.model || null;
|
7448
7448
|
return le(s) ? null : s;
|
7449
7449
|
}), a = C(
|
@@ -7543,7 +7543,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
7543
7543
|
inheritAttrs: !1,
|
7544
7544
|
__name: "index",
|
7545
7545
|
setup(i) {
|
7546
|
-
const { selected: t, designer: e } =
|
7546
|
+
const { selected: t, designer: e } = xe(), l = C(() => (t.value?.path || []).slice(0).reverse()), a = (s) => {
|
7547
7547
|
e.value?.setSelected(s);
|
7548
7548
|
}, o = (s) => {
|
7549
7549
|
e.value?.setHover(s);
|
@@ -7840,7 +7840,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
7840
7840
|
const V = r?.getData()?.id;
|
7841
7841
|
return kt(p.value, (j) => j.userId === V ? "我的" : j.category);
|
7842
7842
|
}), d = C(() => Object.keys(_.value)), h = C(() => `(共 ${l.value.length} 个)`), b = async (V) => {
|
7843
|
-
await o() ? await s(V.id) : await
|
7843
|
+
await o() ? await s(V.id) : await De.confirm(
|
7844
7844
|
"使用模版需登录,您还没登录或已过期,请重新登录!",
|
7845
7845
|
"提示",
|
7846
7846
|
{
|
@@ -7849,13 +7849,13 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
7849
7849
|
}
|
7850
7850
|
).catch(() => !1) && a();
|
7851
7851
|
}, S = (V) => V.share ? !1 : V.userId === r?.getData()?.id, k = async (V) => {
|
7852
|
-
await
|
7852
|
+
await De.confirm("确定删除该模版?", "提示", {
|
7853
7853
|
type: "warning"
|
7854
7854
|
}).catch(() => !1) && (await g(V.id), u());
|
7855
7855
|
};
|
7856
7856
|
return t({
|
7857
7857
|
refreshTemplates: u
|
7858
|
-
}), (V, j) =>
|
7858
|
+
}), (V, j) => Ee((c(), w(n(J), {
|
7859
7859
|
class: "v-blocks-widget v-templates-widgets",
|
7860
7860
|
title: "模板",
|
7861
7861
|
subtitle: h.value,
|
@@ -7932,7 +7932,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
7932
7932
|
A("div", Du, [
|
7933
7933
|
m(n(te), {
|
7934
7934
|
class: "v-templates-widgets__download",
|
7935
|
-
icon: n(
|
7935
|
+
icon: n(Ft),
|
7936
7936
|
type: "primary",
|
7937
7937
|
round: "",
|
7938
7938
|
onClick: (O) => b(T)
|
@@ -8169,7 +8169,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
8169
8169
|
label: "帮助中心",
|
8170
8170
|
actions: [
|
8171
8171
|
{
|
8172
|
-
icon:
|
8172
|
+
icon: Rt(Gs),
|
8173
8173
|
type: "info",
|
8174
8174
|
name: "home"
|
8175
8175
|
}
|
@@ -8886,10 +8886,10 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
8886
8886
|
}
|
8887
8887
|
], Fu = [
|
8888
8888
|
{
|
8889
|
-
name:
|
8889
|
+
name: Bt,
|
8890
8890
|
version: "latest",
|
8891
8891
|
label: "内置",
|
8892
|
-
library:
|
8892
|
+
library: Bt,
|
8893
8893
|
order: 0,
|
8894
8894
|
categories: Bu,
|
8895
8895
|
components: zu
|
@@ -9257,7 +9257,7 @@ const ar = { class: "v-icon-setter" }, sr = { class: "v-icon-setter__content" },
|
|
9257
9257
|
setup(i, { emit: t }) {
|
9258
9258
|
const e = i, l = t, a = x([]), o = C(() => a.value.length < e.limit), s = (u) => u.type.includes("image") ? (Nl(u).then((f) => {
|
9259
9259
|
a.value = [{ name: u.name, url: f }];
|
9260
|
-
}), !1) : (
|
9260
|
+
}), !1) : (Pe.error("只能上传图片"), !1), r = () => {
|
9261
9261
|
a.value = [];
|
9262
9262
|
};
|
9263
9263
|
return q(
|
@@ -9543,7 +9543,7 @@ class rc {
|
|
9543
9543
|
set(t, e) {
|
9544
9544
|
const l = this.widgets[t];
|
9545
9545
|
if (!l) {
|
9546
|
-
|
9546
|
+
Ie.warn(`widget '${t}' is not found`);
|
9547
9547
|
return;
|
9548
9548
|
}
|
9549
9549
|
Ht(l, e), e.component && (l.component = e.component);
|
@@ -9655,7 +9655,7 @@ class cc {
|
|
9655
9655
|
set(t, e) {
|
9656
9656
|
const l = this.setters[t];
|
9657
9657
|
if (!l) {
|
9658
|
-
|
9658
|
+
Ie.warn(`setter '${t}' is not found`);
|
9659
9659
|
return;
|
9660
9660
|
}
|
9661
9661
|
Ht(l, e), e.component && (l.component = e.component);
|
@@ -9781,7 +9781,7 @@ class mc {
|
|
9781
9781
|
this.bind(this.onSelected, "onSelected"),
|
9782
9782
|
!0
|
9783
9783
|
), oe.on(
|
9784
|
-
|
9784
|
+
Ot,
|
9785
9785
|
this.bind(this.onActiveChange, "onActiveChange")
|
9786
9786
|
), oe.on(Ze, this.bind(this.onViewChange, "onViewChange")), q(
|
9787
9787
|
this.devtools.isOpen,
|
@@ -9808,7 +9808,7 @@ class mc {
|
|
9808
9808
|
"dragstart",
|
9809
9809
|
this.bind(this.onDragStart, "onDragStart")
|
9810
9810
|
), e.removeEventListener("dragend", this.bind(this.onDragEnd, "onDragEnd")), e.removeEventListener("drop", this.bind(this.onDrop, "onDrop")), e.removeEventListener("click", this.bind(this.onSelected, "onSelected")), oe.off(
|
9811
|
-
|
9811
|
+
Ot,
|
9812
9812
|
this.bind(this.onActiveChange, "onActiveChange")
|
9813
9813
|
), oe.off(
|
9814
9814
|
Ze,
|
@@ -9988,7 +9988,7 @@ class mc {
|
|
9988
9988
|
this.draggingNode = t;
|
9989
9989
|
}
|
9990
9990
|
async setHover(t) {
|
9991
|
-
if (await
|
9991
|
+
if (await Ce(), t) {
|
9992
9992
|
const e = this.getElmenetByModel(t);
|
9993
9993
|
if (!e) return;
|
9994
9994
|
const l = e.getBoundingClientRect(), a = le(t) ? [] : this.findPathByNode(t);
|
@@ -10003,7 +10003,7 @@ class mc {
|
|
10003
10003
|
this.hover.value = null;
|
10004
10004
|
}
|
10005
10005
|
async setSelected(t) {
|
10006
|
-
if (await
|
10006
|
+
if (await Ce(), t) {
|
10007
10007
|
const e = this.getElmenetByModel(t) || this.document?.createElement("span");
|
10008
10008
|
if (!e) return;
|
10009
10009
|
const l = e.getBoundingClientRect(), a = le(t) ? [] : this.findPathByNode(t);
|
@@ -10018,7 +10018,7 @@ class mc {
|
|
10018
10018
|
this.selected.value = null;
|
10019
10019
|
}
|
10020
10020
|
async setDropping(t, e = "inner") {
|
10021
|
-
if (await
|
10021
|
+
if (await Ce(), t) {
|
10022
10022
|
const l = this.getElmenetByModel(t);
|
10023
10023
|
if (!l) return;
|
10024
10024
|
const a = l.getBoundingClientRect(), o = le(t) ? [] : this.findPathByNode(t);
|
@@ -10107,7 +10107,7 @@ class vc {
|
|
10107
10107
|
} catch (d) {
|
10108
10108
|
re(d.message || "未知错误", "运行时错误"), console.error(d);
|
10109
10109
|
}
|
10110
|
-
this.context = p, oe.on(Ze, this.nodeChange), oe.on(
|
10110
|
+
this.context = p, oe.on(Ze, this.nodeChange), oe.on(zt, this.blockChange);
|
10111
10111
|
}
|
10112
10112
|
dispose() {
|
10113
10113
|
if (this.app) {
|
@@ -10117,7 +10117,7 @@ class vc {
|
|
10117
10117
|
const e = this.app._container;
|
10118
10118
|
e && e.parentNode && (e.parentNode.removeChild(e), this.app._container = null), this.app = null;
|
10119
10119
|
}
|
10120
|
-
this.dsl = null, this.context = null, this.file = null, oe.off(Ze, this.nodeChange), oe.off(
|
10120
|
+
this.dsl = null, this.context = null, this.file = null, oe.off(Ze, this.nodeChange), oe.off(zt, this.blockChange);
|
10121
10121
|
}
|
10122
10122
|
updateChild(t, e) {
|
10123
10123
|
const l = e.children || e.nodes || [];
|
@@ -10171,7 +10171,7 @@ class gc extends Fn {
|
|
10171
10171
|
setup(e, l) {
|
10172
10172
|
const a = e.contentWindow;
|
10173
10173
|
if (!a) {
|
10174
|
-
|
10174
|
+
Ie.warn("Simulator contentWindow is null");
|
10175
10175
|
return;
|
10176
10176
|
}
|
10177
10177
|
a.__simulator__ = this;
|
@@ -10256,7 +10256,7 @@ class gc extends Fn {
|
|
10256
10256
|
const _ = {}, { groups: d, componentMap: h } = f;
|
10257
10257
|
for (const V of d.value) {
|
10258
10258
|
const j = V.names || [];
|
10259
|
-
if (V.name ===
|
10259
|
+
if (V.name === Bt)
|
10260
10260
|
j.forEach((R) => {
|
10261
10261
|
const I = h.get(R), T = I?.package || "", O = Kl[T], Q = v[O];
|
10262
10262
|
Q && I && (_[R] = rn(I, Q));
|
@@ -10446,7 +10446,7 @@ class ld extends Fn {
|
|
10446
10446
|
}), this.bindEvents(), this.init(o), ht(this.render.bind(this)), wn(this.dispose.bind(this));
|
10447
10447
|
}
|
10448
10448
|
async init(e) {
|
10449
|
-
const l = await this.service.init(e).catch((a) => (
|
10449
|
+
const l = await this.service.init(e).catch((a) => (Ie.warn("VTJEngine service init fail.", a), null));
|
10450
10450
|
l && (l.dependencies = uc.merge(l.dependencies || []), this.project.value = new Xl(l), this.saveMaterials(), this.triggerReady());
|
10451
10451
|
}
|
10452
10452
|
render() {
|
@@ -10455,13 +10455,13 @@ class ld extends Fn {
|
|
10455
10455
|
const l = kn(hc);
|
10456
10456
|
this.options.install && l.use(this.options.install, this), l.provide(dl, wl(this)), l.mount(e), this.app = l;
|
10457
10457
|
} else
|
10458
|
-
|
10458
|
+
Ie.warn("VTJEngine constructor param [ container ] is undefined");
|
10459
10459
|
}
|
10460
10460
|
bindEvents() {
|
10461
|
-
oe.on(Ql, (e) => this.saveProject(e)), oe.on(Yl, (e) => this.saveBlockFile(e)), oe.on(Zl, (e) => this.saveBlockFile(e)), oe.on(ea, () => this.saveMaterials()), oe.on(
|
10461
|
+
oe.on(Ql, (e) => this.saveProject(e)), oe.on(Yl, (e) => this.saveBlockFile(e)), oe.on(Zl, (e) => this.saveBlockFile(e)), oe.on(ea, () => this.saveMaterials()), oe.on(Ot, (e) => this.activeFile(e)), oe.on(ta, () => this.publish()), oe.on(na, () => this.publishCurrent()), oe.on(zt, (e) => this.changeFile(e)), oe.on(Ze, () => this.changeCurrentFile()), oe.on(la, (e) => this.saveHistory(e)), oe.on(aa, (e) => this.loadHistory(e)), oe.on(sa, () => this.genSource());
|
10462
10462
|
}
|
10463
10463
|
async activeFile(e) {
|
10464
|
-
await
|
10464
|
+
await Ce();
|
10465
10465
|
const l = e.model, a = e.model.currentFile;
|
10466
10466
|
if (a) {
|
10467
10467
|
if (l.isPageFile(a) && a.raw)
|
@@ -10474,22 +10474,22 @@ class ld extends Fn {
|
|
10474
10474
|
this.updateCurrent(o), this.initHistory(o);
|
10475
10475
|
} else
|
10476
10476
|
this.updateCurrent(null);
|
10477
|
-
|
10477
|
+
Te(this.project);
|
10478
10478
|
}
|
10479
10479
|
async changeFile(e) {
|
10480
|
-
await
|
10480
|
+
await Ce();
|
10481
10481
|
const l = e.toDsl();
|
10482
|
-
this.service.saveFile(l, this.project.value?.toDsl()), this.updateCurrent(e), this.history.value?.add(l),
|
10482
|
+
this.service.saveFile(l, this.project.value?.toDsl()), this.updateCurrent(e), this.history.value?.add(l), Te(this.history);
|
10483
10483
|
}
|
10484
10484
|
changeCurrentFile() {
|
10485
|
-
this.saveCurrentFile(), this.current.value && (this.history.value?.add(this.current.value.toDsl()),
|
10485
|
+
this.saveCurrentFile(), this.current.value && (this.history.value?.add(this.current.value.toDsl()), Te(this.history));
|
10486
10486
|
}
|
10487
10487
|
async updateCurrent(e, l = !0) {
|
10488
|
-
this.current.value = e, await
|
10488
|
+
this.current.value = e, await Ce(), this.context.value = this.simulator.renderer?.context || null, this.isEmptyCurrent.value = this.current.value?.nodes.length === 0, this.changed.value = Symbol(), l && Te(this.context);
|
10489
10489
|
}
|
10490
10490
|
async saveProject(e) {
|
10491
10491
|
const a = e.model.toDsl();
|
10492
|
-
await this.service.saveProject(a),
|
10492
|
+
await this.service.saveProject(a), Te(this.project);
|
10493
10493
|
}
|
10494
10494
|
async saveBlockFile(e) {
|
10495
10495
|
const l = e.type, a = e.model, o = a.toDsl();
|
@@ -10512,7 +10512,7 @@ class ld extends Fn {
|
|
10512
10512
|
const { source: s, target: r } = e.data, u = await this.service.getFile(s.id, o);
|
10513
10513
|
u && (u.id = r.id, u.name = r.name, await this.service.saveFile(u, o));
|
10514
10514
|
}
|
10515
|
-
|
10515
|
+
Te(this.project), this.emitter.emit(It, e);
|
10516
10516
|
}
|
10517
10517
|
onSaveBlockFileFinish(e) {
|
10518
10518
|
const l = (a) => {
|
@@ -10521,7 +10521,7 @@ class ld extends Fn {
|
|
10521
10521
|
this.emitter.on(It, l);
|
10522
10522
|
}
|
10523
10523
|
async saveMaterials() {
|
10524
|
-
await
|
10524
|
+
await Ce(), this.simulator.ready(() => {
|
10525
10525
|
const e = this.project.value;
|
10526
10526
|
if (e) {
|
10527
10527
|
const l = this.assets.componentMap;
|
@@ -10558,7 +10558,7 @@ class ld extends Fn {
|
|
10558
10558
|
o
|
10559
10559
|
);
|
10560
10560
|
const s = a.toDsl();
|
10561
|
-
await this.service.saveHistory(s, o),
|
10561
|
+
await this.service.saveHistory(s, o), Te(this.history);
|
10562
10562
|
}
|
10563
10563
|
async loadHistory(e) {
|
10564
10564
|
const l = e.model, a = e.data, o = this.project.value?.toDsl(), s = await this.service.getHistoryItem(
|
@@ -10568,7 +10568,7 @@ class ld extends Fn {
|
|
10568
10568
|
);
|
10569
10569
|
if (s && s.dsl) {
|
10570
10570
|
const r = new sn(s.dsl);
|
10571
|
-
await this.updateCurrent(r), this.service.saveFile(s.dsl, o),
|
10571
|
+
await this.updateCurrent(r), this.service.saveFile(s.dsl, o), Te(this.history);
|
10572
10572
|
}
|
10573
10573
|
}
|
10574
10574
|
async publish() {
|
@@ -10619,9 +10619,9 @@ class ld extends Fn {
|
|
10619
10619
|
}
|
10620
10620
|
function ce() {
|
10621
10621
|
const i = Wt(dl, null);
|
10622
|
-
return i ||
|
10622
|
+
return i || Ie.error("VTJEngine is not exist"), i;
|
10623
10623
|
}
|
10624
|
-
const
|
10624
|
+
const $e = P({
|
10625
10625
|
name: "RegionWrapper",
|
10626
10626
|
props: {
|
10627
10627
|
region: {
|
@@ -10725,7 +10725,7 @@ const Re = P({
|
|
10725
10725
|
getWidget(i) {
|
10726
10726
|
const t = cl.get(i);
|
10727
10727
|
if (!t) {
|
10728
|
-
|
10728
|
+
Ie.warn(`widget [ ${i} ] is not exsit`);
|
10729
10729
|
return;
|
10730
10730
|
}
|
10731
10731
|
return this.getWidgets(t.region).find((l) => l.widget.name === i);
|
@@ -10783,7 +10783,7 @@ const Re = P({
|
|
10783
10783
|
let e;
|
10784
10784
|
if (typeof t == "string")
|
10785
10785
|
return e = this.getSetter(t), {
|
10786
|
-
component:
|
10786
|
+
component: Rt(e.component),
|
10787
10787
|
name: e.name,
|
10788
10788
|
label: t,
|
10789
10789
|
props: e.props || {}
|
@@ -10791,7 +10791,7 @@ const Re = P({
|
|
10791
10791
|
{
|
10792
10792
|
const l = t;
|
10793
10793
|
return e = this.getSetter(l.name), {
|
10794
|
-
component:
|
10794
|
+
component: Rt(l.component || e.component),
|
10795
10795
|
name: l.name,
|
10796
10796
|
label: l.label || l.name,
|
10797
10797
|
props: Object.assign(e.props || {}, l.props)
|
@@ -10911,18 +10911,18 @@ const Re = P({
|
|
10911
10911
|
height: k.headerHeight
|
10912
10912
|
}, {
|
10913
10913
|
default: y(() => [
|
10914
|
-
m(n(
|
10914
|
+
m(n($e), {
|
10915
10915
|
ref_key: "brand",
|
10916
10916
|
ref: u,
|
10917
10917
|
region: "Brand"
|
10918
10918
|
}, null, 512),
|
10919
|
-
m(n(
|
10919
|
+
m(n($e), {
|
10920
10920
|
ref_key: "toolbar",
|
10921
10921
|
ref: f,
|
10922
10922
|
region: "Toolbar",
|
10923
10923
|
preview: l.value
|
10924
10924
|
}, null, 8, ["preview"]),
|
10925
|
-
m(n(
|
10925
|
+
m(n($e), {
|
10926
10926
|
ref_key: "actions",
|
10927
10927
|
ref: g,
|
10928
10928
|
region: "Actions"
|
@@ -10932,7 +10932,7 @@ const Re = P({
|
|
10932
10932
|
}, 8, ["height"]),
|
10933
10933
|
m(n(tn), { class: "v-skeleton__wrapper" }, {
|
10934
10934
|
default: y(() => [
|
10935
|
-
l.value ? D("", !0) :
|
10935
|
+
l.value ? D("", !0) : Ee((c(), w(n(nn), {
|
10936
10936
|
key: 0,
|
10937
10937
|
width: e.leftWidth,
|
10938
10938
|
class: K(["v-skeleton__left", {
|
@@ -10940,7 +10940,7 @@ const Re = P({
|
|
10940
10940
|
}])
|
10941
10941
|
}, {
|
10942
10942
|
default: y(() => [
|
10943
|
-
m(n(
|
10943
|
+
m(n($e), {
|
10944
10944
|
ref_key: "apps",
|
10945
10945
|
ref: v,
|
10946
10946
|
region: "Apps"
|
@@ -10952,14 +10952,14 @@ const Re = P({
|
|
10952
10952
|
]),
|
10953
10953
|
m(n(Rl), { class: "v-skeleton__main" }, {
|
10954
10954
|
default: y(() => [
|
10955
|
-
l.value ? (c(), w(n(
|
10955
|
+
l.value ? (c(), w(n($e), {
|
10956
10956
|
key: 0,
|
10957
10957
|
ref_key: "preview",
|
10958
10958
|
ref: h,
|
10959
10959
|
region: "Preview",
|
10960
10960
|
preview: l.value
|
10961
10961
|
}, null, 8, ["preview"])) : D("", !0),
|
10962
|
-
|
10962
|
+
Ee(m(n($e), {
|
10963
10963
|
ref_key: "workspace",
|
10964
10964
|
ref: p,
|
10965
10965
|
region: "Workspace"
|
@@ -10969,13 +10969,13 @@ const Re = P({
|
|
10969
10969
|
]),
|
10970
10970
|
_: 1
|
10971
10971
|
}),
|
10972
|
-
l.value ? D("", !0) :
|
10972
|
+
l.value ? D("", !0) : Ee((c(), w(n(nn), {
|
10973
10973
|
key: 1,
|
10974
10974
|
width: e.rightWidth,
|
10975
10975
|
class: "v-skeleton__right"
|
10976
10976
|
}, {
|
10977
10977
|
default: y(() => [
|
10978
|
-
m(n(
|
10978
|
+
m(n($e), {
|
10979
10979
|
ref_key: "settings",
|
10980
10980
|
ref: _,
|
10981
10981
|
region: "Settings"
|
@@ -10995,7 +10995,7 @@ const Re = P({
|
|
10995
10995
|
height: k.footerHeight
|
10996
10996
|
}, {
|
10997
10997
|
default: y(() => [
|
10998
|
-
m(n(
|
10998
|
+
m(n($e), {
|
10999
10999
|
ref_key: "status",
|
11000
11000
|
ref: d,
|
11001
11001
|
region: "Status"
|
@@ -11392,7 +11392,7 @@ const Re = P({
|
|
11392
11392
|
region: {}
|
11393
11393
|
},
|
11394
11394
|
setup(i, { expose: t }) {
|
11395
|
-
const e = i, l = ce(), { current: a } = me(), { selected: o, isSelectBlock: s } =
|
11395
|
+
const e = i, l = ce(), { current: a } = me(), { selected: o, isSelectBlock: s } = xe(), r = C(
|
11396
11396
|
() => s.value ? ke.Block : ke.Node
|
11397
11397
|
), { widgets: u, widgetsRef: f } = Le(e.region, r), g = x(), v = x(!1), p = C(() => u.value.map((b) => ({
|
11398
11398
|
name: b.name,
|
@@ -11610,11 +11610,11 @@ export {
|
|
11610
11610
|
un as MOBILE_SIZE,
|
11611
11611
|
ao as MOUSE_EVENT_LIST,
|
11612
11612
|
nd as MicroApp,
|
11613
|
-
|
11613
|
+
je as NAME_REGEX,
|
11614
11614
|
cn as PAD_SIZE,
|
11615
11615
|
J as Panel,
|
11616
11616
|
co as RegionType,
|
11617
|
-
|
11617
|
+
$e as RegionWrapper,
|
11618
11618
|
vc as Renderer,
|
11619
11619
|
It as SAVE_BLOCK_FILE_FINISH,
|
11620
11620
|
Cc as SetterView,
|
package/package.json
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vtj/designer",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.9.
|
4
|
+
"version": "0.9.6",
|
5
5
|
"type": "module",
|
6
6
|
"dependencies": {
|
7
7
|
"html2canvas": "~1.4.1",
|
8
8
|
"mockjs": "~1.1.0",
|
9
9
|
"monaco-editor": "~0.52.0",
|
10
|
-
"@vtj/core": "~0.9.
|
11
|
-
"@vtj/icons": "~0.9.
|
12
|
-
"@vtj/renderer": "~0.9.
|
13
|
-
"@vtj/
|
14
|
-
"@vtj/
|
10
|
+
"@vtj/core": "~0.9.6",
|
11
|
+
"@vtj/icons": "~0.9.6",
|
12
|
+
"@vtj/renderer": "~0.9.6",
|
13
|
+
"@vtj/utils": "~0.9.6",
|
14
|
+
"@vtj/ui": "~0.9.6"
|
15
15
|
},
|
16
16
|
"devDependencies": {
|
17
17
|
"@types/mockjs": "~1.0.10",
|
18
18
|
"vue": "~3.5.5",
|
19
19
|
"vue-router": "~4.5.0",
|
20
|
-
"@vtj/cli": "~0.9.
|
20
|
+
"@vtj/cli": "~0.9.4"
|
21
21
|
},
|
22
22
|
"files": [
|
23
23
|
"dist",
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/designer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.9.
|
5
|
+
* @version 0.9.5
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.9.
|
8
|
+
export declare const version = "0.9.5";
|