element-less 0.0.1

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.
@@ -0,0 +1,793 @@
1
+ import { defineComponent, ref, computed, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, unref, isRef, normalizeClass, withCtx, createBlock, toDisplayString, createCommentVNode, createSlots, createElementVNode, createTextVNode, nextTick } from "vue";
2
+ import { useVModel } from "@vueuse/core";
3
+ import { u as useProps, a as utils, p as property_arrayAndObject, D as DynamicDesignerInner, E as ElsDynamicRenderAsync, b as property_array, c as property_formItem, d as property_advanced, e as ElsMessage, _ as _export_sfc } from "./index-8a31b394.js";
4
+ import "element-plus";
5
+ import "axios";
6
+ import "file-saver";
7
+ import "xlsx";
8
+ import "lodash";
9
+ import "vuedraggable";
10
+ import "sortablejs";
11
+ import "md-editor-v3";
12
+ import "pinia";
13
+ import "prismjs";
14
+ import "ace-builds";
15
+ import "@wangeditor/editor";
16
+ import "vue-json-viewer";
17
+ import "json-editor-vue";
18
+ const _hoisted_1 = {
19
+ key: 0,
20
+ class: "keyName"
21
+ };
22
+ const _hoisted_2 = { key: 1 };
23
+ const _hoisted_3 = {
24
+ key: 1,
25
+ class: "keyCode"
26
+ };
27
+ const _hoisted_4 = {
28
+ key: 2,
29
+ class: "dataType"
30
+ };
31
+ const _hoisted_5 = { class: "dataType-detail-t" };
32
+ const _hoisted_6 = { key: 0 };
33
+ const _hoisted_7 = { key: 1 };
34
+ const _hoisted_8 = ["title"];
35
+ const _hoisted_9 = ["title"];
36
+ const _hoisted_10 = { class: "dataType-detail-t" };
37
+ const _hoisted_11 = { key: 0 };
38
+ const _hoisted_12 = { key: 1 };
39
+ const _hoisted_13 = ["title"];
40
+ const _hoisted_14 = ["title"];
41
+ const _hoisted_15 = {
42
+ key: 0,
43
+ class: "componentType"
44
+ };
45
+ const _hoisted_16 = {
46
+ key: 1,
47
+ class: "config"
48
+ };
49
+ const _hoisted_17 = {
50
+ key: 4,
51
+ class: "required"
52
+ };
53
+ const _hoisted_18 = {
54
+ key: 5,
55
+ class: "description"
56
+ };
57
+ const _hoisted_19 = {
58
+ key: 6,
59
+ class: "defaultValue"
60
+ };
61
+ const _hoisted_20 = {
62
+ key: 7,
63
+ class: "oper"
64
+ };
65
+ const _hoisted_21 = { class: "els-dynamic-d-oper" };
66
+ const _sfc_main = /* @__PURE__ */ defineComponent({
67
+ ...{
68
+ name: "ElsDynamicDesigner",
69
+ inheritAttrs: false
70
+ },
71
+ __name: "innerItem",
72
+ props: {
73
+ depath: {},
74
+ children: {},
75
+ item: {}
76
+ },
77
+ emits: ["update:item", "update:data"],
78
+ setup(__props, { emit: __emit }) {
79
+ const props = __props;
80
+ const { getValue } = useProps();
81
+ const emits = __emit;
82
+ const camelCase = getValue("camelCase", false);
83
+ const settingDirection = getValue("settingDirection");
84
+ const allowCreateType = getValue("allowCreateType", false);
85
+ const allowCreateComponent = getValue("allowCreateComponent", false);
86
+ const openCreateType = getValue("openCreateType", () => null);
87
+ const openCreateComponent = getValue("openCreateComponent", () => null);
88
+ const componentSettingVisible = getValue("componentSettingVisible", true);
89
+ const columnVisible = getValue("columnVisible", () => {
90
+ return true;
91
+ });
92
+ const dataTypeData = getValue("dataTypeData", null);
93
+ const controlData = getValue("componentData", null);
94
+ const currDepath = ref(props.depath + 1);
95
+ const currData = useVModel(props, "children", emits);
96
+ const currItem = useVModel(props, "item", emits);
97
+ const selectDataTypeItem = ref();
98
+ const selectArrayDataTypeItem = ref();
99
+ const attrDrawVisible = ref(false);
100
+ const formRender = ref();
101
+ if (controlData) {
102
+ controlData.forEach((ele) => {
103
+ if (ele.label === "栅格行") {
104
+ ele.label = "容器";
105
+ }
106
+ });
107
+ }
108
+ function handleRemove(item) {
109
+ var index = currData.value.indexOf(item);
110
+ currData.value.splice(index, 1);
111
+ }
112
+ function handleChangeKeyCode() {
113
+ if (camelCase && currItem.value.keyCode) {
114
+ const keyCode = currItem.value.keyCode;
115
+ currItem.value.keyCode = keyCode.replace(keyCode[0], keyCode[0].toLowerCase());
116
+ }
117
+ }
118
+ const itemDataType = computed(() => {
119
+ if (dataTypeData) {
120
+ const currVal = dataTypeData.find((ele) => ele.value == currItem.value.dataType);
121
+ return currVal ?? {};
122
+ }
123
+ return {};
124
+ });
125
+ const currArrayDataType = computed(() => {
126
+ if (dataTypeData) {
127
+ const currVal = dataTypeData.find((ele) => ele.value == currItem.value.arrayDataType);
128
+ return currVal ?? {};
129
+ }
130
+ return {};
131
+ });
132
+ const currDataType = computed(() => {
133
+ if (dataTypeData) {
134
+ if (itemDataType && itemDataType.value.type == "Array") {
135
+ return currArrayDataType.value;
136
+ }
137
+ return itemDataType.value;
138
+ }
139
+ return {};
140
+ });
141
+ const currComponentType = computed(() => {
142
+ if (controlData) {
143
+ const currVal = controlData.find((ele) => ele.value == currItem.value.componentType);
144
+ return currVal ?? {};
145
+ }
146
+ return {};
147
+ });
148
+ const currComponentTypeData = computed(() => {
149
+ if (controlData) {
150
+ if (currDataType.value.type === "None") {
151
+ return controlData.filter((ele) => {
152
+ var _a, _b;
153
+ return !currDataType.value || ele.dataTypes.includes((_a = currDataType.value) == null ? void 0 : _a.value) || ele.dataTypes.includes((_b = currDataType.value) == null ? void 0 : _b.type);
154
+ }).filter((ele) => ele.type === "Row" || ele.type === "Caption");
155
+ } else {
156
+ return controlData.filter((ele) => {
157
+ var _a, _b;
158
+ return !currDataType.value || ele.dataTypes.includes((_a = currDataType.value) == null ? void 0 : _a.value) || ele.dataTypes.includes((_b = currDataType.value) == null ? void 0 : _b.type);
159
+ }).filter((ele) => ele.group === "Form");
160
+ }
161
+ }
162
+ return [];
163
+ });
164
+ const isObject = computed(() => {
165
+ return itemDataType.value.type == "Object" || currArrayDataType.value.type == "Object";
166
+ });
167
+ const isRow = computed(() => {
168
+ return currComponentType.value.type == "Row";
169
+ });
170
+ const currPropertys = computed(() => {
171
+ if (currItem.value.dataType !== void 0) {
172
+ if (!currItem.value.componentType) {
173
+ const currVal = dataTypeData.find((ele) => ele.value == currItem.value.dataType);
174
+ const arrayVal = dataTypeData.find((ele) => ele.value == currItem.value.arrayDataType);
175
+ if ((currVal == null ? void 0 : currVal.type) == "Array" && (arrayVal == null ? void 0 : arrayVal.type) === "Object" || (currVal == null ? void 0 : currVal.type) == "Object") {
176
+ return utils.cloneObj(property_arrayAndObject);
177
+ }
178
+ } else {
179
+ if (controlData) {
180
+ const currControlData = controlData.find((ele) => ele.value == currItem.value.componentType);
181
+ if (currControlData) {
182
+ return currControlData.propertys;
183
+ }
184
+ }
185
+ }
186
+ } else {
187
+ if (!currItem.value.componentType) {
188
+ currItem.value.config = {
189
+ formConfig: {},
190
+ baseConfig: {},
191
+ advancedConfig: {},
192
+ arrayConfig: {}
193
+ };
194
+ }
195
+ return null;
196
+ }
197
+ });
198
+ watch(() => currItem.value.componentType, () => {
199
+ if (isRow.value) {
200
+ currItem.value.children.length = 0;
201
+ currItem.value.dataType = "None";
202
+ currItem.value.children.push(
203
+ {
204
+ keyID: utils.shortid(),
205
+ keyName: "",
206
+ keyCode: "",
207
+ children: [],
208
+ config: {
209
+ formConfig: {},
210
+ baseConfig: {},
211
+ advancedConfig: {},
212
+ arrayConfig: {}
213
+ }
214
+ }
215
+ );
216
+ } else {
217
+ currItem.value.children.length = 0;
218
+ }
219
+ });
220
+ function handleChangeDataType() {
221
+ if (currItem.value.arrayDataType) {
222
+ currItem.value.arrayDataType = void 0;
223
+ }
224
+ currItem.value.componentType = void 0;
225
+ nextTick(() => {
226
+ if (currComponentTypeData.value.length) {
227
+ if (isObject.value || currDataType.value.type === "None") {
228
+ currItem.value.componentType = "";
229
+ } else if (currDataType.value && currDataType.value.type !== "Array") {
230
+ currItem.value.componentType = currComponentTypeData.value[0].value;
231
+ } else if (currItem.value.arrayDataType) {
232
+ currItem.value.componentType = currComponentTypeData.value[0].value;
233
+ }
234
+ }
235
+ });
236
+ if (isObject.value) {
237
+ currItem.value.children.length = 0;
238
+ currItem.value.children.push({
239
+ keyID: utils.shortid(),
240
+ keyName: "",
241
+ keyCode: "",
242
+ children: [],
243
+ config: {
244
+ formConfig: {},
245
+ baseConfig: {},
246
+ advancedConfig: {},
247
+ arrayConfig: {}
248
+ }
249
+ });
250
+ } else {
251
+ currItem.value.children.length = 0;
252
+ }
253
+ }
254
+ watch(dataTypeData, (val) => {
255
+ if (currItem.value.dataType) {
256
+ selectDataTypeItem.value = val.find((ele) => ele.value === currItem.value.dataType);
257
+ }
258
+ if (currItem.value.arrayDataType) {
259
+ selectArrayDataTypeItem.value = val.find((ele) => ele.value === currItem.value.arrayDataType);
260
+ }
261
+ });
262
+ function handleChangeRequired(val) {
263
+ if (currItem.value.config.formConfig && currItem.value.config.formConfig.required != val) {
264
+ currItem.value.config.formConfig.required = val;
265
+ formRender.value.initData();
266
+ }
267
+ }
268
+ function handleSelectComponent(item) {
269
+ if (item.preSelectValue && item.selectItem) {
270
+ if (item.selectItem.defaultPropertys) {
271
+ currItem.value.config.baseConfig = Object.assign({}, item.selectItem.defaultPropertys);
272
+ } else {
273
+ currItem.value.config.baseConfig = {};
274
+ }
275
+ }
276
+ }
277
+ watch(() => currItem.value.config.formConfig.required, (val) => {
278
+ if (currItem.value.required !== val) {
279
+ currItem.value.required = val;
280
+ }
281
+ });
282
+ function validationCode(rule, value, callback) {
283
+ console.log(rule);
284
+ if (value === "") {
285
+ callback(new Error("keyCode不能为空"));
286
+ } else if (props.children.filter((ele) => ele.keyCode == value).length > 1) {
287
+ ElsMessage.warning(`[${value}]重复`);
288
+ callback(new Error("keyCode重复"));
289
+ } else {
290
+ callback();
291
+ }
292
+ }
293
+ return (_ctx, _cache) => {
294
+ const _component_els_input = resolveComponent("els-input");
295
+ const _component_el_table_column = resolveComponent("el-table-column");
296
+ const _component_el_table = resolveComponent("el-table");
297
+ const _component_els_select = resolveComponent("els-select");
298
+ const _component_el_popover = resolveComponent("el-popover");
299
+ const _component_el_link = resolveComponent("el-link");
300
+ const _component_els_switch = resolveComponent("els-switch");
301
+ const _component_els_textarea = resolveComponent("els-textarea");
302
+ const _component_Rank = resolveComponent("Rank");
303
+ const _component_el_icon = resolveComponent("el-icon");
304
+ const _component_Remove = resolveComponent("Remove");
305
+ const _component_el_popconfirm = resolveComponent("el-popconfirm");
306
+ const _component_els_form = resolveComponent("els-form");
307
+ const _component_el_tab_pane = resolveComponent("el-tab-pane");
308
+ const _component_el_tabs = resolveComponent("el-tabs");
309
+ const _component_els_drawer = resolveComponent("els-drawer");
310
+ return openBlock(), createElementBlock(Fragment, null, [
311
+ createVNode(_component_els_form, {
312
+ modelValue: unref(currItem),
313
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => isRef(currItem) ? currItem.value = $event : null),
314
+ labelWidth: "0",
315
+ inputWidth: "100%",
316
+ class: normalizeClass([{ "els-dynamic-d-item-parentdiv": isObject.value && !unref(currItem).componentType }, { "els-dynamic-d-item-container": isRow.value }]),
317
+ "show-message": false
318
+ }, {
319
+ default: withCtx(() => [
320
+ !isRow.value ? (openBlock(), createElementBlock("div", {
321
+ key: 0,
322
+ class: normalizeClass(["els-dynamic-d-item-div", [{ "setting": attrDrawVisible.value }]])
323
+ }, [
324
+ unref(columnVisible)("keyName") ? (openBlock(), createElementBlock("span", _hoisted_1, [
325
+ itemDataType.value.type != "None" || _ctx.item.componentType === "Caption" ? (openBlock(), createBlock(_component_els_input, {
326
+ key: 0,
327
+ clearable: "",
328
+ placeholder: "请输入名称",
329
+ prop: "keyName"
330
+ })) : unref(currItem).config.baseConfig ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(currItem).config.baseConfig.title), 1)) : createCommentVNode("", true)
331
+ ])) : createCommentVNode("", true),
332
+ unref(columnVisible)("keyCode") ? (openBlock(), createElementBlock("span", _hoisted_3, [
333
+ itemDataType.value.type != "None" ? (openBlock(), createBlock(_component_els_input, {
334
+ key: 0,
335
+ placeholder: "编码",
336
+ validMethod: validationCode,
337
+ required: "",
338
+ clearable: "",
339
+ onBlur: handleChangeKeyCode,
340
+ prop: "keyCode"
341
+ })) : createCommentVNode("", true)
342
+ ])) : createCommentVNode("", true),
343
+ unref(columnVisible)("dataType") ? (openBlock(), createElementBlock("span", _hoisted_4, [
344
+ selectDataTypeItem.value && selectDataTypeItem.value.id ? (openBlock(), createBlock(_component_el_popover, {
345
+ key: 0,
346
+ width: "400",
347
+ placement: "right"
348
+ }, {
349
+ reference: withCtx(() => [
350
+ createVNode(_component_els_select, {
351
+ onClickOption: handleChangeDataType,
352
+ class: "txt-blue-light",
353
+ filterable: "",
354
+ select: selectDataTypeItem.value,
355
+ "onUpdate:select": _cache[2] || (_cache[2] = ($event) => selectDataTypeItem.value = $event),
356
+ required: "",
357
+ initSelect: false,
358
+ data: unref(dataTypeData),
359
+ valueField: "value",
360
+ labelField: "label",
361
+ placeholder: "值类型",
362
+ prop: "dataType"
363
+ }, createSlots({
364
+ default: withCtx(({ item }) => [
365
+ createElementVNode("span", {
366
+ title: item.description
367
+ }, toDisplayString(item.label), 9, _hoisted_8)
368
+ ]),
369
+ _: 2
370
+ }, [
371
+ unref(allowCreateType) ? {
372
+ name: "extra",
373
+ fn: withCtx(() => [
374
+ createElementVNode("li", {
375
+ class: "dynamic-create-dtype",
376
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(openCreateType)())
377
+ }, "创建类型")
378
+ ]),
379
+ key: "0"
380
+ } : void 0
381
+ ]), 1032, ["select", "data"])
382
+ ]),
383
+ default: withCtx(() => [
384
+ createElementVNode("div", null, [
385
+ createElementVNode("div", _hoisted_5, [
386
+ createElementVNode("span", null, toDisplayString(selectDataTypeItem.value.type === "Enum" ? "Enum" : "Object"), 1),
387
+ createElementVNode("span", {
388
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(openCreateType)(selectDataTypeItem.value.id))
389
+ }, "查看详细")
390
+ ]),
391
+ selectDataTypeItem.value.type === "Enum" ? (openBlock(), createElementBlock("div", _hoisted_6, [
392
+ createVNode(_component_el_table, {
393
+ data: selectDataTypeItem.value.componentType.defaultPropertys.data,
394
+ "max-height": "250"
395
+ }, {
396
+ default: withCtx(() => [
397
+ createVNode(_component_el_table_column, {
398
+ prop: "label",
399
+ label: "label"
400
+ }),
401
+ createVNode(_component_el_table_column, {
402
+ prop: "value",
403
+ label: "value"
404
+ })
405
+ ]),
406
+ _: 1
407
+ }, 8, ["data"])
408
+ ])) : (openBlock(), createElementBlock("div", _hoisted_7, [
409
+ createVNode(_component_el_table, {
410
+ data: selectDataTypeItem.value.componentType.defaultPropertys.config,
411
+ "max-height": "250"
412
+ }, {
413
+ default: withCtx(() => [
414
+ createVNode(_component_el_table_column, {
415
+ prop: "keyName",
416
+ label: "keyName"
417
+ }),
418
+ createVNode(_component_el_table_column, {
419
+ prop: "keyCode",
420
+ label: "keyCode"
421
+ }),
422
+ createVNode(_component_el_table_column, {
423
+ prop: "dataType",
424
+ label: "类型"
425
+ })
426
+ ]),
427
+ _: 1
428
+ }, 8, ["data"])
429
+ ]))
430
+ ])
431
+ ]),
432
+ _: 1
433
+ })) : (openBlock(), createBlock(_component_els_select, {
434
+ key: 1,
435
+ onClickOption: handleChangeDataType,
436
+ filterable: "",
437
+ select: selectDataTypeItem.value,
438
+ "onUpdate:select": _cache[4] || (_cache[4] = ($event) => selectDataTypeItem.value = $event),
439
+ required: "",
440
+ initSelect: false,
441
+ data: unref(dataTypeData),
442
+ valueField: "value",
443
+ labelField: "label",
444
+ placeholder: "值类型",
445
+ prop: "dataType"
446
+ }, createSlots({
447
+ default: withCtx(({ item }) => [
448
+ createElementVNode("span", {
449
+ title: item.description
450
+ }, toDisplayString(item.label), 9, _hoisted_9)
451
+ ]),
452
+ _: 2
453
+ }, [
454
+ unref(allowCreateType) ? {
455
+ name: "extra",
456
+ fn: withCtx(() => [
457
+ createElementVNode("li", {
458
+ class: "dynamic-create-dtype",
459
+ onClick: _cache[3] || (_cache[3] = ($event) => unref(openCreateType)())
460
+ }, "创建类型")
461
+ ]),
462
+ key: "0"
463
+ } : void 0
464
+ ]), 1032, ["select", "data"])),
465
+ itemDataType.value.type == "Array" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
466
+ selectArrayDataTypeItem.value && selectArrayDataTypeItem.value.id ? (openBlock(), createBlock(_component_el_popover, {
467
+ key: 0,
468
+ placement: "right",
469
+ width: "400"
470
+ }, {
471
+ reference: withCtx(() => [
472
+ createVNode(_component_els_select, {
473
+ onClickOption: handleChangeDataType,
474
+ filterable: "",
475
+ class: "txt-blue-light",
476
+ select: selectArrayDataTypeItem.value,
477
+ "onUpdate:select": _cache[7] || (_cache[7] = ($event) => selectArrayDataTypeItem.value = $event),
478
+ required: "",
479
+ data: unref(dataTypeData).filter((ele) => ele.type != "None" && ele.type != "Array"),
480
+ valueField: "value",
481
+ labelField: "label",
482
+ prop: "arrayDataType"
483
+ }, createSlots({
484
+ default: withCtx(({ item }) => [
485
+ createElementVNode("span", {
486
+ title: item.description
487
+ }, toDisplayString(item.label), 9, _hoisted_13)
488
+ ]),
489
+ _: 2
490
+ }, [
491
+ unref(allowCreateType) ? {
492
+ name: "extra",
493
+ fn: withCtx(() => [
494
+ createElementVNode("li", {
495
+ class: "dynamic-create-dtype",
496
+ onClick: _cache[6] || (_cache[6] = ($event) => unref(openCreateType)())
497
+ }, "创建类型")
498
+ ]),
499
+ key: "0"
500
+ } : void 0
501
+ ]), 1032, ["select", "data"])
502
+ ]),
503
+ default: withCtx(() => [
504
+ createElementVNode("div", null, [
505
+ createElementVNode("div", _hoisted_10, [
506
+ createElementVNode("span", null, toDisplayString(selectArrayDataTypeItem.value.type === "Enum" ? "Enum" : "Object"), 1),
507
+ createElementVNode("span", {
508
+ onClick: _cache[5] || (_cache[5] = ($event) => unref(openCreateType)(selectArrayDataTypeItem.value.id))
509
+ }, "查看详细")
510
+ ]),
511
+ selectArrayDataTypeItem.value.type === "Enum" ? (openBlock(), createElementBlock("div", _hoisted_11, [
512
+ createVNode(_component_el_table, {
513
+ data: selectArrayDataTypeItem.value.componentType.defaultPropertys.data,
514
+ "max-height": "250"
515
+ }, {
516
+ default: withCtx(() => [
517
+ createVNode(_component_el_table_column, {
518
+ prop: "label",
519
+ label: "label"
520
+ }),
521
+ createVNode(_component_el_table_column, {
522
+ prop: "value",
523
+ label: "value"
524
+ })
525
+ ]),
526
+ _: 1
527
+ }, 8, ["data"])
528
+ ])) : (openBlock(), createElementBlock("div", _hoisted_12, [
529
+ createVNode(_component_el_table, {
530
+ data: selectArrayDataTypeItem.value.componentType.defaultPropertys.config,
531
+ "max-height": "250"
532
+ }, {
533
+ default: withCtx(() => [
534
+ createVNode(_component_el_table_column, {
535
+ prop: "keyName",
536
+ label: "keyName"
537
+ }),
538
+ createVNode(_component_el_table_column, {
539
+ prop: "keyCode",
540
+ label: "keyCode"
541
+ }),
542
+ createVNode(_component_el_table_column, {
543
+ prop: "dataType",
544
+ label: "类型"
545
+ })
546
+ ]),
547
+ _: 1
548
+ }, 8, ["data"])
549
+ ]))
550
+ ])
551
+ ]),
552
+ _: 1
553
+ })) : (openBlock(), createBlock(_component_els_select, {
554
+ key: 1,
555
+ onClickOption: handleChangeDataType,
556
+ filterable: "",
557
+ select: selectArrayDataTypeItem.value,
558
+ "onUpdate:select": _cache[9] || (_cache[9] = ($event) => selectArrayDataTypeItem.value = $event),
559
+ required: "",
560
+ data: unref(dataTypeData).filter((ele) => ele.type != "None" && ele.type != "Array"),
561
+ valueField: "value",
562
+ labelField: "label",
563
+ prop: "arrayDataType"
564
+ }, createSlots({
565
+ default: withCtx(({ item }) => [
566
+ createElementVNode("span", {
567
+ title: item.description
568
+ }, toDisplayString(item.label), 9, _hoisted_14)
569
+ ]),
570
+ _: 2
571
+ }, [
572
+ unref(allowCreateType) ? {
573
+ name: "extra",
574
+ fn: withCtx(() => [
575
+ createElementVNode("li", {
576
+ class: "dynamic-create-dtype",
577
+ onClick: _cache[8] || (_cache[8] = ($event) => unref(openCreateType)())
578
+ }, "创建类型")
579
+ ]),
580
+ key: "0"
581
+ } : void 0
582
+ ]), 1032, ["select", "data"]))
583
+ ], 64)) : createCommentVNode("", true)
584
+ ])) : createCommentVNode("", true),
585
+ unref(componentSettingVisible) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
586
+ unref(columnVisible)("componentType") ? (openBlock(), createElementBlock("span", _hoisted_15, [
587
+ itemDataType.value.type != "Object" && currArrayDataType.value.type != "Object" || isObject.value && currComponentTypeData.value.length ? (openBlock(), createBlock(_component_els_select, {
588
+ key: 0,
589
+ filterable: "",
590
+ disabled: unref(currItem).dataType === void 0,
591
+ placeholder: "组件",
592
+ clearable: "",
593
+ prop: "componentType",
594
+ onSelect: handleSelectComponent,
595
+ data: currComponentTypeData.value,
596
+ valueField: "value",
597
+ labelField: "label"
598
+ }, createSlots({ _: 2 }, [
599
+ unref(allowCreateComponent) ? {
600
+ name: "extra",
601
+ fn: withCtx(() => [
602
+ createElementVNode("li", {
603
+ class: "dynamic-create-dtype",
604
+ onClick: _cache[10] || (_cache[10] = ($event) => unref(openCreateComponent)())
605
+ }, "创建组件")
606
+ ]),
607
+ key: "0"
608
+ } : void 0
609
+ ]), 1032, ["disabled", "data"])) : createCommentVNode("", true)
610
+ ])) : createCommentVNode("", true),
611
+ unref(columnVisible)("config") ? (openBlock(), createElementBlock("span", _hoisted_16, [
612
+ createVNode(_component_el_link, {
613
+ type: "primary",
614
+ onClick: _cache[11] || (_cache[11] = ($event) => {
615
+ attrDrawVisible.value = true;
616
+ })
617
+ }, {
618
+ default: withCtx(() => [
619
+ createTextVNode("配置")
620
+ ]),
621
+ _: 1
622
+ })
623
+ ])) : createCommentVNode("", true)
624
+ ], 64)) : createCommentVNode("", true),
625
+ unref(columnVisible)("required") ? (openBlock(), createElementBlock("span", _hoisted_17, [
626
+ itemDataType.value.type !== "None" ? (openBlock(), createBlock(_component_els_switch, {
627
+ key: 0,
628
+ "active-value": true,
629
+ "inactive-value": false,
630
+ onChange: handleChangeRequired,
631
+ prop: "required"
632
+ })) : createCommentVNode("", true)
633
+ ])) : createCommentVNode("", true),
634
+ unref(columnVisible)("description") ? (openBlock(), createElementBlock("span", _hoisted_18, [
635
+ itemDataType.value.type !== "None" ? (openBlock(), createBlock(_component_els_input, {
636
+ key: 0,
637
+ placeholder: "描述",
638
+ clearable: "",
639
+ prop: "description"
640
+ })) : createCommentVNode("", true)
641
+ ])) : createCommentVNode("", true),
642
+ unref(columnVisible)("defaultValue") ? (openBlock(), createElementBlock("span", _hoisted_19, [
643
+ !isObject.value && itemDataType.value.type !== "None" ? (openBlock(), createBlock(_component_el_popover, {
644
+ key: 0,
645
+ placement: "top-start",
646
+ width: "400",
647
+ trigger: "click"
648
+ }, {
649
+ reference: withCtx(() => [
650
+ createElementVNode("div", null, [
651
+ createVNode(_component_els_input, {
652
+ placeholder: "默认值",
653
+ clearable: "",
654
+ prop: "defaultValue"
655
+ })
656
+ ])
657
+ ]),
658
+ default: withCtx(() => [
659
+ createVNode(_component_els_textarea, {
660
+ placeholder: "默认值",
661
+ clearable: "",
662
+ prop: "defaultValue",
663
+ rows: 3
664
+ })
665
+ ]),
666
+ _: 1
667
+ })) : createCommentVNode("", true)
668
+ ])) : createCommentVNode("", true),
669
+ unref(columnVisible)("oper") ? (openBlock(), createElementBlock("span", _hoisted_20, [
670
+ createElementVNode("span", _hoisted_21, [
671
+ createVNode(_component_el_icon, { class: "el-icon-rank" }, {
672
+ default: withCtx(() => [
673
+ createVNode(_component_Rank)
674
+ ]),
675
+ _: 1
676
+ }),
677
+ createVNode(_component_el_popconfirm, {
678
+ title: "确定删除吗?",
679
+ onConfirm: _cache[12] || (_cache[12] = ($event) => handleRemove(_ctx.item))
680
+ }, {
681
+ reference: withCtx(() => [
682
+ createVNode(_component_el_icon, { class: "el-icon-remove" }, {
683
+ default: withCtx(() => [
684
+ createVNode(_component_Remove)
685
+ ]),
686
+ _: 1
687
+ })
688
+ ]),
689
+ _: 1
690
+ })
691
+ ])
692
+ ])) : createCommentVNode("", true)
693
+ ], 2)) : createCommentVNode("", true),
694
+ isObject.value && !unref(currItem).componentType || isRow.value ? (openBlock(), createBlock(DynamicDesignerInner, {
695
+ key: 1,
696
+ children: unref(currItem).children,
697
+ onRemoveItem: _cache[13] || (_cache[13] = ($event) => handleRemove(_ctx.item)),
698
+ config: unref(currItem).config.advancedConfig,
699
+ "is-container": isRow.value,
700
+ depath: currDepath.value
701
+ }, null, 8, ["children", "config", "is-container", "depath"])) : createCommentVNode("", true)
702
+ ]),
703
+ _: 1
704
+ }, 8, ["modelValue", "class"]),
705
+ createVNode(_component_els_drawer, {
706
+ modelValue: attrDrawVisible.value,
707
+ "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => attrDrawVisible.value = $event),
708
+ title: "设置属性",
709
+ direction: unref(settingDirection),
710
+ class: "work-flow-drawer",
711
+ size: "30%",
712
+ "show-close": false,
713
+ "append-to-body": "",
714
+ "lock-scroll": false
715
+ }, {
716
+ default: withCtx(() => [
717
+ createVNode(_component_el_tabs, { stretch: "" }, {
718
+ default: withCtx(() => [
719
+ unref(currItem).componentType ? (openBlock(), createBlock(_component_el_tab_pane, {
720
+ key: 0,
721
+ label: "组件属性"
722
+ }, {
723
+ default: withCtx(() => {
724
+ var _a, _b;
725
+ return [
726
+ createVNode(ElsDynamicRenderAsync, {
727
+ modelValue: unref(currItem).config.baseConfig,
728
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(currItem).config.baseConfig = $event),
729
+ nodeType: { dataType: (_a = currDataType.value) == null ? void 0 : _a.type, componentName: (_b = currComponentType.value) == null ? void 0 : _b.componentName },
730
+ config: currPropertys.value,
731
+ inputWidth: "100%"
732
+ }, null, 8, ["modelValue", "nodeType", "config"])
733
+ ];
734
+ }),
735
+ _: 1
736
+ })) : createCommentVNode("", true),
737
+ itemDataType.value.type == "Array" ? (openBlock(), createBlock(_component_el_tab_pane, {
738
+ key: 1,
739
+ label: "数组属性"
740
+ }, {
741
+ default: withCtx(() => [
742
+ createVNode(ElsDynamicRenderAsync, {
743
+ modelValue: unref(currItem).config.arrayConfig,
744
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(currItem).config.arrayConfig = $event),
745
+ config: unref(property_array),
746
+ inputWidth: "100%"
747
+ }, null, 8, ["modelValue", "config"])
748
+ ]),
749
+ _: 1
750
+ })) : createCommentVNode("", true),
751
+ itemDataType.value.type != "None" ? (openBlock(), createBlock(_component_el_tab_pane, {
752
+ key: 2,
753
+ label: "表单属性"
754
+ }, {
755
+ default: withCtx(() => [
756
+ createVNode(ElsDynamicRenderAsync, {
757
+ ref_key: "formRender",
758
+ ref: formRender,
759
+ modelValue: unref(currItem).config.formConfig,
760
+ "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(currItem).config.formConfig = $event),
761
+ config: unref(property_formItem),
762
+ inputWidth: "100%"
763
+ }, null, 8, ["modelValue", "config"])
764
+ ]),
765
+ _: 1
766
+ })) : createCommentVNode("", true),
767
+ createVNode(_component_el_tab_pane, { label: "高级属性" }, {
768
+ default: withCtx(() => [
769
+ createVNode(ElsDynamicRenderAsync, {
770
+ modelValue: unref(currItem).config.advancedConfig,
771
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => unref(currItem).config.advancedConfig = $event),
772
+ config: unref(property_advanced),
773
+ inputWidth: "100%"
774
+ }, null, 8, ["modelValue", "config"])
775
+ ]),
776
+ _: 1
777
+ })
778
+ ]),
779
+ _: 1
780
+ })
781
+ ]),
782
+ _: 1
783
+ }, 8, ["modelValue", "direction"])
784
+ ], 64);
785
+ };
786
+ }
787
+ });
788
+ const innerItem_vue_vue_type_style_index_0_lang = "";
789
+ const innerItem_vue_vue_type_style_index_1_scoped_71b75965_lang = "";
790
+ const innerItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71b75965"]]);
791
+ export {
792
+ innerItem as default
793
+ };