super-page-designer 2.0.34 → 2.0.37
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/es/components/design/utils/assemblys-config.js +378 -88
- package/dist/es/components/design/utils/container-design-util.js +6 -8
- package/dist/es/components/design/utils/interfaces/page-design-types.d.ts +3 -2
- package/dist/es/components/design/utils/page-table-util.js +4 -2
- package/dist/es/components/design/views/assemblys/button/button/button-attr-base.vue.js +6 -3
- package/dist/es/components/design/views/assemblys/button/button/button-attr.vue.js +0 -1
- package/dist/es/components/design/views/assemblys/common/common-style-border.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/common/common-style-margin.vue.js +9 -9
- package/dist/es/components/design/views/assemblys/common/common-style-padding.vue.js +9 -9
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +3 -3
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue2.js +691 -1
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +1 -686
- package/dist/es/components/design/views/assemblys/common/page-permission-select.vue.js +77 -31
- package/dist/es/components/design/views/assemblys/container/card/card-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/container/card/card-design.vue2.js +12 -11
- package/dist/es/components/design/views/assemblys/container/collapse/collapse-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/container/container/container-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/container/flex/flex-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/container/flex/flex-design.vue2.js +31 -15
- package/dist/es/components/design/views/assemblys/container/form/form-attr-base.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/container/form/form-attr-style.vue.js +21 -16
- package/dist/es/components/design/views/assemblys/container/form/form-design.vue2.js +16 -19
- package/dist/es/components/design/views/assemblys/container/iframe/iframe-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/container/tools/tools-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/data/component/attr-header.vue.js +46 -5
- package/dist/es/components/design/views/assemblys/data/component/attr-header.vue2.js +1 -45
- package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +3 -58
- package/dist/es/components/design/views/assemblys/data/table/table-attr.vue2.js +10 -10
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js +8 -8
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr-base.vue.js +5 -2
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/label/label-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/link/link-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/radio/radio-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/select/select-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr-base.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/object-design.vue.js +6 -1
- package/dist/es/components/design/views/design/page-event/config.vue.js +7 -1
- package/dist/es/components/design/views/design/page-event/config.vue2.js +1 -7
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +594 -5
- package/dist/es/components/design/views/design/page-event/page-event-content.vue2.js +1 -594
- package/dist/es/components/design/views/design/page-event/page-event-view.vue.js +2 -2
- package/dist/es/components/design/views/design/view/components/quick-add-dialog.vue.js +13 -4
- package/dist/es/components/design/views/design/view/components/quick-add-fields.vue.js +0 -1
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +88 -81
- package/dist/es/components/design/views/design/view/view-design-preview.vue.js +21 -2
- package/dist/es/stores/page-store.js +2 -1
- package/dist/es/style.css +1124 -1367
- package/package.json +4 -4
- package/dist/es/components/design/views/assemblys/button/button/button-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/component/attr-header.vue3.js +0 -1
- package/dist/es/components/design/views/design/page-event/page-event-content.vue3.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, computed, watch, resolveComponent, openBlock, createElementBlock, toDisplayString, createBlock, withCtx, createVNode, withDirectives, withModifiers, unref, vShow, Fragment, renderList, normalizeClass, createElementVNode, createCommentVNode, normalizeStyle, createTextVNode, nextTick } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, onUnmounted, reactive, computed, watch, resolveComponent, openBlock, createElementBlock, toDisplayString, createBlock, withCtx, createVNode, withDirectives, withModifiers, unref, vShow, Fragment, renderList, normalizeClass, createElementVNode, createCommentVNode, normalizeStyle, createTextVNode, nextTick } from "vue";
|
|
2
|
+
import { ElMessage } from "element-plus";
|
|
2
3
|
import { CircleClose, Check, Search, Plus } from "@element-plus/icons-vue";
|
|
3
4
|
import { EnableStates } from "../../../utils/interfaces/page-design-types.js";
|
|
4
5
|
import http from "agilebuilder-ui/src/utils/request";
|
|
@@ -30,6 +31,64 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
31
|
const emits = __emit;
|
|
31
32
|
const props = __props;
|
|
32
33
|
const showPopoverFlag = ref(false);
|
|
34
|
+
const inputRef = ref(null);
|
|
35
|
+
const popoverRef = ref();
|
|
36
|
+
const contentRef = ref(null);
|
|
37
|
+
const popoverVisible = ref(false);
|
|
38
|
+
const inputCode = ref("");
|
|
39
|
+
const tableRef = ref();
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
window.addEventListener("click", handleClickOutside);
|
|
42
|
+
});
|
|
43
|
+
onUnmounted(() => {
|
|
44
|
+
window.removeEventListener("click", handleClickOutside);
|
|
45
|
+
});
|
|
46
|
+
let lastTarget = null;
|
|
47
|
+
function handleClickOutside(event) {
|
|
48
|
+
let popoverDom = null;
|
|
49
|
+
if (contentRef.value) {
|
|
50
|
+
popoverDom = contentRef.value.$el.parentNode;
|
|
51
|
+
}
|
|
52
|
+
if (!event.target || !popoverDom) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (event.target === lastTarget) {
|
|
56
|
+
console.log("与最后的点击一致");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const inputDom = inputRef.value ? inputRef.value.input : null;
|
|
60
|
+
if (inputDom && (event.target === inputDom || inputDom.contains(event.target))) {
|
|
61
|
+
console.log("click contains input");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (event.target === popoverDom || popoverDom.contains(event.target)) {
|
|
65
|
+
console.log("click contains");
|
|
66
|
+
lastTarget = event.target;
|
|
67
|
+
} else {
|
|
68
|
+
if (contentRef.value.$el) {
|
|
69
|
+
console.log("contentRef.value.$el.contains", contentRef.value.$el.contains(event.target));
|
|
70
|
+
}
|
|
71
|
+
console.log("click contains--------not");
|
|
72
|
+
if (popoverVisible.value) {
|
|
73
|
+
closePopover(true);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
let popoverTimeout = null;
|
|
78
|
+
function closePopover(immediate) {
|
|
79
|
+
clearTimeout(popoverTimeout);
|
|
80
|
+
if (immediate) {
|
|
81
|
+
popoverVisible.value = false;
|
|
82
|
+
} else {
|
|
83
|
+
popoverTimeout = setTimeout(() => {
|
|
84
|
+
popoverVisible.value = false;
|
|
85
|
+
}, 2e3);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function openPopover() {
|
|
89
|
+
clearTimeout(popoverTimeout);
|
|
90
|
+
popoverVisible.value = true;
|
|
91
|
+
}
|
|
33
92
|
const typeOptions = [
|
|
34
93
|
{
|
|
35
94
|
value: "service",
|
|
@@ -58,16 +117,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
117
|
set(value) {
|
|
59
118
|
},
|
|
60
119
|
get() {
|
|
61
|
-
return props.rowObj.
|
|
120
|
+
return props.rowObj.simpleCode;
|
|
62
121
|
}
|
|
63
122
|
});
|
|
64
123
|
const searchModel = reactive({
|
|
65
124
|
systemCode: "",
|
|
66
125
|
searchValue: ""
|
|
67
126
|
});
|
|
68
|
-
const popoverRef = ref();
|
|
69
|
-
const inputCode = ref("");
|
|
70
|
-
const tableRef = ref();
|
|
71
127
|
const allSystems = ref([
|
|
72
128
|
{
|
|
73
129
|
value: "",
|
|
@@ -75,14 +131,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
131
|
label: ""
|
|
76
132
|
}
|
|
77
133
|
]);
|
|
78
|
-
function selectClick(evt) {
|
|
79
|
-
if (evt) {
|
|
80
|
-
evt.preventDefault();
|
|
81
|
-
evt.stopPropagation();
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
const inputRef = ref(null);
|
|
86
134
|
const tableDatas = ref([]);
|
|
87
135
|
watch(searchModel, () => {
|
|
88
136
|
if (window.serviceSearchTimeout) {
|
|
@@ -197,13 +245,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
197
245
|
}
|
|
198
246
|
return height;
|
|
199
247
|
});
|
|
200
|
-
computed(() => {
|
|
201
|
-
const style = {};
|
|
202
|
-
if (codeType.value == "service") {
|
|
203
|
-
style.width = "100px";
|
|
204
|
-
}
|
|
205
|
-
return style;
|
|
206
|
-
});
|
|
207
248
|
function paramTypeChange(selParamType) {
|
|
208
249
|
if (selParamType) {
|
|
209
250
|
if (Array.isArray(selParamType)) {
|
|
@@ -212,6 +253,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
212
253
|
}
|
|
213
254
|
}
|
|
214
255
|
}
|
|
256
|
+
if (!selParamType) {
|
|
257
|
+
selParamType = "service";
|
|
258
|
+
}
|
|
215
259
|
codeType.value = selParamType;
|
|
216
260
|
if (codeType.value == "service") {
|
|
217
261
|
if (hisCustomSearchValue == searchModel.searchValue) {
|
|
@@ -225,25 +269,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
225
269
|
codeType.value = "";
|
|
226
270
|
thisValue.value = "";
|
|
227
271
|
emits("update:modelValue", "", "", "");
|
|
228
|
-
|
|
272
|
+
closePopover(true);
|
|
229
273
|
}
|
|
230
274
|
function selectRow(row) {
|
|
231
275
|
thisValue.value = row.code;
|
|
232
276
|
emits("update:modelValue", codeType.value, thisValue.value, row.name, row.id);
|
|
233
|
-
|
|
277
|
+
closePopover(true);
|
|
234
278
|
}
|
|
235
279
|
function addCustom() {
|
|
236
280
|
if (!inputCode.value) {
|
|
237
|
-
|
|
281
|
+
ElMessage.error("请输入权限编码!");
|
|
238
282
|
return;
|
|
239
283
|
}
|
|
240
284
|
thisValue.value = inputCode.value;
|
|
241
285
|
emits("update:modelValue", codeType.value, thisValue.value, "");
|
|
242
|
-
|
|
286
|
+
closePopover(true);
|
|
243
287
|
}
|
|
244
288
|
console.log("init", props.value, props.type);
|
|
245
289
|
function showPopover() {
|
|
246
|
-
|
|
290
|
+
openPopover();
|
|
247
291
|
nextTick(() => {
|
|
248
292
|
paramTypeChange(codeType.value);
|
|
249
293
|
{
|
|
@@ -273,7 +317,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
273
317
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => showPopoverFlag.value = $event),
|
|
274
318
|
ref_key: "popoverRef",
|
|
275
319
|
ref: popoverRef,
|
|
276
|
-
|
|
320
|
+
visible: popoverVisible.value,
|
|
277
321
|
width: 400
|
|
278
322
|
}, {
|
|
279
323
|
reference: withCtx(() => [
|
|
@@ -305,7 +349,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
305
349
|
}, 8, ["title", "modelValue"])
|
|
306
350
|
]),
|
|
307
351
|
default: withCtx(() => [
|
|
308
|
-
createVNode(_component_el_row,
|
|
352
|
+
createVNode(_component_el_row, {
|
|
353
|
+
ref_key: "contentRef",
|
|
354
|
+
ref: contentRef
|
|
355
|
+
}, {
|
|
309
356
|
default: withCtx(() => [
|
|
310
357
|
!__props.onlyService ? (openBlock(), createBlock(_component_el_col, {
|
|
311
358
|
key: 0,
|
|
@@ -371,8 +418,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
371
418
|
return openBlock(), createBlock(_component_el_option, {
|
|
372
419
|
key: item.value,
|
|
373
420
|
label: item.label,
|
|
374
|
-
value: item.value
|
|
375
|
-
onClick: withModifiers(selectClick, ["stop"])
|
|
421
|
+
value: item.value
|
|
376
422
|
}, null, 8, ["label", "value"]);
|
|
377
423
|
}), 128))
|
|
378
424
|
]),
|
|
@@ -499,10 +545,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
499
545
|
}, 8, ["span"]))
|
|
500
546
|
]),
|
|
501
547
|
_: 1
|
|
502
|
-
})
|
|
548
|
+
}, 512)
|
|
503
549
|
]),
|
|
504
550
|
_: 1
|
|
505
|
-
}, 8, ["modelValue"]));
|
|
551
|
+
}, 8, ["modelValue", "visible"]));
|
|
506
552
|
};
|
|
507
553
|
}
|
|
508
554
|
});
|
|
@@ -17,7 +17,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
return (_ctx, _cache) => {
|
|
18
18
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
19
19
|
const _component_el_form = resolveComponent("el-form");
|
|
20
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
20
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
21
|
+
"label-width": "80px",
|
|
22
|
+
size: "small"
|
|
23
|
+
}, {
|
|
21
24
|
default: withCtx(() => [
|
|
22
25
|
createVNode(_component_el_collapse, {
|
|
23
26
|
modelValue: openCollapseItems.value,
|
|
@@ -34,25 +34,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
props.configure.runtime.class = designClass.value;
|
|
35
35
|
props.configure.runtime.headerStyle = designHeaderStyle.value;
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const conentStyle = ref({});
|
|
38
38
|
if (props.configure.props == void 0) {
|
|
39
39
|
props.configure.props = {};
|
|
40
40
|
}
|
|
41
|
-
caculateContentClass();
|
|
42
41
|
watch(props.configure.props, () => {
|
|
43
42
|
caculateContentClass();
|
|
44
|
-
});
|
|
43
|
+
}, { immediate: true });
|
|
45
44
|
function caculateContentClass() {
|
|
46
45
|
const thisProps = props.configure.props;
|
|
46
|
+
const tempStyle = {};
|
|
47
47
|
if (thisProps.isFlex) {
|
|
48
|
-
|
|
48
|
+
tempStyle.display = "flex";
|
|
49
|
+
tempStyle["flex-wrap"] = "wrap";
|
|
50
|
+
tempStyle["align-content"] = "flex-start";
|
|
49
51
|
if (thisProps.flexJustify) {
|
|
50
|
-
|
|
52
|
+
tempStyle["justify-content"] = thisProps.flexJustify;
|
|
51
53
|
}
|
|
52
|
-
} else {
|
|
53
|
-
contentClass.value = "";
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
conentStyle.value = tempStyle;
|
|
56
|
+
props.configure.runtime.contentStyle = tempStyle;
|
|
56
57
|
}
|
|
57
58
|
const ambDragParent = ref(null);
|
|
58
59
|
useDraggable(ambDragParent, props.configure.items, {
|
|
@@ -96,8 +97,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
97
|
createElementVNode("div", {
|
|
97
98
|
ref_key: "ambDragParent",
|
|
98
99
|
ref: ambDragParent,
|
|
99
|
-
class:
|
|
100
|
-
style: { "padding-bottom": "40px" }
|
|
100
|
+
class: "amb-design-item-default",
|
|
101
|
+
style: normalizeStyle([{ "padding-bottom": "40px" }, conentStyle.value])
|
|
101
102
|
}, [
|
|
102
103
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
|
|
103
104
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
@@ -112,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
113
|
onOnDelete: deleteItem
|
|
113
114
|
}, null, 8, ["pageDesign", "configure", "selectWidget", "indexObj"]);
|
|
114
115
|
}), 128))
|
|
115
|
-
],
|
|
116
|
+
], 4)
|
|
116
117
|
]),
|
|
117
118
|
_: 2
|
|
118
119
|
}, [
|
package/dist/es/components/design/views/assemblys/container/collapse/collapse-attr-style.vue.js
CHANGED
|
@@ -15,7 +15,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
return (_ctx, _cache) => {
|
|
16
16
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
17
17
|
const _component_el_form = resolveComponent("el-form");
|
|
18
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
18
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
19
|
+
"label-width": "80px",
|
|
20
|
+
size: "small"
|
|
21
|
+
}, {
|
|
19
22
|
default: withCtx(() => [
|
|
20
23
|
createVNode(_component_el_collapse, {
|
|
21
24
|
modelValue: openCollapseItems.value,
|
package/dist/es/components/design/views/assemblys/container/container/container-attr-style.vue.js
CHANGED
|
@@ -16,7 +16,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
return (_ctx, _cache) => {
|
|
17
17
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
18
18
|
const _component_el_form = resolveComponent("el-form");
|
|
19
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
19
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
20
|
+
"label-width": "80px",
|
|
21
|
+
size: "small"
|
|
22
|
+
}, {
|
|
20
23
|
default: withCtx(() => [
|
|
21
24
|
createVNode(_component_el_collapse, {
|
|
22
25
|
modelValue: openCollapseItems.value,
|
|
@@ -17,7 +17,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
return (_ctx, _cache) => {
|
|
18
18
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
19
19
|
const _component_el_form = resolveComponent("el-form");
|
|
20
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
20
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
21
|
+
"label-width": "80px",
|
|
22
|
+
size: "small"
|
|
23
|
+
}, {
|
|
21
24
|
default: withCtx(() => [
|
|
22
25
|
createVNode(_component_el_collapse, {
|
|
23
26
|
modelValue: openCollapseItems.value,
|
|
@@ -51,13 +51,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
});
|
|
52
52
|
function caculateThisStyle() {
|
|
53
53
|
caculateComponentStyle(props.configure, designStyle, designClass, null);
|
|
54
|
+
updateFlexStyle();
|
|
54
55
|
props.configure.runtime.style = designStyle.value;
|
|
55
56
|
props.configure.runtime.class = designClass.value;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
function updateFlexStyle() {
|
|
59
|
+
if (!designProperty.value || !designStyle.value) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const alignItems = designProperty.value.alignItems;
|
|
63
|
+
if (alignItems) {
|
|
64
|
+
let alignContent = "center";
|
|
65
|
+
if (alignItems === "top") {
|
|
66
|
+
alignContent = "flex-start";
|
|
67
|
+
} else if (alignItems === "bottom") {
|
|
68
|
+
alignContent = "flex-end";
|
|
69
|
+
}
|
|
70
|
+
designStyle.value["align-content"] = alignContent;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
watch(
|
|
74
|
+
props.configure.props,
|
|
75
|
+
() => {
|
|
76
|
+
getRestsParameter();
|
|
77
|
+
updateFlexStyle();
|
|
78
|
+
props.configure.runtime.props = designProperty.value;
|
|
79
|
+
},
|
|
80
|
+
{ immediate: true }
|
|
81
|
+
);
|
|
61
82
|
const ambDragParent = ref(null);
|
|
62
83
|
useDraggable(ambDragParent, props.configure.items, {
|
|
63
84
|
group: {
|
|
@@ -88,15 +109,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
109
|
function deleteItem(sourceItem) {
|
|
89
110
|
let items = props.configure.items;
|
|
90
111
|
if (sourceItem.items && sourceItem.items.length > 0) {
|
|
91
|
-
ElMessageBox.confirm(
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
cancelButtonText: "取消",
|
|
97
|
-
type: "warning"
|
|
98
|
-
}
|
|
99
|
-
).then(() => {
|
|
112
|
+
ElMessageBox.confirm("还有子元素,确定要删除吗?", "删除", {
|
|
113
|
+
confirmButtonText: "确认",
|
|
114
|
+
cancelButtonText: "取消",
|
|
115
|
+
type: "warning"
|
|
116
|
+
}).then(() => {
|
|
100
117
|
const index = items.indexOf(sourceItem);
|
|
101
118
|
if (index > -1) {
|
|
102
119
|
items.splice(index, 1);
|
|
@@ -114,7 +131,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
131
|
ref: ambDragParent,
|
|
115
132
|
style: normalizeStyle([{ "min-height": "40px", "padding-bottom": "20px" }, designStyle.value]),
|
|
116
133
|
justify: designProperty.value.flexJustify,
|
|
117
|
-
gutter: designProperty.value.flexGutter,
|
|
118
134
|
align: designProperty.value.alignItems,
|
|
119
135
|
class: normalizeClass([designClass.value, "amb-design-item-default"])
|
|
120
136
|
}, {
|
|
@@ -134,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
134
150
|
}), 128))
|
|
135
151
|
]),
|
|
136
152
|
_: 1
|
|
137
|
-
}, 8, ["justify", "
|
|
153
|
+
}, 8, ["justify", "align", "style", "class"]);
|
|
138
154
|
};
|
|
139
155
|
}
|
|
140
156
|
});
|
|
@@ -143,8 +143,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
143
143
|
}, {
|
|
144
144
|
default: withCtx(() => [
|
|
145
145
|
createVNode(_component_el_input, {
|
|
146
|
-
modelValue: __props.configure.props.
|
|
147
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => __props.configure.props.
|
|
146
|
+
modelValue: __props.configure.props.formTitle,
|
|
147
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => __props.configure.props.formTitle = $event)
|
|
148
148
|
}, null, 8, ["modelValue"])
|
|
149
149
|
]),
|
|
150
150
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode } from "vue";
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, withDirectives, createElementVNode, vShow } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../common/common-style-font.vue.js";
|
|
3
3
|
import _sfc_main$2 from "../../common/common-style-background.vue.js";
|
|
4
4
|
import _sfc_main$3 from "../../common/common-style-margin.vue.js";
|
|
@@ -20,7 +20,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
const _component_el_form = resolveComponent("el-form");
|
|
21
21
|
const _component_el_collapse_item = resolveComponent("el-collapse-item");
|
|
22
22
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
23
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
23
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
24
|
+
"label-width": "80px",
|
|
25
|
+
size: "small"
|
|
26
|
+
}, {
|
|
24
27
|
default: withCtx(() => [
|
|
25
28
|
createVNode(_component_el_collapse, {
|
|
26
29
|
modelValue: openCollapseItems.value,
|
|
@@ -28,15 +31,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
31
|
style: { "margin-top": "6px" }
|
|
29
32
|
}, {
|
|
30
33
|
default: withCtx(() => [
|
|
31
|
-
createVNode(
|
|
32
|
-
|
|
33
|
-
createVNode(_sfc_main$3, { configure: __props.configure }, null, 8, ["configure"]),
|
|
34
|
-
createVNode(_sfc_main$4, { configure: __props.configure }, null, 8, ["configure"]),
|
|
35
|
-
createVNode(_sfc_main$5, { configure: __props.configure }, null, 8, ["configure"]),
|
|
36
|
-
createVNode(_sfc_main$6, { configure: __props.configure }, null, 8, ["configure"]),
|
|
37
|
-
createVNode(_sfc_main$7, { configure: __props.configure }, null, 8, ["configure"]),
|
|
38
|
-
createVNode(_component_el_collapse_item, {
|
|
39
|
-
title: "表单标题样式",
|
|
34
|
+
withDirectives(createVNode(_component_el_collapse_item, {
|
|
35
|
+
title: "标题",
|
|
40
36
|
name: "formTittleStyle",
|
|
41
37
|
class: "amb-design-attr-group-header"
|
|
42
38
|
}, {
|
|
@@ -44,14 +40,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
40
|
createElementVNode("div", _hoisted_1, [
|
|
45
41
|
createVNode(_component_el_form, { "label-position": "top" }, {
|
|
46
42
|
default: withCtx(() => [
|
|
47
|
-
createVNode(_component_el_form_item, {
|
|
43
|
+
createVNode(_component_el_form_item, { style: { "margin-bottom": "0px" } }, {
|
|
48
44
|
default: withCtx(() => [
|
|
49
45
|
createVNode(_component_el_input, {
|
|
50
|
-
modelValue: __props.configure.style.
|
|
51
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.configure.style.
|
|
46
|
+
modelValue: __props.configure.style.formTitleStyle,
|
|
47
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.configure.style.formTitleStyle = $event),
|
|
52
48
|
rows: 5,
|
|
53
49
|
type: "textarea",
|
|
54
|
-
placeholder: ""
|
|
50
|
+
placeholder: "font-size:18px;"
|
|
55
51
|
}, null, 8, ["modelValue"])
|
|
56
52
|
]),
|
|
57
53
|
_: 1
|
|
@@ -62,7 +58,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
58
|
])
|
|
63
59
|
]),
|
|
64
60
|
_: 1
|
|
65
|
-
})
|
|
61
|
+
}, 512), [
|
|
62
|
+
[vShow, __props.configure.props.formTitle]
|
|
63
|
+
]),
|
|
64
|
+
createVNode(_sfc_main$1, { configure: __props.configure }, null, 8, ["configure"]),
|
|
65
|
+
createVNode(_sfc_main$2, { configure: __props.configure }, null, 8, ["configure"]),
|
|
66
|
+
createVNode(_sfc_main$3, { configure: __props.configure }, null, 8, ["configure"]),
|
|
67
|
+
createVNode(_sfc_main$4, { configure: __props.configure }, null, 8, ["configure"]),
|
|
68
|
+
createVNode(_sfc_main$5, { configure: __props.configure }, null, 8, ["configure"]),
|
|
69
|
+
createVNode(_sfc_main$6, { configure: __props.configure }, null, 8, ["configure"]),
|
|
70
|
+
createVNode(_sfc_main$7, { configure: __props.configure }, null, 8, ["configure"])
|
|
66
71
|
]),
|
|
67
72
|
_: 1
|
|
68
73
|
}, 8, ["modelValue"])
|
|
@@ -47,30 +47,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
}
|
|
48
48
|
const designStyle = ref({});
|
|
49
49
|
const designClass = ref("");
|
|
50
|
-
const
|
|
50
|
+
const formTitleStyle = ref({});
|
|
51
51
|
caculateThisStyle();
|
|
52
52
|
watch(props.configure.style, () => {
|
|
53
53
|
caculateThisStyle();
|
|
54
54
|
});
|
|
55
55
|
function caculateThisStyle() {
|
|
56
56
|
caculateComponentStyle(props.configure, designStyle, designClass, null);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const strs = props.configure.style.
|
|
57
|
+
const tempTitleStyle = {};
|
|
58
|
+
if (props.configure.style.formTitleStyle) {
|
|
59
|
+
const strs = props.configure.style.formTitleStyle.replace(/[\r\n]/g, "").split(";");
|
|
60
60
|
for (let index = 0; index < strs.length; index++) {
|
|
61
61
|
const ss = strs[index].split(":");
|
|
62
62
|
if (ss.length > 1 && ss[0] && ss[1]) {
|
|
63
63
|
if (!isNaN(ss[0])) {
|
|
64
64
|
continue;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
tempTitleStyle[ss[0]] = ss[1];
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
formTittleStyle.value = tempTittleStyle;
|
|
70
69
|
}
|
|
70
|
+
formTitleStyle.value = tempTitleStyle;
|
|
71
71
|
props.configure.runtime.class = designClass.value;
|
|
72
72
|
props.configure.runtime.style = designStyle.value;
|
|
73
|
-
props.configure.runtime.
|
|
73
|
+
props.configure.runtime.titleStyle = formTitleStyle.value;
|
|
74
74
|
}
|
|
75
75
|
const ambDragParent = ref(null);
|
|
76
76
|
useDraggable(ambDragParent, props.configure.items, {
|
|
@@ -100,15 +100,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
100
100
|
}
|
|
101
101
|
function deleteItem(sourceItem) {
|
|
102
102
|
if (sourceItem.items && sourceItem.items.length > 0) {
|
|
103
|
-
ElMessageBox.confirm(
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
cancelButtonText: "取消",
|
|
109
|
-
type: "warning"
|
|
110
|
-
}
|
|
111
|
-
).then(() => {
|
|
103
|
+
ElMessageBox.confirm("还有子元素,确定要删除吗?", "删除", {
|
|
104
|
+
confirmButtonText: "确认",
|
|
105
|
+
cancelButtonText: "取消",
|
|
106
|
+
type: "warning"
|
|
107
|
+
}).then(() => {
|
|
112
108
|
const items = props.configure.items;
|
|
113
109
|
const index = items.indexOf(sourceItem);
|
|
114
110
|
if (index > -1) {
|
|
@@ -132,10 +128,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
128
|
class: normalizeClass(designClass.value)
|
|
133
129
|
}, {
|
|
134
130
|
default: withCtx(() => [
|
|
135
|
-
designProps.value.
|
|
131
|
+
designProps.value.formTitle ? (openBlock(), createElementBlock("div", {
|
|
136
132
|
key: 0,
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
class: "amb-widget-form-title",
|
|
134
|
+
style: normalizeStyle(formTitleStyle.value)
|
|
135
|
+
}, toDisplayString(designProps.value.formTitle), 5)) : createCommentVNode("", true),
|
|
139
136
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
|
|
140
137
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
141
138
|
key: element,
|
|
@@ -14,7 +14,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
return (_ctx, _cache) => {
|
|
15
15
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
16
16
|
const _component_el_form = resolveComponent("el-form");
|
|
17
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
17
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
18
|
+
"label-width": "80px",
|
|
19
|
+
size: "small"
|
|
20
|
+
}, {
|
|
18
21
|
default: withCtx(() => [
|
|
19
22
|
createVNode(_component_el_collapse, {
|
|
20
23
|
modelValue: openCollapseItems.value,
|
|
@@ -17,7 +17,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
return (_ctx, _cache) => {
|
|
18
18
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
19
19
|
const _component_el_form = resolveComponent("el-form");
|
|
20
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
20
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
21
|
+
"label-width": "80px",
|
|
22
|
+
size: "small"
|
|
23
|
+
}, {
|
|
21
24
|
default: withCtx(() => [
|
|
22
25
|
createVNode(_component_el_collapse, {
|
|
23
26
|
modelValue: openCollapseItems.value,
|
|
@@ -18,7 +18,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
return (_ctx, _cache) => {
|
|
19
19
|
const _component_el_collapse = resolveComponent("el-collapse");
|
|
20
20
|
const _component_el_form = resolveComponent("el-form");
|
|
21
|
-
return openBlock(), createBlock(_component_el_form, {
|
|
21
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
22
|
+
"label-width": "80px",
|
|
23
|
+
size: "small"
|
|
24
|
+
}, {
|
|
22
25
|
default: withCtx(() => [
|
|
23
26
|
createVNode(_component_el_collapse, {
|
|
24
27
|
modelValue: openCollapseItems.value,
|
|
@@ -1,7 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, normalizeClass } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "amb-design-attr-header" };
|
|
3
|
+
const _hoisted_2 = { class: "amb-design-attr-header-type" };
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "attr-header",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "base"
|
|
10
|
+
// 设置默认值
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const emit = __emit;
|
|
17
|
+
const clickType = ref(props.modelValue);
|
|
18
|
+
function changeType(type) {
|
|
19
|
+
clickType.value = type;
|
|
20
|
+
emit("update:modelValue", type);
|
|
21
|
+
}
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
24
|
+
createElementVNode("div", _hoisted_2, [
|
|
25
|
+
createElementVNode("label", {
|
|
26
|
+
class: normalizeClass({ selected: clickType.value === "base" }),
|
|
27
|
+
onClick: _cache[0] || (_cache[0] = ($event) => changeType("base"))
|
|
28
|
+
}, "属性", 2),
|
|
29
|
+
createElementVNode("label", {
|
|
30
|
+
class: normalizeClass({ selected: clickType.value === "style" }),
|
|
31
|
+
onClick: _cache[1] || (_cache[1] = ($event) => changeType("style"))
|
|
32
|
+
}, "样式", 2),
|
|
33
|
+
createElementVNode("label", {
|
|
34
|
+
class: normalizeClass({ selected: clickType.value === "event" }),
|
|
35
|
+
onClick: _cache[2] || (_cache[2] = ($event) => changeType("event"))
|
|
36
|
+
}, "事件", 2),
|
|
37
|
+
createElementVNode("label", {
|
|
38
|
+
class: normalizeClass({ selected: clickType.value === "advanced" }),
|
|
39
|
+
onClick: _cache[3] || (_cache[3] = ($event) => changeType("advanced"))
|
|
40
|
+
}, "高级", 2)
|
|
41
|
+
])
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
5
46
|
export {
|
|
6
|
-
|
|
47
|
+
_sfc_main as default
|
|
7
48
|
};
|