element-less 0.0.18 → 0.0.20
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/config/index.d.ts +1 -0
- package/element-less.cjs +1 -1
- package/element-less.iife.js +1 -1
- package/element-less.js +1 -1
- package/element-less.umd.cjs +1 -1
- package/elementui/dialog/index.d.ts +1 -1
- package/elementui/dialog/src/dialog.vue.d.ts +1 -1
- package/{index-DhAJpIKS.js → index-BH6EaaaM.js} +138 -43
- package/index-D2eo4SF1.cjs +1 -0
- package/{inner-Bthjv0kV.js → inner-BX0N_tDo.js} +1 -1
- package/{inner-Bp9Wep5b.cjs → inner-D-0z_vq9.cjs} +1 -1
- package/{innerItem-DXsyRepl.js → innerItem-CJcQLAcJ.js} +1 -1
- package/{innerItem-CVw7fSnZ.cjs → innerItem-D7eOFyaT.cjs} +1 -1
- package/{mode-csharp-B8C4El5T.cjs → mode-csharp-BT0XaiGB.cjs} +1 -1
- package/{mode-csharp-DG8tcbww.js → mode-csharp-_OmY5x-p.js} +1 -1
- package/{mode-css-BVIggJ4K.cjs → mode-css-BfQXkJ4c.cjs} +1 -1
- package/{mode-css-Bv57CStB.js → mode-css-Bl-HLzih.js} +1 -1
- package/{mode-javascript-kv6Sg584.cjs → mode-javascript--8MF0aDH.cjs} +1 -1
- package/{mode-javascript-I_LVVCY0.js → mode-javascript-EI_Mq_JY.js} +1 -1
- package/{mode-json-DR4WOydm.cjs → mode-json-BjTVCdgP.cjs} +1 -1
- package/{mode-json-BUaER4p9.js → mode-json-CawFjkwS.js} +1 -1
- package/{mode-mysql-dy6FGw55.js → mode-mysql-DA0dFpRa.js} +1 -1
- package/{mode-mysql-DfImos_X.cjs → mode-mysql-HTdWpgSP.cjs} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/utils/index.d.ts +2 -0
- package/index-CrjNZOj7.cjs +0 -1
|
@@ -10,10 +10,10 @@ export declare const ElsDialog: import('element-plus/es/utils/index').SFCWithIns
|
|
|
10
10
|
center: boolean;
|
|
11
11
|
showClose: import('element-plus/es/utils/index').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
12
12
|
appendTo: string;
|
|
13
|
+
visible: boolean;
|
|
13
14
|
title: string;
|
|
14
15
|
modelValue: boolean;
|
|
15
16
|
loading: boolean;
|
|
16
|
-
visible: boolean;
|
|
17
17
|
draggable: boolean;
|
|
18
18
|
fullscreen: boolean;
|
|
19
19
|
closeOnPressEscape: import('element-plus/es/utils/index').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -73,10 +73,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
73
73
|
center: boolean;
|
|
74
74
|
showClose: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
75
75
|
appendTo: string;
|
|
76
|
+
visible: boolean;
|
|
76
77
|
title: string;
|
|
77
78
|
modelValue: boolean;
|
|
78
79
|
loading: boolean;
|
|
79
|
-
visible: boolean;
|
|
80
80
|
draggable: boolean;
|
|
81
81
|
fullscreen: boolean;
|
|
82
82
|
closeOnPressEscape: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -1637,7 +1637,8 @@ const defaultConfig = {
|
|
|
1637
1637
|
url: "TargetUrl",
|
|
1638
1638
|
areaName: "AreaName",
|
|
1639
1639
|
controllerName: "ControllerName",
|
|
1640
|
-
actionName: "ActionName"
|
|
1640
|
+
actionName: "ActionName",
|
|
1641
|
+
visible: "Visible"
|
|
1641
1642
|
},
|
|
1642
1643
|
table: {
|
|
1643
1644
|
menu: "PowerMenu",
|
|
@@ -1741,7 +1742,8 @@ const utils = {
|
|
|
1741
1742
|
$buttonTypeField: globalConfig.menu["buttonType"],
|
|
1742
1743
|
$groupField: globalConfig.menu["group"],
|
|
1743
1744
|
$confirmField: globalConfig.menu["confirmField"],
|
|
1744
|
-
$confirmPasswordField: globalConfig.menu["confirmPasswordField"]
|
|
1745
|
+
$confirmPasswordField: globalConfig.menu["confirmPasswordField"],
|
|
1746
|
+
$visibleField: globalConfig.menu["visible"]
|
|
1745
1747
|
};
|
|
1746
1748
|
},
|
|
1747
1749
|
getTableConfig() {
|
|
@@ -2362,6 +2364,19 @@ const utils = {
|
|
|
2362
2364
|
ProxyElsMessage.error("复制失败");
|
|
2363
2365
|
});
|
|
2364
2366
|
},
|
|
2367
|
+
getClipboardContent: async () => {
|
|
2368
|
+
try {
|
|
2369
|
+
const permissionStatus = await navigator.permissions.query({ name: "clipboard-read" });
|
|
2370
|
+
if (permissionStatus.state === "granted" || permissionStatus.state === "prompt") {
|
|
2371
|
+
const text = await navigator.clipboard.readText();
|
|
2372
|
+
return Promise.resolve(text);
|
|
2373
|
+
} else {
|
|
2374
|
+
alert("没有读取剪切板的权限");
|
|
2375
|
+
}
|
|
2376
|
+
} catch (error) {
|
|
2377
|
+
console.error("读取剪切板内容时出错:", error);
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2365
2380
|
isEmptyObject(obj) {
|
|
2366
2381
|
return Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
2367
2382
|
},
|
|
@@ -15318,21 +15333,16 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15318
15333
|
}),
|
|
15319
15334
|
emits: ["update:modelValue"],
|
|
15320
15335
|
setup(__props) {
|
|
15321
|
-
var _a;
|
|
15322
15336
|
const container = useContainer();
|
|
15323
|
-
const { proxy } = getCurrentInstance();
|
|
15324
15337
|
const modelValue = useModel$1(__props, "modelValue");
|
|
15325
15338
|
const contextMenu = ref();
|
|
15326
15339
|
const props = __props;
|
|
15327
15340
|
const menuData = reactive([]);
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
nameFieldname = proxy.$lessConfig.menu.name;
|
|
15334
|
-
iconFieldname = proxy.$lessConfig.menu.icon;
|
|
15335
|
-
}
|
|
15341
|
+
const menuConfig = utils.getMenuConfig();
|
|
15342
|
+
const idFieldname = menuConfig.$idField;
|
|
15343
|
+
const nameFieldname = menuConfig.$nameField;
|
|
15344
|
+
const iconFieldname = menuConfig.$iconField;
|
|
15345
|
+
const visibleFieldname = menuConfig.$visibleField;
|
|
15336
15346
|
const isOutBottom = computed(() => {
|
|
15337
15347
|
return props.positionTop + 30 * menuData.length + 30 > window.innerHeight;
|
|
15338
15348
|
});
|
|
@@ -15361,21 +15371,25 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15361
15371
|
modelValue.value = false;
|
|
15362
15372
|
});
|
|
15363
15373
|
return (_ctx, _cache) => {
|
|
15374
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
15364
15375
|
return withDirectives((openBlock(), createElementBlock("ul", {
|
|
15365
15376
|
ref_key: "contextMenu",
|
|
15366
15377
|
ref: contextMenu,
|
|
15367
15378
|
class: normalizeClass(["els-context-menu", { "outscreen-menu": isOutScreen.value }]),
|
|
15368
15379
|
style: normalizeStyle([{ left: _ctx.positionLeft + "px" }, { top: isOutBottom.value ? "auto" : _ctx.positionTop + "px" }, { bottom: !isOutBottom.value ? "auto" : positionBottom.value + "px" }])
|
|
15369
15380
|
}, [
|
|
15370
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(menuData, (item) => {
|
|
15381
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(menuData.filter((ele) => !unref(visibleFieldname) || ele[unref(visibleFieldname)] === void 0 || ele[unref(visibleFieldname)]), (item) => {
|
|
15371
15382
|
return openBlock(), createElementBlock("li", {
|
|
15372
15383
|
class: "els-context-list",
|
|
15373
15384
|
key: item[unref(idFieldname)],
|
|
15374
15385
|
onClick: ($event) => menuCommand(item)
|
|
15375
15386
|
}, [
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15387
|
+
createVNode(_component_el_icon, null, {
|
|
15388
|
+
default: withCtx(() => [
|
|
15389
|
+
(openBlock(), createBlock(resolveDynamicComponent(item[unref(iconFieldname)])))
|
|
15390
|
+
]),
|
|
15391
|
+
_: 2
|
|
15392
|
+
}, 1024),
|
|
15379
15393
|
createElementVNode("span", _hoisted_2$Z, toDisplayString(item[unref(nameFieldname)]), 1)
|
|
15380
15394
|
], 8, _hoisted_1$17);
|
|
15381
15395
|
}), 128))
|
|
@@ -15385,7 +15399,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15385
15399
|
};
|
|
15386
15400
|
}
|
|
15387
15401
|
});
|
|
15388
|
-
const MenuContext = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-
|
|
15402
|
+
const MenuContext = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-2cc1a2d0"]]);
|
|
15389
15403
|
const ElsMenuContext = withInstall(MenuContext);
|
|
15390
15404
|
const menuDropdownProps = buildProps({
|
|
15391
15405
|
/**
|
|
@@ -38693,7 +38707,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
38693
38707
|
emits: /* @__PURE__ */ mergeModels(["removeItem"], ["update:children"]),
|
|
38694
38708
|
setup(__props, { emit: __emit }) {
|
|
38695
38709
|
const DynamicDesignerInnerItem = defineAsyncComponent(() => {
|
|
38696
|
-
return import("./innerItem-
|
|
38710
|
+
return import("./innerItem-CJcQLAcJ.js");
|
|
38697
38711
|
});
|
|
38698
38712
|
const { getValue: getValue2 } = useProps();
|
|
38699
38713
|
const tagID = getValue2("tagID");
|
|
@@ -39536,10 +39550,10 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
39536
39550
|
emits: ["update:modelValue"],
|
|
39537
39551
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39538
39552
|
const DynamicRenderInner = defineAsyncComponent(() => {
|
|
39539
|
-
return import("./inner-
|
|
39553
|
+
return import("./inner-BX0N_tDo.js").then((n) => n.i);
|
|
39540
39554
|
});
|
|
39541
39555
|
const DynamicRenderForm = defineAsyncComponent(() => {
|
|
39542
|
-
return import("./inner-
|
|
39556
|
+
return import("./inner-BX0N_tDo.js").then((n) => n.f);
|
|
39543
39557
|
});
|
|
39544
39558
|
const props = __props;
|
|
39545
39559
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props);
|
|
@@ -39769,10 +39783,10 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
39769
39783
|
emits: ["update:modelValue"],
|
|
39770
39784
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39771
39785
|
const DynamicRenderInnerAsync = defineAsyncComponent(() => {
|
|
39772
|
-
return import("./inner-
|
|
39786
|
+
return import("./inner-BX0N_tDo.js").then((n) => n.i);
|
|
39773
39787
|
});
|
|
39774
39788
|
const DynamicRenderFormAsync = defineAsyncComponent(() => {
|
|
39775
|
-
return import("./inner-
|
|
39789
|
+
return import("./inner-BX0N_tDo.js").then((n) => n.f);
|
|
39776
39790
|
});
|
|
39777
39791
|
const props = __props;
|
|
39778
39792
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props);
|
|
@@ -41758,12 +41772,6 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
41758
41772
|
const { getValue: getValue2 } = useProps(props);
|
|
41759
41773
|
const removeItem = getValue2("removeItem", () => {
|
|
41760
41774
|
});
|
|
41761
|
-
getValue2("getCurrNode", () => {
|
|
41762
|
-
return {};
|
|
41763
|
-
});
|
|
41764
|
-
getValue2("getParentNode", () => {
|
|
41765
|
-
return {};
|
|
41766
|
-
});
|
|
41767
41775
|
const setSelectItem = getValue2("setSelectItem", () => {
|
|
41768
41776
|
});
|
|
41769
41777
|
const setSlotVisible = getValue2("setSlotVisible", () => {
|
|
@@ -41844,7 +41852,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
41844
41852
|
};
|
|
41845
41853
|
}
|
|
41846
41854
|
});
|
|
41847
|
-
const DynamicDesignerViewOperate = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
41855
|
+
const DynamicDesignerViewOperate = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-63cb7c98"]]);
|
|
41848
41856
|
const _hoisted_1$f = { key: 1 };
|
|
41849
41857
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
41850
41858
|
__name: "wrap",
|
|
@@ -42066,6 +42074,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
42066
42074
|
});
|
|
42067
42075
|
const getSelectItem = getValue2("getSelectItem", () => {
|
|
42068
42076
|
});
|
|
42077
|
+
const handleContextMenu = getValue2("handleContextMenu", () => {
|
|
42078
|
+
});
|
|
42069
42079
|
const { isMobile, formProps: formProps2, renderDisabled } = useDesigner(props, props.nodeItem);
|
|
42070
42080
|
const slotVisible = ref();
|
|
42071
42081
|
function handleSelectItem() {
|
|
@@ -42089,7 +42099,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
42089
42099
|
style: normalizeStyle((_b = _ctx.nodeItem.config.advancedConfig) == null ? void 0 : _b.style),
|
|
42090
42100
|
"data-restrict": _ctx.nodeItem.restrictChild,
|
|
42091
42101
|
"data-type": _ctx.nodeItem.componentType,
|
|
42092
|
-
onClick: withModifiers(handleSelectItem, ["stop"])
|
|
42102
|
+
onClick: withModifiers(handleSelectItem, ["stop"]),
|
|
42103
|
+
onContextmenu: _cache[1] || (_cache[1] = ($event) => unref(handleContextMenu)($event, _ctx.nodeItem))
|
|
42093
42104
|
}, [
|
|
42094
42105
|
createVNode(DynamicDesignerViewOperate, { nodeItem: _ctx.nodeItem }, null, 8, ["nodeItem"]),
|
|
42095
42106
|
_ctx.nodeItem.componentGroup == "Container" ? (openBlock(), createBlock(DynamicDesignerViewWrap, {
|
|
@@ -42182,11 +42193,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
42182
42193
|
]),
|
|
42183
42194
|
_: 1
|
|
42184
42195
|
}, 8, ["visible"])
|
|
42185
|
-
],
|
|
42196
|
+
], 46, _hoisted_1$d);
|
|
42186
42197
|
};
|
|
42187
42198
|
}
|
|
42188
42199
|
});
|
|
42189
|
-
const DynamicDesignerViewInner = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
42200
|
+
const DynamicDesignerViewInner = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5f362207"]]);
|
|
42190
42201
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
42191
42202
|
__name: "form",
|
|
42192
42203
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -42326,7 +42337,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
42326
42337
|
};
|
|
42327
42338
|
}
|
|
42328
42339
|
});
|
|
42329
|
-
const DynamicDesignerViewForm = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-
|
|
42340
|
+
const DynamicDesignerViewForm = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-359ff6ae"]]);
|
|
42330
42341
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
42331
42342
|
__name: "body",
|
|
42332
42343
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -42349,6 +42360,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
42349
42360
|
});
|
|
42350
42361
|
const recordComponent = getValue2("recordComponent", () => {
|
|
42351
42362
|
});
|
|
42363
|
+
const handleContextMenu = getValue2("handleContextMenu", () => {
|
|
42364
|
+
});
|
|
42352
42365
|
function handleAddComponent(e) {
|
|
42353
42366
|
recordComponent();
|
|
42354
42367
|
setSelectItem(renderData.value[e.newIndex]);
|
|
@@ -42378,14 +42391,15 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
42378
42391
|
renderData.value && renderData.value.length && renderData.value[0].componentType === "Form" ? (openBlock(), createBlock(DynamicDesignerViewForm, {
|
|
42379
42392
|
nodeItem: renderData.value[0],
|
|
42380
42393
|
isRoot: true,
|
|
42381
|
-
key: renderData.value[0].keyID
|
|
42394
|
+
key: renderData.value[0].keyID,
|
|
42395
|
+
onContextmenu: _cache[0] || (_cache[0] = ($event) => unref(handleContextMenu)($event, renderData.value[0]))
|
|
42382
42396
|
}, null, 8, ["nodeItem"])) : createCommentVNode("", true)
|
|
42383
42397
|
]),
|
|
42384
42398
|
_: 1
|
|
42385
42399
|
}, 512)) : (openBlock(), createBlock(_component_els_form, {
|
|
42386
42400
|
key: 1,
|
|
42387
42401
|
modelValue: renderData.value,
|
|
42388
|
-
"onUpdate:modelValue": _cache[
|
|
42402
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => renderData.value = $event)
|
|
42389
42403
|
}, {
|
|
42390
42404
|
default: withCtx(() => [
|
|
42391
42405
|
createVNode(unref(draggable), mergeProps({
|
|
@@ -42548,7 +42562,7 @@ const useDesign = defineStore("dynamic-design", () => {
|
|
|
42548
42562
|
clear
|
|
42549
42563
|
};
|
|
42550
42564
|
});
|
|
42551
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
42565
|
+
const _withScopeId = (n) => (pushScopeId("data-v-00688673"), n = n(), popScopeId(), n);
|
|
42552
42566
|
const _hoisted_1$c = {
|
|
42553
42567
|
style: { "display": "flex", "background": "#f8f8f8" },
|
|
42554
42568
|
class: "els-dynamic-d-view"
|
|
@@ -42617,6 +42631,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
42617
42631
|
const mainZoom = ref(1);
|
|
42618
42632
|
const selectProperty = ref("0");
|
|
42619
42633
|
const currDynamicDataType = ref([]);
|
|
42634
|
+
const copyNodeItem = ref();
|
|
42635
|
+
let contextMenus = reactive([
|
|
42636
|
+
{ MenuName: "复制", Action: "copy", ImageUrl: "copy-document", Visible: true },
|
|
42637
|
+
{ MenuName: "黏贴", Action: "paste", ImageUrl: "document-copy", Visible: true }
|
|
42638
|
+
]);
|
|
42639
|
+
let contextMenuVisible = ref(false);
|
|
42640
|
+
let contextMenuPositionLeft = ref(0);
|
|
42641
|
+
let contextMenuPositionTop = ref(0);
|
|
42620
42642
|
if (dataTypeData) {
|
|
42621
42643
|
currDynamicDataType.value = dataTypeData;
|
|
42622
42644
|
} else {
|
|
@@ -42825,6 +42847,23 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
42825
42847
|
const currSelectItem = ref();
|
|
42826
42848
|
const currSelectData = ref();
|
|
42827
42849
|
const showPropertys = ref(false);
|
|
42850
|
+
function handleContextMenu(e, item) {
|
|
42851
|
+
contextMenuPositionLeft.value = e.clientX;
|
|
42852
|
+
contextMenuPositionTop.value = e.clientY;
|
|
42853
|
+
contextMenuVisible.value = true;
|
|
42854
|
+
contextMenus[0].Visible = true;
|
|
42855
|
+
contextMenus[1].Visible = false;
|
|
42856
|
+
if (item.componentName === "Form" && item.dataType === "None") {
|
|
42857
|
+
contextMenus[0].Visible = false;
|
|
42858
|
+
contextMenus[1].Visible = true;
|
|
42859
|
+
}
|
|
42860
|
+
if (item.componentGroup == "Container" || item.arrayDataTypeName === "Object" || item.dataTypeName === "Object") {
|
|
42861
|
+
contextMenus[1].Visible = true;
|
|
42862
|
+
}
|
|
42863
|
+
setSelectItem(item);
|
|
42864
|
+
e.stopPropagation();
|
|
42865
|
+
e.preventDefault();
|
|
42866
|
+
}
|
|
42828
42867
|
function setSelectItem(item) {
|
|
42829
42868
|
if (!item) {
|
|
42830
42869
|
currSelectItem.value = null;
|
|
@@ -43048,6 +43087,44 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
43048
43087
|
props.onBack();
|
|
43049
43088
|
}
|
|
43050
43089
|
}
|
|
43090
|
+
function handleCopyNode() {
|
|
43091
|
+
copyNodeItem.value = utils.cloneObj(currSelectItem.value);
|
|
43092
|
+
utils.clip(JSON.stringify(copyNodeItem.value));
|
|
43093
|
+
}
|
|
43094
|
+
function refreshCopyID(item) {
|
|
43095
|
+
var _a2;
|
|
43096
|
+
item.keyID = "id_" + utils.randomNumber().toString();
|
|
43097
|
+
(_a2 = item.children) == null ? void 0 : _a2.forEach((ele) => {
|
|
43098
|
+
refreshCopyID(ele);
|
|
43099
|
+
});
|
|
43100
|
+
}
|
|
43101
|
+
function handlePasteGetNode() {
|
|
43102
|
+
if (!copyNodeItem.value) {
|
|
43103
|
+
utils.getClipboardContent().then((res) => {
|
|
43104
|
+
try {
|
|
43105
|
+
if (res) {
|
|
43106
|
+
copyNodeItem.value = JSON.parse(res);
|
|
43107
|
+
}
|
|
43108
|
+
} catch (err) {
|
|
43109
|
+
console.warn(err);
|
|
43110
|
+
}
|
|
43111
|
+
handlePasteNode();
|
|
43112
|
+
});
|
|
43113
|
+
return;
|
|
43114
|
+
}
|
|
43115
|
+
handlePasteNode();
|
|
43116
|
+
}
|
|
43117
|
+
function handlePasteNode() {
|
|
43118
|
+
if (!copyNodeItem.value) {
|
|
43119
|
+
return;
|
|
43120
|
+
}
|
|
43121
|
+
const copyNode = utils.cloneObj(copyNodeItem.value);
|
|
43122
|
+
refreshCopyID(copyNode);
|
|
43123
|
+
currSelectItem.value.children.push(copyNode);
|
|
43124
|
+
useDesignStore.record(renderData.value);
|
|
43125
|
+
isDisabledUndo.value = false;
|
|
43126
|
+
isDisabledReDo.value = true;
|
|
43127
|
+
}
|
|
43051
43128
|
setValue({
|
|
43052
43129
|
"isMobile": false,
|
|
43053
43130
|
"dataTypeData": currDynamicDataType.value,
|
|
@@ -43055,6 +43132,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
43055
43132
|
validationCode,
|
|
43056
43133
|
setSelectItem,
|
|
43057
43134
|
getSelectItem,
|
|
43135
|
+
handleContextMenu,
|
|
43058
43136
|
handleMove,
|
|
43059
43137
|
getCurrNode,
|
|
43060
43138
|
getNodeValue,
|
|
@@ -43065,6 +43143,13 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
43065
43143
|
},
|
|
43066
43144
|
recordComponent
|
|
43067
43145
|
});
|
|
43146
|
+
function handleMenuCommand(menu) {
|
|
43147
|
+
if (menu.Action === "copy") {
|
|
43148
|
+
handleCopyNode();
|
|
43149
|
+
} else {
|
|
43150
|
+
handlePasteGetNode();
|
|
43151
|
+
}
|
|
43152
|
+
}
|
|
43068
43153
|
onMounted(() => {
|
|
43069
43154
|
var _a2, _b2;
|
|
43070
43155
|
asideHeight.value = ((_a2 = props.height) == null ? void 0 : _a2.appendPx()) || "calc(100vh - 102px)";
|
|
@@ -43100,6 +43185,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
43100
43185
|
const _component_els_container = resolveComponent("els-container");
|
|
43101
43186
|
const _component_ElsJsonViewer = resolveComponent("ElsJsonViewer");
|
|
43102
43187
|
const _component_els_dialog = resolveComponent("els-dialog");
|
|
43188
|
+
const _component_els_menu_context = resolveComponent("els-menu-context");
|
|
43103
43189
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
43104
43190
|
createElementVNode("div", mergeProps({
|
|
43105
43191
|
ref_key: "designer",
|
|
@@ -43735,12 +43821,21 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
43735
43821
|
})
|
|
43736
43822
|
]),
|
|
43737
43823
|
_: 1
|
|
43738
|
-
}, 8, ["modelValue", "width"])
|
|
43824
|
+
}, 8, ["modelValue", "width"]),
|
|
43825
|
+
createVNode(_component_els_menu_context, {
|
|
43826
|
+
ref: "contentMenu",
|
|
43827
|
+
data: unref(contextMenus),
|
|
43828
|
+
modelValue: unref(contextMenuVisible),
|
|
43829
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => isRef(contextMenuVisible) ? contextMenuVisible.value = $event : contextMenuVisible = $event),
|
|
43830
|
+
positionLeft: unref(contextMenuPositionLeft),
|
|
43831
|
+
positionTop: unref(contextMenuPositionTop),
|
|
43832
|
+
onClick: handleMenuCommand
|
|
43833
|
+
}, null, 8, ["data", "modelValue", "positionLeft", "positionTop"])
|
|
43739
43834
|
], 64);
|
|
43740
43835
|
};
|
|
43741
43836
|
}
|
|
43742
43837
|
});
|
|
43743
|
-
const DesignerView = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
43838
|
+
const DesignerView = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-00688673"]]);
|
|
43744
43839
|
const ElsDesignerView = withInstall(DesignerView);
|
|
43745
43840
|
(function(Prism2) {
|
|
43746
43841
|
var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
@@ -44547,31 +44642,31 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
44547
44642
|
}
|
|
44548
44643
|
onMounted(() => {
|
|
44549
44644
|
if (props.language === "json") {
|
|
44550
|
-
const currModule = import("./mode-json-
|
|
44645
|
+
const currModule = import("./mode-json-CawFjkwS.js").then((n) => n.m);
|
|
44551
44646
|
currModule.then((res) => {
|
|
44552
44647
|
ace.config.setModuleUrl("ace/mode/json", res);
|
|
44553
44648
|
init();
|
|
44554
44649
|
});
|
|
44555
44650
|
} else if (props.language === "javascript") {
|
|
44556
|
-
const currModule = import("./mode-javascript-
|
|
44651
|
+
const currModule = import("./mode-javascript-EI_Mq_JY.js").then((n) => n.m);
|
|
44557
44652
|
currModule.then((res) => {
|
|
44558
44653
|
ace.config.setModuleUrl("ace/mode/javascript", res);
|
|
44559
44654
|
init();
|
|
44560
44655
|
});
|
|
44561
44656
|
} else if (props.language === "csharp") {
|
|
44562
|
-
const currModule = import("./mode-csharp-
|
|
44657
|
+
const currModule = import("./mode-csharp-_OmY5x-p.js").then((n) => n.m);
|
|
44563
44658
|
currModule.then((res) => {
|
|
44564
44659
|
ace.config.setModuleUrl("ace/mode/csharp", res);
|
|
44565
44660
|
init();
|
|
44566
44661
|
});
|
|
44567
44662
|
} else if (props.language === "mysql") {
|
|
44568
|
-
const currModule = import("./mode-mysql-
|
|
44663
|
+
const currModule = import("./mode-mysql-DA0dFpRa.js").then((n) => n.m);
|
|
44569
44664
|
currModule.then((res) => {
|
|
44570
44665
|
ace.config.setModuleUrl("ace/mode/mysql", res);
|
|
44571
44666
|
init();
|
|
44572
44667
|
});
|
|
44573
44668
|
} else if (props.language === "css") {
|
|
44574
|
-
const currModule = import("./mode-css-
|
|
44669
|
+
const currModule = import("./mode-css-Bl-HLzih.js").then((n) => n.m);
|
|
44575
44670
|
currModule.then((res) => {
|
|
44576
44671
|
ace.config.setModuleUrl("ace/mode/css", res);
|
|
44577
44672
|
init();
|