@vtj/designer 0.7.6 → 0.7.9
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.cjs +5 -5
- package/dist/index.mjs +820 -807
- package/dist/style.css +1 -1
- package/package.json +8 -8
- package/types/framework/engine.d.ts +4 -0
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as E, openBlock as c, createElementBlock as j, toDisplayString as N, computed as S, unref as n, ref as w, reactive as Re, watchEffect as
|
|
2
|
-
import { ElNotification as Ue, ElMessageBox as ct, ElMessage as dt, ElButton as re, ElDivider as Le, ElRadioGroup as fn, ElRadioButton as Ze, ElButtonGroup as gn, ElBadge as hn, ElDropdown as
|
|
1
|
+
import { defineComponent as E, openBlock as c, createElementBlock as j, toDisplayString as N, computed as S, unref as n, ref as w, reactive as Re, watchEffect as un, watch as X, toValue as et, createVNode as v, withCtx as g, createElementVNode as z, createBlock as _, createCommentVNode as C, createTextVNode as H, Fragment as $, renderList as B, normalizeClass as te, resolveDynamicComponent as jt, createSlots as cn, renderSlot as de, withModifiers as je, toRaw as dn, withDirectives as Ae, isRef as tt, vShow as We, mergeProps as ue, normalizeStyle as Fe, nextTick as ye, defineAsyncComponent as pn, h as xe, normalizeProps as At, guardReactiveProps as Dt, withKeys as ze, onMounted as Pt, onUnmounted as It, createApp as Rt, shallowRef as Me, shallowReactive as mn, triggerRef as he, inject as vn, markRaw as gt, KeepAlive as $t } from "vue";
|
|
2
|
+
import { ElNotification as Ue, ElMessageBox as ct, ElMessage as dt, ElButton as re, ElDivider as Le, ElRadioGroup as fn, ElRadioButton as Ze, ElButtonGroup as gn, ElBadge as hn, ElDropdown as Bt, ElDropdownMenu as Tt, ElDropdownItem as nt, ElInput as pe, ElEmpty as Z, ElTooltip as Ft, ElTag as bn, ElSwitch as zt, ElTree as pt, ElAlert as _n, ElRow as st, ElCol as lt, ElCollapse as yn, ElCollapseItem as kn, ElForm as Ne, ElDrawer as wn, ElBreadcrumb as Sn, ElBreadcrumbItem as Vn, ElLoading as xn, ElSelect as Cn, ElOption as En, ElInputNumber as jn, ElColorPicker as An, ElConfigProvider as Dn, ElContainer as ht, ElHeader as Pn, ElAside as bt, ElMain as In, ElFooter as Rn, ElFormItem as $n } from "element-plus";
|
|
3
3
|
import Bn from "element-plus/es/locale/lang/zh-cn";
|
|
4
|
-
import { XAction as
|
|
5
|
-
import { delay as
|
|
6
|
-
import { parseExpression as Je, parseFunction as Wn, JSCodeToString as Ce, LIFE_CYCLES_LIST as Ln, DATA_TYPES as Jn, logger as me, isJSExpression as Pe, createLoader as Un, ContextMode as
|
|
7
|
-
import { isBlock as U, DirectiveModel as
|
|
8
|
-
import { VtjIconBack as us, VtjIconPc as cs, VtjIconPhone as ds, VtjIconPad as ps, VtjIconUndo as ms, VtjIconRedo as vs, VtjIconBug as fs, VtjIconPreview as gs, VtjIconRefresh as hs, VtjIconSetting as bs, icons as it, ArrowDown as _s, Search as
|
|
9
|
-
import { useClipboard as Os, useElementSize as
|
|
4
|
+
import { XAction as ke, XIcon as De, XDialog as $e, XDialogForm as ce, XField as P, XPanel as mt, XTabs as Mt, XContainer as O, XForm as Tn, XActionBar as Fn, vResizable as _t, createDialog as zn } from "@vtj/ui";
|
|
5
|
+
import { delay as Nt, upperFirstCamelCase as Ot, toRawType as Qe, cloneDeep as He, isPlainObject as Mn, merge as Wt, arrayToMap as Nn, toArray as On } from "@vtj/utils";
|
|
6
|
+
import { parseExpression as Je, parseFunction as Wn, JSCodeToString as Ce, LIFE_CYCLES_LIST as Ln, DATA_TYPES as Jn, logger as me, isJSExpression as Pe, createLoader as Un, ContextMode as at, createRenderer as Hn, parseDeps as qn, createAssetsCss as Gn, createAssetScripts as yt, getRawComponent as Kn, createSchemaApis as Zn, Provider as Qn, isJSFunction as Xn } from "@vtj/renderer";
|
|
7
|
+
import { isBlock as U, DirectiveModel as Lt, emitter as q, EVENT_PROJECT_ACTIVED as ot, EVENT_NODE_CHANGE as Ie, NodeModel as kt, EVENT_BLOCK_CHANGE as rt, Base as Jt, ProjectModel as Yn, EVENT_PROJECT_CHANGE as es, EVENT_PROJECT_BLOCKS_CHANGE as ts, EVENT_PROJECT_PAGES_CHANGE as ns, EVENT_PROJECT_DEPS_CHANGE as ss, EVENT_PROJECT_PUBLISH as ls, EVENT_PROJECT_FILE_PUBLISH as as, EVENT_HISTORY_CHANGE as os, EVENT_HISTORY_LOAD as rs, BlockModel as wt, HistoryModel as is } from "@vtj/core";
|
|
8
|
+
import { VtjIconBack as us, VtjIconPc as cs, VtjIconPhone as ds, VtjIconPad as ps, VtjIconUndo as ms, VtjIconRedo as vs, VtjIconBug as fs, VtjIconPreview as gs, VtjIconRefresh as hs, VtjIconSetting as bs, icons as it, ArrowDown as _s, Search as Ut, Back as ys, VtjIconPlus as Ht, Delete as ks, VtjIconSave as ws, MoreFilled as vt, VtjIconCheck as qt, VtjIconCopy as Gt, VtjIconEdit as Kt, VtjIconRemove as qe, VtjIconLock as Zt, VtjIconUnlock as Ss, VtjIconInvisible as Qt, VtjIconVisible as Vs, VtjIconHome as xs, VtjIconSearch as Cs, VtjIconLayers as Xt, VtjIconArrowUp as Es, VtjIconArrowDown as js, ArrowRight as As, VtjIconDocument as Ds, VtjIconComponents as Ps, VtjIconBlock as Is, VtjIconOutline as Rs, VtjIconHistory as $s, VtjIconApi as Bs, VtjIconCategory as Ts, VtjIconInfo as Fs, VtjIconVars as zs, VtjIconSwitch as Ms, VtjIconHelp as Ns } from "@vtj/icons";
|
|
9
|
+
import { useClipboard as Os, useElementSize as Yt } from "@vueuse/core";
|
|
10
10
|
/**!
|
|
11
11
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
12
12
|
* @name @vtj/designer
|
|
13
13
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
14
|
-
* @version 0.7.
|
|
14
|
+
* @version 0.7.9
|
|
15
15
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
16
16
|
*/
|
|
17
|
-
const Ws = "0.7.
|
|
17
|
+
const Ws = "0.7.9", St = {
|
|
18
18
|
width: 390,
|
|
19
19
|
height: 844
|
|
20
20
|
}, Vt = {
|
|
@@ -44,13 +44,13 @@ const Ws = "0.7.6", St = {
|
|
|
44
44
|
"once",
|
|
45
45
|
"passive"
|
|
46
46
|
];
|
|
47
|
-
var
|
|
48
|
-
const
|
|
47
|
+
var oe = /* @__PURE__ */ ((i) => (i.Block = "block", i.Node = "node", i))(oe || {}), qs = /* @__PURE__ */ ((i) => (i.Brand = "Brand", i.Toolbar = "Toolbar", i.Actions = "Actions", i.Apps = "Apps", i.Workspace = "Workspace", i.Settings = "Settings", i.Status = "Status", i.Preview = "Preview", i))(qs || {});
|
|
48
|
+
const en = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC", Gs = ["title", "src"], Ks = { key: 1 }, Zs = /* @__PURE__ */ E({
|
|
49
49
|
name: "LogoWidget",
|
|
50
50
|
inheritAttrs: !1,
|
|
51
51
|
__name: "index",
|
|
52
52
|
props: {
|
|
53
|
-
icon: { default:
|
|
53
|
+
icon: { default: en },
|
|
54
54
|
text: { default: "VTJ" },
|
|
55
55
|
link: {}
|
|
56
56
|
},
|
|
@@ -77,26 +77,26 @@ const tn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAA
|
|
|
77
77
|
return (e, t) => (c(), j("div", Qs, "EmptyWidget"));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
function
|
|
80
|
+
function tn() {
|
|
81
81
|
const i = se(), e = S(() => i.project.value?.dependencies ?? []);
|
|
82
82
|
return {
|
|
83
83
|
engine: i,
|
|
84
84
|
dependencies: e
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const t = S(() =>
|
|
87
|
+
function we(i, e) {
|
|
88
|
+
const t = S(() => on.getWidgets(n(i), n(e)).filter((l) => !l.invisible)), s = w();
|
|
89
89
|
return {
|
|
90
90
|
widgets: t,
|
|
91
91
|
widgetsRef: s
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function nn() {
|
|
95
95
|
const i = se();
|
|
96
96
|
return {
|
|
97
97
|
span: S(() => {
|
|
98
|
-
const l = i.skeleton?.skeletonRef.leftWidth || 400,
|
|
99
|
-
return Math.floor(24 /
|
|
98
|
+
const l = i.skeleton?.skeletonRef.leftWidth || 400, a = Math.min(Math.floor((l - 50) / 120), 24);
|
|
99
|
+
return Math.floor(24 / a);
|
|
100
100
|
}),
|
|
101
101
|
engine: i
|
|
102
102
|
};
|
|
@@ -110,7 +110,7 @@ function Ys() {
|
|
|
110
110
|
}
|
|
111
111
|
const el = (i = []) => i.map((e) => e.name);
|
|
112
112
|
function tl() {
|
|
113
|
-
const i = se(), { components: e, groups: t, componentMap: s } = i.assets, l = Re({}),
|
|
113
|
+
const i = se(), { components: e, groups: t, componentMap: s } = i.assets, l = Re({}), a = S(() => {
|
|
114
114
|
const f = {};
|
|
115
115
|
return t.value && t.value.forEach((b) => {
|
|
116
116
|
f[b.name] = b;
|
|
@@ -119,11 +119,11 @@ function tl() {
|
|
|
119
119
|
label: `${f.label} (${f.count})`,
|
|
120
120
|
name: f.name,
|
|
121
121
|
disabled: !f.children?.length
|
|
122
|
-
})) : []),
|
|
123
|
-
|
|
122
|
+
})) : []), o = w(r.value[0]?.name), u = w(""), p = S(() => a.value[o.value]);
|
|
123
|
+
un(() => {
|
|
124
124
|
const f = r.value.reduce(
|
|
125
125
|
(b, h) => (b[h.name] = el(
|
|
126
|
-
|
|
126
|
+
a.value[h.name].children
|
|
127
127
|
), b),
|
|
128
128
|
{}
|
|
129
129
|
);
|
|
@@ -137,16 +137,16 @@ function tl() {
|
|
|
137
137
|
components: e,
|
|
138
138
|
groups: t,
|
|
139
139
|
componentMap: s,
|
|
140
|
-
groupMap:
|
|
140
|
+
groupMap: a,
|
|
141
141
|
tabs: r,
|
|
142
142
|
model: l,
|
|
143
|
-
currentTab:
|
|
143
|
+
currentTab: o,
|
|
144
144
|
currentGroup: p,
|
|
145
145
|
searchKey: u,
|
|
146
146
|
searchResult: m
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function ne() {
|
|
150
150
|
const i = se(), e = S(() => i.current.value), t = S(() => i.context.value), s = S(() => i.isEmptyCurrent.value);
|
|
151
151
|
return {
|
|
152
152
|
engine: i,
|
|
@@ -160,52 +160,54 @@ function nl(i, e) {
|
|
|
160
160
|
t.simulator.init(i, e);
|
|
161
161
|
const s = S(() => t.simulator.designer.value), l = S(
|
|
162
162
|
() => Xe("hover", s.value?.hover.value)
|
|
163
|
-
),
|
|
163
|
+
), a = S(
|
|
164
164
|
() => Xe("dropping", s.value?.dropping.value)
|
|
165
165
|
), r = S(
|
|
166
166
|
() => Xe("selected", s.value?.selected.value)
|
|
167
167
|
);
|
|
168
|
-
return {
|
|
168
|
+
return X(t.changed, () => {
|
|
169
|
+
s.value?.updateRect();
|
|
170
|
+
}), {
|
|
169
171
|
designer: s,
|
|
170
|
-
dropping:
|
|
172
|
+
dropping: a,
|
|
171
173
|
hover: l,
|
|
172
174
|
selected: r
|
|
173
175
|
};
|
|
174
176
|
}
|
|
175
177
|
function sl(i, e = !0) {
|
|
176
|
-
const { top: t, height: s, width: l, left:
|
|
178
|
+
const { top: t, height: s, width: l, left: a } = i || {};
|
|
177
179
|
if (s > 100 && l > 200)
|
|
178
180
|
return "inner";
|
|
179
|
-
let r,
|
|
180
|
-
return
|
|
181
|
+
let r, o;
|
|
182
|
+
return o = t > 30 ? "top" : "bottom", r = e || a < 300 && l < 300 ? "left" : "right", [r, o].join("-");
|
|
181
183
|
}
|
|
182
184
|
function ll(i) {
|
|
183
|
-
const { rect: e, type: t } = i, { left: s, width: l, top:
|
|
185
|
+
const { rect: e, type: t } = i, { left: s, width: l, top: a, height: r } = e, o = { left: s, width: l, top: a, height: r };
|
|
184
186
|
switch (t) {
|
|
185
187
|
case "left":
|
|
186
|
-
|
|
188
|
+
o.left = 0, o.width = 0;
|
|
187
189
|
break;
|
|
188
190
|
case "right":
|
|
189
|
-
|
|
191
|
+
o.left = o.left + o.width - 4, o.width = 0;
|
|
190
192
|
break;
|
|
191
193
|
case "bottom":
|
|
192
|
-
|
|
194
|
+
o.top = o.top + o.height - 4, o.height = 0;
|
|
193
195
|
break;
|
|
194
196
|
case "top":
|
|
195
|
-
|
|
197
|
+
o.height = 0;
|
|
196
198
|
break;
|
|
197
199
|
}
|
|
198
|
-
return
|
|
200
|
+
return o;
|
|
199
201
|
}
|
|
200
202
|
function Xe(i, e) {
|
|
201
203
|
if (!e)
|
|
202
204
|
return null;
|
|
203
|
-
const { left: t, top: s, width: l, height:
|
|
205
|
+
const { left: t, top: s, width: l, height: a } = i === "dropping" ? ll(e) : e.rect, r = {
|
|
204
206
|
left: `${t}px`,
|
|
205
207
|
top: `${s}px`,
|
|
206
208
|
width: `${l}px`,
|
|
207
|
-
height: `${
|
|
208
|
-
visibility: l ||
|
|
209
|
+
height: `${a}px`,
|
|
210
|
+
visibility: l || a ? "visible" : "hidden"
|
|
209
211
|
};
|
|
210
212
|
return {
|
|
211
213
|
...e,
|
|
@@ -224,12 +226,12 @@ function fe() {
|
|
|
224
226
|
isSelectBlock: s
|
|
225
227
|
};
|
|
226
228
|
}
|
|
227
|
-
function
|
|
228
|
-
const t = w(""), { selected: s, isSelectBlock: l } = fe(),
|
|
229
|
+
function al(i, e) {
|
|
230
|
+
const t = w(""), { selected: s, isSelectBlock: l } = fe(), a = S(() => s.value?.model.id), r = S(() => {
|
|
229
231
|
const u = et(i), p = et(e), m = [];
|
|
230
232
|
if (!u)
|
|
231
233
|
return m;
|
|
232
|
-
const f = p?.__contextRefs[
|
|
234
|
+
const f = p?.__contextRefs[a.value || ""], h = p === f || l.value ? [] : Object.keys(f?.context || {}).filter((A) => !["context", "ref"].includes(A)).map((A) => `this.context.${A}`);
|
|
233
235
|
h.length && m.push({ title: "上下文", items: h });
|
|
234
236
|
const d = u.inject.map((A) => `this.${A.name}`);
|
|
235
237
|
d.length && m.push({ title: "注入", items: d });
|
|
@@ -253,7 +255,7 @@ function ol(i, e) {
|
|
|
253
255
|
(A) => `this.$refs.${A}`
|
|
254
256
|
);
|
|
255
257
|
return F.length && m.push({ title: "refs", items: F }), m;
|
|
256
|
-
}),
|
|
258
|
+
}), o = S(() => {
|
|
257
259
|
if (!t.value)
|
|
258
260
|
return r.value;
|
|
259
261
|
const u = t.value.toLowerCase(), p = [];
|
|
@@ -270,7 +272,7 @@ function ol(i, e) {
|
|
|
270
272
|
return {
|
|
271
273
|
keyword: t,
|
|
272
274
|
options: r,
|
|
273
|
-
searchResult:
|
|
275
|
+
searchResult: o
|
|
274
276
|
};
|
|
275
277
|
}
|
|
276
278
|
const Te = [
|
|
@@ -283,12 +285,12 @@ const Te = [
|
|
|
283
285
|
label: "表达式"
|
|
284
286
|
}
|
|
285
287
|
];
|
|
286
|
-
function
|
|
288
|
+
function ol(i) {
|
|
287
289
|
const e = se(), t = S(() => {
|
|
288
290
|
const f = i.value?.model || null;
|
|
289
291
|
return U(f) ? null : f;
|
|
290
292
|
}), s = w();
|
|
291
|
-
|
|
293
|
+
X(
|
|
292
294
|
t,
|
|
293
295
|
async (f) => {
|
|
294
296
|
f?.from ? s.value = await e.assets.getBlockMaterial(f.from) || void 0 : s.value = void 0;
|
|
@@ -319,7 +321,7 @@ function al(i) {
|
|
|
319
321
|
setters: Te,
|
|
320
322
|
value: Array.isArray(t.value.children) ? "" : t.value.children
|
|
321
323
|
}
|
|
322
|
-
] : []),
|
|
324
|
+
] : []), a = S(() => {
|
|
323
325
|
if (!t.value)
|
|
324
326
|
return [];
|
|
325
327
|
const f = s.value || e.assets.componentMap.get(t.value.name);
|
|
@@ -327,15 +329,15 @@ function al(i) {
|
|
|
327
329
|
...h,
|
|
328
330
|
value: t.value?.getPropValue(h.name) ?? h.defaultValue
|
|
329
331
|
})) : [];
|
|
330
|
-
}), r = (f) => l.value.some((b) => b.name === f) ||
|
|
332
|
+
}), r = (f) => l.value.some((b) => b.name === f) || a.value.some((b) => b.name === f) || f === "style", o = S(() => t.value ? Object.keys(t.value.props).filter((f) => !r(f)).map((f) => ({
|
|
331
333
|
name: f,
|
|
332
334
|
setters: "InputSetter",
|
|
333
335
|
value: t.value?.getPropValue(f)
|
|
334
336
|
})) : []);
|
|
335
337
|
return {
|
|
336
338
|
commonProps: l,
|
|
337
|
-
componentProps:
|
|
338
|
-
customProps:
|
|
339
|
+
componentProps: a,
|
|
340
|
+
customProps: o,
|
|
339
341
|
node: t,
|
|
340
342
|
change: (f, b) => {
|
|
341
343
|
t.value && (f === "children" ? t.value.setChildren(b) : t.value.setProp(f, b));
|
|
@@ -360,13 +362,13 @@ async function Ee(i) {
|
|
|
360
362
|
() => !1
|
|
361
363
|
);
|
|
362
364
|
}
|
|
363
|
-
function
|
|
365
|
+
function ae(i, e = "success") {
|
|
364
366
|
return dt({
|
|
365
367
|
message: i,
|
|
366
368
|
type: e
|
|
367
369
|
});
|
|
368
370
|
}
|
|
369
|
-
function
|
|
371
|
+
function ee(i, e, t = !1) {
|
|
370
372
|
let s = !0;
|
|
371
373
|
try {
|
|
372
374
|
i.type === "JSExpression" ? Je(i, e, t, !0) : Wn(i, e, t, !0);
|
|
@@ -378,26 +380,26 @@ function Y(i, e, t = !1) {
|
|
|
378
380
|
}
|
|
379
381
|
return s;
|
|
380
382
|
}
|
|
381
|
-
function
|
|
383
|
+
function sn() {
|
|
382
384
|
const i = se(), e = S(
|
|
383
385
|
() => i.simulator.designer.value
|
|
384
386
|
), t = S(
|
|
385
387
|
() => i.current.value ? i.history.value : null
|
|
386
388
|
), s = S(() => t.value?.items.length || 0), l = () => {
|
|
387
389
|
e.value?.cleanHelper(), t.value?.forward();
|
|
388
|
-
},
|
|
390
|
+
}, a = () => {
|
|
389
391
|
t.value?.backward(), e.value?.cleanHelper();
|
|
390
392
|
}, r = (p) => {
|
|
391
|
-
e.value?.cleanHelper(), t.value?.load(p),
|
|
392
|
-
},
|
|
393
|
+
e.value?.cleanHelper(), t.value?.load(p), ae("已载入历史记录", "success");
|
|
394
|
+
}, o = S(() => s.value <= 1 ? !0 : (t.value?.index || -1) <= 0), u = S(() => s.value <= 1 ? !0 : (t.value?.index || -1) >= s.value - 1);
|
|
393
395
|
return {
|
|
394
396
|
engine: i,
|
|
395
397
|
history: t,
|
|
396
398
|
total: s,
|
|
397
399
|
forward: l,
|
|
398
|
-
backward:
|
|
400
|
+
backward: a,
|
|
399
401
|
load: r,
|
|
400
|
-
forwardDisabled:
|
|
402
|
+
forwardDisabled: o,
|
|
401
403
|
backwardDisabled: u
|
|
402
404
|
};
|
|
403
405
|
}
|
|
@@ -410,51 +412,51 @@ function Ge() {
|
|
|
410
412
|
}
|
|
411
413
|
function rl(i) {
|
|
412
414
|
const e = se(), t = S(() => {
|
|
413
|
-
const
|
|
414
|
-
return U(
|
|
415
|
+
const o = i.value?.model || null;
|
|
416
|
+
return U(o) ? null : o;
|
|
415
417
|
}), s = w();
|
|
416
|
-
|
|
417
|
-
|
|
418
|
+
X(t, async (o) => {
|
|
419
|
+
o?.from ? s.value = await e.assets.getBlockMaterial(o.from) || void 0 : s.value = void 0;
|
|
418
420
|
});
|
|
419
421
|
const l = S(() => {
|
|
420
422
|
if (U(t.value))
|
|
421
423
|
return [];
|
|
422
|
-
const
|
|
424
|
+
const o = t.value?.events || {};
|
|
423
425
|
return Ls.map((u) => ({
|
|
424
426
|
name: u,
|
|
425
|
-
event:
|
|
427
|
+
event: o[u]
|
|
426
428
|
}));
|
|
427
|
-
}),
|
|
429
|
+
}), a = S(() => {
|
|
428
430
|
if (U(t.value))
|
|
429
431
|
return [];
|
|
430
|
-
const
|
|
432
|
+
const o = t.value?.events || {};
|
|
431
433
|
return Js.map((u) => ({
|
|
432
434
|
name: u,
|
|
433
|
-
event:
|
|
435
|
+
event: o[u]
|
|
434
436
|
}));
|
|
435
437
|
}), r = S(() => {
|
|
436
438
|
if (!t.value || U(t.value))
|
|
437
439
|
return [];
|
|
438
|
-
const
|
|
440
|
+
const o = t.value.events || {};
|
|
439
441
|
return (s.value?.events || e.assets.componentMap.get(t.value.name)?.events || []).map((p) => {
|
|
440
442
|
const m = typeof p == "string" ? p : p.name;
|
|
441
443
|
return {
|
|
442
444
|
name: m,
|
|
443
|
-
event:
|
|
445
|
+
event: o[m]
|
|
444
446
|
};
|
|
445
447
|
});
|
|
446
448
|
});
|
|
447
449
|
return {
|
|
448
450
|
mouseEventList: l,
|
|
449
|
-
keyboardEventList:
|
|
451
|
+
keyboardEventList: a,
|
|
450
452
|
componentEventList: r
|
|
451
453
|
};
|
|
452
454
|
}
|
|
453
|
-
const xt = (i, e) => new
|
|
455
|
+
const xt = (i, e) => new Lt({
|
|
454
456
|
name: i,
|
|
455
457
|
value: void 0,
|
|
456
458
|
iterator: e
|
|
457
|
-
}), il = (i = "modelValue") => new
|
|
459
|
+
}), il = (i = "modelValue") => new Lt({
|
|
458
460
|
name: "vModel",
|
|
459
461
|
value: void 0,
|
|
460
462
|
arg: i
|
|
@@ -465,7 +467,7 @@ function ul(i) {
|
|
|
465
467
|
const { props: e = [], events: t = [] } = i;
|
|
466
468
|
if (e.length && t.length) {
|
|
467
469
|
const s = t.filter((l) => (typeof l == "string" ? l : l.name).startsWith("update:")).map((l) => l = typeof l == "string" ? l : l.name);
|
|
468
|
-
return s.length ? e.filter((l) => s.some((
|
|
470
|
+
return s.length ? e.filter((l) => s.some((a) => a.includes(l.name))) : [];
|
|
469
471
|
}
|
|
470
472
|
return [];
|
|
471
473
|
}
|
|
@@ -480,18 +482,18 @@ function cl(i) {
|
|
|
480
482
|
return (d ? ul(d) : []).map((y) => (t.value?.directives || []).find(
|
|
481
483
|
(V) => V.name === "vModel" && V.arg == y.name
|
|
482
484
|
) || il(y.name));
|
|
483
|
-
}),
|
|
484
|
-
vIf:
|
|
485
|
+
}), a = s("vIf"), r = s("vShow"), o = s("vBind"), u = s("vFor"), p = l(), m = {
|
|
486
|
+
vIf: a,
|
|
485
487
|
vShow: r,
|
|
486
|
-
vBind:
|
|
488
|
+
vBind: o,
|
|
487
489
|
vFor: u
|
|
488
490
|
};
|
|
489
491
|
return {
|
|
490
492
|
engine: e,
|
|
491
493
|
node: t,
|
|
492
|
-
vIf:
|
|
494
|
+
vIf: a,
|
|
493
495
|
vShow: r,
|
|
494
|
-
vBind:
|
|
496
|
+
vBind: o,
|
|
495
497
|
vFor: u,
|
|
496
498
|
vModels: p,
|
|
497
499
|
onValueChange: (d, k) => {
|
|
@@ -532,10 +534,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
532
534
|
__name: "index",
|
|
533
535
|
emits: ["click"],
|
|
534
536
|
setup(i, { emit: e }) {
|
|
535
|
-
const t = e, { engine: s } =
|
|
537
|
+
const t = e, { engine: s } = ne(), l = S(() => s.project.value?.name), a = S(() => s.project.value?.currentFile?.title), r = () => {
|
|
536
538
|
t("click", s.project.value);
|
|
537
539
|
};
|
|
538
|
-
return (
|
|
540
|
+
return (o, u) => (c(), j("div", pl, [
|
|
539
541
|
v(n(re), {
|
|
540
542
|
size: "small",
|
|
541
543
|
round: "",
|
|
@@ -544,11 +546,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
544
546
|
default: g(() => [
|
|
545
547
|
v(n(us), { class: "v-switcher-widget__back" }),
|
|
546
548
|
z("span", null, N(l.value), 1),
|
|
547
|
-
|
|
549
|
+
a.value ? (c(), _(n(Le), {
|
|
548
550
|
key: 0,
|
|
549
551
|
direction: "vertical"
|
|
550
552
|
})) : C("", !0),
|
|
551
|
-
|
|
553
|
+
a.value ? (c(), j("span", ml, N(a.value), 1)) : C("", !0)
|
|
552
554
|
]),
|
|
553
555
|
_: 1
|
|
554
556
|
})
|
|
@@ -562,14 +564,14 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
562
564
|
preview: { type: Boolean }
|
|
563
565
|
},
|
|
564
566
|
setup(i, { expose: e }) {
|
|
565
|
-
const t = i, { forward: s, backward: l, forwardDisabled:
|
|
567
|
+
const t = i, { forward: s, backward: l, forwardDisabled: a, backwardDisabled: r } = sn(), o = w("pc");
|
|
566
568
|
return e({
|
|
567
|
-
mode:
|
|
569
|
+
mode: o
|
|
568
570
|
}), (u, p) => (c(), j("div", fl, [
|
|
569
571
|
v(n(fn), {
|
|
570
572
|
size: "small",
|
|
571
|
-
modelValue:
|
|
572
|
-
"onUpdate:modelValue": p[0] || (p[0] = (m) =>
|
|
573
|
+
modelValue: o.value,
|
|
574
|
+
"onUpdate:modelValue": p[0] || (p[0] = (m) => o.value = m)
|
|
573
575
|
}, {
|
|
574
576
|
default: g(() => [
|
|
575
577
|
v(n(Ze), { label: "pc" }, {
|
|
@@ -611,7 +613,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
611
613
|
type: "default",
|
|
612
614
|
size: "small",
|
|
613
615
|
onClick: n(s),
|
|
614
|
-
disabled: n(
|
|
616
|
+
disabled: n(a) || !!t.preview
|
|
615
617
|
}, {
|
|
616
618
|
default: g(() => [
|
|
617
619
|
v(n(vs))
|
|
@@ -632,9 +634,9 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
632
634
|
},
|
|
633
635
|
setup(i) {
|
|
634
636
|
const { engine: e, designer: t } = fe(), s = w(!1), l = () => {
|
|
635
|
-
e.current.value ? (s.value ? e.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (t.value?.setSelected(null), e.simulator.refresh()),
|
|
636
|
-
},
|
|
637
|
-
e.current.value ? (s.value && (e.skeleton?.closePreview(), s.value = !1, await
|
|
637
|
+
e.current.value ? (s.value ? e.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (t.value?.setSelected(null), e.simulator.refresh()), ae("刷新完成", "success")) : ae("请先打开文件", "warning");
|
|
638
|
+
}, a = async () => {
|
|
639
|
+
e.current.value ? (s.value && (e.skeleton?.closePreview(), s.value = !1, await Nt(1e3)), t.value?.setSelected(e.current.value)) : ae("请先打开文件", "warning");
|
|
638
640
|
}, r = () => {
|
|
639
641
|
if (e.project.value)
|
|
640
642
|
if (e.current.value) {
|
|
@@ -644,13 +646,13 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
644
646
|
}
|
|
645
647
|
e.skeleton?.openPreview(""), s.value = !0;
|
|
646
648
|
} else
|
|
647
|
-
|
|
648
|
-
},
|
|
649
|
+
ae("请先打开文件", "warning");
|
|
650
|
+
}, o = () => {
|
|
649
651
|
const p = e.project.value;
|
|
650
|
-
p && (p.currentFile ? p.publish(p.currentFile) :
|
|
652
|
+
p && (p.currentFile ? p.publish(p.currentFile) : ae("请先打开文件", "warning"));
|
|
651
653
|
}, u = (p) => {
|
|
652
654
|
const m = e.project.value;
|
|
653
|
-
m && (p === "current" ?
|
|
655
|
+
m && (p === "current" ? o() : m.publish());
|
|
654
656
|
};
|
|
655
657
|
return (p, m) => (c(), j("div", hl, [
|
|
656
658
|
v(n(hn), {
|
|
@@ -659,7 +661,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
659
661
|
hidden: !0
|
|
660
662
|
}, {
|
|
661
663
|
default: g(() => [
|
|
662
|
-
v(n(
|
|
664
|
+
v(n(ke), {
|
|
663
665
|
mode: "icon",
|
|
664
666
|
icon: n(fs),
|
|
665
667
|
background: "hover"
|
|
@@ -694,7 +696,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
694
696
|
type: "default",
|
|
695
697
|
size: "small",
|
|
696
698
|
title: "页面设置",
|
|
697
|
-
onClick:
|
|
699
|
+
onClick: a
|
|
698
700
|
}, {
|
|
699
701
|
default: g(() => [
|
|
700
702
|
v(n(bs))
|
|
@@ -702,15 +704,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
702
704
|
_: 1
|
|
703
705
|
}),
|
|
704
706
|
v(n(Le), { direction: "vertical" }),
|
|
705
|
-
v(n(
|
|
707
|
+
v(n(Bt), {
|
|
706
708
|
"split-button": "",
|
|
707
709
|
type: "primary",
|
|
708
710
|
size: "small",
|
|
709
|
-
onClick:
|
|
711
|
+
onClick: o,
|
|
710
712
|
onCommand: u
|
|
711
713
|
}, {
|
|
712
714
|
dropdown: g(() => [
|
|
713
|
-
v(n(
|
|
715
|
+
v(n(Tt), null, {
|
|
714
716
|
default: g(() => [
|
|
715
717
|
v(n(nt), { command: "current" }, {
|
|
716
718
|
default: g(() => [
|
|
@@ -735,7 +737,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
735
737
|
})
|
|
736
738
|
]));
|
|
737
739
|
}
|
|
738
|
-
}), yl = { class: "v-icon-setter" }, kl = { class: "v-icon-setter__content" }, wl = { class: "v-icon-setter__list" },
|
|
740
|
+
}), yl = { class: "v-icon-setter" }, kl = { class: "v-icon-setter__content" }, wl = { class: "v-icon-setter__list" }, ln = /* @__PURE__ */ E({
|
|
739
741
|
name: "IconSetter",
|
|
740
742
|
__name: "icon",
|
|
741
743
|
props: {
|
|
@@ -744,17 +746,17 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
744
746
|
},
|
|
745
747
|
emits: ["change", "update:modelValue"],
|
|
746
748
|
setup(i, { emit: e }) {
|
|
747
|
-
const t = i, s = e, l = w(!1),
|
|
749
|
+
const t = i, s = e, l = w(!1), a = w(t.modelValue), r = w(""), o = S(
|
|
748
750
|
() => it[t.modelValue] || t.modelValue
|
|
749
751
|
), u = S(() => {
|
|
750
752
|
const h = Object.entries(it);
|
|
751
753
|
return r.value ? h.filter((d) => d[0].toLowerCase().includes(r.value)) : h;
|
|
752
754
|
}), p = (h) => {
|
|
753
|
-
|
|
755
|
+
a.value = h;
|
|
754
756
|
}, m = () => {
|
|
755
|
-
s("change",
|
|
757
|
+
s("change", a.value), s("update:modelValue", a.value), l.value = !1;
|
|
756
758
|
}, f = () => {
|
|
757
|
-
|
|
759
|
+
a.value = "", s("change", ""), s("update:modelValue", ""), l.value = !1;
|
|
758
760
|
}, b = () => {
|
|
759
761
|
l.value = !0;
|
|
760
762
|
};
|
|
@@ -768,7 +770,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
768
770
|
onFocus: b
|
|
769
771
|
}, {
|
|
770
772
|
prepend: g(() => [
|
|
771
|
-
v(n(De), { icon:
|
|
773
|
+
v(n(De), { icon: o.value }, null, 8, ["icon"])
|
|
772
774
|
]),
|
|
773
775
|
_: 1
|
|
774
776
|
}, 8, ["size", "model-value", "suffix-icon"]),
|
|
@@ -800,7 +802,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
800
802
|
z("div", kl, [
|
|
801
803
|
v(n(pe), {
|
|
802
804
|
size: t.size,
|
|
803
|
-
"prefix-icon": n(
|
|
805
|
+
"prefix-icon": n(Ut),
|
|
804
806
|
clearable: "",
|
|
805
807
|
modelValue: r.value,
|
|
806
808
|
"onUpdate:modelValue": d[0] || (d[0] = (k) => r.value = k),
|
|
@@ -810,7 +812,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
810
812
|
(c(!0), j($, null, B(u.value, (k) => (c(), _(n(De), {
|
|
811
813
|
icon: k[1],
|
|
812
814
|
onClick: (y) => p(k[0]),
|
|
813
|
-
class:
|
|
815
|
+
class: te({ "is-active": a.value === k[0] })
|
|
814
816
|
}, null, 8, ["icon", "onClick", "class"]))), 256)),
|
|
815
817
|
u.value.length === 0 ? (c(), _(n(Z), { key: 0 })) : C("", !0)
|
|
816
818
|
])
|
|
@@ -836,18 +838,18 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
836
838
|
mask: !0,
|
|
837
839
|
hidden: !1,
|
|
838
840
|
raw: !1
|
|
839
|
-
}),
|
|
841
|
+
}), a = w(e.item || l()), r = [
|
|
840
842
|
{ label: "页面", value: !1 },
|
|
841
843
|
{ label: "目录", value: !0 }
|
|
842
|
-
],
|
|
843
|
-
|
|
844
|
+
], o = (p) => {
|
|
845
|
+
a.value && (a.value.name = Ot(p));
|
|
844
846
|
}, u = async (p) => t.value?.existPageName(p.name, [p.id]) ? (Q("页面名称已存在,请更换"), !1) : (e.item ? t.value?.updatePage(p) : t.value?.createPage(p, e.parentId), !0);
|
|
845
847
|
return (p, m) => (c(), _(n(ce), {
|
|
846
848
|
title: s.value,
|
|
847
849
|
width: "800px",
|
|
848
850
|
height: "500px",
|
|
849
851
|
"form-props": { tooltipMessage: !1 },
|
|
850
|
-
model:
|
|
852
|
+
model: a.value,
|
|
851
853
|
"submit-method": u
|
|
852
854
|
}, {
|
|
853
855
|
default: g(() => [
|
|
@@ -864,7 +866,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
864
866
|
name: "name",
|
|
865
867
|
label: "名称",
|
|
866
868
|
required: "",
|
|
867
|
-
onChange:
|
|
869
|
+
onChange: o,
|
|
868
870
|
rules: { pattern: n(ve), message: "名称格式不正确" }
|
|
869
871
|
}, null, 8, ["rules"]),
|
|
870
872
|
v(n(P), {
|
|
@@ -878,9 +880,9 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
878
880
|
editor: "none"
|
|
879
881
|
}, {
|
|
880
882
|
editor: g(() => [
|
|
881
|
-
v(
|
|
882
|
-
modelValue:
|
|
883
|
-
"onUpdate:modelValue": m[0] || (m[0] = (f) =>
|
|
883
|
+
v(ln, {
|
|
884
|
+
modelValue: a.value.icon,
|
|
885
|
+
"onUpdate:modelValue": m[0] || (m[0] = (f) => a.value.icon = f),
|
|
884
886
|
size: "default"
|
|
885
887
|
}, null, 8, ["modelValue"])
|
|
886
888
|
]),
|
|
@@ -924,10 +926,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
924
926
|
const t = i, s = e, l = S(() => ({
|
|
925
927
|
"is-active": t.active,
|
|
926
928
|
"is-open": t.open
|
|
927
|
-
})),
|
|
929
|
+
})), a = () => {
|
|
928
930
|
s("click");
|
|
929
931
|
};
|
|
930
|
-
return (r,
|
|
932
|
+
return (r, o) => (c(), _(n(Ft), {
|
|
931
933
|
effect: "dark",
|
|
932
934
|
placement: "right",
|
|
933
935
|
content: r.label,
|
|
@@ -935,10 +937,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
935
937
|
}, {
|
|
936
938
|
default: g(() => [
|
|
937
939
|
z("div", {
|
|
938
|
-
class:
|
|
939
|
-
onClick:
|
|
940
|
+
class: te(["v-apps-region__icon", l.value]),
|
|
941
|
+
onClick: a
|
|
940
942
|
}, [
|
|
941
|
-
(c(), _(
|
|
943
|
+
(c(), _(jt(r.icon)))
|
|
942
944
|
], 2)
|
|
943
945
|
]),
|
|
944
946
|
_: 1
|
|
@@ -960,17 +962,17 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
960
962
|
setup(i, { emit: e }) {
|
|
961
963
|
const t = i, s = e, l = () => {
|
|
962
964
|
s("plus");
|
|
963
|
-
},
|
|
965
|
+
}, a = () => {
|
|
964
966
|
s("back");
|
|
965
967
|
}, r = () => {
|
|
966
968
|
s("remove");
|
|
967
|
-
},
|
|
969
|
+
}, o = () => {
|
|
968
970
|
s("save");
|
|
969
971
|
}, u = S(() => t.header ? {
|
|
970
972
|
content: t.title,
|
|
971
973
|
subtitle: t.subtitle,
|
|
972
974
|
icon: t.back ? ys : void 0,
|
|
973
|
-
onClickBack: t.back ?
|
|
975
|
+
onClickBack: t.back ? a : void 0
|
|
974
976
|
} : null);
|
|
975
977
|
return (p, m) => (c(), _(n(mt), {
|
|
976
978
|
class: "v-panel",
|
|
@@ -979,16 +981,16 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
979
981
|
fit: ""
|
|
980
982
|
}, cn({
|
|
981
983
|
actions: g(() => [
|
|
982
|
-
t.plus ? (c(), _(n(
|
|
984
|
+
t.plus ? (c(), _(n(ke), {
|
|
983
985
|
key: 0,
|
|
984
986
|
size: p.$attrs.size,
|
|
985
987
|
mode: "icon",
|
|
986
|
-
icon: n(
|
|
988
|
+
icon: n(Ht),
|
|
987
989
|
background: "hover",
|
|
988
990
|
title: "新增",
|
|
989
991
|
onClick: l
|
|
990
992
|
}, null, 8, ["size", "icon"])) : C("", !0),
|
|
991
|
-
t.remove ? (c(), _(n(
|
|
993
|
+
t.remove ? (c(), _(n(ke), {
|
|
992
994
|
key: 1,
|
|
993
995
|
size: p.$attrs.size,
|
|
994
996
|
mode: "icon",
|
|
@@ -997,14 +999,14 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
997
999
|
title: "清除",
|
|
998
1000
|
onClick: r
|
|
999
1001
|
}, null, 8, ["size", "icon"])) : C("", !0),
|
|
1000
|
-
t.save ? (c(), _(n(
|
|
1002
|
+
t.save ? (c(), _(n(ke), {
|
|
1001
1003
|
key: 2,
|
|
1002
1004
|
size: p.$attrs.size,
|
|
1003
1005
|
mode: "icon",
|
|
1004
1006
|
icon: n(ws),
|
|
1005
1007
|
background: "hover",
|
|
1006
1008
|
title: "保存",
|
|
1007
|
-
onClick:
|
|
1009
|
+
onClick: o
|
|
1008
1010
|
}, null, 8, ["size", "icon"])) : C("", !0),
|
|
1009
1011
|
de(p.$slots, "actions")
|
|
1010
1012
|
]),
|
|
@@ -1039,20 +1041,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1039
1041
|
const t = i, s = e, l = w(
|
|
1040
1042
|
(t.modelValue || t.items[0]?.name) ?? ""
|
|
1041
1043
|
);
|
|
1042
|
-
|
|
1044
|
+
X(l, () => {
|
|
1043
1045
|
s("update:modelValue", l.value);
|
|
1044
|
-
}),
|
|
1046
|
+
}), X(
|
|
1045
1047
|
() => t.modelValue,
|
|
1046
|
-
(
|
|
1047
|
-
l.value =
|
|
1048
|
+
(o) => {
|
|
1049
|
+
l.value = o;
|
|
1048
1050
|
}
|
|
1049
1051
|
);
|
|
1050
|
-
const
|
|
1051
|
-
s("command",
|
|
1052
|
-
}, r = (
|
|
1053
|
-
s("remove",
|
|
1052
|
+
const a = (o) => {
|
|
1053
|
+
s("command", o);
|
|
1054
|
+
}, r = (o) => {
|
|
1055
|
+
s("remove", o);
|
|
1054
1056
|
};
|
|
1055
|
-
return (
|
|
1057
|
+
return (o, u) => (c(), _(n(mt), {
|
|
1056
1058
|
class: "v-tabs",
|
|
1057
1059
|
border: !1,
|
|
1058
1060
|
fit: "",
|
|
@@ -1060,7 +1062,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1060
1062
|
}, {
|
|
1061
1063
|
header: g(() => [
|
|
1062
1064
|
z("div", Vl, [
|
|
1063
|
-
v(n(
|
|
1065
|
+
v(n(Mt), {
|
|
1064
1066
|
class: "v-tabs__tabs",
|
|
1065
1067
|
items: t.items,
|
|
1066
1068
|
type: "card",
|
|
@@ -1070,7 +1072,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1070
1072
|
stretch: t.stretch
|
|
1071
1073
|
}, null, 8, ["items", "modelValue", "stretch"]),
|
|
1072
1074
|
t.menus && t.menus.length ? (c(), j("div", xl, [
|
|
1073
|
-
t.menus && t.menus.length ? (c(), _(n(
|
|
1075
|
+
t.menus && t.menus.length ? (c(), _(n(ke), {
|
|
1074
1076
|
key: 0,
|
|
1075
1077
|
mode: "icon",
|
|
1076
1078
|
size: "small",
|
|
@@ -1081,13 +1083,13 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1081
1083
|
placement: "bottom-end"
|
|
1082
1084
|
},
|
|
1083
1085
|
menus: t.menus,
|
|
1084
|
-
onCommand:
|
|
1086
|
+
onCommand: a
|
|
1085
1087
|
}, {
|
|
1086
1088
|
item: g(({ item: p }) => [
|
|
1087
1089
|
z("span", null, [
|
|
1088
|
-
t.checkable ? (c(), _(n(
|
|
1090
|
+
t.checkable ? (c(), _(n(qt), {
|
|
1089
1091
|
key: 0,
|
|
1090
|
-
class:
|
|
1092
|
+
class: te({
|
|
1091
1093
|
"v-tabs__checked": !0,
|
|
1092
1094
|
"is-checked": p.checked
|
|
1093
1095
|
})
|
|
@@ -1101,7 +1103,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1101
1103
|
])
|
|
1102
1104
|
]),
|
|
1103
1105
|
default: g(() => [
|
|
1104
|
-
de(
|
|
1106
|
+
de(o.$slots, "default")
|
|
1105
1107
|
]),
|
|
1106
1108
|
_: 3
|
|
1107
1109
|
}));
|
|
@@ -1112,7 +1114,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1112
1114
|
}, El = { class: "v-item__content" }, jl = {
|
|
1113
1115
|
key: 3,
|
|
1114
1116
|
class: "v-item__subtitle"
|
|
1115
|
-
},
|
|
1117
|
+
}, Y = /* @__PURE__ */ E({
|
|
1116
1118
|
name: "VItem",
|
|
1117
1119
|
__name: "item",
|
|
1118
1120
|
props: {
|
|
@@ -1136,15 +1138,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1136
1138
|
const t = {
|
|
1137
1139
|
add: {
|
|
1138
1140
|
label: "创建",
|
|
1139
|
-
icon:
|
|
1141
|
+
icon: Ht
|
|
1140
1142
|
},
|
|
1141
1143
|
copy: {
|
|
1142
1144
|
label: "复制",
|
|
1143
|
-
icon:
|
|
1145
|
+
icon: Gt
|
|
1144
1146
|
},
|
|
1145
1147
|
edit: {
|
|
1146
1148
|
label: "编辑",
|
|
1147
|
-
icon:
|
|
1149
|
+
icon: Kt
|
|
1148
1150
|
},
|
|
1149
1151
|
remove: {
|
|
1150
1152
|
label: "删除",
|
|
@@ -1152,7 +1154,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1152
1154
|
},
|
|
1153
1155
|
lock: {
|
|
1154
1156
|
label: "锁定",
|
|
1155
|
-
icon:
|
|
1157
|
+
icon: Zt
|
|
1156
1158
|
},
|
|
1157
1159
|
unlock: {
|
|
1158
1160
|
label: "解锁",
|
|
@@ -1160,7 +1162,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1160
1162
|
},
|
|
1161
1163
|
invisible: {
|
|
1162
1164
|
label: "隐藏",
|
|
1163
|
-
icon:
|
|
1165
|
+
icon: Qt
|
|
1164
1166
|
},
|
|
1165
1167
|
visible: {
|
|
1166
1168
|
label: "显示",
|
|
@@ -1170,13 +1172,13 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1170
1172
|
label: "主页",
|
|
1171
1173
|
icon: xs
|
|
1172
1174
|
}
|
|
1173
|
-
}, s = i, l = e,
|
|
1175
|
+
}, s = i, l = e, a = w(!!s.modelValue), r = S(() => s.actions.map((m) => {
|
|
1174
1176
|
const f = t[m];
|
|
1175
1177
|
return {
|
|
1176
1178
|
name: m,
|
|
1177
1179
|
...f
|
|
1178
1180
|
};
|
|
1179
|
-
})),
|
|
1181
|
+
})), o = S(() => ({
|
|
1180
1182
|
"is-background": s.background,
|
|
1181
1183
|
"is-border": s.border,
|
|
1182
1184
|
"is-active": s.active,
|
|
@@ -1195,15 +1197,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1195
1197
|
modelValue: s.modelValue
|
|
1196
1198
|
});
|
|
1197
1199
|
};
|
|
1198
|
-
return
|
|
1200
|
+
return X(a, (m) => {
|
|
1199
1201
|
l("update:modelValue", m), l("switch", m);
|
|
1200
|
-
}),
|
|
1202
|
+
}), X(
|
|
1201
1203
|
() => s.modelValue,
|
|
1202
1204
|
(m) => {
|
|
1203
|
-
|
|
1205
|
+
a.value = !!m;
|
|
1204
1206
|
}
|
|
1205
1207
|
), (m, f) => (c(), _(n(O), {
|
|
1206
|
-
class:
|
|
1208
|
+
class: te(["v-item", o.value]),
|
|
1207
1209
|
justify: "space-between",
|
|
1208
1210
|
align: "center",
|
|
1209
1211
|
onClick: u
|
|
@@ -1243,7 +1245,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1243
1245
|
}, ["stop"]))
|
|
1244
1246
|
}, {
|
|
1245
1247
|
default: g(() => [
|
|
1246
|
-
(c(!0), j($, null, B(r.value, (b) => (c(), _(n(
|
|
1248
|
+
(c(!0), j($, null, B(r.value, (b) => (c(), _(n(ke), {
|
|
1247
1249
|
name: b.name,
|
|
1248
1250
|
title: b.label,
|
|
1249
1251
|
mode: "icon",
|
|
@@ -1253,10 +1255,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1253
1255
|
icon: b.icon,
|
|
1254
1256
|
onClick: (h) => p(b.name)
|
|
1255
1257
|
}, null, 8, ["name", "title", "icon", "onClick"]))), 256)),
|
|
1256
|
-
s.switch ? (c(), _(n(
|
|
1258
|
+
s.switch ? (c(), _(n(zt), {
|
|
1257
1259
|
key: 0,
|
|
1258
|
-
modelValue:
|
|
1259
|
-
"onUpdate:modelValue": f[0] || (f[0] = (b) =>
|
|
1260
|
+
modelValue: a.value,
|
|
1261
|
+
"onUpdate:modelValue": f[0] || (f[0] = (b) => a.value = b),
|
|
1260
1262
|
class: "v-item__switch",
|
|
1261
1263
|
size: "small"
|
|
1262
1264
|
}, null, 8, ["modelValue"])) : C("", !0),
|
|
@@ -1282,22 +1284,22 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1282
1284
|
setup(i, { emit: e }) {
|
|
1283
1285
|
const t = i, s = e, l = () => {
|
|
1284
1286
|
s("edit");
|
|
1285
|
-
},
|
|
1287
|
+
}, a = async () => {
|
|
1286
1288
|
await ct.confirm("确认删除?", "提示", {
|
|
1287
1289
|
type: "warning"
|
|
1288
1290
|
}).catch(() => !1) && s("remove");
|
|
1289
1291
|
}, r = S(() => ({
|
|
1290
1292
|
"is-active": t.active,
|
|
1291
1293
|
"is-draggable": t.draggable
|
|
1292
|
-
})),
|
|
1294
|
+
})), o = () => {
|
|
1293
1295
|
s("dragstart", t);
|
|
1294
1296
|
}, u = () => {
|
|
1295
1297
|
s("dragend", t);
|
|
1296
1298
|
};
|
|
1297
1299
|
return (p, m) => (c(), j("div", {
|
|
1298
|
-
class:
|
|
1300
|
+
class: te(["v-box", r.value]),
|
|
1299
1301
|
draggable: p.draggable,
|
|
1300
|
-
onDragstart:
|
|
1302
|
+
onDragstart: o,
|
|
1301
1303
|
onDragend: u
|
|
1302
1304
|
}, [
|
|
1303
1305
|
v(n(O), {
|
|
@@ -1319,12 +1321,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1319
1321
|
}, {
|
|
1320
1322
|
default: g(() => [
|
|
1321
1323
|
v(n(De), {
|
|
1322
|
-
icon: n(
|
|
1324
|
+
icon: n(Kt),
|
|
1323
1325
|
onClick: l
|
|
1324
1326
|
}, null, 8, ["icon"]),
|
|
1325
1327
|
v(n(De), {
|
|
1326
1328
|
icon: n(qe),
|
|
1327
|
-
onClick:
|
|
1329
|
+
onClick: a
|
|
1328
1330
|
}, null, 8, ["icon"])
|
|
1329
1331
|
]),
|
|
1330
1332
|
_: 1
|
|
@@ -1338,7 +1340,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1338
1340
|
},
|
|
1339
1341
|
emits: ["pick", "copy"],
|
|
1340
1342
|
setup(i, { emit: e }) {
|
|
1341
|
-
const t = i, s = e, l = ["$provider", "$apis", "$components", "context"],
|
|
1343
|
+
const t = i, s = e, l = ["$provider", "$apis", "$components", "context"], a = (m) => {
|
|
1342
1344
|
const f = m.value, b = Qe(f);
|
|
1343
1345
|
return b === "Object" || b === "Module" ? Object.keys(f || {}).length === 0 : b === "Array" ? f.length === 0 : !0;
|
|
1344
1346
|
}, r = (m, f = "this") => typeof m == "object" ? Array.isArray(m) ? m.map((b, h) => {
|
|
@@ -1356,7 +1358,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1356
1358
|
path: `${f}.${b}`
|
|
1357
1359
|
})).filter(
|
|
1358
1360
|
(b) => !b.label.startsWith("__") && !l.includes(b.label)
|
|
1359
|
-
) : [],
|
|
1361
|
+
) : [], o = (m, f) => {
|
|
1360
1362
|
if (m.level === 0)
|
|
1361
1363
|
f(r(t.context));
|
|
1362
1364
|
else {
|
|
@@ -1372,12 +1374,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1372
1374
|
m.context ? (c(), _(n(pt), {
|
|
1373
1375
|
key: 0,
|
|
1374
1376
|
lazy: "",
|
|
1375
|
-
load:
|
|
1377
|
+
load: o,
|
|
1376
1378
|
"expand-on-click-node": !1,
|
|
1377
|
-
props: { isLeaf:
|
|
1379
|
+
props: { isLeaf: a }
|
|
1378
1380
|
}, {
|
|
1379
1381
|
default: g(({ data: b }) => [
|
|
1380
|
-
v(
|
|
1382
|
+
v(Y, {
|
|
1381
1383
|
title: b.label,
|
|
1382
1384
|
clickable: "",
|
|
1383
1385
|
onClick: (h) => p(b),
|
|
@@ -1413,7 +1415,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1413
1415
|
"close"
|
|
1414
1416
|
],
|
|
1415
1417
|
setup(i, { emit: e }) {
|
|
1416
|
-
const t = i, s = e, { searchResult: l, keyword:
|
|
1418
|
+
const t = i, s = e, { searchResult: l, keyword: a } = al(t.block, t.context), { copy: r } = Os({}), o = [
|
|
1417
1419
|
{
|
|
1418
1420
|
name: "normal",
|
|
1419
1421
|
label: "常用"
|
|
@@ -1464,7 +1466,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1464
1466
|
default: g(() => [
|
|
1465
1467
|
v(Ke, {
|
|
1466
1468
|
class: "v-binder__tabs",
|
|
1467
|
-
items:
|
|
1469
|
+
items: o,
|
|
1468
1470
|
modelValue: u.value,
|
|
1469
1471
|
"onUpdate:modelValue": x[1] || (x[1] = (D) => u.value = D)
|
|
1470
1472
|
}, {
|
|
@@ -1478,11 +1480,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1478
1480
|
default: g(() => [
|
|
1479
1481
|
Ae(z("div", null, [
|
|
1480
1482
|
v(n(pe), {
|
|
1481
|
-
modelValue: n(
|
|
1482
|
-
"onUpdate:modelValue": x[0] || (x[0] = (D) => tt(
|
|
1483
|
+
modelValue: n(a),
|
|
1484
|
+
"onUpdate:modelValue": x[0] || (x[0] = (D) => tt(a) ? a.value = D : null),
|
|
1483
1485
|
size: "small",
|
|
1484
1486
|
clearable: "",
|
|
1485
|
-
"prefix-icon": n(
|
|
1487
|
+
"prefix-icon": n(Ut),
|
|
1486
1488
|
placeholder: "筛选可用项"
|
|
1487
1489
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
|
1488
1490
|
(c(!0), j($, null, B(n(l), (D) => (c(), j("div", null, [
|
|
@@ -1492,7 +1494,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1492
1494
|
]),
|
|
1493
1495
|
_: 2
|
|
1494
1496
|
}, 1024),
|
|
1495
|
-
(c(!0), j($, null, B(D.items, (F) => (c(), _(
|
|
1497
|
+
(c(!0), j($, null, B(D.items, (F) => (c(), _(Y, {
|
|
1496
1498
|
title: F,
|
|
1497
1499
|
background: "",
|
|
1498
1500
|
actions: ["copy"],
|
|
@@ -1608,19 +1610,19 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1608
1610
|
},
|
|
1609
1611
|
emits: ["submit", "update:modelValue"],
|
|
1610
1612
|
setup(i, { emit: e }) {
|
|
1611
|
-
const t = i, s = e, l = w(),
|
|
1613
|
+
const t = i, s = e, l = w(), a = S(() => `${50 * Math.ceil(t.slots.length / 4) + 180}px`), r = (u) => {
|
|
1612
1614
|
l.value = u;
|
|
1613
|
-
},
|
|
1615
|
+
}, o = () => {
|
|
1614
1616
|
l.value ? (s("submit", l.value), s("update:modelValue", !1)) : Q("请选择插槽");
|
|
1615
1617
|
};
|
|
1616
1618
|
return (u, p) => (c(), _(n($e), ue({
|
|
1617
1619
|
class: "v-slots-picker",
|
|
1618
1620
|
title: "选择插槽",
|
|
1619
1621
|
width: "600px",
|
|
1620
|
-
height:
|
|
1622
|
+
height: a.value,
|
|
1621
1623
|
submit: "",
|
|
1622
1624
|
cancel: "",
|
|
1623
|
-
onSubmit:
|
|
1625
|
+
onSubmit: o
|
|
1624
1626
|
}, u.$attrs), {
|
|
1625
1627
|
default: g(() => [
|
|
1626
1628
|
v(n(_n), {
|
|
@@ -1637,7 +1639,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1637
1639
|
}, {
|
|
1638
1640
|
default: g(() => [
|
|
1639
1641
|
(c(!0), j($, null, B(t.slots, (m, f) => (c(), _(n(O), {
|
|
1640
|
-
class:
|
|
1642
|
+
class: te(["v-slots-picker__item", { "is-active": m.name === l.value?.name }]),
|
|
1641
1643
|
grow: "",
|
|
1642
1644
|
flex: !1,
|
|
1643
1645
|
onClick: (b) => r(m)
|
|
@@ -1667,36 +1669,36 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1667
1669
|
const e = i, t = S(() => [`is-${e.mode}`]), s = S(() => {
|
|
1668
1670
|
if (e.mode === "pc")
|
|
1669
1671
|
return 1;
|
|
1670
|
-
const
|
|
1672
|
+
const a = e.mode === "mobile" ? St : Vt, { width: r, height: o } = a, u = r > 0 ? (e.width || 0) / r : 1, p = o > 0 ? (e.height || 0) / o : 1;
|
|
1671
1673
|
return Math.min(u, p);
|
|
1672
1674
|
}), l = S(() => {
|
|
1673
1675
|
if (e.mode === "pc")
|
|
1674
1676
|
return {};
|
|
1675
|
-
const
|
|
1677
|
+
const a = e.mode === "mobile" ? St : Vt, { width: r, height: o } = a;
|
|
1676
1678
|
return {
|
|
1677
1679
|
width: `${r}px`,
|
|
1678
|
-
height: `${
|
|
1680
|
+
height: `${o}px`,
|
|
1679
1681
|
left: "50%",
|
|
1680
1682
|
top: "50%",
|
|
1681
1683
|
transform: `translate(-50%, -50%) scale(${s.value})`
|
|
1682
1684
|
};
|
|
1683
1685
|
});
|
|
1684
|
-
return (
|
|
1685
|
-
class:
|
|
1686
|
+
return (a, r) => (c(), j("div", {
|
|
1687
|
+
class: te(["v-viewport", t.value]),
|
|
1686
1688
|
style: Fe(l.value)
|
|
1687
1689
|
}, [
|
|
1688
|
-
de(
|
|
1690
|
+
de(a.$slots, "default")
|
|
1689
1691
|
], 6));
|
|
1690
1692
|
}
|
|
1691
1693
|
}), Tl = /* @__PURE__ */ E({
|
|
1692
1694
|
name: "PagesWidget",
|
|
1693
1695
|
__name: "index",
|
|
1694
1696
|
setup(i) {
|
|
1695
|
-
const { project: e, engine: t } = Ge(), s = S(() => e.value?.pages || []), { current: l } =
|
|
1696
|
-
|
|
1697
|
+
const { project: e, engine: t } = Ge(), s = S(() => e.value?.pages || []), { current: l } = ne(), a = w(!1), r = w(), o = w(), u = () => {
|
|
1698
|
+
o.value = void 0, r.value = void 0, a.value = !0;
|
|
1697
1699
|
}, p = async (h) => {
|
|
1698
1700
|
const { name: d, modelValue: k } = h, { data: y, node: V } = k;
|
|
1699
|
-
if (d === "add" && (r.value = void 0,
|
|
1701
|
+
if (d === "add" && (r.value = void 0, o.value = y.id, a.value = !0), d === "edit" && (r.value = He(y), o.value = void 0, a.value = !0), d === "remove") {
|
|
1700
1702
|
if (y.dir) {
|
|
1701
1703
|
const x = e.value?.getPage(y.id);
|
|
1702
1704
|
if (x && x.children?.length) {
|
|
@@ -1710,9 +1712,9 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1710
1712
|
const x = V.parent?.data.id;
|
|
1711
1713
|
e.value?.clonePage(y, x);
|
|
1712
1714
|
}
|
|
1713
|
-
d === "home" && (e.value?.setHomepage(y.id),
|
|
1715
|
+
d === "home" && (e.value?.setHomepage(y.id), ae("设置主页成功", "success"));
|
|
1714
1716
|
}, m = async (h) => {
|
|
1715
|
-
h.raw &&
|
|
1717
|
+
h.raw && ae("这是源码模式页面,不能低代码设计", "warning"), h.dir || h.raw ? t.project.value?.deactivate() : t.project.value?.active(h);
|
|
1716
1718
|
}, f = (h, d, k) => k === "inner" ? !!d.data.dir : !0, b = () => {
|
|
1717
1719
|
e.value?.update({
|
|
1718
1720
|
pages: et(s)
|
|
@@ -1735,7 +1737,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1735
1737
|
onNodeDrop: b
|
|
1736
1738
|
}, {
|
|
1737
1739
|
default: g(({ data: k, node: y }) => [
|
|
1738
|
-
v(n(
|
|
1740
|
+
v(n(Y), {
|
|
1739
1741
|
class: "v-pages-widget__item",
|
|
1740
1742
|
icon: n(it)[k.icon],
|
|
1741
1743
|
title: k.title,
|
|
@@ -1755,12 +1757,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1755
1757
|
]),
|
|
1756
1758
|
_: 1
|
|
1757
1759
|
}, 8, ["data"]),
|
|
1758
|
-
|
|
1760
|
+
a.value ? (c(), _(Sl, {
|
|
1759
1761
|
key: 0,
|
|
1760
|
-
modelValue:
|
|
1761
|
-
"onUpdate:modelValue": d[0] || (d[0] = (k) =>
|
|
1762
|
+
modelValue: a.value,
|
|
1763
|
+
"onUpdate:modelValue": d[0] || (d[0] = (k) => a.value = k),
|
|
1762
1764
|
item: r.value,
|
|
1763
|
-
"parent-id":
|
|
1765
|
+
"parent-id": o.value
|
|
1764
1766
|
}, null, 8, ["modelValue", "item", "parent-id"])) : C("", !0)
|
|
1765
1767
|
]),
|
|
1766
1768
|
_: 1
|
|
@@ -1770,7 +1772,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1770
1772
|
name: "BlocksWidget",
|
|
1771
1773
|
__name: "index",
|
|
1772
1774
|
setup(i) {
|
|
1773
|
-
const { span: e } =
|
|
1775
|
+
const { span: e } = nn(), { blocks: t, engine: s } = Ys(), l = w(void 0), { current: a } = ne(), r = w(!1), o = S(() => l.value?.id ? "编辑" : "新增"), u = S(() => `(共 ${t.value.length} 个)`), p = () => ({
|
|
1774
1776
|
name: "",
|
|
1775
1777
|
title: "",
|
|
1776
1778
|
type: "block"
|
|
@@ -1795,7 +1797,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1795
1797
|
}, h = (x) => {
|
|
1796
1798
|
s.project.value?.removeBlock(x.id);
|
|
1797
1799
|
}, d = (x) => {
|
|
1798
|
-
l.value && (l.value.name =
|
|
1800
|
+
l.value && (l.value.name = Ot(x));
|
|
1799
1801
|
}, k = async (x) => {
|
|
1800
1802
|
s.project.value?.active(x);
|
|
1801
1803
|
}, y = async (x) => {
|
|
@@ -1829,12 +1831,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1829
1831
|
v(n(ut), {
|
|
1830
1832
|
name: F.name,
|
|
1831
1833
|
title: F.title,
|
|
1832
|
-
active: n(
|
|
1834
|
+
active: n(a)?.id === F.id,
|
|
1833
1835
|
editable: "",
|
|
1834
1836
|
onEdit: (A) => b(F),
|
|
1835
1837
|
onRemove: (A) => h(F),
|
|
1836
1838
|
onClick: (A) => k(F),
|
|
1837
|
-
draggable: n(
|
|
1839
|
+
draggable: n(a)?.id !== F.id,
|
|
1838
1840
|
onDragstart: (A) => y(F),
|
|
1839
1841
|
onDragend: V
|
|
1840
1842
|
}, null, 8, ["name", "title", "active", "onEdit", "onRemove", "onClick", "draggable", "onDragstart"])
|
|
@@ -1848,7 +1850,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1848
1850
|
v(n(ce), {
|
|
1849
1851
|
modelValue: r.value,
|
|
1850
1852
|
"onUpdate:modelValue": D[0] || (D[0] = (F) => r.value = F),
|
|
1851
|
-
title:
|
|
1853
|
+
title: o.value,
|
|
1852
1854
|
model: l.value,
|
|
1853
1855
|
width: "600px",
|
|
1854
1856
|
height: "250px",
|
|
@@ -1886,7 +1888,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1886
1888
|
name: "ComponentsWidget",
|
|
1887
1889
|
__name: "index",
|
|
1888
1890
|
setup(i) {
|
|
1889
|
-
const { span: e, engine: t } =
|
|
1891
|
+
const { span: e, engine: t } = nn(), { tabs: s, currentTab: l, currentGroup: a, model: r, searchKey: o, searchResult: u } = tl(), p = (f) => {
|
|
1890
1892
|
const b = t.skeleton?.getWidget("Designer")?.widgetRef?.designer;
|
|
1891
1893
|
b && b.setDragging(f);
|
|
1892
1894
|
}, m = () => {
|
|
@@ -1901,8 +1903,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1901
1903
|
default: g(() => [
|
|
1902
1904
|
z("div", zl, [
|
|
1903
1905
|
v(n(pe), {
|
|
1904
|
-
modelValue: n(
|
|
1905
|
-
"onUpdate:modelValue": b[0] || (b[0] = (h) => tt(
|
|
1906
|
+
modelValue: n(o),
|
|
1907
|
+
"onUpdate:modelValue": b[0] || (b[0] = (h) => tt(o) ? o.value = h : null),
|
|
1906
1908
|
placeholder: "搜索组件",
|
|
1907
1909
|
clearable: "",
|
|
1908
1910
|
size: "small"
|
|
@@ -1913,7 +1915,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1913
1915
|
_: 1
|
|
1914
1916
|
}, 8, ["modelValue"])
|
|
1915
1917
|
]),
|
|
1916
|
-
n(
|
|
1918
|
+
n(o) ? (c(), j("div", Ml, [
|
|
1917
1919
|
v(n(st), {
|
|
1918
1920
|
wrap: "wrap",
|
|
1919
1921
|
gutter: 5
|
|
@@ -1938,7 +1940,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1938
1940
|
_: 1
|
|
1939
1941
|
}),
|
|
1940
1942
|
n(u).length ? C("", !0) : (c(), _(n(Z), { key: 0 }))
|
|
1941
|
-
])) : (c(), _(n(
|
|
1943
|
+
])) : (c(), _(n(Mt), {
|
|
1942
1944
|
key: 1,
|
|
1943
1945
|
items: n(s),
|
|
1944
1946
|
modelValue: n(l),
|
|
@@ -1946,13 +1948,13 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
1946
1948
|
}, {
|
|
1947
1949
|
default: g(() => [
|
|
1948
1950
|
z("div", Nl, [
|
|
1949
|
-
n(
|
|
1951
|
+
n(a) ? (c(), _(n(yn), {
|
|
1950
1952
|
key: 0,
|
|
1951
1953
|
modelValue: n(r)[n(l)],
|
|
1952
1954
|
"onUpdate:modelValue": b[1] || (b[1] = (h) => n(r)[n(l)] = h)
|
|
1953
1955
|
}, {
|
|
1954
1956
|
default: g(() => [
|
|
1955
|
-
(c(!0), j($, null, B(n(
|
|
1957
|
+
(c(!0), j($, null, B(n(a).children, (h) => (c(), _(n(kn), {
|
|
1956
1958
|
key: h.name,
|
|
1957
1959
|
name: h.name,
|
|
1958
1960
|
title: `${h.label} (${h.count})`
|
|
@@ -2000,12 +2002,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2000
2002
|
name: "OutlineWidget",
|
|
2001
2003
|
__name: "index",
|
|
2002
2004
|
setup(i) {
|
|
2003
|
-
const { engine: e, designer: t, selected: s } = fe(), { current: l } =
|
|
2005
|
+
const { engine: e, designer: t, selected: s } = fe(), { current: l } = ne(), a = w([]), r = (A) => {
|
|
2004
2006
|
if (U(A))
|
|
2005
2007
|
return A.locked ? ["unlock"] : ["lock"];
|
|
2006
2008
|
const T = A.parent;
|
|
2007
2009
|
return T && (T.locked || T.invisible) ? [] : l.value?.locked ? [] : A.locked ? ["unlock"] : A.invisible ? ["visible"] : ["lock", "invisible", "copy", "remove"];
|
|
2008
|
-
},
|
|
2010
|
+
}, o = (A) => {
|
|
2009
2011
|
const T = [];
|
|
2010
2012
|
return A.forEach((I) => {
|
|
2011
2013
|
const G = {
|
|
@@ -2015,7 +2017,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2015
2017
|
//getNodeType(model),
|
|
2016
2018
|
model: I
|
|
2017
2019
|
};
|
|
2018
|
-
Array.isArray(I.children) && (G.children =
|
|
2020
|
+
Array.isArray(I.children) && (G.children = o(I.children)), T.push(G);
|
|
2019
2021
|
}), T;
|
|
2020
2022
|
}, u = () => {
|
|
2021
2023
|
if (!l.value)
|
|
@@ -2027,11 +2029,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2027
2029
|
label: T,
|
|
2028
2030
|
type: A,
|
|
2029
2031
|
model: l.value,
|
|
2030
|
-
children:
|
|
2032
|
+
children: o(I)
|
|
2031
2033
|
}
|
|
2032
2034
|
];
|
|
2033
|
-
}, p = () => {
|
|
2034
|
-
|
|
2035
|
+
}, p = async () => {
|
|
2036
|
+
a.value = u(), s.value?.model && (await ye(), t.value?.setSelected(s.value.model));
|
|
2035
2037
|
}, m = S(() => s.value?.model.id), f = (A) => {
|
|
2036
2038
|
const T = A.data;
|
|
2037
2039
|
if (U(T.model) || T.model.locked || T.model.name === "template")
|
|
@@ -2118,13 +2120,14 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2118
2120
|
break;
|
|
2119
2121
|
}
|
|
2120
2122
|
};
|
|
2121
|
-
return
|
|
2123
|
+
return X(e.changed, p, { immediate: !0 }), (A, T) => (c(), _(n(W), {
|
|
2122
2124
|
class: "v-outline-widget",
|
|
2123
2125
|
title: "大纲树"
|
|
2124
2126
|
}, {
|
|
2125
2127
|
default: g(() => [
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
+
(c(), _(n(pt), {
|
|
2129
|
+
key: n(e).changed.value,
|
|
2130
|
+
data: a.value,
|
|
2128
2131
|
"node-key": "id",
|
|
2129
2132
|
"default-expand-all": "",
|
|
2130
2133
|
draggable: "",
|
|
@@ -2140,8 +2143,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2140
2143
|
onNodeDragEnd: x
|
|
2141
2144
|
}, {
|
|
2142
2145
|
default: g(({ data: I, node: G }) => [
|
|
2143
|
-
v(n(
|
|
2144
|
-
class:
|
|
2146
|
+
v(n(Y), {
|
|
2147
|
+
class: te(["v-outline-widget__item", {
|
|
2145
2148
|
"is-locked": I.model.locked,
|
|
2146
2149
|
"is-invisible": I.model.invisible,
|
|
2147
2150
|
"is-dragging": I.dragging
|
|
@@ -2152,7 +2155,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2152
2155
|
background: "",
|
|
2153
2156
|
hover: "",
|
|
2154
2157
|
"model-value": I.model,
|
|
2155
|
-
icon: I.model.locked ? n(
|
|
2158
|
+
icon: I.model.locked ? n(Zt) : I.model.invisible ? n(Qt) : void 0,
|
|
2156
2159
|
title: I.label,
|
|
2157
2160
|
subtitle: I.type,
|
|
2158
2161
|
actions: r(I.model),
|
|
@@ -2162,7 +2165,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2162
2165
|
}, null, 8, ["class", "active", "model-value", "icon", "title", "subtitle", "actions", "onMouseenter"])
|
|
2163
2166
|
]),
|
|
2164
2167
|
_: 1
|
|
2165
|
-
}, 8, ["data", "current-node-key"])
|
|
2168
|
+
}, 8, ["data", "current-node-key"]))
|
|
2166
2169
|
]),
|
|
2167
2170
|
_: 1
|
|
2168
2171
|
}));
|
|
@@ -2171,12 +2174,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2171
2174
|
name: "HistoryWidget",
|
|
2172
2175
|
__name: "index",
|
|
2173
2176
|
setup(i) {
|
|
2174
|
-
const { history: e, load: t, total: s } =
|
|
2175
|
-
|
|
2177
|
+
const { history: e, load: t, total: s } = sn(), l = S(() => `(共 ${s.value} 条)`), a = (o) => {
|
|
2178
|
+
o.name === "remove" && e.value?.remove(o.modelValue.id);
|
|
2176
2179
|
}, r = async () => {
|
|
2177
2180
|
await Ee("确定要清空历史记录吗?") && e.value?.clear();
|
|
2178
2181
|
};
|
|
2179
|
-
return (
|
|
2182
|
+
return (o, u) => (c(), _(n(W), {
|
|
2180
2183
|
class: "v-history-widget",
|
|
2181
2184
|
title: "历史记录",
|
|
2182
2185
|
subtitle: l.value,
|
|
@@ -2188,7 +2191,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2188
2191
|
key: 0,
|
|
2189
2192
|
"image-size": 50
|
|
2190
2193
|
})) : C("", !0),
|
|
2191
|
-
n(e) ? (c(!0), j($, { key: 1 }, B(n(e).items, (p, m) => (c(), _(n(
|
|
2194
|
+
n(e) ? (c(!0), j($, { key: 1 }, B(n(e).items, (p, m) => (c(), _(n(Y), {
|
|
2192
2195
|
index: m + 1,
|
|
2193
2196
|
title: p.label,
|
|
2194
2197
|
"model-value": p,
|
|
@@ -2196,7 +2199,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2196
2199
|
small: "",
|
|
2197
2200
|
background: "",
|
|
2198
2201
|
actions: ["remove"],
|
|
2199
|
-
onAction:
|
|
2202
|
+
onAction: a,
|
|
2200
2203
|
onClick: (f) => n(t)(p.id)
|
|
2201
2204
|
}, null, 8, ["index", "title", "model-value", "active", "onClick"]))), 256)) : C("", !0)
|
|
2202
2205
|
]),
|
|
@@ -2219,7 +2222,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2219
2222
|
name: "ApisWidget",
|
|
2220
2223
|
__name: "index",
|
|
2221
2224
|
setup(i) {
|
|
2222
|
-
const e = w(!1), t = w(null), s = w(!1), l = S(() => s.value ? "编辑API" : "新增API"),
|
|
2225
|
+
const e = w(!1), t = w(null), s = w(!1), l = S(() => s.value ? "编辑API" : "新增API"), a = S(() => r.value?.apis || []), { project: r } = Ge(), o = () => ({
|
|
2223
2226
|
method: "get",
|
|
2224
2227
|
name: "",
|
|
2225
2228
|
label: "",
|
|
@@ -2237,7 +2240,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2237
2240
|
}
|
|
2238
2241
|
}
|
|
2239
2242
|
}), u = () => {
|
|
2240
|
-
e.value = !0, s.value = !1, t.value =
|
|
2243
|
+
e.value = !0, s.value = !1, t.value = o();
|
|
2241
2244
|
}, p = Us.map((y) => ({
|
|
2242
2245
|
label: y,
|
|
2243
2246
|
value: y.toLowerCase()
|
|
@@ -2262,7 +2265,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2262
2265
|
value: "data"
|
|
2263
2266
|
}
|
|
2264
2267
|
], b = (y, V, x) => {
|
|
2265
|
-
|
|
2268
|
+
ee(
|
|
2266
2269
|
{
|
|
2267
2270
|
type: "JSExpression",
|
|
2268
2271
|
value: V
|
|
@@ -2284,7 +2287,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2284
2287
|
onPlus: u
|
|
2285
2288
|
}, {
|
|
2286
2289
|
default: g(() => [
|
|
2287
|
-
(c(!0), j($, null, B(
|
|
2290
|
+
(c(!0), j($, null, B(a.value, (x) => (c(), _(n(Y), {
|
|
2288
2291
|
key: x.id,
|
|
2289
2292
|
small: "",
|
|
2290
2293
|
title: x.name,
|
|
@@ -2297,7 +2300,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2297
2300
|
onClick: (D) => d(x),
|
|
2298
2301
|
onAction: h
|
|
2299
2302
|
}, null, 8, ["title", "subtitle", "model-value", "tag", "tag-type", "onClick"]))), 128)),
|
|
2300
|
-
|
|
2303
|
+
a.value.length === 0 ? (c(), _(n(Z), {
|
|
2301
2304
|
key: 0,
|
|
2302
2305
|
"image-size": 50
|
|
2303
2306
|
})) : C("", !0),
|
|
@@ -2481,19 +2484,19 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2481
2484
|
name: "DepsWidget",
|
|
2482
2485
|
__name: "index",
|
|
2483
2486
|
setup(i) {
|
|
2484
|
-
const { dependencies: e, engine: t } =
|
|
2487
|
+
const { dependencies: e, engine: t } = tn(), s = w(!1), l = w(!1), a = w({}), r = S(() => l.value ? "查看依赖" : a.value ? "编辑依赖" : "新增依赖"), o = (d) => d.required || d.official ? [] : ["edit", "remove"], u = (d) => d.official && !d.required, p = async (d) => (d.urls = d.urls.split(`
|
|
2485
2488
|
`), t.project.value?.setDeps(d), !0), m = (d) => {
|
|
2486
2489
|
t.project.value?.setDeps(d);
|
|
2487
2490
|
}, f = () => {
|
|
2488
|
-
l.value = !1, s.value = !0,
|
|
2491
|
+
l.value = !1, s.value = !0, a.value = null;
|
|
2489
2492
|
}, b = (d) => {
|
|
2490
|
-
l.value = !0,
|
|
2493
|
+
l.value = !0, a.value = {
|
|
2491
2494
|
...d,
|
|
2492
2495
|
urls: d.urls.join(`
|
|
2493
2496
|
`)
|
|
2494
2497
|
}, s.value = !0;
|
|
2495
2498
|
}, h = (d, k) => {
|
|
2496
|
-
k.name === "edit" && (
|
|
2499
|
+
k.name === "edit" && (a.value = {
|
|
2497
2500
|
...d,
|
|
2498
2501
|
urls: d.urls.join(`
|
|
2499
2502
|
`)
|
|
@@ -2506,11 +2509,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2506
2509
|
onPlus: f
|
|
2507
2510
|
}, {
|
|
2508
2511
|
default: g(() => [
|
|
2509
|
-
(c(!0), j($, null, B(n(e), (y) => (c(), _(n(
|
|
2512
|
+
(c(!0), j($, null, B(n(e), (y) => (c(), _(n(Y), {
|
|
2510
2513
|
key: y.package,
|
|
2511
2514
|
title: y.package,
|
|
2512
2515
|
subtitle: y.version,
|
|
2513
|
-
actions:
|
|
2516
|
+
actions: o(y),
|
|
2514
2517
|
background: "",
|
|
2515
2518
|
switch: u(y),
|
|
2516
2519
|
modelValue: y.enabled,
|
|
@@ -2525,7 +2528,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2525
2528
|
width: "600px",
|
|
2526
2529
|
height: "500px",
|
|
2527
2530
|
title: r.value,
|
|
2528
|
-
model:
|
|
2531
|
+
model: a.value,
|
|
2529
2532
|
submitMethod: p,
|
|
2530
2533
|
formProps: {
|
|
2531
2534
|
disabled: l.value,
|
|
@@ -2537,7 +2540,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2537
2540
|
name: "package",
|
|
2538
2541
|
label: "包名",
|
|
2539
2542
|
required: "",
|
|
2540
|
-
disabled: !!
|
|
2543
|
+
disabled: !!a.value
|
|
2541
2544
|
}, null, 8, ["disabled"]),
|
|
2542
2545
|
v(n(P), {
|
|
2543
2546
|
name: "version",
|
|
@@ -2581,13 +2584,13 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2581
2584
|
},
|
|
2582
2585
|
emits: ["action"],
|
|
2583
2586
|
setup(i, { emit: e }) {
|
|
2584
|
-
const t = i, s = e, l = S(() => t.model.name),
|
|
2587
|
+
const t = i, s = e, l = S(() => t.model.name), a = S(() => !U(t.model) && !t.model.locked), r = S(() => t.path.map((m) => ({
|
|
2585
2588
|
command: m,
|
|
2586
2589
|
label: m.name,
|
|
2587
2590
|
onMouseenter: () => {
|
|
2588
2591
|
s("action", { type: "hover", model: m });
|
|
2589
2592
|
}
|
|
2590
|
-
}))),
|
|
2593
|
+
}))), o = [
|
|
2591
2594
|
{
|
|
2592
2595
|
name: "prev",
|
|
2593
2596
|
icon: Es,
|
|
@@ -2600,7 +2603,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2600
2603
|
},
|
|
2601
2604
|
{
|
|
2602
2605
|
name: "copy",
|
|
2603
|
-
icon:
|
|
2606
|
+
icon: Gt,
|
|
2604
2607
|
title: "复制"
|
|
2605
2608
|
},
|
|
2606
2609
|
{
|
|
@@ -2614,22 +2617,22 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2614
2617
|
m.name === "remove" ? await Ee("确定删除?") && s("action", { type: m.name, model: t.model }) : s("action", { type: m.name, model: t.model });
|
|
2615
2618
|
};
|
|
2616
2619
|
return (m, f) => (c(), j("div", {
|
|
2617
|
-
class:
|
|
2620
|
+
class: te(["v-actions", [`is-${t.position}`]])
|
|
2618
2621
|
}, [
|
|
2619
|
-
v(n(
|
|
2622
|
+
v(n(ke), {
|
|
2620
2623
|
mode: "icon",
|
|
2621
2624
|
size: "small",
|
|
2622
|
-
icon: n(
|
|
2625
|
+
icon: n(Xt),
|
|
2623
2626
|
label: l.value,
|
|
2624
2627
|
menus: r.value,
|
|
2625
2628
|
background: "none",
|
|
2626
2629
|
onCommand: u
|
|
2627
2630
|
}, null, 8, ["icon", "label", "menus"]),
|
|
2628
2631
|
v(n(Fn), {
|
|
2629
|
-
disabled: !
|
|
2632
|
+
disabled: !a.value,
|
|
2630
2633
|
mode: "icon",
|
|
2631
2634
|
size: "small",
|
|
2632
|
-
items:
|
|
2635
|
+
items: o,
|
|
2633
2636
|
background: "none",
|
|
2634
2637
|
onClick: p
|
|
2635
2638
|
}, null, 8, ["disabled"])
|
|
@@ -2643,7 +2646,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2643
2646
|
inheritAttrs: !1,
|
|
2644
2647
|
__name: "index",
|
|
2645
2648
|
setup(i, { expose: e }) {
|
|
2646
|
-
const t = w(), s = w(), { width: l, height:
|
|
2649
|
+
const t = w(), s = w(), { width: l, height: a } = Yt(t), { dependencies: r, engine: o } = tn(), { current: u, isEmpty: p } = ne(), m = S(() => o.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc"), { designer: f, hover: b, dropping: h, selected: d } = nl(
|
|
2647
2650
|
s,
|
|
2648
2651
|
r
|
|
2649
2652
|
), k = (y) => {
|
|
@@ -2682,7 +2685,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2682
2685
|
v(n(an), {
|
|
2683
2686
|
mode: m.value,
|
|
2684
2687
|
width: n(l),
|
|
2685
|
-
height: n(
|
|
2688
|
+
height: n(a)
|
|
2686
2689
|
}, {
|
|
2687
2690
|
default: g(() => [
|
|
2688
2691
|
z("iframe", {
|
|
@@ -2692,7 +2695,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2692
2695
|
}, null, 512),
|
|
2693
2696
|
n(h) ? (c(), j("div", {
|
|
2694
2697
|
key: 0,
|
|
2695
|
-
class:
|
|
2698
|
+
class: te(["v-designer__dropping", "is-inner"]),
|
|
2696
2699
|
style: Fe(n(h).style)
|
|
2697
2700
|
}, null, 4)) : C("", !0),
|
|
2698
2701
|
n(b) ? (c(), j("div", {
|
|
@@ -2701,7 +2704,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2701
2704
|
style: Fe(n(b).style)
|
|
2702
2705
|
}, [
|
|
2703
2706
|
z("span", {
|
|
2704
|
-
class:
|
|
2707
|
+
class: te(`is-${n(b).position}`)
|
|
2705
2708
|
}, [
|
|
2706
2709
|
H(N(n(b).model.name) + ": ", 1),
|
|
2707
2710
|
z("i", null, N(n(b).model.id), 1)
|
|
@@ -2744,10 +2747,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2744
2747
|
itemTitle: { type: Function, default: (i) => i.name }
|
|
2745
2748
|
},
|
|
2746
2749
|
setup(i) {
|
|
2747
|
-
const e = i, t = w(), s = w(), l = w(!1),
|
|
2750
|
+
const e = i, t = w(), s = w(), l = w(!1), a = w(e.createEmpty()), r = w(!1), o = S(
|
|
2748
2751
|
() => r.value ? `编辑${e.title}` : `新增${e.title}`
|
|
2749
2752
|
), u = () => {
|
|
2750
|
-
r.value = !1,
|
|
2753
|
+
r.value = !1, a.value = e.createEmpty(), l.value = !0;
|
|
2751
2754
|
}, p = (d, k) => {
|
|
2752
2755
|
switch (k.name) {
|
|
2753
2756
|
case "edit":
|
|
@@ -2758,9 +2761,9 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2758
2761
|
break;
|
|
2759
2762
|
}
|
|
2760
2763
|
}, m = (d) => {
|
|
2761
|
-
|
|
2764
|
+
a.value.value = d;
|
|
2762
2765
|
}, f = (d) => {
|
|
2763
|
-
r.value = !0,
|
|
2766
|
+
r.value = !0, a.value = {
|
|
2764
2767
|
...d
|
|
2765
2768
|
}, l.value = !0;
|
|
2766
2769
|
}, b = async (d) => e.submit(d, r.value), h = () => {
|
|
@@ -2775,7 +2778,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2775
2778
|
onPlus: u
|
|
2776
2779
|
}, {
|
|
2777
2780
|
default: g(() => [
|
|
2778
|
-
(c(!0), j($, null, B(d.list, (y) => (c(), _(n(
|
|
2781
|
+
(c(!0), j($, null, B(d.list, (y) => (c(), _(n(Y), {
|
|
2779
2782
|
title: e.itemTitle(y),
|
|
2780
2783
|
border: "",
|
|
2781
2784
|
actions: ["edit", "remove"],
|
|
@@ -2789,15 +2792,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2789
2792
|
v(n(ft), {
|
|
2790
2793
|
modelValue: l.value,
|
|
2791
2794
|
"onUpdate:modelValue": k[1] || (k[1] = (y) => l.value = y),
|
|
2792
|
-
title:
|
|
2795
|
+
title: o.value,
|
|
2793
2796
|
"submit-method": b,
|
|
2794
|
-
model:
|
|
2797
|
+
model: a.value,
|
|
2795
2798
|
block: d.current,
|
|
2796
2799
|
context: d.context,
|
|
2797
2800
|
onPick: m
|
|
2798
2801
|
}, {
|
|
2799
2802
|
default: g(() => [
|
|
2800
|
-
de(d.$slots, "fields", Dt(
|
|
2803
|
+
de(d.$slots, "fields", At(Dt({ model: a.value, isEdit: r.value, nameLabel: d.nameLabel, valueLabel: d.valueLabel })), () => [
|
|
2801
2804
|
v(n(P), {
|
|
2802
2805
|
name: "name",
|
|
2803
2806
|
label: d.nameLabel,
|
|
@@ -2817,8 +2820,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2817
2820
|
ref: t,
|
|
2818
2821
|
dark: "",
|
|
2819
2822
|
height: "350px",
|
|
2820
|
-
modelValue:
|
|
2821
|
-
"onUpdate:modelValue": k[0] || (k[0] = (y) =>
|
|
2823
|
+
modelValue: a.value.value,
|
|
2824
|
+
"onUpdate:modelValue": k[0] || (k[0] = (y) => a.value.value = y),
|
|
2822
2825
|
onBlur: h
|
|
2823
2826
|
}, null, 8, ["modelValue"])
|
|
2824
2827
|
]),
|
|
@@ -2839,20 +2842,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2839
2842
|
current: {}
|
|
2840
2843
|
},
|
|
2841
2844
|
setup(i) {
|
|
2842
|
-
const e = i, t = S(() => Object.entries(e.current?.state || {}).map(([
|
|
2845
|
+
const e = i, t = S(() => Object.entries(e.current?.state || {}).map(([o, u]) => ({ name: o, value: Ce(u) }))), s = () => ({
|
|
2843
2846
|
name: "",
|
|
2844
2847
|
value: ""
|
|
2845
|
-
}), l = (r) => e.current?.removeState(r.name),
|
|
2848
|
+
}), l = (r) => e.current?.removeState(r.name), a = async (r, o) => {
|
|
2846
2849
|
const { name: u, value: p } = r;
|
|
2847
|
-
if (!
|
|
2850
|
+
if (!o && e.current?.state[u])
|
|
2848
2851
|
return Q(`名称 ${u} 已存在,请更换!`), !1;
|
|
2849
2852
|
const m = {
|
|
2850
2853
|
type: "JSExpression",
|
|
2851
2854
|
value: p
|
|
2852
2855
|
};
|
|
2853
|
-
return
|
|
2856
|
+
return ee(m, e.context, !0) ? (e.current?.setState(u, m), !0) : !1;
|
|
2854
2857
|
};
|
|
2855
|
-
return (r,
|
|
2858
|
+
return (r, o) => (c(), _(Be, {
|
|
2856
2859
|
title: "状态数据",
|
|
2857
2860
|
current: e.current,
|
|
2858
2861
|
context: e.context,
|
|
@@ -2861,7 +2864,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2861
2864
|
valueLabel: "状态初始值 [ JSExpression ]",
|
|
2862
2865
|
createEmpty: s,
|
|
2863
2866
|
remove: l,
|
|
2864
|
-
submit:
|
|
2867
|
+
submit: a
|
|
2865
2868
|
}, null, 8, ["current", "context", "list"]));
|
|
2866
2869
|
}
|
|
2867
2870
|
}), Zl = /* @__PURE__ */ E({
|
|
@@ -2871,20 +2874,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2871
2874
|
current: {}
|
|
2872
2875
|
},
|
|
2873
2876
|
setup(i) {
|
|
2874
|
-
const e = i, t = S(() => Object.entries(e.current?.computed || {}).map(([
|
|
2877
|
+
const e = i, t = S(() => Object.entries(e.current?.computed || {}).map(([o, u]) => ({ name: o, value: Ce(u) }))), s = () => ({
|
|
2875
2878
|
name: "",
|
|
2876
2879
|
value: "() => { }"
|
|
2877
|
-
}), l = (r) => e.current?.removeFunction("computed", r.name),
|
|
2880
|
+
}), l = (r) => e.current?.removeFunction("computed", r.name), a = async (r, o) => {
|
|
2878
2881
|
const { name: u, value: p } = r;
|
|
2879
|
-
if (!
|
|
2882
|
+
if (!o && e.current?.computed[u])
|
|
2880
2883
|
return Q(`名称 ${u} 已存在,请更换!`), !1;
|
|
2881
2884
|
const m = {
|
|
2882
2885
|
type: "JSFunction",
|
|
2883
2886
|
value: p
|
|
2884
2887
|
};
|
|
2885
|
-
return
|
|
2888
|
+
return ee(m, e.context, !0) ? (e.current?.setFunction("computed", u, m), !0) : !1;
|
|
2886
2889
|
};
|
|
2887
|
-
return (r,
|
|
2890
|
+
return (r, o) => (c(), _(Be, {
|
|
2888
2891
|
title: "计算属性",
|
|
2889
2892
|
current: e.current,
|
|
2890
2893
|
context: e.context,
|
|
@@ -2893,7 +2896,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2893
2896
|
valueLabel: "计算函数 [ JSFunction ]",
|
|
2894
2897
|
createEmpty: s,
|
|
2895
2898
|
remove: l,
|
|
2896
|
-
submit:
|
|
2899
|
+
submit: a
|
|
2897
2900
|
}, null, 8, ["current", "context", "list"]));
|
|
2898
2901
|
}
|
|
2899
2902
|
}), Ql = /* @__PURE__ */ E({
|
|
@@ -2903,20 +2906,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2903
2906
|
current: {}
|
|
2904
2907
|
},
|
|
2905
2908
|
setup(i) {
|
|
2906
|
-
const e = i, t = S(() => Object.entries(e.current?.methods || {}).map(([
|
|
2909
|
+
const e = i, t = S(() => Object.entries(e.current?.methods || {}).map(([o, u]) => ({ name: o, value: Ce(u) }))), s = () => ({
|
|
2907
2910
|
name: "",
|
|
2908
2911
|
value: "() => { }"
|
|
2909
|
-
}), l = (r) => e.current?.removeFunction("methods", r.name),
|
|
2912
|
+
}), l = (r) => e.current?.removeFunction("methods", r.name), a = async (r, o) => {
|
|
2910
2913
|
const { name: u, value: p } = r;
|
|
2911
|
-
if (!
|
|
2914
|
+
if (!o && e.current?.methods[u])
|
|
2912
2915
|
return Q(`名称 ${u} 已存在,请更换!`), !1;
|
|
2913
2916
|
const m = {
|
|
2914
2917
|
type: "JSFunction",
|
|
2915
2918
|
value: p
|
|
2916
2919
|
};
|
|
2917
|
-
return
|
|
2920
|
+
return ee(m, e.context, !0) ? (e.current?.setFunction("methods", u, m), !0) : !1;
|
|
2918
2921
|
};
|
|
2919
|
-
return (r,
|
|
2922
|
+
return (r, o) => (c(), _(Be, {
|
|
2920
2923
|
title: "组件方法",
|
|
2921
2924
|
current: e.current,
|
|
2922
2925
|
context: e.context,
|
|
@@ -2925,7 +2928,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2925
2928
|
valueLabel: "方法函数 [ JSFunction ]",
|
|
2926
2929
|
createEmpty: s,
|
|
2927
2930
|
remove: l,
|
|
2928
|
-
submit:
|
|
2931
|
+
submit: a
|
|
2929
2932
|
}, null, 8, ["current", "context", "list"]));
|
|
2930
2933
|
}
|
|
2931
2934
|
}), Xl = /* @__PURE__ */ E({
|
|
@@ -2935,23 +2938,23 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2935
2938
|
current: {}
|
|
2936
2939
|
},
|
|
2937
2940
|
setup(i) {
|
|
2938
|
-
const e = i, t = S(() => Ln.map((
|
|
2939
|
-
label:
|
|
2940
|
-
value:
|
|
2941
|
+
const e = i, t = S(() => Ln.map((o) => ({
|
|
2942
|
+
label: o,
|
|
2943
|
+
value: o
|
|
2941
2944
|
}))), s = S(() => Object.entries(e.current?.lifeCycles || {}).map(([u, p]) => ({ name: u, value: Ce(p) }))), l = () => ({
|
|
2942
2945
|
name: "",
|
|
2943
2946
|
value: "() => { }"
|
|
2944
|
-
}),
|
|
2945
|
-
const { name: p, value: m } =
|
|
2947
|
+
}), a = (o) => e.current?.removeFunction("lifeCycles", o.name), r = async (o, u) => {
|
|
2948
|
+
const { name: p, value: m } = o;
|
|
2946
2949
|
if (!u && e.current?.lifeCycles[p])
|
|
2947
2950
|
return Q(`名称 ${p} 已存在,请更换!`), !1;
|
|
2948
2951
|
const f = {
|
|
2949
2952
|
type: "JSFunction",
|
|
2950
2953
|
value: m
|
|
2951
2954
|
};
|
|
2952
|
-
return
|
|
2955
|
+
return ee(f, e.context, !0) ? (e.current?.setFunction("lifeCycles", p, f), !0) : !1;
|
|
2953
2956
|
};
|
|
2954
|
-
return (
|
|
2957
|
+
return (o, u) => (c(), _(Be, {
|
|
2955
2958
|
title: "生命周期",
|
|
2956
2959
|
current: e.current,
|
|
2957
2960
|
context: e.context,
|
|
@@ -2959,7 +2962,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2959
2962
|
nameLabel: "名称",
|
|
2960
2963
|
valueLabel: "函数 [ JSFunction ]",
|
|
2961
2964
|
createEmpty: l,
|
|
2962
|
-
remove:
|
|
2965
|
+
remove: a,
|
|
2963
2966
|
submit: r
|
|
2964
2967
|
}, {
|
|
2965
2968
|
fields: g(({ model: p, nameLabel: m, isEdit: f, valueLabel: b }) => [
|
|
@@ -2998,33 +3001,33 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
2998
3001
|
current: {}
|
|
2999
3002
|
},
|
|
3000
3003
|
setup(i) {
|
|
3001
|
-
const e = i, t = S(() => (e.current?.watch || []).map((
|
|
3002
|
-
...
|
|
3003
|
-
source: Ce(
|
|
3004
|
-
handler: Ce(
|
|
3004
|
+
const e = i, t = S(() => (e.current?.watch || []).map((o) => ({
|
|
3005
|
+
...o,
|
|
3006
|
+
source: Ce(o.source),
|
|
3007
|
+
handler: Ce(o.handler)
|
|
3005
3008
|
}))), s = () => ({
|
|
3006
3009
|
source: "() => { }",
|
|
3007
3010
|
deep: !1,
|
|
3008
3011
|
immediate: !1,
|
|
3009
3012
|
handler: "() => { }"
|
|
3010
|
-
}), l = (
|
|
3013
|
+
}), l = (o) => o.source, a = (o) => e.current?.removeWatch(o), r = async (o, u) => {
|
|
3011
3014
|
const p = {
|
|
3012
3015
|
type: "JSFunction",
|
|
3013
|
-
value:
|
|
3016
|
+
value: o.source
|
|
3014
3017
|
}, m = {
|
|
3015
3018
|
type: "JSFunction",
|
|
3016
|
-
value:
|
|
3019
|
+
value: o.handler
|
|
3017
3020
|
};
|
|
3018
|
-
if (!
|
|
3021
|
+
if (!ee(p, e.context, !0) || !ee(m, e.context, !0))
|
|
3019
3022
|
return !1;
|
|
3020
3023
|
const f = {
|
|
3021
|
-
...
|
|
3024
|
+
...o,
|
|
3022
3025
|
source: p,
|
|
3023
3026
|
handler: m
|
|
3024
3027
|
};
|
|
3025
3028
|
return e.current?.setWatch(f), !0;
|
|
3026
3029
|
};
|
|
3027
|
-
return (
|
|
3030
|
+
return (o, u) => (c(), _(Be, {
|
|
3028
3031
|
title: "侦听器",
|
|
3029
3032
|
current: e.current,
|
|
3030
3033
|
context: e.context,
|
|
@@ -3032,7 +3035,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3032
3035
|
nameLabel: "侦听源 [ JSFunction ]",
|
|
3033
3036
|
valueLabel: "处理函数 [ JSFunction ]",
|
|
3034
3037
|
createEmpty: s,
|
|
3035
|
-
remove:
|
|
3038
|
+
remove: a,
|
|
3036
3039
|
submit: r,
|
|
3037
3040
|
itemTitle: l,
|
|
3038
3041
|
grow: ""
|
|
@@ -3086,10 +3089,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3086
3089
|
_: 1
|
|
3087
3090
|
}, 8, ["current", "context", "list"]));
|
|
3088
3091
|
}
|
|
3089
|
-
}),
|
|
3092
|
+
}), ea = /* @__PURE__ */ E({
|
|
3090
3093
|
__name: "index",
|
|
3091
3094
|
setup(i) {
|
|
3092
|
-
const { current: e, context: t } =
|
|
3095
|
+
const { current: e, context: t } = ne();
|
|
3093
3096
|
return (s, l) => (c(), _(n(O), {
|
|
3094
3097
|
class: "v-scripts-widget",
|
|
3095
3098
|
direction: "column",
|
|
@@ -3132,12 +3135,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3132
3135
|
},
|
|
3133
3136
|
emits: ["change", "remove"],
|
|
3134
3137
|
setup(i, { emit: e }) {
|
|
3135
|
-
const t = i, s = e, l = (r,
|
|
3136
|
-
s("change", r,
|
|
3137
|
-
},
|
|
3138
|
+
const t = i, s = e, l = (r, o) => {
|
|
3139
|
+
s("change", r, o);
|
|
3140
|
+
}, a = (r) => {
|
|
3138
3141
|
s("remove", r);
|
|
3139
3142
|
};
|
|
3140
|
-
return (r,
|
|
3143
|
+
return (r, o) => (c(), _(n(W), {
|
|
3141
3144
|
title: t.title,
|
|
3142
3145
|
class: "v-sub-panel",
|
|
3143
3146
|
size: "small",
|
|
@@ -3145,9 +3148,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3145
3148
|
}, {
|
|
3146
3149
|
default: g(() => [
|
|
3147
3150
|
v(n(Ne), {
|
|
3151
|
+
class: "v-properties-widget__form",
|
|
3148
3152
|
size: "small",
|
|
3149
|
-
"label-width": "
|
|
3150
|
-
onKeydown:
|
|
3153
|
+
"label-width": "90px",
|
|
3154
|
+
onKeydown: o[0] || (o[0] = ze(je(() => {
|
|
3151
3155
|
}, ["prevent", "stop"]), ["enter"]))
|
|
3152
3156
|
}, {
|
|
3153
3157
|
default: g(() => [
|
|
@@ -3157,7 +3161,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3157
3161
|
context: t.context,
|
|
3158
3162
|
removable: t.removable,
|
|
3159
3163
|
onChange: l,
|
|
3160
|
-
onRemove:
|
|
3164
|
+
onRemove: a
|
|
3161
3165
|
}), null, 16, ["current", "context", "removable"]))), 128))
|
|
3162
3166
|
]),
|
|
3163
3167
|
_: 1
|
|
@@ -3166,19 +3170,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3166
3170
|
_: 1
|
|
3167
3171
|
}, 8, ["title"]));
|
|
3168
3172
|
}
|
|
3169
|
-
}),
|
|
3173
|
+
}), ta = /* @__PURE__ */ E({
|
|
3174
|
+
name: "PropertiesWidget",
|
|
3170
3175
|
__name: "index",
|
|
3171
3176
|
setup(i) {
|
|
3172
|
-
const { current: e, context: t } =
|
|
3177
|
+
const { current: e, context: t } = ne(), { selected: s } = fe(), {
|
|
3173
3178
|
node: l,
|
|
3174
|
-
commonProps:
|
|
3179
|
+
commonProps: a,
|
|
3175
3180
|
change: r,
|
|
3176
|
-
componentProps:
|
|
3181
|
+
componentProps: o,
|
|
3177
3182
|
customProps: u,
|
|
3178
3183
|
addCustom: p,
|
|
3179
3184
|
removeCustom: m,
|
|
3180
3185
|
isExist: f
|
|
3181
|
-
} =
|
|
3186
|
+
} = ol(s), b = w(!1), h = w(), d = () => {
|
|
3182
3187
|
b.value = !0, h.value = {
|
|
3183
3188
|
name: ""
|
|
3184
3189
|
};
|
|
@@ -3201,7 +3206,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3201
3206
|
current: n(e),
|
|
3202
3207
|
context: n(t),
|
|
3203
3208
|
node: n(l),
|
|
3204
|
-
items: n(
|
|
3209
|
+
items: n(a),
|
|
3205
3210
|
onChange: n(r)
|
|
3206
3211
|
}, null, 8, ["current", "context", "node", "items", "onChange"])) : C("", !0),
|
|
3207
3212
|
n(l) ? (c(), _(Ye, {
|
|
@@ -3210,7 +3215,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3210
3215
|
current: n(e),
|
|
3211
3216
|
context: n(t),
|
|
3212
3217
|
node: n(l),
|
|
3213
|
-
items: n(
|
|
3218
|
+
items: n(o),
|
|
3214
3219
|
onChange: n(r)
|
|
3215
3220
|
}, null, 8, ["current", "context", "node", "items", "onChange"])) : C("", !0),
|
|
3216
3221
|
n(l) ? (c(), _(Ye, {
|
|
@@ -3254,7 +3259,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3254
3259
|
_: 1
|
|
3255
3260
|
})) : C("", !0);
|
|
3256
3261
|
}
|
|
3257
|
-
}),
|
|
3262
|
+
}), na = /* @__PURE__ */ E({
|
|
3258
3263
|
name: "VariableBinder",
|
|
3259
3264
|
__name: "variable",
|
|
3260
3265
|
props: {
|
|
@@ -3266,10 +3271,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3266
3271
|
const e = i, t = w(), s = Re({
|
|
3267
3272
|
type: "JSExpression",
|
|
3268
3273
|
value: e.value
|
|
3269
|
-
}), l = (
|
|
3270
|
-
t.value.getEditor().setValue(
|
|
3274
|
+
}), l = (a) => {
|
|
3275
|
+
t.value.getEditor().setValue(a), s.value = a;
|
|
3271
3276
|
};
|
|
3272
|
-
return (
|
|
3277
|
+
return (a, r) => (c(), _(n(ft), {
|
|
3273
3278
|
title: "绑定变量",
|
|
3274
3279
|
"unbind-enabled": "",
|
|
3275
3280
|
block: e.current,
|
|
@@ -3288,7 +3293,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3288
3293
|
ref_key: "editorRef",
|
|
3289
3294
|
ref: t,
|
|
3290
3295
|
modelValue: s.value,
|
|
3291
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
3296
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => s.value = o),
|
|
3292
3297
|
dark: "",
|
|
3293
3298
|
height: "450px"
|
|
3294
3299
|
}, null, 8, ["modelValue"])
|
|
@@ -3299,7 +3304,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3299
3304
|
_: 1
|
|
3300
3305
|
}, 8, ["block", "context", "model"]));
|
|
3301
3306
|
}
|
|
3302
|
-
}),
|
|
3307
|
+
}), sa = /* @__PURE__ */ E({
|
|
3303
3308
|
name: "EventBinder",
|
|
3304
3309
|
__name: "event",
|
|
3305
3310
|
props: {
|
|
@@ -3317,13 +3322,13 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3317
3322
|
type: "JSFunction",
|
|
3318
3323
|
value: e.event?.handler?.value || "() => {}"
|
|
3319
3324
|
}
|
|
3320
|
-
}),
|
|
3321
|
-
label:
|
|
3322
|
-
value:
|
|
3323
|
-
})), r = (
|
|
3324
|
-
t.value.getEditor().setValue(
|
|
3325
|
+
}), a = Hs.map((o) => ({
|
|
3326
|
+
label: o,
|
|
3327
|
+
value: o
|
|
3328
|
+
})), r = (o) => {
|
|
3329
|
+
t.value.getEditor().setValue(o), l.handler.value = o;
|
|
3325
3330
|
};
|
|
3326
|
-
return (
|
|
3331
|
+
return (o, u) => (c(), _(n(ft), {
|
|
3327
3332
|
title: "绑定事件",
|
|
3328
3333
|
"unbind-enabled": "",
|
|
3329
3334
|
block: e.current,
|
|
@@ -3336,7 +3341,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3336
3341
|
name: "modifiers",
|
|
3337
3342
|
label: "事件修饰符",
|
|
3338
3343
|
editor: "checkbox",
|
|
3339
|
-
options: n(
|
|
3344
|
+
options: n(a)
|
|
3340
3345
|
}, null, 8, ["options"]),
|
|
3341
3346
|
v(n(P), {
|
|
3342
3347
|
name: "handler.value",
|
|
@@ -3359,26 +3364,26 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3359
3364
|
_: 1
|
|
3360
3365
|
}, 8, ["block", "context", "model"]));
|
|
3361
3366
|
}
|
|
3362
|
-
}),
|
|
3367
|
+
}), la = /* @__PURE__ */ E({
|
|
3363
3368
|
name: "EventsWidget",
|
|
3364
3369
|
__name: "index",
|
|
3365
3370
|
setup(i) {
|
|
3366
|
-
const { current: e, context: t } =
|
|
3371
|
+
const { current: e, context: t } = ne(), { selected: s } = fe(), { mouseEventList: l, keyboardEventList: a, componentEventList: r } = rl(s), o = w({
|
|
3367
3372
|
name: "",
|
|
3368
3373
|
event: void 0
|
|
3369
3374
|
}), u = w(!1), p = (d) => {
|
|
3370
|
-
|
|
3375
|
+
o.value = He(d), u.value = !0;
|
|
3371
3376
|
}, m = async (d) => {
|
|
3372
3377
|
const k = {
|
|
3373
3378
|
...d,
|
|
3374
3379
|
modifiers: d.modifiers.reduce((V, x) => (V[x] = !0, V), {})
|
|
3375
3380
|
};
|
|
3376
|
-
return
|
|
3381
|
+
return ee(k.handler, t.value, !0) ? ((s.value?.model).setEvent(k), !0) : !1;
|
|
3377
3382
|
}, f = async (d) => {
|
|
3378
3383
|
const k = s.value?.model;
|
|
3379
3384
|
d.name && (k.removeEvent(d.name), u.value = !1);
|
|
3380
3385
|
}, b = async () => {
|
|
3381
|
-
|
|
3386
|
+
o.value.name && await Ee("确定要删除该事件吗?") && f(o.value);
|
|
3382
3387
|
}, h = (d) => {
|
|
3383
3388
|
const { name: k, modelValue: y } = d;
|
|
3384
3389
|
k === "edit" && p(y), k === "remove" && f(y);
|
|
@@ -3401,7 +3406,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3401
3406
|
"image-size": 50,
|
|
3402
3407
|
description: "该组件无自带事件"
|
|
3403
3408
|
})),
|
|
3404
|
-
(c(!0), j($, null, B(n(r), (y) => (c(), _(n(
|
|
3409
|
+
(c(!0), j($, null, B(n(r), (y) => (c(), _(n(Y), {
|
|
3405
3410
|
title: y.name,
|
|
3406
3411
|
"model-value": y,
|
|
3407
3412
|
border: "",
|
|
@@ -3421,7 +3426,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3421
3426
|
fit: !1
|
|
3422
3427
|
}, {
|
|
3423
3428
|
default: g(() => [
|
|
3424
|
-
(c(!0), j($, null, B(n(l), (y) => (c(), _(n(
|
|
3429
|
+
(c(!0), j($, null, B(n(l), (y) => (c(), _(n(Y), {
|
|
3425
3430
|
title: y.name,
|
|
3426
3431
|
"model-value": y,
|
|
3427
3432
|
border: "",
|
|
@@ -3442,7 +3447,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3442
3447
|
fit: !1
|
|
3443
3448
|
}, {
|
|
3444
3449
|
default: g(() => [
|
|
3445
|
-
(c(!0), j($, null, B(n(
|
|
3450
|
+
(c(!0), j($, null, B(n(a), (y) => (c(), _(n(Y), {
|
|
3446
3451
|
title: y.name,
|
|
3447
3452
|
"model-value": y,
|
|
3448
3453
|
border: "",
|
|
@@ -3455,14 +3460,14 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3455
3460
|
]),
|
|
3456
3461
|
_: 1
|
|
3457
3462
|
}),
|
|
3458
|
-
u.value ? (c(), _(n(
|
|
3463
|
+
u.value ? (c(), _(n(sa), {
|
|
3459
3464
|
key: 0,
|
|
3460
3465
|
modelValue: u.value,
|
|
3461
3466
|
"onUpdate:modelValue": k[0] || (k[0] = (y) => u.value = y),
|
|
3462
3467
|
context: n(t),
|
|
3463
3468
|
current: n(e),
|
|
3464
|
-
name:
|
|
3465
|
-
event:
|
|
3469
|
+
name: o.value.name,
|
|
3470
|
+
event: o.value.event,
|
|
3466
3471
|
submitMethod: m,
|
|
3467
3472
|
onUnbind: b
|
|
3468
3473
|
}, null, 8, ["modelValue", "context", "current", "name", "event"])) : C("", !0)
|
|
@@ -3470,23 +3475,23 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3470
3475
|
_: 1
|
|
3471
3476
|
}));
|
|
3472
3477
|
}
|
|
3473
|
-
}),
|
|
3478
|
+
}), aa = /* @__PURE__ */ E({
|
|
3474
3479
|
name: "CssWidget",
|
|
3475
3480
|
__name: "index",
|
|
3476
3481
|
setup(i) {
|
|
3477
|
-
const { current: e } =
|
|
3482
|
+
const { current: e } = ne(), t = w(), s = S(() => e.value?.css || ""), l = (r) => {
|
|
3478
3483
|
e.value?.setCss(r);
|
|
3479
|
-
},
|
|
3480
|
-
const
|
|
3481
|
-
l(
|
|
3484
|
+
}, a = () => {
|
|
3485
|
+
const o = (t.value?.getEditor()).getValue();
|
|
3486
|
+
l(o), ae("保存成功");
|
|
3482
3487
|
};
|
|
3483
|
-
return (r,
|
|
3488
|
+
return (r, o) => (c(), _(n(W), {
|
|
3484
3489
|
class: "v-css-widget v-sub-panel",
|
|
3485
3490
|
title: "lang:css scoped",
|
|
3486
3491
|
size: "small",
|
|
3487
3492
|
fit: "",
|
|
3488
3493
|
save: "",
|
|
3489
|
-
onSave:
|
|
3494
|
+
onSave: a
|
|
3490
3495
|
}, {
|
|
3491
3496
|
default: g(() => [
|
|
3492
3497
|
v(n(K), {
|
|
@@ -3502,15 +3507,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3502
3507
|
_: 1
|
|
3503
3508
|
}));
|
|
3504
3509
|
}
|
|
3505
|
-
}),
|
|
3510
|
+
}), oa = /* @__PURE__ */ E({
|
|
3506
3511
|
name: "DirectivesWidget",
|
|
3507
3512
|
__name: "index",
|
|
3508
3513
|
setup(i) {
|
|
3509
|
-
const { current: e, context: t } =
|
|
3514
|
+
const { current: e, context: t } = ne(), { selected: s } = fe(), {
|
|
3510
3515
|
vIf: l,
|
|
3511
|
-
vShow:
|
|
3516
|
+
vShow: a,
|
|
3512
3517
|
vBind: r,
|
|
3513
|
-
vFor:
|
|
3518
|
+
vFor: o,
|
|
3514
3519
|
vModels: u,
|
|
3515
3520
|
onValueChange: p,
|
|
3516
3521
|
onForChange: m,
|
|
@@ -3551,7 +3556,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3551
3556
|
setters: "ExpressionSetter",
|
|
3552
3557
|
current: n(e),
|
|
3553
3558
|
context: n(t),
|
|
3554
|
-
value: n(
|
|
3559
|
+
value: n(a).value,
|
|
3555
3560
|
onChange: n(p)
|
|
3556
3561
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
|
3557
3562
|
v(n(_e), {
|
|
@@ -3589,7 +3594,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3589
3594
|
setters: "ExpressionSetter",
|
|
3590
3595
|
current: n(e),
|
|
3591
3596
|
context: n(t),
|
|
3592
|
-
value: n(
|
|
3597
|
+
value: n(o).value,
|
|
3593
3598
|
onChange: n(m)
|
|
3594
3599
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
|
3595
3600
|
v(n(_e), {
|
|
@@ -3601,7 +3606,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3601
3606
|
},
|
|
3602
3607
|
current: n(e),
|
|
3603
3608
|
context: n(t),
|
|
3604
|
-
value: n(
|
|
3609
|
+
value: n(o).iterator?.item,
|
|
3605
3610
|
onChange: n(m)
|
|
3606
3611
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
|
3607
3612
|
v(n(_e), {
|
|
@@ -3613,7 +3618,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3613
3618
|
},
|
|
3614
3619
|
current: n(e),
|
|
3615
3620
|
context: n(t),
|
|
3616
|
-
value: n(
|
|
3621
|
+
value: n(o).iterator?.index,
|
|
3617
3622
|
onChange: n(m)
|
|
3618
3623
|
}, null, 8, ["current", "context", "value", "onChange"])
|
|
3619
3624
|
]),
|
|
@@ -3674,7 +3679,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3674
3679
|
_: 1
|
|
3675
3680
|
}));
|
|
3676
3681
|
}
|
|
3677
|
-
}),
|
|
3682
|
+
}), ra = /* @__PURE__ */ E({
|
|
3678
3683
|
name: "DefinedPropsDialog",
|
|
3679
3684
|
__name: "props",
|
|
3680
3685
|
props: {
|
|
@@ -3696,17 +3701,17 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3696
3701
|
), l = Object.keys(Jn).map((r) => ({
|
|
3697
3702
|
label: r,
|
|
3698
3703
|
value: r
|
|
3699
|
-
})),
|
|
3700
|
-
const
|
|
3701
|
-
return
|
|
3704
|
+
})), a = async (r) => {
|
|
3705
|
+
const o = r.default;
|
|
3706
|
+
return o && !ee(o, e.context, !0) ? !1 : (e.current.setProp(r), !0);
|
|
3702
3707
|
};
|
|
3703
|
-
return (r,
|
|
3708
|
+
return (r, o) => (c(), _(n(ce), {
|
|
3704
3709
|
title: t.value,
|
|
3705
3710
|
width: "800px",
|
|
3706
3711
|
height: "500px",
|
|
3707
3712
|
model: s.value,
|
|
3708
3713
|
"form-props": { tooltipMessage: !1 },
|
|
3709
|
-
"submit-method":
|
|
3714
|
+
"submit-method": a
|
|
3710
3715
|
}, {
|
|
3711
3716
|
default: g(() => [
|
|
3712
3717
|
v(n(P), {
|
|
@@ -3741,7 +3746,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3741
3746
|
default: g(() => [
|
|
3742
3747
|
v(n(K), {
|
|
3743
3748
|
modelValue: s.value.default.value,
|
|
3744
|
-
"onUpdate:modelValue":
|
|
3749
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => s.value.default.value = u),
|
|
3745
3750
|
height: "200px",
|
|
3746
3751
|
dark: ""
|
|
3747
3752
|
}, null, 8, ["modelValue"])
|
|
@@ -3752,7 +3757,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3752
3757
|
_: 1
|
|
3753
3758
|
}, 8, ["title", "model"]));
|
|
3754
3759
|
}
|
|
3755
|
-
}),
|
|
3760
|
+
}), ia = /* @__PURE__ */ E({
|
|
3756
3761
|
name: "DefinedEventsDialog",
|
|
3757
3762
|
__name: "events",
|
|
3758
3763
|
props: {
|
|
@@ -3763,8 +3768,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3763
3768
|
setup(i) {
|
|
3764
3769
|
const e = i, t = S(() => e.item ? "编辑定义事件" : "新增定义事件"), s = w({
|
|
3765
3770
|
name: e.item
|
|
3766
|
-
}), l = async (
|
|
3767
|
-
return (
|
|
3771
|
+
}), l = async (a) => (e.item && e.current.removeEmit(e.item, !0), e.current.setEmit(a.name), !0);
|
|
3772
|
+
return (a, r) => (c(), _(n(ce), {
|
|
3768
3773
|
title: t.value,
|
|
3769
3774
|
width: "600px",
|
|
3770
3775
|
height: "200px",
|
|
@@ -3787,7 +3792,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3787
3792
|
_: 1
|
|
3788
3793
|
}, 8, ["title", "model"]));
|
|
3789
3794
|
}
|
|
3790
|
-
}),
|
|
3795
|
+
}), ua = /* @__PURE__ */ E({
|
|
3791
3796
|
name: "DefinedSlotsDialog",
|
|
3792
3797
|
__name: "slots",
|
|
3793
3798
|
props: {
|
|
@@ -3798,8 +3803,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3798
3803
|
setup(i) {
|
|
3799
3804
|
const e = i, t = S(() => e.item ? "编辑定义插槽" : "新增定义插槽"), s = w({
|
|
3800
3805
|
name: e.item
|
|
3801
|
-
}), l = async (
|
|
3802
|
-
return (
|
|
3806
|
+
}), l = async (a) => (e.item && e.current.removeSlot(e.item, !0), e.current.setSlot(a.name), !0);
|
|
3807
|
+
return (a, r) => (c(), _(n(ce), {
|
|
3803
3808
|
title: t.value,
|
|
3804
3809
|
width: "600px",
|
|
3805
3810
|
height: "200px",
|
|
@@ -3822,7 +3827,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3822
3827
|
_: 1
|
|
3823
3828
|
}, 8, ["title", "model"]));
|
|
3824
3829
|
}
|
|
3825
|
-
}),
|
|
3830
|
+
}), ca = /* @__PURE__ */ E({
|
|
3826
3831
|
name: "DefinedInjectsDialog",
|
|
3827
3832
|
__name: "injects",
|
|
3828
3833
|
props: {
|
|
@@ -3841,11 +3846,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3841
3846
|
},
|
|
3842
3847
|
e.item
|
|
3843
3848
|
)
|
|
3844
|
-
), l = async (
|
|
3845
|
-
const r =
|
|
3846
|
-
return r && !
|
|
3849
|
+
), l = async (a) => {
|
|
3850
|
+
const r = a.default;
|
|
3851
|
+
return r && !ee(r, e.context, !0) ? !1 : (e.current.setInject(a), !0);
|
|
3847
3852
|
};
|
|
3848
|
-
return (
|
|
3853
|
+
return (a, r) => (c(), _(n(ce), {
|
|
3849
3854
|
title: t.value,
|
|
3850
3855
|
width: "800px",
|
|
3851
3856
|
height: "500px",
|
|
@@ -3878,7 +3883,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3878
3883
|
default: g(() => [
|
|
3879
3884
|
v(n(K), {
|
|
3880
3885
|
modelValue: s.value.default.value,
|
|
3881
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
3886
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => s.value.default.value = o),
|
|
3882
3887
|
height: "200px",
|
|
3883
3888
|
dark: ""
|
|
3884
3889
|
}, null, 8, ["modelValue"])
|
|
@@ -3889,17 +3894,17 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3889
3894
|
_: 1
|
|
3890
3895
|
}, 8, ["title", "model"]));
|
|
3891
3896
|
}
|
|
3892
|
-
}),
|
|
3897
|
+
}), da = /* @__PURE__ */ E({
|
|
3893
3898
|
name: "DefinedWidget",
|
|
3894
3899
|
__name: "index",
|
|
3895
3900
|
setup(i) {
|
|
3896
|
-
const { current: e, context: t } =
|
|
3897
|
-
u.value = void 0,
|
|
3901
|
+
const { current: e, context: t } = ne(), s = S(() => (e.value?.props || []).map((M) => typeof M == "string" ? { name: M } : M)), l = S(() => e.value?.emits || []), a = S(() => e.value?.slots || []), r = S(() => e.value?.inject || []), o = w(!1), u = w(), p = w(!1), m = w(), f = w(!1), b = w(), h = w(!1), d = w(), k = () => {
|
|
3902
|
+
u.value = void 0, o.value = !0;
|
|
3898
3903
|
}, y = (M) => {
|
|
3899
3904
|
const { name: J, modelValue: R } = M;
|
|
3900
3905
|
J === "edit" && V(R), J === "remove" && e.value?.removeProp(R);
|
|
3901
3906
|
}, V = (M) => {
|
|
3902
|
-
u.value = M,
|
|
3907
|
+
u.value = M, o.value = !0;
|
|
3903
3908
|
}, x = () => {
|
|
3904
3909
|
m.value = void 0, p.value = !0;
|
|
3905
3910
|
}, D = (M) => {
|
|
@@ -3938,7 +3943,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3938
3943
|
onPlus: k
|
|
3939
3944
|
}, {
|
|
3940
3945
|
default: g(() => [
|
|
3941
|
-
(c(!0), j($, null, B(s.value, (R) => (c(), _(n(
|
|
3946
|
+
(c(!0), j($, null, B(s.value, (R) => (c(), _(n(Y), {
|
|
3942
3947
|
"model-value": R,
|
|
3943
3948
|
title: R.name,
|
|
3944
3949
|
border: "",
|
|
@@ -3950,12 +3955,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3950
3955
|
key: 0,
|
|
3951
3956
|
"image-size": 50
|
|
3952
3957
|
})),
|
|
3953
|
-
|
|
3958
|
+
o.value ? (c(), _(ra, {
|
|
3954
3959
|
key: 1,
|
|
3955
3960
|
current: n(e),
|
|
3956
3961
|
context: n(t),
|
|
3957
|
-
modelValue:
|
|
3958
|
-
"onUpdate:modelValue": J[0] || (J[0] = (R) =>
|
|
3962
|
+
modelValue: o.value,
|
|
3963
|
+
"onUpdate:modelValue": J[0] || (J[0] = (R) => o.value = R),
|
|
3959
3964
|
item: u.value
|
|
3960
3965
|
}, null, 8, ["current", "context", "modelValue", "item"])) : C("", !0)
|
|
3961
3966
|
]),
|
|
@@ -3970,7 +3975,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3970
3975
|
onPlus: x
|
|
3971
3976
|
}, {
|
|
3972
3977
|
default: g(() => [
|
|
3973
|
-
(c(!0), j($, null, B(l.value, (R) => (c(), _(n(
|
|
3978
|
+
(c(!0), j($, null, B(l.value, (R) => (c(), _(n(Y), {
|
|
3974
3979
|
"model-value": R,
|
|
3975
3980
|
title: R,
|
|
3976
3981
|
border: "",
|
|
@@ -3982,7 +3987,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
3982
3987
|
key: 0,
|
|
3983
3988
|
"image-size": 50
|
|
3984
3989
|
})),
|
|
3985
|
-
p.value ? (c(), _(
|
|
3990
|
+
p.value ? (c(), _(ia, {
|
|
3986
3991
|
key: 1,
|
|
3987
3992
|
modelValue: p.value,
|
|
3988
3993
|
"onUpdate:modelValue": J[1] || (J[1] = (R) => p.value = R),
|
|
@@ -4002,7 +4007,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4002
4007
|
onPlus: A
|
|
4003
4008
|
}, {
|
|
4004
4009
|
default: g(() => [
|
|
4005
|
-
(c(!0), j($, null, B(
|
|
4010
|
+
(c(!0), j($, null, B(a.value, (R) => (c(), _(n(Y), {
|
|
4006
4011
|
"model-value": R,
|
|
4007
4012
|
title: R,
|
|
4008
4013
|
border: "",
|
|
@@ -4010,11 +4015,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4010
4015
|
onClick: (Ve) => T(R),
|
|
4011
4016
|
onAction: I
|
|
4012
4017
|
}, null, 8, ["model-value", "title", "onClick"]))), 256)),
|
|
4013
|
-
|
|
4018
|
+
a.value.length ? C("", !0) : (c(), _(n(Z), {
|
|
4014
4019
|
key: 0,
|
|
4015
4020
|
"image-size": 50
|
|
4016
4021
|
})),
|
|
4017
|
-
f.value ? (c(), _(
|
|
4022
|
+
f.value ? (c(), _(ua, {
|
|
4018
4023
|
key: 1,
|
|
4019
4024
|
modelValue: f.value,
|
|
4020
4025
|
"onUpdate:modelValue": J[2] || (J[2] = (R) => f.value = R),
|
|
@@ -4035,7 +4040,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4035
4040
|
onPlus: G
|
|
4036
4041
|
}, {
|
|
4037
4042
|
default: g(() => [
|
|
4038
|
-
(c(!0), j($, null, B(r.value, (R) => (c(), _(n(
|
|
4043
|
+
(c(!0), j($, null, B(r.value, (R) => (c(), _(n(Y), {
|
|
4039
4044
|
"model-value": R,
|
|
4040
4045
|
title: R.name,
|
|
4041
4046
|
border: "",
|
|
@@ -4047,7 +4052,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4047
4052
|
key: 0,
|
|
4048
4053
|
"image-size": 50
|
|
4049
4054
|
})),
|
|
4050
|
-
h.value ? (c(), _(
|
|
4055
|
+
h.value ? (c(), _(ca, {
|
|
4051
4056
|
key: 1,
|
|
4052
4057
|
modelValue: h.value,
|
|
4053
4058
|
"onUpdate:modelValue": J[3] || (J[3] = (R) => h.value = R),
|
|
@@ -4062,7 +4067,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4062
4067
|
_: 1
|
|
4063
4068
|
})) : C("", !0);
|
|
4064
4069
|
}
|
|
4065
|
-
}),
|
|
4070
|
+
}), pa = /* @__PURE__ */ E({
|
|
4066
4071
|
name: "DataSourceDialogForm",
|
|
4067
4072
|
__name: "form",
|
|
4068
4073
|
props: {
|
|
@@ -4091,7 +4096,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4091
4096
|
})`
|
|
4092
4097
|
}
|
|
4093
4098
|
}, e.item)
|
|
4094
|
-
),
|
|
4099
|
+
), a = w(!1), r = w(""), o = w(!1), u = S(() => t.value.map((h) => ({
|
|
4095
4100
|
label: h.label || "",
|
|
4096
4101
|
value: h.id,
|
|
4097
4102
|
data: h
|
|
@@ -4105,12 +4110,12 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4105
4110
|
if (!e.item && e.current.dataSources[y])
|
|
4106
4111
|
return Q(`名称【${y}】已经存在,请更换名称`), !1;
|
|
4107
4112
|
if (d?.value) {
|
|
4108
|
-
if (!
|
|
4113
|
+
if (!ee(d, e.context, !0))
|
|
4109
4114
|
return !1;
|
|
4110
4115
|
} else
|
|
4111
4116
|
h.transform = void 0;
|
|
4112
4117
|
if (k?.value) {
|
|
4113
|
-
if (!
|
|
4118
|
+
if (!ee(k, e.context, !0))
|
|
4114
4119
|
return !1;
|
|
4115
4120
|
} else
|
|
4116
4121
|
h.test = void 0;
|
|
@@ -4126,7 +4131,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4126
4131
|
Q("请先填写测试用例");
|
|
4127
4132
|
return;
|
|
4128
4133
|
}
|
|
4129
|
-
if (!
|
|
4134
|
+
if (!ee(l.value.test, e.context, !0))
|
|
4130
4135
|
return;
|
|
4131
4136
|
const d = async (...V) => {
|
|
4132
4137
|
const x = e.context?.$apis[l.value.ref];
|
|
@@ -4136,14 +4141,14 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4136
4141
|
}, k = Je(l.value.test, {
|
|
4137
4142
|
runApi: d
|
|
4138
4143
|
}), y = l.value.transform?.value ? Je(l.value.transform, {}, !0) : (V) => V;
|
|
4139
|
-
|
|
4144
|
+
a.value = !0;
|
|
4140
4145
|
try {
|
|
4141
4146
|
const V = await k();
|
|
4142
4147
|
r.value = JSON.stringify(await y(V), null, 2);
|
|
4143
4148
|
} catch (V) {
|
|
4144
4149
|
me.error(V);
|
|
4145
4150
|
}
|
|
4146
|
-
|
|
4151
|
+
a.value = !1, o.value = !0;
|
|
4147
4152
|
};
|
|
4148
4153
|
return (h, d) => (c(), _(n(ce), {
|
|
4149
4154
|
width: "1000px",
|
|
@@ -4155,7 +4160,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4155
4160
|
}, {
|
|
4156
4161
|
extra: g(() => [
|
|
4157
4162
|
v(n(re), {
|
|
4158
|
-
loading:
|
|
4163
|
+
loading: a.value,
|
|
4159
4164
|
type: "warning",
|
|
4160
4165
|
onClick: b
|
|
4161
4166
|
}, {
|
|
@@ -4228,11 +4233,11 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4228
4233
|
]),
|
|
4229
4234
|
_: 1
|
|
4230
4235
|
}),
|
|
4231
|
-
|
|
4236
|
+
o.value ? (c(), _(n(wn), {
|
|
4232
4237
|
key: 0,
|
|
4233
4238
|
class: "v-drawer",
|
|
4234
|
-
modelValue:
|
|
4235
|
-
"onUpdate:modelValue": d[2] || (d[2] = (k) =>
|
|
4239
|
+
modelValue: o.value,
|
|
4240
|
+
"onUpdate:modelValue": d[2] || (d[2] = (k) => o.value = k),
|
|
4236
4241
|
title: "测试用例运行结果",
|
|
4237
4242
|
direction: "btt",
|
|
4238
4243
|
"append-to-body": "",
|
|
@@ -4253,19 +4258,19 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4253
4258
|
_: 1
|
|
4254
4259
|
}, 8, ["title", "model"]));
|
|
4255
4260
|
}
|
|
4256
|
-
}),
|
|
4261
|
+
}), ma = /* @__PURE__ */ E({
|
|
4257
4262
|
name: "DataSourcesWidget",
|
|
4258
4263
|
__name: "index",
|
|
4259
4264
|
setup(i) {
|
|
4260
|
-
const { current: e, context: t } =
|
|
4265
|
+
const { current: e, context: t } = ne(), s = w(!1), l = w(), a = S(() => Object.values(e.value?.dataSources || {}).filter(
|
|
4261
4266
|
(p) => p.type === "api"
|
|
4262
4267
|
)), r = () => {
|
|
4263
4268
|
l.value = void 0, s.value = !0;
|
|
4264
|
-
},
|
|
4269
|
+
}, o = (p) => {
|
|
4265
4270
|
l.value = p, s.value = !0;
|
|
4266
4271
|
}, u = (p) => {
|
|
4267
4272
|
const { name: m, modelValue: f } = p;
|
|
4268
|
-
m === "edit" &&
|
|
4273
|
+
m === "edit" && o(f), m === "remove" && e.value?.removeDataSource(f.name);
|
|
4269
4274
|
};
|
|
4270
4275
|
return (p, m) => (c(), _(n(O), {
|
|
4271
4276
|
class: "v-data-sources-widget",
|
|
@@ -4281,23 +4286,23 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4281
4286
|
onPlus: r
|
|
4282
4287
|
}, {
|
|
4283
4288
|
default: g(() => [
|
|
4284
|
-
(c(!0), j($, null, B(
|
|
4289
|
+
(c(!0), j($, null, B(a.value, (f) => (c(), _(n(Y), {
|
|
4285
4290
|
border: "",
|
|
4286
4291
|
title: f.name,
|
|
4287
4292
|
subtitle: f.label,
|
|
4288
4293
|
"model-value": f,
|
|
4289
4294
|
actions: ["edit", "remove"],
|
|
4290
4295
|
onAction: u,
|
|
4291
|
-
onClick: (b) =>
|
|
4296
|
+
onClick: (b) => o(f)
|
|
4292
4297
|
}, null, 8, ["title", "subtitle", "model-value", "onClick"]))), 256)),
|
|
4293
|
-
|
|
4298
|
+
a.value.length ? C("", !0) : (c(), _(n(Z), {
|
|
4294
4299
|
key: 0,
|
|
4295
4300
|
"image-size": 50
|
|
4296
4301
|
}))
|
|
4297
4302
|
]),
|
|
4298
4303
|
_: 1
|
|
4299
4304
|
}),
|
|
4300
|
-
s.value ? (c(), _(
|
|
4305
|
+
s.value ? (c(), _(pa, {
|
|
4301
4306
|
key: 0,
|
|
4302
4307
|
modelValue: s.value,
|
|
4303
4308
|
"onUpdate:modelValue": m[0] || (m[0] = (f) => s.value = f),
|
|
@@ -4309,27 +4314,27 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4309
4314
|
_: 1
|
|
4310
4315
|
}));
|
|
4311
4316
|
}
|
|
4312
|
-
}),
|
|
4317
|
+
}), va = /* @__PURE__ */ E({
|
|
4313
4318
|
name: "StyleWidget",
|
|
4314
4319
|
__name: "index",
|
|
4315
4320
|
setup(i) {
|
|
4316
4321
|
const { selected: e } = fe(), t = w(), s = S(() => {
|
|
4317
|
-
const
|
|
4318
|
-
return U(
|
|
4322
|
+
const o = e.value?.model || null;
|
|
4323
|
+
return U(o) ? null : o;
|
|
4319
4324
|
}), l = S(
|
|
4320
4325
|
() => JSON.stringify(s.value?.getPropValue("style") || {}, null, 2)
|
|
4321
|
-
),
|
|
4326
|
+
), a = (o) => {
|
|
4322
4327
|
try {
|
|
4323
|
-
const u = JSON.parse(
|
|
4328
|
+
const u = JSON.parse(o);
|
|
4324
4329
|
s.value?.setProp("style", u);
|
|
4325
4330
|
} catch {
|
|
4326
4331
|
Q("JSON格式错误");
|
|
4327
4332
|
}
|
|
4328
4333
|
}, r = () => {
|
|
4329
4334
|
const u = (t.value?.getEditor()).getValue();
|
|
4330
|
-
|
|
4335
|
+
a(u), ae("保存成功");
|
|
4331
4336
|
};
|
|
4332
|
-
return (
|
|
4337
|
+
return (o, u) => (c(), _(n(W), {
|
|
4333
4338
|
class: "v-css-widget v-sub-panel",
|
|
4334
4339
|
title: "style",
|
|
4335
4340
|
size: "small",
|
|
@@ -4345,20 +4350,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4345
4350
|
height: "100%",
|
|
4346
4351
|
lang: "json",
|
|
4347
4352
|
dark: "",
|
|
4348
|
-
onBlur:
|
|
4353
|
+
onBlur: a
|
|
4349
4354
|
}, null, 8, ["model-value"])
|
|
4350
4355
|
]),
|
|
4351
4356
|
_: 1
|
|
4352
4357
|
}));
|
|
4353
4358
|
}
|
|
4354
|
-
}),
|
|
4359
|
+
}), fa = ["src"], ga = /* @__PURE__ */ E({
|
|
4355
4360
|
name: "PreviewerWidget",
|
|
4356
4361
|
__name: "index",
|
|
4357
4362
|
props: {
|
|
4358
4363
|
path: { type: Function }
|
|
4359
4364
|
},
|
|
4360
4365
|
setup(i, { expose: e }) {
|
|
4361
|
-
const t = i, s = w(), l = w(Symbol()), { current:
|
|
4366
|
+
const t = i, s = w(), l = w(Symbol()), { current: a, engine: r } = ne(), { width: o, height: u } = Yt(s), p = S(() => a.value && t.path ? t.path(a.value) : null), m = S(() => r.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc");
|
|
4362
4367
|
return e({
|
|
4363
4368
|
refresh: () => {
|
|
4364
4369
|
l.value = Symbol();
|
|
@@ -4371,7 +4376,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4371
4376
|
}, [
|
|
4372
4377
|
v(n(an), {
|
|
4373
4378
|
mode: m.value,
|
|
4374
|
-
width: n(
|
|
4379
|
+
width: n(o),
|
|
4375
4380
|
height: n(u)
|
|
4376
4381
|
}, {
|
|
4377
4382
|
default: g(() => [
|
|
@@ -4380,23 +4385,23 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4380
4385
|
ref: "iframe",
|
|
4381
4386
|
frameborder: "0",
|
|
4382
4387
|
src: p.value
|
|
4383
|
-
}, null, 8,
|
|
4388
|
+
}, null, 8, fa)) : C("", !0)
|
|
4384
4389
|
]),
|
|
4385
4390
|
_: 1
|
|
4386
4391
|
}, 8, ["mode", "width", "height"])
|
|
4387
4392
|
]));
|
|
4388
4393
|
}
|
|
4389
|
-
}),
|
|
4394
|
+
}), ha = /* @__PURE__ */ E({
|
|
4390
4395
|
name: "NodePathWidget",
|
|
4391
4396
|
inheritAttrs: !1,
|
|
4392
4397
|
__name: "index",
|
|
4393
4398
|
setup(i) {
|
|
4394
4399
|
const { selected: e, designer: t } = fe(), s = S(() => (e.value?.path || []).slice(0).reverse()), l = (r) => {
|
|
4395
4400
|
t.value?.setSelected(r);
|
|
4396
|
-
},
|
|
4401
|
+
}, a = (r) => {
|
|
4397
4402
|
t.value?.setHover(r);
|
|
4398
4403
|
};
|
|
4399
|
-
return (r,
|
|
4404
|
+
return (r, o) => n(e) ? (c(), _(n(Sn), {
|
|
4400
4405
|
key: 0,
|
|
4401
4406
|
class: "v-nodepath-widget",
|
|
4402
4407
|
"separator-icon": n(As)
|
|
@@ -4404,7 +4409,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4404
4409
|
default: g(() => [
|
|
4405
4410
|
(c(!0), j($, null, B(s.value, (u) => (c(), _(n(Vn), {
|
|
4406
4411
|
onClick: (p) => l(u),
|
|
4407
|
-
onMouseover: (p) =>
|
|
4412
|
+
onMouseover: (p) => a(u)
|
|
4408
4413
|
}, {
|
|
4409
4414
|
default: g(() => [
|
|
4410
4415
|
H(N(u.name), 1)
|
|
@@ -4415,32 +4420,32 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4415
4420
|
_: 1
|
|
4416
4421
|
}, 8, ["separator-icon"])) : C("", !0);
|
|
4417
4422
|
}
|
|
4418
|
-
}),
|
|
4423
|
+
}), ba = /* @__PURE__ */ E({
|
|
4419
4424
|
name: "SchemaWidget",
|
|
4420
4425
|
__name: "index",
|
|
4421
4426
|
setup(i) {
|
|
4422
|
-
const { current: e } =
|
|
4427
|
+
const { current: e } = ne(), t = w(), s = S(
|
|
4423
4428
|
() => JSON.stringify(e.value?.toDsl() || {}, null, 2)
|
|
4424
|
-
), l = S(() => e.value ? e.value.name : ""),
|
|
4425
|
-
const
|
|
4426
|
-
if (
|
|
4429
|
+
), l = S(() => e.value ? e.value.name : ""), a = async () => {
|
|
4430
|
+
const o = (t.value?.getEditor()).getValue();
|
|
4431
|
+
if (o && await Ee(
|
|
4427
4432
|
"手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。"
|
|
4428
4433
|
))
|
|
4429
4434
|
try {
|
|
4430
|
-
const p = JSON.parse(
|
|
4431
|
-
e.value?.update(p),
|
|
4435
|
+
const p = JSON.parse(o);
|
|
4436
|
+
e.value?.update(p), ae("保存成功");
|
|
4432
4437
|
} catch (p) {
|
|
4433
4438
|
Q(p?.message);
|
|
4434
4439
|
}
|
|
4435
4440
|
};
|
|
4436
|
-
return (r,
|
|
4441
|
+
return (r, o) => (c(), _(n(W), {
|
|
4437
4442
|
class: "v-schema-widget",
|
|
4438
4443
|
title: l.value,
|
|
4439
4444
|
subtitle: "手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。",
|
|
4440
4445
|
size: "small",
|
|
4441
4446
|
fit: "",
|
|
4442
4447
|
save: "",
|
|
4443
|
-
onSave:
|
|
4448
|
+
onSave: a
|
|
4444
4449
|
}, {
|
|
4445
4450
|
default: g(() => [
|
|
4446
4451
|
v(n(K), {
|
|
@@ -4455,28 +4460,28 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4455
4460
|
_: 1
|
|
4456
4461
|
}, 8, ["title"]));
|
|
4457
4462
|
}
|
|
4458
|
-
}),
|
|
4463
|
+
}), _a = /* @__PURE__ */ E({
|
|
4459
4464
|
name: "SchemaWidget",
|
|
4460
4465
|
__name: "index",
|
|
4461
4466
|
setup(i) {
|
|
4462
|
-
const { current: e, engine: t } =
|
|
4463
|
-
return
|
|
4467
|
+
const { current: e, engine: t } = ne(), s = w(), l = w(""), a = S(() => e.value ? `$vtj/raw/${e.value.id}.vue` : ""), r = S(() => e.value ? e.value.name : "");
|
|
4468
|
+
return X(
|
|
4464
4469
|
e,
|
|
4465
|
-
async (
|
|
4470
|
+
async (o) => {
|
|
4466
4471
|
const u = t.project.value;
|
|
4467
|
-
u &&
|
|
4472
|
+
u && o ? l.value = await t.service.genVueContent(
|
|
4468
4473
|
u.toDsl(),
|
|
4469
|
-
|
|
4474
|
+
o.toDsl()
|
|
4470
4475
|
) : l.value = "";
|
|
4471
4476
|
},
|
|
4472
4477
|
{
|
|
4473
4478
|
immediate: !0,
|
|
4474
4479
|
deep: !0
|
|
4475
4480
|
}
|
|
4476
|
-
), (
|
|
4481
|
+
), (o, u) => (c(), _(n(W), {
|
|
4477
4482
|
class: "v-raw-widget",
|
|
4478
4483
|
title: r.value,
|
|
4479
|
-
subtitle:
|
|
4484
|
+
subtitle: a.value,
|
|
4480
4485
|
size: "small",
|
|
4481
4486
|
fit: ""
|
|
4482
4487
|
}, {
|
|
@@ -4494,7 +4499,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4494
4499
|
_: 1
|
|
4495
4500
|
}, 8, ["title", "subtitle"]));
|
|
4496
4501
|
}
|
|
4497
|
-
}),
|
|
4502
|
+
}), ya = ["src"], ka = /* @__PURE__ */ E({
|
|
4498
4503
|
name: "DocsWidget",
|
|
4499
4504
|
__name: "index",
|
|
4500
4505
|
props: {
|
|
@@ -4503,15 +4508,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4503
4508
|
setup(i) {
|
|
4504
4509
|
const e = i, t = w();
|
|
4505
4510
|
let s = null;
|
|
4506
|
-
|
|
4511
|
+
Pt(() => {
|
|
4507
4512
|
s || (s = xn.service({ target: t.value?.$el }));
|
|
4508
|
-
}),
|
|
4513
|
+
}), It(() => {
|
|
4509
4514
|
l(), s = null;
|
|
4510
4515
|
});
|
|
4511
4516
|
const l = () => {
|
|
4512
4517
|
s?.close();
|
|
4513
4518
|
};
|
|
4514
|
-
return (
|
|
4519
|
+
return (a, r) => (c(), _(n(W), {
|
|
4515
4520
|
class: "v-docs-widget",
|
|
4516
4521
|
size: "small",
|
|
4517
4522
|
fit: "",
|
|
@@ -4525,21 +4530,21 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4525
4530
|
ref: "frame",
|
|
4526
4531
|
src: e.url,
|
|
4527
4532
|
onLoad: l
|
|
4528
|
-
}, null, 40,
|
|
4533
|
+
}, null, 40, ya)
|
|
4529
4534
|
]),
|
|
4530
4535
|
_: 1
|
|
4531
4536
|
}, 512));
|
|
4532
4537
|
}
|
|
4533
|
-
}),
|
|
4538
|
+
}), wa = { class: "v-about-widget" }, Sa = { class: "v-about-widget__logo" }, Va = ["src"], xa = /* @__PURE__ */ z("div", { class: "v-about-widget__name" }, "VTJ.PRO", -1), Ca = { class: "v-about-widget__version" }, Ea = /* @__PURE__ */ E({
|
|
4534
4539
|
name: "AboutWidget",
|
|
4535
4540
|
__name: "index",
|
|
4536
4541
|
setup(i) {
|
|
4537
|
-
return (e, t) => (c(), j("div",
|
|
4538
|
-
z("div",
|
|
4539
|
-
z("img", { src: n(
|
|
4542
|
+
return (e, t) => (c(), j("div", wa, [
|
|
4543
|
+
z("div", Sa, [
|
|
4544
|
+
z("img", { src: n(en) }, null, 8, Va)
|
|
4540
4545
|
]),
|
|
4541
|
-
|
|
4542
|
-
z("div",
|
|
4546
|
+
xa,
|
|
4547
|
+
z("div", Ca, "版本:" + N(n(Ws)), 1)
|
|
4543
4548
|
]));
|
|
4544
4549
|
}
|
|
4545
4550
|
}), L = {
|
|
@@ -4556,21 +4561,21 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4556
4561
|
Apis: Jl,
|
|
4557
4562
|
Deps: Ul,
|
|
4558
4563
|
Designer: Gl,
|
|
4559
|
-
Scripts:
|
|
4560
|
-
Properties:
|
|
4561
|
-
Events:
|
|
4562
|
-
Css:
|
|
4563
|
-
Directives:
|
|
4564
|
-
Defined:
|
|
4565
|
-
DataSources:
|
|
4566
|
-
Style:
|
|
4567
|
-
Previewer:
|
|
4568
|
-
NodePath:
|
|
4569
|
-
Schema:
|
|
4570
|
-
Raw:
|
|
4571
|
-
Docs:
|
|
4572
|
-
About:
|
|
4573
|
-
},
|
|
4564
|
+
Scripts: ea,
|
|
4565
|
+
Properties: ta,
|
|
4566
|
+
Events: la,
|
|
4567
|
+
Css: aa,
|
|
4568
|
+
Directives: oa,
|
|
4569
|
+
Defined: da,
|
|
4570
|
+
DataSources: ma,
|
|
4571
|
+
Style: va,
|
|
4572
|
+
Previewer: ga,
|
|
4573
|
+
NodePath: ha,
|
|
4574
|
+
Schema: ba,
|
|
4575
|
+
Raw: _a,
|
|
4576
|
+
Docs: ka,
|
|
4577
|
+
About: Ea
|
|
4578
|
+
}, ja = [
|
|
4574
4579
|
{
|
|
4575
4580
|
name: "Logo",
|
|
4576
4581
|
region: "Brand",
|
|
@@ -4712,7 +4717,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4712
4717
|
region: "Settings",
|
|
4713
4718
|
component: L.Scripts,
|
|
4714
4719
|
type: "tab",
|
|
4715
|
-
group:
|
|
4720
|
+
group: oe.Block,
|
|
4716
4721
|
label: "设置"
|
|
4717
4722
|
},
|
|
4718
4723
|
{
|
|
@@ -4720,7 +4725,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4720
4725
|
region: "Settings",
|
|
4721
4726
|
component: L.Css,
|
|
4722
4727
|
type: "tab",
|
|
4723
|
-
group:
|
|
4728
|
+
group: oe.Block,
|
|
4724
4729
|
label: "CSS"
|
|
4725
4730
|
},
|
|
4726
4731
|
{
|
|
@@ -4728,7 +4733,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4728
4733
|
region: "Settings",
|
|
4729
4734
|
component: L.DataSources,
|
|
4730
4735
|
type: "tab",
|
|
4731
|
-
group:
|
|
4736
|
+
group: oe.Block,
|
|
4732
4737
|
label: "数据源"
|
|
4733
4738
|
},
|
|
4734
4739
|
{
|
|
@@ -4736,7 +4741,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4736
4741
|
region: "Settings",
|
|
4737
4742
|
component: L.Defined,
|
|
4738
4743
|
type: "tab",
|
|
4739
|
-
group:
|
|
4744
|
+
group: oe.Block,
|
|
4740
4745
|
label: "定义"
|
|
4741
4746
|
},
|
|
4742
4747
|
{
|
|
@@ -4744,7 +4749,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4744
4749
|
region: "Settings",
|
|
4745
4750
|
component: L.Properties,
|
|
4746
4751
|
type: "tab",
|
|
4747
|
-
group:
|
|
4752
|
+
group: oe.Node,
|
|
4748
4753
|
label: "属性"
|
|
4749
4754
|
},
|
|
4750
4755
|
{
|
|
@@ -4752,7 +4757,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4752
4757
|
region: "Settings",
|
|
4753
4758
|
component: L.Style,
|
|
4754
4759
|
type: "tab",
|
|
4755
|
-
group:
|
|
4760
|
+
group: oe.Node,
|
|
4756
4761
|
label: "样式"
|
|
4757
4762
|
},
|
|
4758
4763
|
{
|
|
@@ -4760,7 +4765,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4760
4765
|
region: "Settings",
|
|
4761
4766
|
component: L.Events,
|
|
4762
4767
|
type: "tab",
|
|
4763
|
-
group:
|
|
4768
|
+
group: oe.Node,
|
|
4764
4769
|
label: "事件"
|
|
4765
4770
|
},
|
|
4766
4771
|
{
|
|
@@ -4768,7 +4773,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4768
4773
|
region: "Settings",
|
|
4769
4774
|
component: L.Directives,
|
|
4770
4775
|
type: "tab",
|
|
4771
|
-
group:
|
|
4776
|
+
group: oe.Node,
|
|
4772
4777
|
label: "指令"
|
|
4773
4778
|
},
|
|
4774
4779
|
{
|
|
@@ -4776,7 +4781,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4776
4781
|
region: "Status",
|
|
4777
4782
|
component: L.NodePath
|
|
4778
4783
|
}
|
|
4779
|
-
],
|
|
4784
|
+
], Aa = [
|
|
4780
4785
|
{
|
|
4781
4786
|
package: "vue",
|
|
4782
4787
|
version: "latest",
|
|
@@ -4875,7 +4880,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4875
4880
|
official: !0,
|
|
4876
4881
|
enabled: !1
|
|
4877
4882
|
}
|
|
4878
|
-
],
|
|
4883
|
+
], Da = [
|
|
4879
4884
|
{
|
|
4880
4885
|
id: "elements",
|
|
4881
4886
|
category: "特殊元素"
|
|
@@ -4884,7 +4889,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4884
4889
|
id: "components",
|
|
4885
4890
|
category: "内置组件"
|
|
4886
4891
|
}
|
|
4887
|
-
],
|
|
4892
|
+
], Pa = [
|
|
4888
4893
|
{
|
|
4889
4894
|
name: "component",
|
|
4890
4895
|
label: "动态组件",
|
|
@@ -4921,8 +4926,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
4921
4926
|
children: "默认插槽内容"
|
|
4922
4927
|
}
|
|
4923
4928
|
}
|
|
4924
|
-
],
|
|
4925
|
-
...
|
|
4929
|
+
], Ia = [
|
|
4930
|
+
...Pa,
|
|
4926
4931
|
{
|
|
4927
4932
|
name: "Transition",
|
|
4928
4933
|
label: "过渡效果",
|
|
@@ -5237,31 +5242,31 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5237
5242
|
}
|
|
5238
5243
|
]
|
|
5239
5244
|
}
|
|
5240
|
-
],
|
|
5245
|
+
], Ra = [
|
|
5241
5246
|
{
|
|
5242
5247
|
name: "vue",
|
|
5243
5248
|
version: "latest",
|
|
5244
5249
|
label: "内置",
|
|
5245
5250
|
library: "Vue",
|
|
5246
5251
|
order: 0,
|
|
5247
|
-
categories:
|
|
5248
|
-
components:
|
|
5252
|
+
categories: Da,
|
|
5253
|
+
components: Ia
|
|
5249
5254
|
}
|
|
5250
|
-
],
|
|
5255
|
+
], $a = /* @__PURE__ */ E({
|
|
5251
5256
|
name: "StringSetter",
|
|
5252
5257
|
__name: "string",
|
|
5253
5258
|
setup(i) {
|
|
5254
5259
|
return (e, t) => (c(), _(n(pe), ue({ clearable: "" }, e.$attrs), null, 16));
|
|
5255
5260
|
}
|
|
5256
|
-
}),
|
|
5261
|
+
}), Ba = /* @__PURE__ */ E({
|
|
5257
5262
|
name: "BooleanSetter",
|
|
5258
5263
|
__name: "boolean",
|
|
5259
5264
|
setup(i) {
|
|
5260
|
-
return (e, t) => (c(), _(n(
|
|
5265
|
+
return (e, t) => (c(), _(n(zt), ue(e.$attrs, {
|
|
5261
5266
|
"model-value": !!e.$attrs.modelValue
|
|
5262
5267
|
}), null, 16, ["model-value"]));
|
|
5263
5268
|
}
|
|
5264
|
-
}),
|
|
5269
|
+
}), Ta = "{{", Fa = "}}", za = /* @__PURE__ */ E({
|
|
5265
5270
|
name: "ExpressionSetter",
|
|
5266
5271
|
__name: "expression",
|
|
5267
5272
|
props: {
|
|
@@ -5273,8 +5278,8 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5273
5278
|
const t = (u = "") => ({
|
|
5274
5279
|
type: "JSExpression",
|
|
5275
5280
|
value: Pe(u) ? u.value : u
|
|
5276
|
-
}), s = i, l = e,
|
|
5277
|
-
|
|
5281
|
+
}), s = i, l = e, a = (u) => ee(u, s.context, !0), r = w(t(s.modelValue).value);
|
|
5282
|
+
X(
|
|
5278
5283
|
() => s.modelValue,
|
|
5279
5284
|
(u) => {
|
|
5280
5285
|
r.value = t(u).value;
|
|
@@ -5283,29 +5288,29 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5283
5288
|
immediate: !0
|
|
5284
5289
|
}
|
|
5285
5290
|
);
|
|
5286
|
-
const
|
|
5291
|
+
const o = (u) => {
|
|
5287
5292
|
const p = {
|
|
5288
5293
|
type: "JSExpression",
|
|
5289
5294
|
value: u
|
|
5290
5295
|
};
|
|
5291
|
-
|
|
5296
|
+
a(p) && l("change", p);
|
|
5292
5297
|
};
|
|
5293
5298
|
return (u, p) => (c(), _(n(pe), {
|
|
5294
5299
|
class: "v-expression-setter",
|
|
5295
5300
|
modelValue: r.value,
|
|
5296
5301
|
"onUpdate:modelValue": p[0] || (p[0] = (m) => r.value = m),
|
|
5297
|
-
onChange:
|
|
5302
|
+
onChange: o
|
|
5298
5303
|
}, {
|
|
5299
5304
|
prefix: g(() => [
|
|
5300
|
-
H(N(
|
|
5305
|
+
H(N(Ta))
|
|
5301
5306
|
]),
|
|
5302
5307
|
suffix: g(() => [
|
|
5303
|
-
H(N(
|
|
5308
|
+
H(N(Fa))
|
|
5304
5309
|
]),
|
|
5305
5310
|
_: 1
|
|
5306
5311
|
}, 8, ["modelValue"]));
|
|
5307
5312
|
}
|
|
5308
|
-
}),
|
|
5313
|
+
}), Ma = /* @__PURE__ */ E({
|
|
5309
5314
|
name: "SelectSetter",
|
|
5310
5315
|
__name: "select",
|
|
5311
5316
|
props: {
|
|
@@ -5322,7 +5327,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5322
5327
|
_: 1
|
|
5323
5328
|
}, 16));
|
|
5324
5329
|
}
|
|
5325
|
-
}),
|
|
5330
|
+
}), Na = /* @__PURE__ */ E({
|
|
5326
5331
|
name: "NumberSetter",
|
|
5327
5332
|
__name: "number",
|
|
5328
5333
|
props: {
|
|
@@ -5330,22 +5335,22 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5330
5335
|
},
|
|
5331
5336
|
emits: ["change"],
|
|
5332
5337
|
setup(i, { emit: e }) {
|
|
5333
|
-
const t = i, s = e, l = S(() => Pe(t.modelValue) ? void 0 : Number(t.modelValue || 0)),
|
|
5338
|
+
const t = i, s = e, l = S(() => Pe(t.modelValue) ? void 0 : Number(t.modelValue || 0)), a = (r) => {
|
|
5334
5339
|
s("change", r);
|
|
5335
5340
|
};
|
|
5336
|
-
return (r,
|
|
5341
|
+
return (r, o) => (c(), _(n(jn), ue({
|
|
5337
5342
|
class: "v-number-setter",
|
|
5338
5343
|
"controls-position": "right",
|
|
5339
5344
|
"model-value": l.value
|
|
5340
|
-
}, r.$attrs, { onChange:
|
|
5345
|
+
}, r.$attrs, { onChange: a }), null, 16, ["model-value"]));
|
|
5341
5346
|
}
|
|
5342
|
-
}),
|
|
5347
|
+
}), Oa = /* @__PURE__ */ E({
|
|
5343
5348
|
name: "ColorSetter",
|
|
5344
5349
|
__name: "color",
|
|
5345
5350
|
setup(i) {
|
|
5346
|
-
return (e, t) => (c(), _(n(An), Dt(
|
|
5351
|
+
return (e, t) => (c(), _(n(An), At(Dt(e.$attrs)), null, 16));
|
|
5347
5352
|
}
|
|
5348
|
-
}),
|
|
5353
|
+
}), Wa = /* @__PURE__ */ E({
|
|
5349
5354
|
name: "JsonSetter",
|
|
5350
5355
|
__name: "json",
|
|
5351
5356
|
props: {
|
|
@@ -5356,7 +5361,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5356
5361
|
setup(i, { emit: e }) {
|
|
5357
5362
|
const t = i, s = w(), l = w(
|
|
5358
5363
|
typeof t.modelValue == "object" ? JSON.stringify(t.modelValue, null, 2) : void 0
|
|
5359
|
-
),
|
|
5364
|
+
), a = S(() => !!l.value), r = w(!1), o = e, u = (b) => {
|
|
5360
5365
|
let h = !0;
|
|
5361
5366
|
try {
|
|
5362
5367
|
const d = JSON.parse(b);
|
|
@@ -5377,15 +5382,15 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5377
5382
|
const b = s.value?.getEditor();
|
|
5378
5383
|
if (b) {
|
|
5379
5384
|
const h = b.getValue();
|
|
5380
|
-
u(h) && (l.value = h,
|
|
5385
|
+
u(h) && (l.value = h, o("change", JSON.parse(h)), r.value = !1);
|
|
5381
5386
|
}
|
|
5382
5387
|
}, m = () => {
|
|
5383
|
-
l.value = "",
|
|
5388
|
+
l.value = "", o("change", void 0), r.value = !1;
|
|
5384
5389
|
}, f = () => {
|
|
5385
5390
|
r.value = !0;
|
|
5386
5391
|
};
|
|
5387
5392
|
return (b, h) => (c(), j("div", {
|
|
5388
|
-
class:
|
|
5393
|
+
class: te(["v-json-setter", { "is-active": a.value }])
|
|
5389
5394
|
}, [
|
|
5390
5395
|
v(n(pe), ue({
|
|
5391
5396
|
readonly: "",
|
|
@@ -5420,7 +5425,7 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5420
5425
|
}, 8, ["modelValue", "title"])) : C("", !0)
|
|
5421
5426
|
], 2));
|
|
5422
5427
|
}
|
|
5423
|
-
}),
|
|
5428
|
+
}), La = /* @__PURE__ */ E({
|
|
5424
5429
|
name: "FunctionSetter",
|
|
5425
5430
|
__name: "function",
|
|
5426
5431
|
props: {
|
|
@@ -5431,22 +5436,22 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5431
5436
|
},
|
|
5432
5437
|
emits: ["change"],
|
|
5433
5438
|
setup(i, { emit: e }) {
|
|
5434
|
-
const t = i, s = w(), l = w(t.modelValue.value),
|
|
5439
|
+
const t = i, s = w(), l = w(t.modelValue.value), a = w(!1), r = S(() => !!l.value), o = e, u = () => {
|
|
5435
5440
|
const f = s.value?.getEditor();
|
|
5436
5441
|
if (f) {
|
|
5437
5442
|
const b = f.getValue(), h = {
|
|
5438
5443
|
type: "JSFunction",
|
|
5439
5444
|
value: b
|
|
5440
5445
|
};
|
|
5441
|
-
|
|
5446
|
+
ee(h, {}) && (l.value = b, o("change", h), a.value = !1);
|
|
5442
5447
|
}
|
|
5443
5448
|
}, p = () => {
|
|
5444
|
-
l.value = "",
|
|
5449
|
+
l.value = "", o("change", void 0), a.value = !1;
|
|
5445
5450
|
}, m = () => {
|
|
5446
|
-
|
|
5451
|
+
a.value = !0;
|
|
5447
5452
|
};
|
|
5448
5453
|
return (f, b) => (c(), j("div", {
|
|
5449
|
-
class:
|
|
5454
|
+
class: te(["v-function-setter", { "is-active": r.value }])
|
|
5450
5455
|
}, [
|
|
5451
5456
|
v(n(pe), ue({
|
|
5452
5457
|
readonly: "",
|
|
@@ -5454,10 +5459,10 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5454
5459
|
"model-value": "JSFunction",
|
|
5455
5460
|
"suffix-icon": n(vt)
|
|
5456
5461
|
}, f.$attrs), null, 16, ["suffix-icon"]),
|
|
5457
|
-
|
|
5462
|
+
a.value ? (c(), _(n($e), {
|
|
5458
5463
|
key: 0,
|
|
5459
|
-
modelValue:
|
|
5460
|
-
"onUpdate:modelValue": b[0] || (b[0] = (h) =>
|
|
5464
|
+
modelValue: a.value,
|
|
5465
|
+
"onUpdate:modelValue": b[0] || (b[0] = (h) => a.value = h),
|
|
5461
5466
|
title: "JSFunction",
|
|
5462
5467
|
width: "1000px",
|
|
5463
5468
|
height: "600px",
|
|
@@ -5481,20 +5486,20 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5481
5486
|
], 2));
|
|
5482
5487
|
}
|
|
5483
5488
|
}), le = {
|
|
5484
|
-
StringSetter:
|
|
5485
|
-
BooleanSetter:
|
|
5486
|
-
ExpressionSetter:
|
|
5487
|
-
SelectSetter:
|
|
5488
|
-
NumberSetter:
|
|
5489
|
-
ColorSetter:
|
|
5490
|
-
IconSetter:
|
|
5491
|
-
JsonSetter:
|
|
5492
|
-
FunctionSetter:
|
|
5493
|
-
},
|
|
5489
|
+
StringSetter: $a,
|
|
5490
|
+
BooleanSetter: Ba,
|
|
5491
|
+
ExpressionSetter: za,
|
|
5492
|
+
SelectSetter: Ma,
|
|
5493
|
+
NumberSetter: Na,
|
|
5494
|
+
ColorSetter: Oa,
|
|
5495
|
+
IconSetter: ln,
|
|
5496
|
+
JsonSetter: Wa,
|
|
5497
|
+
FunctionSetter: La
|
|
5498
|
+
}, Ja = {
|
|
5494
5499
|
name: "StringSetter",
|
|
5495
5500
|
component: le.StringSetter,
|
|
5496
5501
|
type: "String"
|
|
5497
|
-
},
|
|
5502
|
+
}, Ua = [
|
|
5498
5503
|
{
|
|
5499
5504
|
name: "InputSetter",
|
|
5500
5505
|
component: le.StringSetter,
|
|
@@ -5573,14 +5578,14 @@ const pl = { class: "v-switcher-widget" }, ml = { key: 1 }, vl = /* @__PURE__ */
|
|
|
5573
5578
|
type: "Function"
|
|
5574
5579
|
}
|
|
5575
5580
|
];
|
|
5576
|
-
class
|
|
5581
|
+
class Ha {
|
|
5577
5582
|
widgets = {};
|
|
5578
5583
|
constructor() {
|
|
5579
5584
|
this.widgets = this.createWidgets();
|
|
5580
5585
|
}
|
|
5581
5586
|
createWidgets() {
|
|
5582
5587
|
const e = {};
|
|
5583
|
-
for (const t of
|
|
5588
|
+
for (const t of ja)
|
|
5584
5589
|
e[t.name] = t;
|
|
5585
5590
|
return e;
|
|
5586
5591
|
}
|
|
@@ -5611,7 +5616,7 @@ class qo {
|
|
|
5611
5616
|
me.warn(`widget '${e}' is not found`);
|
|
5612
5617
|
return;
|
|
5613
5618
|
}
|
|
5614
|
-
|
|
5619
|
+
Wt(s, t), t.component && (s.component = t.component);
|
|
5615
5620
|
}
|
|
5616
5621
|
/**
|
|
5617
5622
|
* 根据区域名称获取区域内的器件配置
|
|
@@ -5626,9 +5631,9 @@ class qo {
|
|
|
5626
5631
|
) : s;
|
|
5627
5632
|
}
|
|
5628
5633
|
}
|
|
5629
|
-
const
|
|
5630
|
-
class
|
|
5631
|
-
constructor(e =
|
|
5634
|
+
const on = new Ha();
|
|
5635
|
+
class qa {
|
|
5636
|
+
constructor(e = Aa) {
|
|
5632
5637
|
this.deps = e;
|
|
5633
5638
|
}
|
|
5634
5639
|
/**
|
|
@@ -5661,14 +5666,14 @@ class Go {
|
|
|
5661
5666
|
merge(e) {
|
|
5662
5667
|
const t = [];
|
|
5663
5668
|
for (const s of this.deps) {
|
|
5664
|
-
const l = e.find((
|
|
5669
|
+
const l = e.find((a) => a.package === s.package);
|
|
5665
5670
|
t.push({
|
|
5666
5671
|
...s,
|
|
5667
5672
|
...l
|
|
5668
5673
|
});
|
|
5669
5674
|
}
|
|
5670
5675
|
for (const s of e)
|
|
5671
|
-
this.deps.find((
|
|
5676
|
+
this.deps.find((a) => a.package === s.package) || t.push(s);
|
|
5672
5677
|
return t;
|
|
5673
5678
|
}
|
|
5674
5679
|
/**
|
|
@@ -5680,16 +5685,16 @@ class Go {
|
|
|
5680
5685
|
t > -1 && this.deps.splice(t, 1);
|
|
5681
5686
|
}
|
|
5682
5687
|
}
|
|
5683
|
-
const
|
|
5684
|
-
class
|
|
5688
|
+
const Ga = new qa();
|
|
5689
|
+
class Ka {
|
|
5685
5690
|
setters = {};
|
|
5686
|
-
defaultSetter =
|
|
5691
|
+
defaultSetter = Ja;
|
|
5687
5692
|
constructor() {
|
|
5688
5693
|
this.setters = this.createSetters();
|
|
5689
5694
|
}
|
|
5690
5695
|
createSetters() {
|
|
5691
5696
|
const e = {};
|
|
5692
|
-
for (const t of
|
|
5697
|
+
for (const t of Ua)
|
|
5693
5698
|
e[t.name] = t;
|
|
5694
5699
|
return e;
|
|
5695
5700
|
}
|
|
@@ -5720,16 +5725,16 @@ class Zo {
|
|
|
5720
5725
|
me.warn(`setter '${e}' is not found`);
|
|
5721
5726
|
return;
|
|
5722
5727
|
}
|
|
5723
|
-
|
|
5728
|
+
Wt(s, t), t.component && (s.component = t.component);
|
|
5724
5729
|
}
|
|
5725
5730
|
getByType(e) {
|
|
5726
5731
|
return Object.values(this.setters).filter((s) => s.type === e).map((s) => s.name);
|
|
5727
5732
|
}
|
|
5728
5733
|
}
|
|
5729
|
-
const Oe = new
|
|
5730
|
-
function
|
|
5734
|
+
const Oe = new Ka();
|
|
5735
|
+
function Za(i) {
|
|
5731
5736
|
return new Promise((e, t) => {
|
|
5732
|
-
const s =
|
|
5737
|
+
const s = Rt(Bl, {
|
|
5733
5738
|
slots: i,
|
|
5734
5739
|
onClose: () => {
|
|
5735
5740
|
s.unmount(), t(null);
|
|
@@ -5741,7 +5746,7 @@ function Qo(i) {
|
|
|
5741
5746
|
s.mount(document.createElement("div"));
|
|
5742
5747
|
});
|
|
5743
5748
|
}
|
|
5744
|
-
class
|
|
5749
|
+
class Qa {
|
|
5745
5750
|
constructor(e, t, s) {
|
|
5746
5751
|
this.engine = e, this.contentWindow = t, this.dependencies = s, this.document = this.contentWindow.document, this.bindEvents(t, this.document);
|
|
5747
5752
|
}
|
|
@@ -5763,7 +5768,7 @@ class Xo {
|
|
|
5763
5768
|
"scroll",
|
|
5764
5769
|
this.bind(this.onViewChange, "onViewChange")
|
|
5765
5770
|
), e.addEventListener("resize", this.bind(this.onViewChange, "onViewChange")), t.addEventListener("mouseleave", this.bind(this.onLeave, "onLeave")), t.addEventListener("dragleave", this.bind(this.onLeave, "onLeave")), t.addEventListener("dragover", this.bind(this.onDragOver, "onDragOver")), t.addEventListener("drop", this.bind(this.onDrop, "onDrop")), t.addEventListener("click", this.bind(this.onSelected, "onSelected")), q.on(
|
|
5766
|
-
|
|
5771
|
+
ot,
|
|
5767
5772
|
this.bind(this.onActiveChange, "onActiveChange")
|
|
5768
5773
|
), q.on(Ie, this.bind(this.onViewChange, "onViewChange"));
|
|
5769
5774
|
}
|
|
@@ -5781,7 +5786,7 @@ class Xo {
|
|
|
5781
5786
|
"dragover",
|
|
5782
5787
|
this.bind(this.onDragOver, "onDragOver")
|
|
5783
5788
|
), t.removeEventListener("drop", this.bind(this.onDrop, "onDrop")), t.removeEventListener("click", this.bind(this.onSelected, "onSelected")), q.off(
|
|
5784
|
-
|
|
5789
|
+
ot,
|
|
5785
5790
|
this.bind(this.onActiveChange, "onActiveChange")
|
|
5786
5791
|
), q.off(
|
|
5787
5792
|
Ie,
|
|
@@ -5804,10 +5809,10 @@ class Xo {
|
|
|
5804
5809
|
async getDropSlot(e) {
|
|
5805
5810
|
if (!e)
|
|
5806
5811
|
return;
|
|
5807
|
-
const { engine: t } = this, s = t.assets, l = s.componentMap,
|
|
5808
|
-
if (!
|
|
5812
|
+
const { engine: t } = this, s = t.assets, l = s.componentMap, a = await s.getBlockMaterial(e.from) || l.get(e.name);
|
|
5813
|
+
if (!a?.slots)
|
|
5809
5814
|
return;
|
|
5810
|
-
const r = (
|
|
5815
|
+
const r = (a?.slots || ["default"]).map(
|
|
5811
5816
|
(u) => typeof u == "string" ? {
|
|
5812
5817
|
name: u,
|
|
5813
5818
|
params: []
|
|
@@ -5820,28 +5825,28 @@ class Xo {
|
|
|
5820
5825
|
return;
|
|
5821
5826
|
if (r.length === 1)
|
|
5822
5827
|
return r[0];
|
|
5823
|
-
const
|
|
5824
|
-
if (!(
|
|
5825
|
-
return
|
|
5828
|
+
const o = await Za(r).catch(() => null);
|
|
5829
|
+
if (!(o && o.name === "default" && (!o.params || o.params?.length === 0)))
|
|
5830
|
+
return o;
|
|
5826
5831
|
}
|
|
5827
5832
|
async onDrop(e) {
|
|
5828
5833
|
e.preventDefault();
|
|
5829
|
-
const { engine: t, dragging: s, dropping: l } = this,
|
|
5830
|
-
if (!
|
|
5834
|
+
const { engine: t, dragging: s, dropping: l } = this, a = t.current.value, r = this.getHelper(e);
|
|
5835
|
+
if (!a || !s || !l.value || !r)
|
|
5831
5836
|
return;
|
|
5832
|
-
const
|
|
5833
|
-
if (!await this.allowDrop(
|
|
5837
|
+
const o = r.model, u = l.value.type;
|
|
5838
|
+
if (!await this.allowDrop(o, u))
|
|
5834
5839
|
return;
|
|
5835
5840
|
const p = this.createNodeDsl(s), m = new kt(p);
|
|
5836
|
-
if (U(
|
|
5837
|
-
|
|
5841
|
+
if (U(o))
|
|
5842
|
+
a.addNode(m, void 0, u);
|
|
5838
5843
|
else {
|
|
5839
|
-
const f = await this.getDropSlot(u === "inner" ?
|
|
5844
|
+
const f = await this.getDropSlot(u === "inner" ? o : o.parent);
|
|
5840
5845
|
if (f === null) {
|
|
5841
5846
|
this.dropping.value = null;
|
|
5842
5847
|
return;
|
|
5843
5848
|
}
|
|
5844
|
-
m.slot = f,
|
|
5849
|
+
m.slot = f, a.addNode(m, o, u);
|
|
5845
5850
|
}
|
|
5846
5851
|
this.dropping.value = null;
|
|
5847
5852
|
}
|
|
@@ -5866,12 +5871,12 @@ class Xo {
|
|
|
5866
5871
|
return kt.nodes[t] || null;
|
|
5867
5872
|
}
|
|
5868
5873
|
getDropType(e, t, s) {
|
|
5869
|
-
const { left: l, top:
|
|
5870
|
-
return t >= l && t <= l + r * 0.2 ? "left" : t >= l + r * 0.8 && t <= l + r ? "right" : s >=
|
|
5874
|
+
const { left: l, top: a, width: r, height: o } = e;
|
|
5875
|
+
return t >= l && t <= l + r * 0.2 ? "left" : t >= l + r * 0.8 && t <= l + r ? "right" : s >= a && s <= a + o * 0.2 ? "top" : s >= a + o * 0.8 && s <= a + o ? "bottom" : "inner";
|
|
5871
5876
|
}
|
|
5872
5877
|
getNodePath(e = []) {
|
|
5873
|
-
const t = e.filter((
|
|
5874
|
-
return [...t.map((
|
|
5878
|
+
const t = e.filter((a) => this.isVtjElement(a)), s = this.engine.current.value;
|
|
5879
|
+
return [...t.map((a) => this.getNodeByElement(a)).filter((a) => !!a), s];
|
|
5875
5880
|
}
|
|
5876
5881
|
setDslFrom(e) {
|
|
5877
5882
|
const t = this.engine.assets.componentMap.get(e.name);
|
|
@@ -5880,12 +5885,12 @@ class Xo {
|
|
|
5880
5885
|
this.setDslFrom(s);
|
|
5881
5886
|
}
|
|
5882
5887
|
createNodeDsl(e) {
|
|
5883
|
-
const { name: t, snippet: s = {}, from: l } = e,
|
|
5888
|
+
const { name: t, snippet: s = {}, from: l } = e, a = {
|
|
5884
5889
|
...s,
|
|
5885
5890
|
name: t,
|
|
5886
5891
|
from: l || e.package
|
|
5887
5892
|
};
|
|
5888
|
-
return this.setDslFrom(
|
|
5893
|
+
return this.setDslFrom(a), a;
|
|
5889
5894
|
}
|
|
5890
5895
|
getElmenetByModel(e) {
|
|
5891
5896
|
return !this.document || !e ? null : U(e) ? this.document.body : Array.from(
|
|
@@ -5909,20 +5914,20 @@ class Xo {
|
|
|
5909
5914
|
const l = this.getNodeByElement(s) || this.engine.current.value;
|
|
5910
5915
|
if (!l)
|
|
5911
5916
|
return null;
|
|
5912
|
-
const
|
|
5917
|
+
const a = s.getBoundingClientRect(), r = this.getDropType(a, e.clientX, e.clientY), o = this.getNodePath(t);
|
|
5913
5918
|
return {
|
|
5914
5919
|
el: s,
|
|
5915
5920
|
model: l,
|
|
5916
|
-
rect:
|
|
5921
|
+
rect: a,
|
|
5917
5922
|
type: r,
|
|
5918
|
-
path:
|
|
5923
|
+
path: o
|
|
5919
5924
|
};
|
|
5920
5925
|
}
|
|
5921
5926
|
cleanHelper() {
|
|
5922
5927
|
this.setSelected(null), this.setHover(null), this.setDragging(null), this.setDropping(null);
|
|
5923
5928
|
}
|
|
5924
5929
|
async updateRect() {
|
|
5925
|
-
await
|
|
5930
|
+
await Nt(100);
|
|
5926
5931
|
const e = n(this.selected), t = n(this.hover);
|
|
5927
5932
|
if (e) {
|
|
5928
5933
|
const s = e.el.getBoundingClientRect();
|
|
@@ -5943,7 +5948,7 @@ class Xo {
|
|
|
5943
5948
|
this.dragging = e;
|
|
5944
5949
|
}
|
|
5945
5950
|
async setHover(e) {
|
|
5946
|
-
if (await
|
|
5951
|
+
if (await ye(), e) {
|
|
5947
5952
|
const t = this.getElmenetByModel(e);
|
|
5948
5953
|
if (!t)
|
|
5949
5954
|
return;
|
|
@@ -5959,7 +5964,7 @@ class Xo {
|
|
|
5959
5964
|
this.hover.value = null;
|
|
5960
5965
|
}
|
|
5961
5966
|
async setSelected(e) {
|
|
5962
|
-
if (await
|
|
5967
|
+
if (await ye(), e) {
|
|
5963
5968
|
const t = this.getElmenetByModel(e) || this.document?.createElement("span");
|
|
5964
5969
|
if (!t)
|
|
5965
5970
|
return;
|
|
@@ -5975,31 +5980,31 @@ class Xo {
|
|
|
5975
5980
|
this.selected.value = null;
|
|
5976
5981
|
}
|
|
5977
5982
|
async setDropping(e, t = "inner") {
|
|
5978
|
-
if (await
|
|
5983
|
+
if (await ye(), e) {
|
|
5979
5984
|
const s = this.getElmenetByModel(e);
|
|
5980
5985
|
if (!s)
|
|
5981
5986
|
return;
|
|
5982
|
-
const l = s.getBoundingClientRect(),
|
|
5987
|
+
const l = s.getBoundingClientRect(), a = U(e) ? [] : this.findPathByNode(e);
|
|
5983
5988
|
this.dropping.value = {
|
|
5984
5989
|
el: s,
|
|
5985
5990
|
model: e,
|
|
5986
5991
|
rect: l,
|
|
5987
5992
|
type: t,
|
|
5988
|
-
path:
|
|
5993
|
+
path: a
|
|
5989
5994
|
};
|
|
5990
5995
|
} else
|
|
5991
5996
|
this.dropping.value = null;
|
|
5992
5997
|
}
|
|
5993
5998
|
async allowDrop(e, t = "inner") {
|
|
5994
|
-
const { dragging: s, engine: l } = this,
|
|
5995
|
-
if (!s || !
|
|
5999
|
+
const { dragging: s, engine: l } = this, a = l.current.value;
|
|
6000
|
+
if (!s || !a)
|
|
5996
6001
|
return !1;
|
|
5997
6002
|
if (U(e))
|
|
5998
6003
|
return !0;
|
|
5999
|
-
const r = l.assets.componentMap,
|
|
6004
|
+
const r = l.assets.componentMap, o = t !== "inner" && e.parent || e, u = await l.assets.getBlockMaterial(o.from) || r.get(o.name);
|
|
6000
6005
|
if (!u)
|
|
6001
6006
|
return !1;
|
|
6002
|
-
const { parentIncludes: p = !0, name: m } = s, { childIncludes: f = !0 } = u, b = p === !0 || Array.isArray(p) && p.includes(
|
|
6007
|
+
const { parentIncludes: p = !0, name: m } = s, { childIncludes: f = !0 } = u, b = p === !0 || Array.isArray(p) && p.includes(o.name), h = f === !0 || Array.isArray(f) && f.includes(m);
|
|
6003
6008
|
return b && h;
|
|
6004
6009
|
}
|
|
6005
6010
|
dispose() {
|
|
@@ -6007,7 +6012,7 @@ class Xo {
|
|
|
6007
6012
|
this.setSelected(null), this.setHover(null), this.setDragging(null), e && t && this.unbindEvents(e, t), this.document = null;
|
|
6008
6013
|
}
|
|
6009
6014
|
}
|
|
6010
|
-
class
|
|
6015
|
+
class Xa {
|
|
6011
6016
|
constructor(e, t, s = null) {
|
|
6012
6017
|
this.env = e, this.service = t, this.designer = s, this.nodeChange = this.__onNodeChange.bind(this), this.blockChange = this.__onBlockChange.bind(this);
|
|
6013
6018
|
}
|
|
@@ -6018,18 +6023,18 @@ class Yo {
|
|
|
6018
6023
|
context = null;
|
|
6019
6024
|
install(e) {
|
|
6020
6025
|
const { library: t, globals: s } = this.env, l = Object.values(t);
|
|
6021
|
-
Object.assign(e.config.globalProperties, s), e.config.errorHandler = (
|
|
6022
|
-
const u = r?.$options.name, p =
|
|
6026
|
+
Object.assign(e.config.globalProperties, s), e.config.errorHandler = (a, r, o) => {
|
|
6027
|
+
const u = r?.$options.name, p = a?.message || a?.msg || "未知错误", m = `[ ${u} ] ${p}`;
|
|
6023
6028
|
console.error({
|
|
6024
|
-
err:
|
|
6029
|
+
err: a,
|
|
6025
6030
|
instance: r,
|
|
6026
|
-
info:
|
|
6031
|
+
info: o
|
|
6027
6032
|
}), Ue.error({
|
|
6028
6033
|
title: "运行错误",
|
|
6029
6034
|
message: m
|
|
6030
6035
|
});
|
|
6031
|
-
}, l.forEach((
|
|
6032
|
-
(typeof
|
|
6036
|
+
}, l.forEach((a) => {
|
|
6037
|
+
(typeof a == "function" || typeof a.install == "function") && e?.use(a);
|
|
6033
6038
|
});
|
|
6034
6039
|
}
|
|
6035
6040
|
render(e) {
|
|
@@ -6037,28 +6042,28 @@ class Yo {
|
|
|
6037
6042
|
window: t,
|
|
6038
6043
|
container: s,
|
|
6039
6044
|
Vue: l,
|
|
6040
|
-
components:
|
|
6045
|
+
components: a,
|
|
6041
6046
|
library: r,
|
|
6042
|
-
apis:
|
|
6047
|
+
apis: o
|
|
6043
6048
|
} = this.env, u = t.document.createElement("div");
|
|
6044
6049
|
u.id = "app", s.appendChild(u), this.dsl = l.reactive(e.toDsl());
|
|
6045
6050
|
const p = Un({
|
|
6046
6051
|
getDsl: async (b) => await this.service.getFile(b) || null,
|
|
6047
6052
|
options: {
|
|
6048
|
-
mode:
|
|
6053
|
+
mode: at.Design,
|
|
6049
6054
|
Vue: l,
|
|
6050
|
-
components:
|
|
6055
|
+
components: a,
|
|
6051
6056
|
libs: r,
|
|
6052
|
-
apis:
|
|
6057
|
+
apis: o,
|
|
6053
6058
|
window: t
|
|
6054
6059
|
}
|
|
6055
6060
|
}), { renderer: m, context: f } = Hn({
|
|
6056
6061
|
Vue: l,
|
|
6057
|
-
mode:
|
|
6062
|
+
mode: at.Design,
|
|
6058
6063
|
dsl: this.dsl,
|
|
6059
|
-
components:
|
|
6064
|
+
components: a,
|
|
6060
6065
|
libs: r,
|
|
6061
|
-
apis:
|
|
6066
|
+
apis: o,
|
|
6062
6067
|
loader: p,
|
|
6063
6068
|
window: t
|
|
6064
6069
|
});
|
|
@@ -6082,12 +6087,12 @@ class Yo {
|
|
|
6082
6087
|
const s = t.children || t.nodes || [];
|
|
6083
6088
|
if (Array.isArray(s))
|
|
6084
6089
|
for (let l = 0; l < s.length; l++) {
|
|
6085
|
-
const
|
|
6086
|
-
if (
|
|
6090
|
+
const a = s[l];
|
|
6091
|
+
if (a.id === e.id) {
|
|
6087
6092
|
s.splice(l, 1, e);
|
|
6088
6093
|
return;
|
|
6089
6094
|
} else
|
|
6090
|
-
this.updateChild(e,
|
|
6095
|
+
this.updateChild(e, a);
|
|
6091
6096
|
}
|
|
6092
6097
|
}
|
|
6093
6098
|
__onNodeChange(e) {
|
|
@@ -6097,7 +6102,7 @@ class Yo {
|
|
|
6097
6102
|
this.dispose(), this.render(e), this.designer?.selected.value && this.designer.setSelected(e);
|
|
6098
6103
|
}
|
|
6099
6104
|
}
|
|
6100
|
-
class
|
|
6105
|
+
class Ya extends Jt {
|
|
6101
6106
|
contentWindow = null;
|
|
6102
6107
|
renderer = null;
|
|
6103
6108
|
designer = Me(null);
|
|
@@ -6106,18 +6111,22 @@ class ea extends Ut {
|
|
|
6106
6111
|
constructor(e) {
|
|
6107
6112
|
super();
|
|
6108
6113
|
const { engine: t, materialPath: s } = e;
|
|
6109
|
-
this.engine = t, this.materialPath = s,
|
|
6114
|
+
this.engine = t, this.materialPath = s, X(this.engine.current, () => {
|
|
6110
6115
|
this.refresh();
|
|
6111
6116
|
});
|
|
6112
6117
|
}
|
|
6113
6118
|
init(e, t) {
|
|
6114
|
-
|
|
6115
|
-
e
|
|
6116
|
-
|
|
6117
|
-
this.contentWindow,
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6119
|
+
X(
|
|
6120
|
+
[e, t],
|
|
6121
|
+
() => {
|
|
6122
|
+
e.value && t.value.length && (this.resetReady(), this.setup(e.value, t.value), this.contentWindow && (this.designer.value?.dispose(), this.designer.value = new Qa(
|
|
6123
|
+
this.engine,
|
|
6124
|
+
this.contentWindow,
|
|
6125
|
+
t
|
|
6126
|
+
)));
|
|
6127
|
+
},
|
|
6128
|
+
{ immediate: !0 }
|
|
6129
|
+
);
|
|
6121
6130
|
}
|
|
6122
6131
|
setup(e, t) {
|
|
6123
6132
|
const s = e.contentWindow;
|
|
@@ -6129,9 +6138,9 @@ class ea extends Ut {
|
|
|
6129
6138
|
const l = s.document;
|
|
6130
6139
|
this.contentWindow = s;
|
|
6131
6140
|
const {
|
|
6132
|
-
scripts:
|
|
6141
|
+
scripts: a,
|
|
6133
6142
|
css: r,
|
|
6134
|
-
materials:
|
|
6143
|
+
materials: o,
|
|
6135
6144
|
libraryExports: u,
|
|
6136
6145
|
materialExports: p,
|
|
6137
6146
|
materialMapLibrary: m
|
|
@@ -6154,8 +6163,8 @@ class ea extends Ut {
|
|
|
6154
6163
|
}
|
|
6155
6164
|
</style>
|
|
6156
6165
|
${Gn(r)}
|
|
6157
|
-
${yt(o)}
|
|
6158
6166
|
${yt(a)}
|
|
6167
|
+
${yt(o)}
|
|
6159
6168
|
</head>
|
|
6160
6169
|
<body>
|
|
6161
6170
|
</body>
|
|
@@ -6169,17 +6178,17 @@ class ea extends Ut {
|
|
|
6169
6178
|
}
|
|
6170
6179
|
async emitReady(e = [], t = [], s = {}) {
|
|
6171
6180
|
this.renderer?.dispose(), this.renderer = null;
|
|
6172
|
-
const l = this.contentWindow, { assets:
|
|
6181
|
+
const l = this.contentWindow, { assets: a, service: r, current: o, provider: u } = this.engine, p = u.materials || {}, m = [];
|
|
6173
6182
|
for (const b of t) {
|
|
6174
6183
|
const h = p[b] ? (await p[b]()).default : l[b];
|
|
6175
6184
|
m.push(h);
|
|
6176
6185
|
}
|
|
6177
|
-
|
|
6186
|
+
a.load(m);
|
|
6178
6187
|
const f = this.createEnv(e, s, m);
|
|
6179
|
-
this.renderer = new
|
|
6188
|
+
this.renderer = new Xa(f, r, this.designer.value), o.value && this.renderer.render(o.value), this.triggerReady();
|
|
6180
6189
|
}
|
|
6181
6190
|
createEnv(e = [], t = {}, s = []) {
|
|
6182
|
-
const l = this.contentWindow, { engine:
|
|
6191
|
+
const l = this.contentWindow, { engine: a } = this, { project: r, assets: o, provider: u } = a, p = e.reduce((y, V) => (y[V] = l[V], y), {}), m = {}, { groups: f, componentMap: b } = o;
|
|
6183
6192
|
for (const y of f.value) {
|
|
6184
6193
|
const V = y.names || [], x = p[t[y.library || ""]];
|
|
6185
6194
|
x && V.forEach((D) => {
|
|
@@ -6208,7 +6217,7 @@ class ea extends Ut {
|
|
|
6208
6217
|
this.renderer?.dispose(), this.designer.value?.dispose(), this.contentWindow = null, this.renderer = null, this.designer.value = null;
|
|
6209
6218
|
}
|
|
6210
6219
|
}
|
|
6211
|
-
class
|
|
6220
|
+
class eo {
|
|
6212
6221
|
constructor(e) {
|
|
6213
6222
|
this.service = e;
|
|
6214
6223
|
}
|
|
@@ -6229,14 +6238,14 @@ class ta {
|
|
|
6229
6238
|
parseGroups(e) {
|
|
6230
6239
|
const t = [];
|
|
6231
6240
|
for (let s of e) {
|
|
6232
|
-
const { categories: l, components:
|
|
6233
|
-
if (!l || !
|
|
6241
|
+
const { categories: l, components: a, label: r, name: o, library: u } = s;
|
|
6242
|
+
if (!l || !a)
|
|
6234
6243
|
continue;
|
|
6235
|
-
const p =
|
|
6236
|
-
(h) => this.getCateoryComponents(h,
|
|
6244
|
+
const p = a.map((h) => h.name), m = l.map(
|
|
6245
|
+
(h) => this.getCateoryComponents(h, a)
|
|
6237
6246
|
), f = m.reduce((h, d) => d.count + h, 0), b = {
|
|
6238
6247
|
name: s.name,
|
|
6239
|
-
label: r ||
|
|
6248
|
+
label: r || o,
|
|
6240
6249
|
count: f,
|
|
6241
6250
|
names: p,
|
|
6242
6251
|
library: u,
|
|
@@ -6247,7 +6256,7 @@ class ta {
|
|
|
6247
6256
|
return t;
|
|
6248
6257
|
}
|
|
6249
6258
|
load(e) {
|
|
6250
|
-
const t = [
|
|
6259
|
+
const t = [...Ra, ...e].filter((s) => !!s);
|
|
6251
6260
|
t.sort((s, l) => s.order - l.order);
|
|
6252
6261
|
for (let s of t)
|
|
6253
6262
|
s.components && (this.components = this.components.concat(s.components));
|
|
@@ -6262,7 +6271,7 @@ class ta {
|
|
|
6262
6271
|
const s = await this.service.getFile(t);
|
|
6263
6272
|
if (!s)
|
|
6264
6273
|
return null;
|
|
6265
|
-
const { id: l, name:
|
|
6274
|
+
const { id: l, name: a, slots: r, props: o, emits: u } = s, p = (f) => {
|
|
6266
6275
|
const b = Array.isArray(f) ? f : [f];
|
|
6267
6276
|
let h = [];
|
|
6268
6277
|
for (const d of b)
|
|
@@ -6273,10 +6282,10 @@ class ta {
|
|
|
6273
6282
|
};
|
|
6274
6283
|
return {
|
|
6275
6284
|
id: l,
|
|
6276
|
-
name:
|
|
6285
|
+
name: a,
|
|
6277
6286
|
// 如果没有定义插槽,不能放置子组件
|
|
6278
6287
|
childIncludes: r?.length ? void 0 : !1,
|
|
6279
|
-
props: (
|
|
6288
|
+
props: (o || []).map((f) => typeof f == "string" ? {
|
|
6280
6289
|
name: f
|
|
6281
6290
|
} : {
|
|
6282
6291
|
name: f.name,
|
|
@@ -6289,8 +6298,8 @@ class ta {
|
|
|
6289
6298
|
};
|
|
6290
6299
|
}
|
|
6291
6300
|
}
|
|
6292
|
-
const
|
|
6293
|
-
class
|
|
6301
|
+
const rn = Symbol("VtjEngine");
|
|
6302
|
+
class Mo extends Jt {
|
|
6294
6303
|
app;
|
|
6295
6304
|
skeleton;
|
|
6296
6305
|
container;
|
|
@@ -6304,47 +6313,51 @@ class Ma extends Ut {
|
|
|
6304
6313
|
isEmptyCurrent = w(!1);
|
|
6305
6314
|
history = w(null);
|
|
6306
6315
|
provider;
|
|
6316
|
+
/**
|
|
6317
|
+
* 当current变化时,更新该值,用于通知组件更新
|
|
6318
|
+
*/
|
|
6319
|
+
changed = w(Symbol());
|
|
6307
6320
|
constructor(e) {
|
|
6308
6321
|
super();
|
|
6309
6322
|
const {
|
|
6310
6323
|
container: t,
|
|
6311
6324
|
service: s,
|
|
6312
6325
|
project: l = {},
|
|
6313
|
-
globals:
|
|
6326
|
+
globals: a = {},
|
|
6314
6327
|
dependencies: r,
|
|
6315
|
-
materials:
|
|
6328
|
+
materials: o,
|
|
6316
6329
|
materialPath: u = "./"
|
|
6317
6330
|
} = e;
|
|
6318
6331
|
this.container = t, this.service = s, this.provider = new Qn({
|
|
6319
|
-
mode:
|
|
6320
|
-
globals:
|
|
6332
|
+
mode: at.Design,
|
|
6333
|
+
globals: a,
|
|
6321
6334
|
project: l,
|
|
6322
6335
|
service: s,
|
|
6323
6336
|
dependencies: r,
|
|
6324
|
-
materials:
|
|
6337
|
+
materials: o,
|
|
6325
6338
|
materialPath: u
|
|
6326
|
-
}), this.assets = new
|
|
6339
|
+
}), this.assets = new eo(this.service), this.simulator = new Ya({
|
|
6327
6340
|
engine: this,
|
|
6328
6341
|
materialPath: u
|
|
6329
|
-
}), this.bindEvents(), this.init(l),
|
|
6342
|
+
}), this.bindEvents(), this.init(l), Pt(this.render.bind(this)), It(this.dispose.bind(this));
|
|
6330
6343
|
}
|
|
6331
6344
|
async init(e) {
|
|
6332
6345
|
const t = await this.service.init(e).catch((s) => (me.warn("VTJEngine service init fail.", s), null));
|
|
6333
|
-
t && (t.dependencies =
|
|
6346
|
+
t && (t.dependencies = Ga.merge(t.dependencies || []), this.project.value = new Yn(t), this.saveMaterials(), this.triggerReady());
|
|
6334
6347
|
}
|
|
6335
6348
|
render() {
|
|
6336
6349
|
const e = n(this.container);
|
|
6337
6350
|
if (e) {
|
|
6338
|
-
const t =
|
|
6339
|
-
t.provide(
|
|
6351
|
+
const t = Rt(to);
|
|
6352
|
+
t.provide(rn, mn(this)), t.mount(e), this.app = t;
|
|
6340
6353
|
} else
|
|
6341
6354
|
me.warn("VTJEngine constructor param [ container ] is undefined");
|
|
6342
6355
|
}
|
|
6343
6356
|
bindEvents() {
|
|
6344
|
-
q.on(es, (e) => this.saveProject(e)), q.on(ts, (e) => this.saveBlockFile(e)), q.on(ns, (e) => this.saveBlockFile(e)), q.on(ss, () => this.saveMaterials()), q.on(
|
|
6357
|
+
q.on(es, (e) => this.saveProject(e)), q.on(ts, (e) => this.saveBlockFile(e)), q.on(ns, (e) => this.saveBlockFile(e)), q.on(ss, () => this.saveMaterials()), q.on(ot, (e) => this.activeFile(e)), q.on(ls, () => this.publish()), q.on(as, () => this.publishCurrent()), q.on(rt, (e) => this.changeFile(e)), q.on(Ie, () => this.changeCurrentFile()), q.on(os, (e) => this.saveHistory(e)), q.on(rs, (e) => this.loadHistory(e));
|
|
6345
6358
|
}
|
|
6346
6359
|
async activeFile(e) {
|
|
6347
|
-
await
|
|
6360
|
+
await ye();
|
|
6348
6361
|
const t = e.model, s = e.model.currentFile;
|
|
6349
6362
|
if (s) {
|
|
6350
6363
|
if (t.isPageFile(s) && s.raw)
|
|
@@ -6360,7 +6373,7 @@ class Ma extends Ut {
|
|
|
6360
6373
|
he(this.project);
|
|
6361
6374
|
}
|
|
6362
6375
|
async changeFile(e) {
|
|
6363
|
-
await
|
|
6376
|
+
await ye();
|
|
6364
6377
|
const t = e.toDsl();
|
|
6365
6378
|
this.service.saveFile(t), this.updateCurrent(e), this.history.value?.add(t), he(this.history);
|
|
6366
6379
|
}
|
|
@@ -6368,7 +6381,7 @@ class Ma extends Ut {
|
|
|
6368
6381
|
this.saveCurrentFile(), this.current.value && (this.history.value?.add(this.current.value.toDsl()), he(this.history));
|
|
6369
6382
|
}
|
|
6370
6383
|
async updateCurrent(e, t = !0) {
|
|
6371
|
-
this.current.value = e, await
|
|
6384
|
+
this.current.value = e, await ye(), this.context.value = this.simulator.renderer?.context || null, this.isEmptyCurrent.value = this.current.value?.nodes.length === 0, this.changed.value = Symbol(), t && he(this.context);
|
|
6372
6385
|
}
|
|
6373
6386
|
async saveProject(e) {
|
|
6374
6387
|
const s = e.model.toDsl();
|
|
@@ -6378,27 +6391,27 @@ class Ma extends Ut {
|
|
|
6378
6391
|
const t = e.type, s = e.model;
|
|
6379
6392
|
if (t === "create") {
|
|
6380
6393
|
const l = e.data;
|
|
6381
|
-
s.isPageFile(l) && l.raw ? (await this.service.createRawPage(l),
|
|
6394
|
+
s.isPageFile(l) && l.raw ? (await this.service.createRawPage(l), ae(`源码文件已经生成:/.vtj/vue/${l.id}.vue`, "success")) : l.dsl && await this.service.saveFile(l.dsl);
|
|
6382
6395
|
}
|
|
6383
6396
|
if (t === "update") {
|
|
6384
6397
|
const l = e.data;
|
|
6385
6398
|
if (s.isPageFile(l) && (l.dir || l.raw))
|
|
6386
6399
|
return;
|
|
6387
|
-
const
|
|
6388
|
-
|
|
6400
|
+
const a = await this.service.getFile(l.id);
|
|
6401
|
+
a && (a.name = l.name, await this.service.saveFile(a));
|
|
6389
6402
|
}
|
|
6390
6403
|
if (t === "delete") {
|
|
6391
6404
|
const l = e.data;
|
|
6392
6405
|
l && s.isPageFile(l) && l.raw ? await this.service.removeRawPage(l.id) : l.dir || (await this.service.removeFile(l.id), await this.service.removeHistory(l.id));
|
|
6393
6406
|
}
|
|
6394
6407
|
if (t === "clone") {
|
|
6395
|
-
const { page: l, newPage:
|
|
6396
|
-
r && (r.id =
|
|
6408
|
+
const { page: l, newPage: a } = e.data, r = await this.service.getFile(l.id);
|
|
6409
|
+
r && (r.id = a.id, r.name = a.name, await this.service.saveFile(r));
|
|
6397
6410
|
}
|
|
6398
6411
|
he(this.project);
|
|
6399
6412
|
}
|
|
6400
6413
|
async saveMaterials() {
|
|
6401
|
-
await
|
|
6414
|
+
await ye(), this.simulator.ready(() => {
|
|
6402
6415
|
const e = this.project.value;
|
|
6403
6416
|
if (e) {
|
|
6404
6417
|
const t = this.assets.componentMap;
|
|
@@ -6431,8 +6444,8 @@ class Ma extends Ut {
|
|
|
6431
6444
|
async loadHistory(e) {
|
|
6432
6445
|
const t = e.model, s = e.data, l = await this.service.getHistoryItem(t.id, s.id);
|
|
6433
6446
|
if (l && l.dsl) {
|
|
6434
|
-
const
|
|
6435
|
-
await this.updateCurrent(
|
|
6447
|
+
const a = new wt(l.dsl);
|
|
6448
|
+
await this.updateCurrent(a), he(this.history);
|
|
6436
6449
|
}
|
|
6437
6450
|
}
|
|
6438
6451
|
async publish() {
|
|
@@ -6442,7 +6455,7 @@ class Ma extends Ut {
|
|
|
6442
6455
|
...e.toDsl(),
|
|
6443
6456
|
pages: e.getPages()
|
|
6444
6457
|
};
|
|
6445
|
-
await this.service.publish(t) &&
|
|
6458
|
+
await this.service.publish(t) && ae("整站发布成功", "success");
|
|
6446
6459
|
}
|
|
6447
6460
|
}
|
|
6448
6461
|
async publishCurrent() {
|
|
@@ -6452,7 +6465,7 @@ class Ma extends Ut {
|
|
|
6452
6465
|
...e.toDsl(),
|
|
6453
6466
|
pages: e.getPages()
|
|
6454
6467
|
};
|
|
6455
|
-
await this.service.publishFile(s, t) &&
|
|
6468
|
+
await this.service.publishFile(s, t) && ae("发布成功", "success");
|
|
6456
6469
|
}
|
|
6457
6470
|
}
|
|
6458
6471
|
dispose() {
|
|
@@ -6462,9 +6475,9 @@ class Ma extends Ut {
|
|
|
6462
6475
|
const t = this.project.value, s = this.skeleton?.getRegion("Apps"), l = e || t?.homepage;
|
|
6463
6476
|
if (!t || !s || !l)
|
|
6464
6477
|
return;
|
|
6465
|
-
const
|
|
6466
|
-
|
|
6467
|
-
t.active(
|
|
6478
|
+
const a = t.getPage(l);
|
|
6479
|
+
a && !a.raw && (s.regionRef?.setActive("Pages"), this.simulator.ready(() => {
|
|
6480
|
+
t.active(a);
|
|
6468
6481
|
}));
|
|
6469
6482
|
const r = t.getBlock(l);
|
|
6470
6483
|
r && (s.regionRef?.setActive("Blocks"), this.simulator?.ready(() => {
|
|
@@ -6473,7 +6486,7 @@ class Ma extends Ut {
|
|
|
6473
6486
|
}
|
|
6474
6487
|
}
|
|
6475
6488
|
function se() {
|
|
6476
|
-
const i = vn(
|
|
6489
|
+
const i = vn(rn, null);
|
|
6477
6490
|
return i || me.error("VTJEngine is not exist"), i;
|
|
6478
6491
|
}
|
|
6479
6492
|
const be = E({
|
|
@@ -6493,7 +6506,7 @@ const be = E({
|
|
|
6493
6506
|
const i = Et[this.region] || Et.EmptyRegion;
|
|
6494
6507
|
return xe(i, { ...this.$props, ...this.$attrs, ref: "regionRef" });
|
|
6495
6508
|
}
|
|
6496
|
-
}),
|
|
6509
|
+
}), Se = E({
|
|
6497
6510
|
name: "WidgetWrapper",
|
|
6498
6511
|
props: {
|
|
6499
6512
|
region: {
|
|
@@ -6518,7 +6531,7 @@ const be = E({
|
|
|
6518
6531
|
ref: "widgetRef"
|
|
6519
6532
|
});
|
|
6520
6533
|
}
|
|
6521
|
-
}),
|
|
6534
|
+
}), to = E({
|
|
6522
6535
|
name: "SkeletonWrapper",
|
|
6523
6536
|
setup() {
|
|
6524
6537
|
const i = w(), e = se(), t = w({});
|
|
@@ -6532,7 +6545,7 @@ const be = E({
|
|
|
6532
6545
|
this.engine.skeleton = this;
|
|
6533
6546
|
},
|
|
6534
6547
|
render() {
|
|
6535
|
-
return xe(
|
|
6548
|
+
return xe(no, { ...this.$props, ...this.$attrs, ref: "skeletonRef" });
|
|
6536
6549
|
},
|
|
6537
6550
|
methods: {
|
|
6538
6551
|
/**
|
|
@@ -6576,7 +6589,7 @@ const be = E({
|
|
|
6576
6589
|
* @returns
|
|
6577
6590
|
*/
|
|
6578
6591
|
getWidget(i) {
|
|
6579
|
-
const e =
|
|
6592
|
+
const e = on.get(i);
|
|
6580
6593
|
if (!e) {
|
|
6581
6594
|
me.warn(`widget [ ${i} ] is not exsit`);
|
|
6582
6595
|
return;
|
|
@@ -6671,16 +6684,16 @@ const be = E({
|
|
|
6671
6684
|
name: t,
|
|
6672
6685
|
label: s,
|
|
6673
6686
|
title: l,
|
|
6674
|
-
value:
|
|
6687
|
+
value: a,
|
|
6675
6688
|
computedSetters: r,
|
|
6676
|
-
computedOptions:
|
|
6689
|
+
computedOptions: o,
|
|
6677
6690
|
variable: u,
|
|
6678
6691
|
changeValue: p,
|
|
6679
6692
|
defaultSetter: m,
|
|
6680
6693
|
removable: f,
|
|
6681
6694
|
onRemove: b
|
|
6682
6695
|
} = this;
|
|
6683
|
-
return xe(
|
|
6696
|
+
return xe(uo, {
|
|
6684
6697
|
context: i,
|
|
6685
6698
|
current: e,
|
|
6686
6699
|
name: t,
|
|
@@ -6689,9 +6702,9 @@ const be = E({
|
|
|
6689
6702
|
setters: r,
|
|
6690
6703
|
defaultSetter: m,
|
|
6691
6704
|
variable: u,
|
|
6692
|
-
value:
|
|
6705
|
+
value: a,
|
|
6693
6706
|
removable: f,
|
|
6694
|
-
options:
|
|
6707
|
+
options: o,
|
|
6695
6708
|
onChange: p,
|
|
6696
6709
|
onRemove: b
|
|
6697
6710
|
});
|
|
@@ -6708,7 +6721,7 @@ const be = E({
|
|
|
6708
6721
|
this.$emit("remove", i);
|
|
6709
6722
|
}
|
|
6710
6723
|
}
|
|
6711
|
-
}),
|
|
6724
|
+
}), no = /* @__PURE__ */ E({
|
|
6712
6725
|
name: "Skeletion",
|
|
6713
6726
|
__name: "skeleton",
|
|
6714
6727
|
props: {
|
|
@@ -6718,7 +6731,7 @@ const be = E({
|
|
|
6718
6731
|
footerHeight: { default: "20px" }
|
|
6719
6732
|
},
|
|
6720
6733
|
setup(i, { expose: e }) {
|
|
6721
|
-
const t = i, s = w(!1), l = w(parseInt(t.leftWidth)),
|
|
6734
|
+
const t = i, s = w(!1), l = w(parseInt(t.leftWidth)), a = w(parseInt(t.rightWidth)), r = {
|
|
6722
6735
|
dirs: ["e"],
|
|
6723
6736
|
maxWidth: 600,
|
|
6724
6737
|
minWidth: 49,
|
|
@@ -6728,15 +6741,15 @@ const be = E({
|
|
|
6728
6741
|
onEnd(x, D) {
|
|
6729
6742
|
l.value = D.elementWidth.value;
|
|
6730
6743
|
}
|
|
6731
|
-
},
|
|
6744
|
+
}, o = {
|
|
6732
6745
|
dirs: ["w"],
|
|
6733
6746
|
maxWidth: 600,
|
|
6734
6747
|
minWidth: 2,
|
|
6735
6748
|
onResizing(x, D) {
|
|
6736
|
-
|
|
6749
|
+
a.value = D.elementWidth.value;
|
|
6737
6750
|
},
|
|
6738
6751
|
onEnd(x, D) {
|
|
6739
|
-
|
|
6752
|
+
a.value = D.elementWidth.value;
|
|
6740
6753
|
}
|
|
6741
6754
|
}, u = w(), p = w(), m = w(), f = w(), b = w(), h = w(), d = w(), k = w(), y = w(!1), V = w(!1);
|
|
6742
6755
|
return e({
|
|
@@ -6750,7 +6763,7 @@ const be = E({
|
|
|
6750
6763
|
collapsed: y,
|
|
6751
6764
|
settable: V,
|
|
6752
6765
|
leftWidth: l,
|
|
6753
|
-
rightWidth:
|
|
6766
|
+
rightWidth: a,
|
|
6754
6767
|
preview: k,
|
|
6755
6768
|
isPreview: s
|
|
6756
6769
|
}), (x, D) => (c(), _(n(Dn), { locale: n(Bn) }, {
|
|
@@ -6786,7 +6799,7 @@ const be = E({
|
|
|
6786
6799
|
s.value ? C("", !0) : Ae((c(), _(n(bt), {
|
|
6787
6800
|
key: 0,
|
|
6788
6801
|
width: t.leftWidth,
|
|
6789
|
-
class:
|
|
6802
|
+
class: te(["v-skeleton__left", {
|
|
6790
6803
|
"is-collapsed": y.value
|
|
6791
6804
|
}])
|
|
6792
6805
|
}, {
|
|
@@ -6835,7 +6848,7 @@ const be = E({
|
|
|
6835
6848
|
_: 1
|
|
6836
6849
|
}, 8, ["width"])), [
|
|
6837
6850
|
[We, V.value],
|
|
6838
|
-
[n(_t),
|
|
6851
|
+
[n(_t), o]
|
|
6839
6852
|
])
|
|
6840
6853
|
]),
|
|
6841
6854
|
_: 1
|
|
@@ -6861,10 +6874,10 @@ const be = E({
|
|
|
6861
6874
|
_: 1
|
|
6862
6875
|
}, 8, ["locale"]));
|
|
6863
6876
|
}
|
|
6864
|
-
}),
|
|
6877
|
+
}), so = { key: 1 }, lo = { class: "v-setter__content" }, ao = {
|
|
6865
6878
|
key: 0,
|
|
6866
6879
|
class: "v-setter__input"
|
|
6867
|
-
},
|
|
6880
|
+
}, oo = { class: "v-setter__action" }, ro = "{{", io = "}}", uo = /* @__PURE__ */ E({
|
|
6868
6881
|
__name: "setter",
|
|
6869
6882
|
props: {
|
|
6870
6883
|
context: {},
|
|
@@ -6881,19 +6894,19 @@ const be = E({
|
|
|
6881
6894
|
},
|
|
6882
6895
|
emits: ["change", "remove"],
|
|
6883
6896
|
setup(i, { emit: e }) {
|
|
6884
|
-
const t = i, s = e, l = w(!1),
|
|
6897
|
+
const t = i, s = e, l = w(!1), a = w(""), r = w(
|
|
6885
6898
|
t.setters.find((V) => V.name === t.defaultSetter) || t.setters[0]
|
|
6886
|
-
),
|
|
6887
|
-
[r.value.name]:
|
|
6899
|
+
), o = w(t.value), u = S(() => !!Pe(o.value)), p = {
|
|
6900
|
+
[r.value.name]: o.value
|
|
6888
6901
|
}, m = (V) => {
|
|
6889
|
-
p[r.value.name] =
|
|
6902
|
+
p[r.value.name] = o.value, r.value = V, o.value = p[V.name] ?? void 0, f(o.value);
|
|
6890
6903
|
};
|
|
6891
|
-
|
|
6904
|
+
X(
|
|
6892
6905
|
() => t.value,
|
|
6893
6906
|
() => {
|
|
6894
|
-
|
|
6907
|
+
o.value = t.value;
|
|
6895
6908
|
}
|
|
6896
|
-
),
|
|
6909
|
+
), X(
|
|
6897
6910
|
() => t.defaultSetter,
|
|
6898
6911
|
() => {
|
|
6899
6912
|
r.value = t.setters.find(
|
|
@@ -6906,11 +6919,11 @@ const be = E({
|
|
|
6906
6919
|
}, b = () => {
|
|
6907
6920
|
s("remove", t.name);
|
|
6908
6921
|
}, h = () => {
|
|
6909
|
-
l.value = !0,
|
|
6922
|
+
l.value = !0, a.value = Pe(o.value) ? o.value.value : "";
|
|
6910
6923
|
}, d = () => {
|
|
6911
|
-
l.value = !1,
|
|
6912
|
-
}, k = async (V) =>
|
|
6913
|
-
await Ee("确定要解除绑定吗?") && (d(),
|
|
6924
|
+
l.value = !1, a.value = "";
|
|
6925
|
+
}, k = async (V) => ee(V, t.context, !0) ? (p[r.value.name] = o.value, o.value = V, s("change", V), !0) : !1, y = async () => {
|
|
6926
|
+
await Ee("确定要解除绑定吗?") && (d(), o.value = void 0, s("change", ""));
|
|
6914
6927
|
};
|
|
6915
6928
|
return (V, x) => (c(), _(n($n), {
|
|
6916
6929
|
class: "v-setter",
|
|
@@ -6918,7 +6931,7 @@ const be = E({
|
|
|
6918
6931
|
"label-positon": "left"
|
|
6919
6932
|
}, {
|
|
6920
6933
|
label: g(() => [
|
|
6921
|
-
t.title ? (c(), _(n(
|
|
6934
|
+
t.title ? (c(), _(n(Ft), {
|
|
6922
6935
|
key: 0,
|
|
6923
6936
|
placement: "top-start",
|
|
6924
6937
|
content: t.title
|
|
@@ -6927,19 +6940,19 @@ const be = E({
|
|
|
6927
6940
|
H(N(t.label || t.name), 1)
|
|
6928
6941
|
]),
|
|
6929
6942
|
_: 1
|
|
6930
|
-
}, 8, ["content"])) : (c(), j("span",
|
|
6943
|
+
}, 8, ["content"])) : (c(), j("span", so, N(t.label || t.name), 1))
|
|
6931
6944
|
]),
|
|
6932
6945
|
default: g(() => [
|
|
6933
|
-
z("div",
|
|
6934
|
-
r.value ? (c(), j("div",
|
|
6935
|
-
u.value ? C("", !0) : (c(), _(
|
|
6946
|
+
z("div", lo, [
|
|
6947
|
+
r.value ? (c(), j("div", ao, [
|
|
6948
|
+
u.value ? C("", !0) : (c(), _(jt(r.value.component), ue({
|
|
6936
6949
|
key: 0,
|
|
6937
6950
|
current: t.current,
|
|
6938
6951
|
context: t.context
|
|
6939
6952
|
}, r.value.props, {
|
|
6940
6953
|
options: t.options,
|
|
6941
|
-
modelValue:
|
|
6942
|
-
"onUpdate:modelValue": x[0] || (x[0] = (D) =>
|
|
6954
|
+
modelValue: o.value,
|
|
6955
|
+
"onUpdate:modelValue": x[0] || (x[0] = (D) => o.value = D),
|
|
6943
6956
|
onChange: f,
|
|
6944
6957
|
disabled: u.value
|
|
6945
6958
|
}), null, 16, ["current", "context", "options", "modelValue", "disabled"])),
|
|
@@ -6950,22 +6963,22 @@ const be = E({
|
|
|
6950
6963
|
"model-value": "JSExpression"
|
|
6951
6964
|
}, {
|
|
6952
6965
|
prefix: g(() => [
|
|
6953
|
-
H(N(
|
|
6966
|
+
H(N(ro))
|
|
6954
6967
|
]),
|
|
6955
6968
|
suffix: g(() => [
|
|
6956
|
-
H(N(
|
|
6969
|
+
H(N(io))
|
|
6957
6970
|
]),
|
|
6958
6971
|
_: 1
|
|
6959
6972
|
})) : C("", !0)
|
|
6960
6973
|
])) : C("", !0),
|
|
6961
|
-
z("div",
|
|
6974
|
+
z("div", oo, [
|
|
6962
6975
|
t.variable ? (c(), _(n(zs), {
|
|
6963
6976
|
key: 0,
|
|
6964
6977
|
onClick: h,
|
|
6965
|
-
class:
|
|
6978
|
+
class: te(["v-icon-vars", { "is-active": u.value }]),
|
|
6966
6979
|
title: "绑定变量"
|
|
6967
6980
|
}, null, 8, ["class"])) : C("", !0),
|
|
6968
|
-
t.setters.length > 1 ? (c(), _(n(
|
|
6981
|
+
t.setters.length > 1 ? (c(), _(n(Bt), {
|
|
6969
6982
|
key: 1,
|
|
6970
6983
|
disabled: u.value,
|
|
6971
6984
|
size: "small",
|
|
@@ -6973,15 +6986,15 @@ const be = E({
|
|
|
6973
6986
|
onCommand: m
|
|
6974
6987
|
}, {
|
|
6975
6988
|
dropdown: g(() => [
|
|
6976
|
-
v(n(
|
|
6989
|
+
v(n(Tt), null, {
|
|
6977
6990
|
default: g(() => [
|
|
6978
6991
|
(c(!0), j($, null, B(t.setters, (D) => (c(), _(n(nt), {
|
|
6979
6992
|
command: D,
|
|
6980
6993
|
key: D.name
|
|
6981
6994
|
}, {
|
|
6982
6995
|
default: g(() => [
|
|
6983
|
-
v(n(
|
|
6984
|
-
class:
|
|
6996
|
+
v(n(qt), {
|
|
6997
|
+
class: te({
|
|
6985
6998
|
"is-placeholder": D.name !== r.value.name
|
|
6986
6999
|
})
|
|
6987
7000
|
}, null, 8, ["class"]),
|
|
@@ -7005,11 +7018,11 @@ const be = E({
|
|
|
7005
7018
|
})) : C("", !0)
|
|
7006
7019
|
])
|
|
7007
7020
|
]),
|
|
7008
|
-
l.value ? (c(), _(n(
|
|
7021
|
+
l.value ? (c(), _(n(na), {
|
|
7009
7022
|
key: 0,
|
|
7010
7023
|
current: t.current,
|
|
7011
7024
|
context: t.context,
|
|
7012
|
-
value:
|
|
7025
|
+
value: a.value,
|
|
7013
7026
|
modelValue: l.value,
|
|
7014
7027
|
"onUpdate:modelValue": x[1] || (x[1] = (D) => l.value = D),
|
|
7015
7028
|
submitMethod: k,
|
|
@@ -7019,16 +7032,16 @@ const be = E({
|
|
|
7019
7032
|
_: 1
|
|
7020
7033
|
}));
|
|
7021
7034
|
}
|
|
7022
|
-
}),
|
|
7035
|
+
}), co = { class: "v-empty-region" }, po = /* @__PURE__ */ E({
|
|
7023
7036
|
name: "EmptyRegion",
|
|
7024
7037
|
__name: "empty",
|
|
7025
7038
|
props: {
|
|
7026
7039
|
region: {}
|
|
7027
7040
|
},
|
|
7028
7041
|
setup(i) {
|
|
7029
|
-
return (e, t) => (c(), j("div",
|
|
7042
|
+
return (e, t) => (c(), j("div", co, "找不到符合【" + N(e.region) + "】名称的区域组件", 1));
|
|
7030
7043
|
}
|
|
7031
|
-
}),
|
|
7044
|
+
}), mo = { class: "v-brand-region" }, vo = /* @__PURE__ */ E({
|
|
7032
7045
|
name: "BrandRegion",
|
|
7033
7046
|
inheritAttrs: !1,
|
|
7034
7047
|
__name: "brand",
|
|
@@ -7036,21 +7049,21 @@ const be = E({
|
|
|
7036
7049
|
region: {}
|
|
7037
7050
|
},
|
|
7038
7051
|
setup(i, { expose: e }) {
|
|
7039
|
-
const t = i, { widgets: s, widgetsRef: l } =
|
|
7052
|
+
const t = i, { widgets: s, widgetsRef: l } = we(t.region);
|
|
7040
7053
|
return e({
|
|
7041
7054
|
widgets: s,
|
|
7042
7055
|
widgetsRef: l
|
|
7043
|
-
}), (
|
|
7044
|
-
(c(!0), j($, null, B(n(s), (
|
|
7056
|
+
}), (a, r) => (c(), j("div", mo, [
|
|
7057
|
+
(c(!0), j($, null, B(n(s), (o) => (c(), _(n(Se), {
|
|
7045
7058
|
ref_for: !0,
|
|
7046
7059
|
ref_key: "widgetsRef",
|
|
7047
7060
|
ref: l,
|
|
7048
|
-
region:
|
|
7049
|
-
widget:
|
|
7061
|
+
region: a.region,
|
|
7062
|
+
widget: o
|
|
7050
7063
|
}, null, 8, ["region", "widget"]))), 256))
|
|
7051
7064
|
]));
|
|
7052
7065
|
}
|
|
7053
|
-
}),
|
|
7066
|
+
}), fo = { class: "v-toolbar-region" }, go = /* @__PURE__ */ E({
|
|
7054
7067
|
name: "ToolbarRegion",
|
|
7055
7068
|
__name: "toolbar",
|
|
7056
7069
|
props: {
|
|
@@ -7058,22 +7071,22 @@ const be = E({
|
|
|
7058
7071
|
preview: { type: Boolean }
|
|
7059
7072
|
},
|
|
7060
7073
|
setup(i, { expose: e }) {
|
|
7061
|
-
const t = i, { widgets: s, widgetsRef: l } =
|
|
7074
|
+
const t = i, { widgets: s, widgetsRef: l } = we(t.region);
|
|
7062
7075
|
return e({
|
|
7063
7076
|
widgets: s,
|
|
7064
7077
|
widgetsRef: l
|
|
7065
|
-
}), (
|
|
7066
|
-
(c(!0), j($, null, B(n(s), (
|
|
7078
|
+
}), (a, r) => (c(), j("div", fo, [
|
|
7079
|
+
(c(!0), j($, null, B(n(s), (o) => (c(), _(n(Se), {
|
|
7067
7080
|
ref_for: !0,
|
|
7068
7081
|
ref_key: "widgetsRef",
|
|
7069
7082
|
ref: l,
|
|
7070
|
-
region:
|
|
7071
|
-
widget:
|
|
7072
|
-
preview:
|
|
7083
|
+
region: a.region,
|
|
7084
|
+
widget: o,
|
|
7085
|
+
preview: a.preview
|
|
7073
7086
|
}, null, 8, ["region", "widget", "preview"]))), 256))
|
|
7074
7087
|
]));
|
|
7075
7088
|
}
|
|
7076
|
-
}),
|
|
7089
|
+
}), ho = { class: "v-actions-region" }, bo = /* @__PURE__ */ E({
|
|
7077
7090
|
name: "ActionsRegion",
|
|
7078
7091
|
inheritAttrs: !1,
|
|
7079
7092
|
__name: "actions",
|
|
@@ -7081,21 +7094,21 @@ const be = E({
|
|
|
7081
7094
|
region: {}
|
|
7082
7095
|
},
|
|
7083
7096
|
setup(i, { expose: e }) {
|
|
7084
|
-
const t = i, { widgets: s, widgetsRef: l } =
|
|
7097
|
+
const t = i, { widgets: s, widgetsRef: l } = we(t.region);
|
|
7085
7098
|
return e({
|
|
7086
7099
|
widgets: s,
|
|
7087
7100
|
widgetsRef: l
|
|
7088
|
-
}), (
|
|
7089
|
-
(c(!0), j($, null, B(n(s), (
|
|
7101
|
+
}), (a, r) => (c(), j("div", ho, [
|
|
7102
|
+
(c(!0), j($, null, B(n(s), (o) => (c(), _(n(Se), {
|
|
7090
7103
|
ref_for: !0,
|
|
7091
7104
|
ref_key: "widgetsRef",
|
|
7092
7105
|
ref: l,
|
|
7093
|
-
region:
|
|
7094
|
-
widget:
|
|
7106
|
+
region: a.region,
|
|
7107
|
+
widget: o
|
|
7095
7108
|
}, null, 8, ["region", "widget"]))), 256))
|
|
7096
7109
|
]));
|
|
7097
7110
|
}
|
|
7098
|
-
}),
|
|
7111
|
+
}), _o = { class: "v-apps-region" }, yo = { class: "v-apps-region__header" }, ko = { class: "v-apps-region__top" }, wo = { class: "v-apps-region__bottom" }, So = { class: "v-apps-region__panels" }, Vo = /* @__PURE__ */ E({
|
|
7099
7112
|
name: "AppsRegion",
|
|
7100
7113
|
inheritAttrs: !1,
|
|
7101
7114
|
__name: "apps",
|
|
@@ -7104,7 +7117,7 @@ const be = E({
|
|
|
7104
7117
|
index: { default: 0 }
|
|
7105
7118
|
},
|
|
7106
7119
|
setup(i, { expose: e }) {
|
|
7107
|
-
const t = i, s = se(), { widgets: l, widgetsRef:
|
|
7120
|
+
const t = i, s = se(), { widgets: l, widgetsRef: a } = we(t.region), r = S(() => l.value.filter((d) => d.openType === "panel")), o = S(() => l.value.filter((d) => d.openType !== "panel")), u = r.value[t.index], p = w(u), m = w(u), f = (d) => {
|
|
7108
7121
|
p.value = d, m.value = m.value?.name === d.name ? null : d;
|
|
7109
7122
|
}, b = (d) => {
|
|
7110
7123
|
d.openType === "link" && d.url && window.open(d.url), d.openType === "dialog" && zn({
|
|
@@ -7114,18 +7127,18 @@ const be = E({
|
|
|
7114
7127
|
content: d.component
|
|
7115
7128
|
});
|
|
7116
7129
|
};
|
|
7117
|
-
return
|
|
7130
|
+
return X(m, (d) => {
|
|
7118
7131
|
s.skeleton?.toggleCollapse(!d);
|
|
7119
7132
|
}), e({
|
|
7120
7133
|
widgets: l,
|
|
7121
|
-
widgetsRef:
|
|
7134
|
+
widgetsRef: a,
|
|
7122
7135
|
setActive: (d) => {
|
|
7123
7136
|
const k = r.value.find((y) => y.name === d);
|
|
7124
7137
|
p.value = k, m.value = k;
|
|
7125
7138
|
}
|
|
7126
|
-
}), (d, k) => (c(), j("div",
|
|
7127
|
-
z("div",
|
|
7128
|
-
z("div",
|
|
7139
|
+
}), (d, k) => (c(), j("div", _o, [
|
|
7140
|
+
z("div", yo, [
|
|
7141
|
+
z("div", ko, [
|
|
7129
7142
|
(c(!0), j($, null, B(r.value, (y) => (c(), _(n(Ct), {
|
|
7130
7143
|
key: `icon-${y.name}`,
|
|
7131
7144
|
icon: y.icon,
|
|
@@ -7135,8 +7148,8 @@ const be = E({
|
|
|
7135
7148
|
onClick: (V) => f(y)
|
|
7136
7149
|
}, null, 8, ["icon", "label", "active", "open", "onClick"]))), 128))
|
|
7137
7150
|
]),
|
|
7138
|
-
z("div",
|
|
7139
|
-
(c(!0), j($, null, B(
|
|
7151
|
+
z("div", wo, [
|
|
7152
|
+
(c(!0), j($, null, B(o.value, (y) => (c(), _(n(Ct), {
|
|
7140
7153
|
key: `icon-${y.name}`,
|
|
7141
7154
|
icon: y.icon,
|
|
7142
7155
|
label: y.label,
|
|
@@ -7144,15 +7157,15 @@ const be = E({
|
|
|
7144
7157
|
}, null, 8, ["icon", "label", "onClick"]))), 128))
|
|
7145
7158
|
])
|
|
7146
7159
|
]),
|
|
7147
|
-
z("div",
|
|
7148
|
-
(c(!0), j($, null, B(r.value, (y) => (c(), _(
|
|
7160
|
+
z("div", So, [
|
|
7161
|
+
(c(!0), j($, null, B(r.value, (y) => (c(), _($t, {
|
|
7149
7162
|
key: y.name
|
|
7150
7163
|
}, [
|
|
7151
|
-
p.value?.name === y.name ? (c(), _(n(
|
|
7164
|
+
p.value?.name === y.name ? (c(), _(n(Se), {
|
|
7152
7165
|
key: 0,
|
|
7153
7166
|
ref_for: !0,
|
|
7154
7167
|
ref_key: "widgetsRef",
|
|
7155
|
-
ref:
|
|
7168
|
+
ref: a,
|
|
7156
7169
|
region: d.region,
|
|
7157
7170
|
widget: y
|
|
7158
7171
|
}, null, 8, ["region", "widget"])) : C("", !0)
|
|
@@ -7160,14 +7173,14 @@ const be = E({
|
|
|
7160
7173
|
])
|
|
7161
7174
|
]));
|
|
7162
7175
|
}
|
|
7163
|
-
}),
|
|
7176
|
+
}), xo = /* @__PURE__ */ E({
|
|
7164
7177
|
name: "WorkspaceRegion",
|
|
7165
7178
|
__name: "workspace",
|
|
7166
7179
|
props: {
|
|
7167
7180
|
region: {}
|
|
7168
7181
|
},
|
|
7169
7182
|
setup(i, { expose: e }) {
|
|
7170
|
-
const t = i, { widgets: s, widgetsRef: l } =
|
|
7183
|
+
const t = i, { widgets: s, widgetsRef: l } = we(t.region), a = Re(
|
|
7171
7184
|
s.value.map((h) => ({
|
|
7172
7185
|
name: h.name,
|
|
7173
7186
|
command: h.name,
|
|
@@ -7176,14 +7189,14 @@ const be = E({
|
|
|
7176
7189
|
props: h.props || {},
|
|
7177
7190
|
checked: !h.closable
|
|
7178
7191
|
}))
|
|
7179
|
-
), r = S(() =>
|
|
7192
|
+
), r = S(() => a.filter((h) => !h.closable || h.checked)), o = S(() => a.map((h) => ({
|
|
7180
7193
|
...h,
|
|
7181
7194
|
disabled: !h.closable
|
|
7182
|
-
}))), u = w(r.value[0]?.name), p = S(() =>
|
|
7183
|
-
const d =
|
|
7195
|
+
}))), u = w(r.value[0]?.name), p = S(() => a.find((d) => d.name === u.value)?.props || {}), m = (h) => {
|
|
7196
|
+
const d = a.find((k) => k.name === h);
|
|
7184
7197
|
d && (d.checked = !1), u.value === h && (u.value = r.value[0]?.name);
|
|
7185
7198
|
}, f = (h) => {
|
|
7186
|
-
const d =
|
|
7199
|
+
const d = a.find((k) => k.name === h.name);
|
|
7187
7200
|
d && d.closable && (d.checked = !d.checked, d.checked && (u.value = d.name), !d.checked && u.value === d.name && (u.value = r.value[0]?.name));
|
|
7188
7201
|
};
|
|
7189
7202
|
return e({
|
|
@@ -7191,13 +7204,13 @@ const be = E({
|
|
|
7191
7204
|
widgets: s,
|
|
7192
7205
|
widgetsRef: l,
|
|
7193
7206
|
openTab: (h, d = {}) => {
|
|
7194
|
-
const k =
|
|
7207
|
+
const k = a.find((y) => y.name === h);
|
|
7195
7208
|
k && (k.props = Object.assign({}, k.props, d), k.checked = !0, u.value = k.name);
|
|
7196
7209
|
}
|
|
7197
7210
|
}), (h, d) => (c(), _(n(Ke), {
|
|
7198
7211
|
class: "v-workspace-region",
|
|
7199
7212
|
items: r.value,
|
|
7200
|
-
menus:
|
|
7213
|
+
menus: o.value,
|
|
7201
7214
|
modelValue: u.value,
|
|
7202
7215
|
"onUpdate:modelValue": d[0] || (d[0] = (k) => u.value = k),
|
|
7203
7216
|
checkable: "",
|
|
@@ -7208,7 +7221,7 @@ const be = E({
|
|
|
7208
7221
|
(c(!0), j($, null, B(n(s), (k) => (c(), j($, {
|
|
7209
7222
|
key: k.name
|
|
7210
7223
|
}, [
|
|
7211
|
-
u.value === k.name ? (c(), _(n(
|
|
7224
|
+
u.value === k.name ? (c(), _(n(Se), {
|
|
7212
7225
|
key: 0,
|
|
7213
7226
|
ref_for: !0,
|
|
7214
7227
|
ref_key: "widgetsRef",
|
|
@@ -7221,26 +7234,26 @@ const be = E({
|
|
|
7221
7234
|
_: 1
|
|
7222
7235
|
}, 8, ["items", "menus", "modelValue"]));
|
|
7223
7236
|
}
|
|
7224
|
-
}),
|
|
7237
|
+
}), Co = /* @__PURE__ */ E({
|
|
7225
7238
|
name: "SettingsRegion",
|
|
7226
7239
|
__name: "settings",
|
|
7227
7240
|
props: {
|
|
7228
7241
|
region: {}
|
|
7229
7242
|
},
|
|
7230
7243
|
setup(i, { expose: e }) {
|
|
7231
|
-
const t = i, s = se(), { current: l } =
|
|
7232
|
-
() => r.value ?
|
|
7233
|
-
), { widgets: u, widgetsRef: p } =
|
|
7244
|
+
const t = i, s = se(), { current: l } = ne(), { selected: a, isSelectBlock: r } = fe(), o = S(
|
|
7245
|
+
() => r.value ? oe.Block : oe.Node
|
|
7246
|
+
), { widgets: u, widgetsRef: p } = we(t.region, o), m = S(() => u.value.map((d) => ({
|
|
7234
7247
|
name: d.name,
|
|
7235
7248
|
label: d.label
|
|
7236
7249
|
}))), f = w(""), b = S(() => {
|
|
7237
|
-
const d =
|
|
7250
|
+
const d = a.value?.model;
|
|
7238
7251
|
return d ? s.assets.componentMap.get(d.name)?.doc : null;
|
|
7239
7252
|
});
|
|
7240
|
-
|
|
7253
|
+
X(l, (d) => {
|
|
7241
7254
|
s.skeleton?.settable(!!d);
|
|
7242
|
-
}),
|
|
7243
|
-
|
|
7255
|
+
}), X(
|
|
7256
|
+
o,
|
|
7244
7257
|
() => {
|
|
7245
7258
|
f.value = m.value[0]?.name;
|
|
7246
7259
|
},
|
|
@@ -7264,7 +7277,7 @@ const be = E({
|
|
|
7264
7277
|
direction: "column"
|
|
7265
7278
|
}, {
|
|
7266
7279
|
default: g(() => [
|
|
7267
|
-
n(
|
|
7280
|
+
n(a) ? (c(), _(n(O), {
|
|
7268
7281
|
key: 0,
|
|
7269
7282
|
flex: "",
|
|
7270
7283
|
justify: "space-between",
|
|
@@ -7274,17 +7287,17 @@ const be = E({
|
|
|
7274
7287
|
default: g(() => [
|
|
7275
7288
|
v(n(O), { class: "v-settings-region__title" }, {
|
|
7276
7289
|
default: g(() => [
|
|
7277
|
-
v(n(
|
|
7290
|
+
v(n(Xt)),
|
|
7278
7291
|
z("span", null, [
|
|
7279
|
-
H(N(n(
|
|
7280
|
-
z("i", null, N(n(
|
|
7292
|
+
H(N(n(a)?.model.name) + ": ", 1),
|
|
7293
|
+
z("i", null, N(n(a)?.model.id), 1)
|
|
7281
7294
|
])
|
|
7282
7295
|
]),
|
|
7283
7296
|
_: 1
|
|
7284
7297
|
}),
|
|
7285
7298
|
b.value ? (c(), _(n(O), { key: 0 }, {
|
|
7286
7299
|
default: g(() => [
|
|
7287
|
-
v(n(
|
|
7300
|
+
v(n(ke), {
|
|
7288
7301
|
onClick: h,
|
|
7289
7302
|
icon: n(Ns),
|
|
7290
7303
|
mode: "text",
|
|
@@ -7296,7 +7309,7 @@ const be = E({
|
|
|
7296
7309
|
]),
|
|
7297
7310
|
_: 1
|
|
7298
7311
|
})) : C("", !0),
|
|
7299
|
-
n(
|
|
7312
|
+
n(a) && !n(a).model.locked ? (c(), _(n(O), {
|
|
7300
7313
|
key: 1,
|
|
7301
7314
|
grow: "",
|
|
7302
7315
|
padding: !1
|
|
@@ -7313,7 +7326,7 @@ const be = E({
|
|
|
7313
7326
|
(c(!0), j($, null, B(n(u), (y) => (c(), j($, {
|
|
7314
7327
|
key: y.name
|
|
7315
7328
|
}, [
|
|
7316
|
-
f.value === y.name ? (c(), _(n(
|
|
7329
|
+
f.value === y.name ? (c(), _(n(Se), {
|
|
7317
7330
|
key: 0,
|
|
7318
7331
|
ref_for: !0,
|
|
7319
7332
|
ref_key: "widgetsRef",
|
|
@@ -7328,11 +7341,11 @@ const be = E({
|
|
|
7328
7341
|
]),
|
|
7329
7342
|
_: 1
|
|
7330
7343
|
})) : C("", !0),
|
|
7331
|
-
n(
|
|
7344
|
+
n(a) ? C("", !0) : (c(), _(n(Z), {
|
|
7332
7345
|
key: 2,
|
|
7333
7346
|
description: "请在左侧画布选中节点"
|
|
7334
7347
|
})),
|
|
7335
|
-
n(
|
|
7348
|
+
n(a) && n(a).model.locked ? (c(), _(n(Z), {
|
|
7336
7349
|
key: 3,
|
|
7337
7350
|
"image-size": 1,
|
|
7338
7351
|
description: "节点已被锁定, 禁止编辑"
|
|
@@ -7341,7 +7354,7 @@ const be = E({
|
|
|
7341
7354
|
_: 1
|
|
7342
7355
|
})) : C("", !0);
|
|
7343
7356
|
}
|
|
7344
|
-
}),
|
|
7357
|
+
}), Eo = { class: "v-status-region" }, jo = /* @__PURE__ */ E({
|
|
7345
7358
|
name: "StatusRegion",
|
|
7346
7359
|
inheritAttrs: !1,
|
|
7347
7360
|
__name: "status",
|
|
@@ -7349,28 +7362,28 @@ const be = E({
|
|
|
7349
7362
|
region: {}
|
|
7350
7363
|
},
|
|
7351
7364
|
setup(i, { expose: e }) {
|
|
7352
|
-
const t = i, { widgets: s, widgetsRef: l } =
|
|
7365
|
+
const t = i, { widgets: s, widgetsRef: l } = we(t.region);
|
|
7353
7366
|
return e({
|
|
7354
7367
|
widgets: s,
|
|
7355
7368
|
widgetsRef: l
|
|
7356
|
-
}), (
|
|
7357
|
-
(c(!0), j($, null, B(n(s), (
|
|
7369
|
+
}), (a, r) => (c(), j("div", Eo, [
|
|
7370
|
+
(c(!0), j($, null, B(n(s), (o) => (c(), _(n(Se), {
|
|
7358
7371
|
ref_for: !0,
|
|
7359
7372
|
ref_key: "widgetsRef",
|
|
7360
7373
|
ref: l,
|
|
7361
|
-
region:
|
|
7362
|
-
widget:
|
|
7374
|
+
region: a.region,
|
|
7375
|
+
widget: o
|
|
7363
7376
|
}, null, 8, ["region", "widget"]))), 256))
|
|
7364
7377
|
]));
|
|
7365
7378
|
}
|
|
7366
|
-
}),
|
|
7379
|
+
}), Ao = /* @__PURE__ */ E({
|
|
7367
7380
|
name: "PreviewRegion",
|
|
7368
7381
|
__name: "preview",
|
|
7369
7382
|
props: {
|
|
7370
7383
|
region: {}
|
|
7371
7384
|
},
|
|
7372
7385
|
setup(i, { expose: e }) {
|
|
7373
|
-
const t = i, { widgets: s, widgetsRef: l } =
|
|
7386
|
+
const t = i, { widgets: s, widgetsRef: l } = we(t.region), a = Re(
|
|
7374
7387
|
s.value.map((u) => ({
|
|
7375
7388
|
name: u.name,
|
|
7376
7389
|
command: u.name,
|
|
@@ -7378,22 +7391,22 @@ const be = E({
|
|
|
7378
7391
|
closable: !!u.closable,
|
|
7379
7392
|
checked: !1
|
|
7380
7393
|
}))
|
|
7381
|
-
), r = S(() =>
|
|
7394
|
+
), r = S(() => a.filter((u) => !u.closable || u.checked)), o = w(r.value[0]?.name);
|
|
7382
7395
|
return e({
|
|
7383
|
-
currentTab:
|
|
7396
|
+
currentTab: o,
|
|
7384
7397
|
widgets: s,
|
|
7385
7398
|
widgetsRef: l
|
|
7386
7399
|
}), (u, p) => (c(), _(n(Ke), {
|
|
7387
7400
|
class: "v-workspace-region",
|
|
7388
7401
|
items: r.value,
|
|
7389
|
-
modelValue:
|
|
7390
|
-
"onUpdate:modelValue": p[0] || (p[0] = (m) =>
|
|
7402
|
+
modelValue: o.value,
|
|
7403
|
+
"onUpdate:modelValue": p[0] || (p[0] = (m) => o.value = m)
|
|
7391
7404
|
}, {
|
|
7392
7405
|
default: g(() => [
|
|
7393
|
-
(c(!0), j($, null, B(n(s), (m) => (c(), _(
|
|
7406
|
+
(c(!0), j($, null, B(n(s), (m) => (c(), _($t, {
|
|
7394
7407
|
key: m.name
|
|
7395
7408
|
}, [
|
|
7396
|
-
|
|
7409
|
+
o.value === m.name ? (c(), _(n(Se), {
|
|
7397
7410
|
key: 0,
|
|
7398
7411
|
ref_for: !0,
|
|
7399
7412
|
ref_key: "widgetsRef",
|
|
@@ -7407,28 +7420,28 @@ const be = E({
|
|
|
7407
7420
|
}, 8, ["items", "modelValue"]));
|
|
7408
7421
|
}
|
|
7409
7422
|
}), Et = {
|
|
7410
|
-
EmptyRegion:
|
|
7411
|
-
Brand:
|
|
7412
|
-
Toolbar:
|
|
7413
|
-
Actions:
|
|
7414
|
-
Apps:
|
|
7415
|
-
Workspace:
|
|
7416
|
-
Settings:
|
|
7417
|
-
Status:
|
|
7418
|
-
Preview:
|
|
7423
|
+
EmptyRegion: po,
|
|
7424
|
+
Brand: vo,
|
|
7425
|
+
Toolbar: go,
|
|
7426
|
+
Actions: bo,
|
|
7427
|
+
Apps: Vo,
|
|
7428
|
+
Workspace: xo,
|
|
7429
|
+
Settings: Co,
|
|
7430
|
+
Status: jo,
|
|
7431
|
+
Preview: Ao
|
|
7419
7432
|
};
|
|
7420
7433
|
export {
|
|
7421
7434
|
Us as API_METHOD_TYPES,
|
|
7422
|
-
|
|
7435
|
+
eo as Assets,
|
|
7423
7436
|
ft as Binder,
|
|
7424
7437
|
ut as Box,
|
|
7425
|
-
|
|
7438
|
+
Qa as Designer,
|
|
7426
7439
|
Hs as EVENT_MODIFIERS,
|
|
7427
7440
|
K as Editor,
|
|
7428
|
-
|
|
7429
|
-
|
|
7441
|
+
Mo as Engine,
|
|
7442
|
+
sa as EventBinder,
|
|
7430
7443
|
Ct as Icon,
|
|
7431
|
-
|
|
7444
|
+
Y as Item,
|
|
7432
7445
|
Js as KEYBOARD_EVENT_LIST,
|
|
7433
7446
|
St as MOBILE_SIZE,
|
|
7434
7447
|
Ls as MOUSE_EVENT_LIST,
|
|
@@ -7437,36 +7450,36 @@ export {
|
|
|
7437
7450
|
W as Panel,
|
|
7438
7451
|
qs as RegionType,
|
|
7439
7452
|
be as RegionWrapper,
|
|
7440
|
-
|
|
7441
|
-
|
|
7453
|
+
Xa as Renderer,
|
|
7454
|
+
uo as SetterView,
|
|
7442
7455
|
_e as SetterWrapper,
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7456
|
+
Ya as Simulator,
|
|
7457
|
+
no as Skeleton,
|
|
7458
|
+
to as SkeletonWrapper,
|
|
7446
7459
|
Bl as SlotsPicker,
|
|
7447
7460
|
Ke as Tabs,
|
|
7448
7461
|
Ws as VTJ_DESIGNER_VERSION,
|
|
7449
|
-
|
|
7462
|
+
na as VariableBinder,
|
|
7450
7463
|
Rl as Viewer,
|
|
7451
7464
|
an as Viewport,
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7465
|
+
oe as WidgetGroup,
|
|
7466
|
+
Se as WidgetWrapper,
|
|
7467
|
+
Aa as builtInDeps,
|
|
7468
|
+
Ra as builtInMaterials,
|
|
7469
|
+
Ua as builtInSetters,
|
|
7470
|
+
ja as builtInWidgets,
|
|
7458
7471
|
Ee as confirm,
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7472
|
+
Za as createSlotsPicker,
|
|
7473
|
+
Ja as defaultSetter,
|
|
7474
|
+
Ga as depsManager,
|
|
7475
|
+
rn as engineKey,
|
|
7476
|
+
ee as expressionValidate,
|
|
7477
|
+
ae as message,
|
|
7465
7478
|
Q as notify,
|
|
7466
7479
|
Et as regions,
|
|
7467
7480
|
Oe as setterManager,
|
|
7468
7481
|
le as setters,
|
|
7469
7482
|
se as useEngine,
|
|
7470
|
-
|
|
7483
|
+
on as widgetManager,
|
|
7471
7484
|
L as widgets
|
|
7472
7485
|
};
|