super-page-designer 2.2.13 → 2.2.16
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/common-util.d.ts +1 -0
- package/dist/es/components/design/utils/common-util.js +20 -15
- package/dist/es/components/design/utils/data-table-util.d.ts +1 -1
- package/dist/es/components/design/utils/data-table-util.js +52 -55
- package/dist/es/components/design/utils/page-table-util.js +7 -7
- package/dist/es/components/design/views/assemblys/button/button/button-attr-advanced.vue.js +34 -33
- package/dist/es/components/design/views/assemblys/button/component/combination.vue.js +23 -20
- package/dist/es/components/design/views/assemblys/button/component/condition-dialog.vue.js +16 -15
- package/dist/es/components/design/views/assemblys/button/component/set-dialog.vue.js +36 -31
- package/dist/es/components/design/views/assemblys/chart/common/common-home-chart.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/chart/common/common-home-chart.vue2.js +29 -28
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/font-style-dialog.vue.js +13 -13
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/table-showcondition.vue.js +48 -48
- package/dist/es/components/design/views/assemblys/common/common-advanced-basic-showcondition.vue.js +39 -34
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/table-attr-advanced.vue.js +7 -7
- package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue.js +2 -26
- package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue2.js +26 -2
- package/dist/es/components/design/views/assemblys/form/common/linkpage-page-callback.vue.js +5 -5
- package/dist/es/components/design/views/assemblys/form/common/parameter-table.vue.js +21 -21
- package/dist/es/components/design/views/assemblys/form/common/uploading.vue.js +4 -4
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-autoset.vue.js +7 -7
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-design.vue2.js +5 -5
- package/dist/es/components/design/views/assemblys/form/select/select-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/select/select-design.vue2.js +12 -11
- package/dist/es/components/design/views/assemblys/page/variable-dialog.vue.js +1 -1
- package/dist/es/components/design/views/design/page-event/{config.vue.js → config.vue2.js} +2 -2
- package/dist/es/components/design/views/design/page-event/config.vue3.js +5 -5
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +50 -50
- package/dist/es/components/design/views/design/view/components/quick-add-fields.vue.js +50 -50
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
- package/dist/es/style.css +15 -15
- package/package.json +5 -5
- /package/dist/es/components/design/views/assemblys/common/{common-variable-bind.vue2.js → common-variable-bind.vue3.js} +0 -0
|
@@ -10,41 +10,41 @@ const s = { style: { "text-align": "center", margin: "0px -8px", "padding-top":
|
|
|
10
10
|
g(), a(() => f.tableConfigure, () => {
|
|
11
11
|
g();
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const C = l([]);
|
|
14
|
+
function w(e3) {
|
|
15
15
|
let l2 = -1;
|
|
16
|
-
const a2 =
|
|
17
|
-
for (let t2 = 0; t2 < a2; t2++) if (
|
|
16
|
+
const a2 = C.value.length;
|
|
17
|
+
for (let t2 = 0; t2 < a2; t2++) if (C.value[t2].uuid == e3.uuid) {
|
|
18
18
|
l2 = t2;
|
|
19
19
|
break;
|
|
20
20
|
}
|
|
21
21
|
return l2;
|
|
22
22
|
}
|
|
23
|
-
return
|
|
24
|
-
"" !== e3[0].paramName && v("dataChange",
|
|
23
|
+
return C.value = f.data, C.value && 0 != C.value.length || C.value.push({ uuid: d(), paramValue: "", paramName: "" }), a(() => C.value, (e3) => {
|
|
24
|
+
"" !== e3[0].paramName && v("dataChange", C.value);
|
|
25
25
|
}, { deep: true }), (e3, l2) => {
|
|
26
|
-
const a2 = t("Top"), p2 = t("el-icon"), c3 = t("Bottom"), f2 = t("el-table-column"), v2 = t("el-input"), g2 = t("Plus"),
|
|
27
|
-
return u(), o(
|
|
28
|
-
let l4 =
|
|
26
|
+
const a2 = t("Top"), p2 = t("el-icon"), c3 = t("Bottom"), f2 = t("el-table-column"), v2 = t("el-input"), g2 = t("Plus"), V = t("Delete"), h = t("el-table");
|
|
27
|
+
return u(), o(h, { data: C.value, "row-key": "uuid", style: { width: "100%" } }, { default: r(() => [n(f2, { label: "", width: "32" }, { default: r((e4) => [i("div", s, [n(p2, { size: "14", style: { cursor: "pointer" }, onClick: (l3) => function(e5) {
|
|
28
|
+
let l4 = w(e5);
|
|
29
29
|
if (l4 < 1) return;
|
|
30
|
-
const a3 =
|
|
30
|
+
const a3 = C.value;
|
|
31
31
|
[a3[l4 - 1], a3[l4]] = [a3[l4], a3[l4 - 1]];
|
|
32
32
|
}(e4.row) }, { default: r(() => [n(a2)]), _: 2 }, 1032, ["onClick"]), n(p2, { size: "14", style: { "margin-left": "2px", cursor: "pointer" }, onClick: (l3) => function(e5) {
|
|
33
|
-
let l4 =
|
|
34
|
-
if (-1 == l4 ||
|
|
35
|
-
const a3 =
|
|
33
|
+
let l4 = w(e5);
|
|
34
|
+
if (-1 == l4 || C.value.length == l4 + 1) return;
|
|
35
|
+
const a3 = C.value;
|
|
36
36
|
[a3[l4], a3[l4 + 1]] = [a3[l4 + 1], a3[l4]];
|
|
37
|
-
}(e4.row) }, { default: r(() => [n(c3)]), _: 2 }, 1032, ["onClick"])])]), _: 1 }), n(f2, { label: "参数名称"
|
|
37
|
+
}(e4.row) }, { default: r(() => [n(c3)]), _: 2 }, 1032, ["onClick"])])]), _: 1 }), n(f2, { label: "参数名称" }, { default: r((e4) => [n(v2, { modelValue: e4.row.paramName, "onUpdate:modelValue": (l3) => e4.row.paramName = l3, size: "small" }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1 }), n(f2, { prop: "value", label: "参数值" }, { default: r((e4) => [n(m, { modelValue: e4.row.paramValue, objModelOptions: b.value, "onUpdate:modelValue": (l3) => {
|
|
38
38
|
return a3 = l3, void ((t2 = e4.row) && (t2.paramValue = a3));
|
|
39
39
|
var a3, t2;
|
|
40
|
-
} }, null, 8, ["modelValue", "objModelOptions", "onUpdate:modelValue"])]), _: 1 }), n(f2, { label: "操作", width: "60" }, { default: r((e4) => [n(p2, { size: "14", style: { color: "#
|
|
40
|
+
} }, null, 8, ["modelValue", "objModelOptions", "onUpdate:modelValue"])]), _: 1 }), n(f2, { label: "操作", width: "60" }, { default: r((e4) => [n(p2, { size: "14", style: { color: "#5893ef", cursor: "pointer", "font-weight": "bold", "margin-right": "8px" }, onClick: (l3) => function(e5) {
|
|
41
41
|
let l4 = -1;
|
|
42
|
-
e5 && (l4 =
|
|
43
|
-
}(e4.row) }, { default: r(() => [n(g2)]), _: 2 }, 1032, ["onClick"]), n(p2, { size: "14", style: { color: "#
|
|
44
|
-
if (1 ==
|
|
45
|
-
let l4 =
|
|
46
|
-
l4 > -1 &&
|
|
47
|
-
}(e4.row) }, { default: r(() => [n(
|
|
42
|
+
e5 && (l4 = w(e5)), C.value.splice(l4 + 1, 0, { uuid: d(), paramValue: "", paramName: "" });
|
|
43
|
+
}(e4.row) }, { default: r(() => [n(g2)]), _: 2 }, 1032, ["onClick"]), n(p2, { size: "14", style: { color: "#5893ef", cursor: "pointer" }, onClick: (l3) => function(e5) {
|
|
44
|
+
if (1 == C.value.length) return e5.paramValue = "", void (e5.paramName = "");
|
|
45
|
+
let l4 = w(e5);
|
|
46
|
+
l4 > -1 && C.value.splice(l4, 1);
|
|
47
|
+
}(e4.row) }, { default: r(() => [n(V)]), _: 2 }, 1032, ["onClick"])]), _: 1 })]), _: 1 }, 8, ["data"]);
|
|
48
48
|
};
|
|
49
49
|
} });
|
|
50
50
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const m = { style: { padding: "8px 0px 0px 0px" } }, p =
|
|
3
|
-
const
|
|
4
|
-
return o(), a(c, { title: "上传设置", name: "uploadConfig", class: "amb-design-attr-group-header" }, { default: d(() => [
|
|
1
|
+
import { defineComponent as l, resolveComponent as e, createBlock as a, openBlock as o, withCtx as d, createElementVNode as i, renderSlot as t, createVNode as u, createCommentVNode as n } from "vue";
|
|
2
|
+
const m = { style: { padding: "8px 0px 0px 0px" } }, p = l({ __name: "uploading", props: { uploadConfig: Object }, setup: (l2) => (p2, s) => {
|
|
3
|
+
const g = e("el-switch"), r = e("el-form-item"), f = e("el-input"), C = e("el-input-number"), b = e("el-option"), V = e("el-select"), c = e("el-collapse-item");
|
|
4
|
+
return o(), a(c, { title: "上传设置", name: "uploadConfig", class: "amb-design-attr-group-header" }, { default: d(() => [i("div", m, [t(p2.$slots, "addition", { row: l2.uploadConfig }), u(r, { label: "附件多选", class: "amb-design-attr-item" }, { default: d(() => [u(g, { modelValue: l2.uploadConfig.multiple, "onUpdate:modelValue": s[0] || (s[0] = (e2) => l2.uploadConfig.multiple = e2) }, null, 8, ["modelValue"])]), _: 1 }), u(r, { label: "拖拽上传", class: "amb-design-attr-item" }, { default: d(() => [u(g, { modelValue: l2.uploadConfig.drag, "onUpdate:modelValue": s[1] || (s[1] = (e2) => l2.uploadConfig.drag = e2) }, null, 8, ["modelValue"])]), _: 1 }), l2.uploadConfig.drag ? (o(), a(r, { key: 0, label: "文字提示", class: "amb-design-attr-item" }, { default: d(() => [u(f, { modelValue: l2.uploadConfig.dragTip, "onUpdate:modelValue": s[2] || (s[2] = (e2) => l2.uploadConfig.dragTip = e2) }, null, 8, ["modelValue"])]), _: 1 })) : n("", true), l2.uploadConfig.multiple ? (o(), a(r, { key: 1, label: "个数限制", class: "amb-design-attr-item" }, { default: d(() => [u(C, { modelValue: l2.uploadConfig.limit, "onUpdate:modelValue": s[3] || (s[3] = (e2) => l2.uploadConfig.limit = e2), min: "0" }, null, 8, ["modelValue"])]), _: 1 })) : n("", true), u(r, { label: "文件限制(M)", class: "amb-design-attr-item" }, { default: d(() => [u(C, { modelValue: l2.uploadConfig.limitFileSize, "onUpdate:modelValue": s[4] || (s[4] = (e2) => l2.uploadConfig.limitFileSize = e2), placeholder: "30", min: "0", max: "100" }, null, 8, ["modelValue"])]), _: 1 }), u(r, { label: "移动端上传方式", class: "amb-design-attr-item" }, { default: d(() => [u(V, { modelValue: l2.uploadConfig.openCameraOrChoosePhoto, "onUpdate:modelValue": s[5] || (s[5] = (e2) => l2.uploadConfig.openCameraOrChoosePhoto = e2), size: "mini", clearable: "" }, { default: d(() => [u(b, { label: "拍照和相册选取", value: "openCameraAndChoosePhoto" }), u(b, { label: "拍照", value: "openCamera" }), u(b, { label: "相册选取", value: "openChoosePhoto" })]), _: 1 }, 8, ["modelValue"])]), _: 1 })])]), _: 3 });
|
|
5
5
|
} });
|
|
6
6
|
export {
|
|
7
7
|
p as default
|
|
@@ -6,11 +6,11 @@ const v = { style: { padding: "8px 0px 0px 0px" } }, h = e({ __name: "depttree-a
|
|
|
6
6
|
const h2 = e2;
|
|
7
7
|
h2.configure.props || (h2.configure.props = {}), h2.configure.props.base || (h2.configure.props.base = {}), h2.configure.props.base.otherFieldSets || (h2.configure.props.base.otherFieldSets = []);
|
|
8
8
|
const w = h2.configure.props.base, _ = w.otherFieldSets;
|
|
9
|
-
0 == _.length &&
|
|
9
|
+
0 == _.length && C(null);
|
|
10
10
|
const T = l(() => {
|
|
11
11
|
let e3 = h2.configure.props.base.treeType;
|
|
12
12
|
return e3 = e3 || "DeptUserTree", e3.includes("User") ? "user" : "dept";
|
|
13
|
-
}), V = [{ name: "ID", value: "id", types: ["user", "dept"] }, { name: "编码", value: "code", types: ["dept"] }, { name: "名称", value: "name", types: ["user", "dept"] }, { name: "登录名", value: "loginName", types: ["user"] }, { name: "Email", value: "email", types: ["user"] }, { name: "Telephone", value: "电话", types: ["user"] }, { name: "正职部门名称", value: "mainDeptName", types: ["user"] }, { name: "正职部门ID", value: "mainDeptId", types: ["user"] }, { name: "分支机构名称", value: "subCompanyName", types: ["user"] }, { name: "分支机构ID", value: "subCompanyId", types: ["user"] }];
|
|
13
|
+
}), V = [{ name: "ID", value: "id", types: ["user", "dept"] }, { name: "编码", value: "code", types: ["dept"] }, { name: "名称", value: "name", types: ["user", "dept"] }, { name: "登录名", value: "loginName", types: ["user"] }, { name: "Email", value: "email", types: ["user"] }, { name: "Telephone", value: "电话", types: ["user"] }, { name: "正职部门名称", value: "mainDeptName", types: ["user"] }, { name: "正职部门编码", value: "mainDeptCode", types: ["user"] }, { name: "正职部门ID", value: "mainDeptId", types: ["user"] }, { name: "分支机构名称", value: "subCompanyName", types: ["user"] }, { name: "分支机构ID", value: "subCompanyId", types: ["user"] }];
|
|
14
14
|
function k(e3) {
|
|
15
15
|
let l2 = -1;
|
|
16
16
|
const t2 = _.length;
|
|
@@ -20,20 +20,20 @@ const v = { style: { padding: "8px 0px 0px 0px" } }, h = e({ __name: "depttree-a
|
|
|
20
20
|
}
|
|
21
21
|
return l2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function C(e3) {
|
|
24
24
|
let l2 = -1;
|
|
25
25
|
e3 && (l2 = k(e3));
|
|
26
26
|
const t2 = { uuid: g(), source: "", target: "" };
|
|
27
27
|
_.splice(l2 + 1, 0, t2);
|
|
28
28
|
}
|
|
29
29
|
return (l2, g2) => {
|
|
30
|
-
const h3 = t("el-option"),
|
|
31
|
-
return o(), a(I, { title: "其他字段设值", name: "otherFieldSet", class: "amb-design-attr-group-header" }, { default: r(() => [u("div", v, [s(F, { data: n(w).otherFieldSets }, { default: r(() => [s(
|
|
30
|
+
const h3 = t("el-option"), D = t("el-select"), x = t("el-table-column"), U = t("el-icon"), F = t("el-table"), I = t("el-collapse-item");
|
|
31
|
+
return o(), a(I, { title: "其他字段设值", name: "otherFieldSet", class: "amb-design-attr-group-header" }, { default: r(() => [u("div", v, [s(F, { data: n(w).otherFieldSets }, { default: r(() => [s(x, { prop: "label", label: "字段", width: "90" }, { default: r((e3) => [s(D, { size: "small", modelValue: e3.row.source, "onUpdate:modelValue": (l3) => e3.row.source = l3, title: e3.row.source, filterable: "", "reserve-keyword": "", clearable: "", placeholder: "请选择" }, { default: r(() => [(o(), p(i, null, d(V, (e4) => m(s(h3, { key: e4.name, label: e4.name, value: e4.value }, null, 8, ["label", "value"]), [[c, e4.types.includes(T.value)]])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "title"])]), _: 1 }), s(x, { prop: "value", label: "设置到", width: "120" }, { default: r((l3) => [s(y, { isTable: e2.configure.isTable, modelValue: l3.row.target, paramTypes: ["data", "page"], "onUpdate:modelValue": (e3) => function(e4, l4) {
|
|
32
32
|
l4.target = e4;
|
|
33
|
-
}(e3, l3.row) }, null, 8, ["isTable", "modelValue", "onUpdate:modelValue"])]), _: 1 }), s(
|
|
33
|
+
}(e3, l3.row) }, null, 8, ["isTable", "modelValue", "onUpdate:modelValue"])]), _: 1 }), s(x, { label: "操作", width: "60" }, { default: r((e3) => [s(U, { size: "14", style: { color: "#5893ef", cursor: "pointer", "font-weight": "bold", "margin-right": "8px" }, onClick: (l3) => C(e3.row) }, { default: r(() => [s(n(f))]), _: 2 }, 1032, ["onClick"]), s(U, { size: "14", style: { color: "#5893ef", cursor: "pointer" }, onClick: (l3) => function(e4) {
|
|
34
34
|
let l4 = k(e4);
|
|
35
35
|
l4 > -1 && (_.splice(l4, 1), 0 == _.length && setTimeout(function() {
|
|
36
|
-
|
|
36
|
+
C(null);
|
|
37
37
|
}, 10));
|
|
38
38
|
}(e3.row) }, { default: r(() => [s(n(b))]), _: 2 }, 1032, ["onClick"])]), _: 1 })]), _: 1 }, 8, ["data"])])]), _: 1 });
|
|
39
39
|
};
|
package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-design.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, watch as i, resolveComponent as
|
|
1
|
+
import { defineComponent as e, ref as l, watch as i, resolveComponent as t, createBlock as o, openBlock as a, normalizeStyle as u, normalizeClass as r, withCtx as p, createVNode as s, unref as n, createElementBlock as m, createCommentVNode as c, toDisplayString as d } from "vue";
|
|
2
2
|
import { caculateDetailComponentStyle as f, caculateComponentProps as v } from "../../../../utils/form-design-util.js";
|
|
3
3
|
import { FsUploadNew as g } from "agilebuilder-ui";
|
|
4
4
|
import "@element-plus/icons-vue";
|
|
@@ -11,12 +11,12 @@ const y = e({ __name: "fileupload-design", props: { pageDesign: {}, configure: {
|
|
|
11
11
|
}, { immediate: true }), i(y2.configure.props, () => {
|
|
12
12
|
v(y2.configure, S, z), function() {
|
|
13
13
|
let e3 = y2.configure.props ? y2.configure.props : {};
|
|
14
|
-
const l2 = e3.uploadConfig ? e3.uploadConfig : {}, i2 = e3.base ? e3.base : {},
|
|
15
|
-
l2.drag && (
|
|
14
|
+
const l2 = e3.uploadConfig ? e3.uploadConfig : {}, i2 = e3.base ? e3.base : {}, t2 = {};
|
|
15
|
+
l2.drag && (t2.drag = l2.drag), t2.prop = i2.prop, t2.propName = i2.propName, t2.displayType = l2.displayType ? l2.displayType : "input", t2.state = i2.state, t2.placeholder = i2.placeholder, l2.accept ? t2.accept = l2.accept : t2.accept = null, l2.multiple ? (t2.multiple = l2.multiple, l2.limit ? t2.limit = l2.limit : t2.limit = null) : (t2.multiple = false, t2.limit = 1), l2.limitFileSize ? t2.limitFileSize = l2.limitFileSize : t2.limitFileSize = null, l2.openCameraOrChoosePhoto ? t2.openCameraOrChoosePhoto = l2.openCameraOrChoosePhoto : t2.openCameraOrChoosePhoto = null, t2.isDeleteNow = l2.isDeleteNow, Object.assign(S.value, t2);
|
|
16
16
|
}(), y2.configure.runtime.props = S.value, y2.configure.runtime.titleExceedStyle = z.value;
|
|
17
17
|
}, { immediate: true }), (e3, l2) => {
|
|
18
|
-
const i2 =
|
|
19
|
-
return a(),
|
|
18
|
+
const i2 = t("el-form-item");
|
|
19
|
+
return a(), o(i2, { required: !!S.value.required, class: r([b.value, "remove-formLabel-formContent-blankStyle"]), "label-width": S.value.labelWidth, style: u(h.value) }, { label: p(() => [S.value.tittleShow ? (a(), m("div", { key: 0, style: u({ ...C.value, ...z.value, "padding-right": "12px" }) }, d(S.value.title ? S.value.title : "Files"), 5)) : c("", true)]), default: p(() => [s(n(g), { disabled: "disabled" == S.value.state, style: { width: "100%" }, displayType: S.value.displayType, accept: S.value.accept, multiple: S.value.multiple, placeholder: S.value.placeholder, limit: S.value.limit, "limit-file-size": S.value.limitFileSize, "file-info": e3.fileInfo, "file-list": e3.fileList, "on-success": e3.onSuccess, "on-remove": e3.onRemove, openFsUpload: false, "before-upload": e3.beforeUpload }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list", "on-success", "on-remove", "before-upload"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
20
20
|
};
|
|
21
21
|
} });
|
|
22
22
|
export {
|
|
@@ -26,7 +26,7 @@ const j = { style: { padding: "8px 0px 0px 0px" } }, S = { style: { padding: "8p
|
|
|
26
26
|
}
|
|
27
27
|
return T.configure.isTable && (P.value = true), (l2, V2) => {
|
|
28
28
|
const z3 = a("el-option"), T2 = a("el-select"), W2 = a("el-form-item"), B = a("el-input"), E = a("el-radio"), F = a("el-radio-group"), G = a("el-input-number"), H = a("el-collapse-item"), I = a("el-checkbox"), J = a("el-collapse"), K = a("el-form");
|
|
29
|
-
return o(), u(K, { "label-width": "80px", size: "small" }, { default: t(() => [i(J, { modelValue: D.value, "onUpdate:modelValue": V2[
|
|
29
|
+
return o(), u(K, { "label-width": "80px", size: "small" }, { default: t(() => [i(J, { modelValue: D.value, "onUpdate:modelValue": V2[16] || (V2[16] = (e3) => D.value = e3), style: { "margin-top": "6px" } }, { default: t(() => [i(H, { title: "基本", name: "base", class: "amb-design-attr-group-header" }, { default: t(() => [d("div", j, [i(W2, { label: "组件类型", class: "amb-design-attr-item" }, { default: t(() => [i(T2, { modelValue: q.value, "onUpdate:modelValue": V2[0] || (V2[0] = (e3) => q.value = e3), onChange: A, placeholder: "请选择" }, { default: t(() => [(o(true), n(m, null, p(f(b)(), (e3) => (o(), u(z3, { key: e3.name, label: e3.label, value: e3.name }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"])]), _: 1 }), i(W2, { label: "唯一编码", class: "amb-design-attr-item" }, { default: t(() => [i(B, { modelValue: e2.configure.uuid, "onUpdate:modelValue": V2[1] || (V2[1] = (l3) => e2.configure.uuid = l3), readonly: "", title: e2.configure.uuid }, null, 8, ["modelValue", "title"])]), _: 1 }), P.value ? s("", true) : (o(), u(W2, { key: 0, label: "绑定变量", class: "amb-design-attr-item" }, { default: t(() => [(o(), u(h, { key: e2.configure.uuid, modelValue: e2.configure.props.base.prop, paramTypes: ["data", "page"], "onUpdate:modelValue": C }, null, 8, ["modelValue"]))]), _: 1 })), P.value ? s("", true) : (o(), u(W2, { key: 1, label: "绑定权限", class: "amb-design-attr-item" }, { default: t(() => [(o(), u(U, { key: e2.configure.uuid, configure: e2.configure }, null, 8, ["configure"]))]), _: 1 })), P.value ? s("", true) : (o(), u(W2, { key: 2, label: "选项名变量", class: "amb-design-attr-item" }, { default: t(() => [(o(), u(h, { key: e2.configure.uuid, modelValue: e2.configure.props.base.optionProp, paramTypes: ["data", "page"], "onUpdate:modelValue": M }, null, 8, ["modelValue"]))]), _: 1 })), i(W2, { label: "默认值", class: "amb-design-attr-item" }, { default: t(() => [(o(), u(h, { isTable: e2.configure.isTable, key: e2.configure.uuid, modelValue: e2.configure.props.base.defaultValue, "onUpdate:modelValue": O }, null, 8, ["isTable", "modelValue"]))]), _: 1 }), P.value ? s("", true) : (o(), u(W2, { key: 3, label: "标题显示", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.tittleShow, "onUpdate:modelValue": V2[2] || (V2[2] = (l3) => e2.configure.props.base.tittleShow = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[17] || (V2[17] = [c("显示")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[18] || (V2[18] = [c("隐藏")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })), r(i(W2, { label: "标题", class: "amb-design-attr-item" }, { default: t(() => [i(x, { modelValue: e2.configure.props.base.title, "onUpdate:modelValue": V2[3] || (V2[3] = (l3) => e2.configure.props.base.title = l3) }, null, 8, ["modelValue"])]), _: 1 }, 512), [[g, e2.configure.props.base.tittleShow]]), r(i(W2, { label: "标题宽度", class: "amb-design-attr-item" }, { default: t(() => [i(G, { modelValue: e2.configure.props.base.titleWidth, "onUpdate:modelValue": V2[4] || (V2[4] = (l3) => e2.configure.props.base.titleWidth = l3), style: { width: "100%" }, min: 0, max: 200, placeholder: "请输入" }, null, 8, ["modelValue"])]), _: 1 }, 512), [[g, e2.configure.props.base.tittleShow]]), r(i(W2, { label: "标题超宽", title: "标题超宽显示", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.titleShowWay, "onUpdate:modelValue": V2[5] || (V2[5] = (l3) => e2.configure.props.base.titleShowWay = l3), class: "ml-4" }, { default: t(() => [i(E, { value: "block" }, { default: t(() => V2[19] || (V2[19] = [c("换行")])), _: 1 }), i(E, { value: "inline" }, { default: t(() => V2[20] || (V2[20] = [c("不换行")])), _: 1 }), i(E, { value: "omit" }, { default: t(() => V2[21] || (V2[21] = [c("省略号")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[g, e2.configure.props.base.tittleShow && e2.configure.props.base.titleWidth > 0]]), i(W2, { label: "输入提示", class: "amb-design-attr-item" }, { default: t(() => [i(x, { modelValue: e2.configure.props.base.placeholder, "onUpdate:modelValue": V2[6] || (V2[6] = (l3) => e2.configure.props.base.placeholder = l3) }, null, 8, ["modelValue"])]), _: 1 }), i(W2, { label: "多选", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.multiple, "onUpdate:modelValue": V2[7] || (V2[7] = (l3) => e2.configure.props.base.multiple = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[22] || (V2[22] = [c("是")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[23] || (V2[23] = [c("否")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), r(i(W2, { label: "多选合并", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.multipleMerge, "onUpdate:modelValue": V2[8] || (V2[8] = (l3) => e2.configure.props.base.multipleMerge = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[24] || (V2[24] = [c("是")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[25] || (V2[25] = [c("否")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[g, e2.configure.props.base.multiple]]), i(W2, { label: "可创建条目", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.allowCreate, "onUpdate:modelValue": V2[9] || (V2[9] = (l3) => e2.configure.props.base.allowCreate = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[26] || (V2[26] = [c("是")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[27] || (V2[27] = [c("否")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), i(W2, { label: "常用选优先", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.frequently, "onUpdate:modelValue": V2[10] || (V2[10] = (l3) => e2.configure.props.base.frequently = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[28] || (V2[28] = [c("是")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[29] || (V2[29] = [c("否")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), r(i(W2, { label: "值为数组", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.arrayValue, "onUpdate:modelValue": V2[11] || (V2[11] = (l3) => e2.configure.props.base.arrayValue = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[30] || (V2[30] = [c("是")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[31] || (V2[31] = [c("否")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[g, e2.configure.props.base.multiple]]), i(W2, { label: "清除按钮", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.clearable, "onUpdate:modelValue": V2[12] || (V2[12] = (l3) => e2.configure.props.base.clearable = l3), class: "ml-4" }, { default: t(() => [i(E, { value: true }, { default: t(() => V2[32] || (V2[32] = [c("显示")])), _: 1 }), i(E, { value: false }, { default: t(() => V2[33] || (V2[33] = [c("隐藏")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), i(W2, { label: "尺寸", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.size, "onUpdate:modelValue": V2[13] || (V2[13] = (l3) => e2.configure.props.base.size = l3), class: "ml-4" }, { default: t(() => [i(E, { value: "large" }, { default: t(() => V2[34] || (V2[34] = [c("大")])), _: 1 }), i(E, { value: "default" }, { default: t(() => V2[35] || (V2[35] = [c("中")])), _: 1 }), i(E, { value: "small" }, { default: t(() => V2[36] || (V2[36] = [c("小")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), i(W2, { label: "状态", class: "amb-design-attr-item" }, { default: t(() => [i(F, { modelValue: e2.configure.props.base.state, "onUpdate:modelValue": V2[14] || (V2[14] = (l3) => e2.configure.props.base.state = l3), class: "ml-4" }, { default: t(() => [i(E, { value: "default" }, { default: t(() => V2[37] || (V2[37] = [c("普通")])), _: 1 }), i(E, { value: "disabled" }, { default: t(() => V2[38] || (V2[38] = [c("禁用")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })])]), _: 1 }), P.value ? s("", true) : (o(), u(v, { key: e2.configure.uuid, configure: e2.configure, remote: true }, null, 8, ["configure"])), (o(), u(y, { key: e2.configure.uuid, configureProps: e2.configure.props }, null, 8, ["configureProps"])), r(i(k, { configure: e2.configure }, null, 8, ["configure"]), [[g, e2.configure.props.base.tittleShow]]), (o(), u(H, { title: "校验", name: "verification", key: e2.configure.uuid, class: "amb-design-attr-group-header" }, { default: t(() => [d("div", S, [i(W2, { class: "amb-design-attr-item", "label-width": "0" }, { default: t(() => [i(I, { modelValue: e2.configure.props.verification.required, "onUpdate:modelValue": V2[15] || (V2[15] = (l3) => e2.configure.props.verification.required = l3), label: "必填" }, null, 8, ["modelValue"])]), _: 1 }), i(W2, { class: "amb-design-attr-item", "label-width": "0" }, { default: t(() => [i(w, { pageDesign: e2.pageDesign, verification: e2.configure.props.verification }, null, 8, ["pageDesign", "verification"])]), _: 1 })])]), _: 1 })), P.value ? s("", true) : (o(), u(_, { key: e2.configure.uuid, size: e2.configure.props.size }, null, 8, ["size"]))]), _: 1 }, 8, ["modelValue"])]), _: 1 });
|
|
30
30
|
};
|
|
31
31
|
} });
|
|
32
32
|
export {
|
|
@@ -2,31 +2,32 @@ import { defineComponent as e, ref as l, watch as a, onUnmounted as t, resolveCo
|
|
|
2
2
|
import { caculateDetailComponentStyle as b, removComponentOptionConfigs as y, caculateComponentProps as h } from "../../../../utils/form-design-util.js";
|
|
3
3
|
import T from "../common/title-suffix-element.vue.js";
|
|
4
4
|
const w = e({ __name: "select-design", props: { pageDesign: {}, configure: {} }, emits: ["handleSelect"], setup(e2, { emit: w2 }) {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
5
|
+
const V = e2;
|
|
6
|
+
V.configure.runtime || (V.configure.runtime = {});
|
|
7
|
+
const k = l(null), S = l({}), x = l(""), C = l({}), _ = l({ value: "" }), j = l({});
|
|
8
8
|
function q() {
|
|
9
|
-
h(
|
|
9
|
+
h(V.configure, _, j), function() {
|
|
10
|
+
var _a;
|
|
10
11
|
let e3 = {};
|
|
11
12
|
const l2 = {};
|
|
12
|
-
|
|
13
|
+
V.configure.props && (e3 = V.configure.props), l2.value = "", e3.base && e3.base.multiple ? (l2.multiple = true, l2.value = []) : (l2.multiple = false, l2.value = ""), e3.base && e3.base.defaultValue && (l2.defaultValue = e3.base.defaultValue), e3.base && e3.base.allowCreate && (l2.filterable = true, l2.allowCreate = true), l2.arrayValue = !!((_a = e3 == null ? void 0 : e3.base) == null ? void 0 : _a.arrayValue);
|
|
13
14
|
const a2 = e3.dataOrigin;
|
|
14
15
|
a2 && ("normal" != a2.filterType && "remote" != a2.filterType || (l2.filterable = true)), Object.assign(_.value, l2), _.value.options || (_.value.options = []), _.value.multiple && e3.base.multipleMerge && setTimeout(() => {
|
|
15
16
|
_.value.collapseTags = true, _.value.collapseTagsTooltip = true;
|
|
16
17
|
}, 10);
|
|
17
|
-
}(),
|
|
18
|
+
}(), V.configure.runtime.props = _.value, V.configure.runtime.titleExceedStyle = j.value;
|
|
18
19
|
}
|
|
19
|
-
return a(
|
|
20
|
-
b(
|
|
20
|
+
return a(V.configure.style, () => {
|
|
21
|
+
b(V.configure, S, x, C), V.configure.runtime.style = S.value, V.configure.runtime.class = x.value, V.configure.runtime.headerStyle = C.value;
|
|
21
22
|
}, { immediate: true }), setTimeout(() => {
|
|
22
23
|
q();
|
|
23
24
|
}, 10), t(() => {
|
|
24
|
-
y(
|
|
25
|
-
}), a(
|
|
25
|
+
y(V.configure);
|
|
26
|
+
}), a(V.configure.props, () => {
|
|
26
27
|
q();
|
|
27
28
|
}), (e3, l2) => {
|
|
28
29
|
const a2 = u("el-option"), t2 = u("el-select"), b2 = u("el-form-item");
|
|
29
|
-
return o(), i(b2, { required: !!_.value.required, class: s([x.value, "remove-formLabel-formContent-blankStyle"]), "label-width": _.value.labelWidth, style: r(
|
|
30
|
+
return o(), i(b2, { required: !!_.value.required, class: s([x.value, "remove-formLabel-formContent-blankStyle"]), "label-width": _.value.labelWidth, style: r(S.value) }, { label: n(() => [_.value.tittleShow ? (o(), p("div", { key: 0, style: r({ ...C.value, ...j.value, "padding-right": "12px" }) }, [_.value.prefixType ? (o(), i(T, { key: 0, configure: e3.configure }, null, 8, ["configure"])) : (o(), p(f, { key: 1 }, [g(d(_.value.title), 1)], 64))], 4)) : m("", true)]), default: n(() => [c(t2, { ref_key: "thisRef", ref: k, disabled: "", size: _.value.size, clearable: _.value.clearable, multiple: _.value.multiple, "collapse-tags": _.value.collapseTags, "collapse-tags-tooltip": _.value.collapseTagsTooltip, filterable: _.value.filterable, "allow-create": _.value.allowCreate, placeholder: _.value.placeholder, modelValue: _.value.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e4) => _.value.value = e4), onClick: l2[1] || (l2[1] = (l3) => e3.$emit("handleSelect")) }, { default: n(() => [(o(true), p(f, null, v(_.value.options, (e4) => (o(), i(a2, { key: e4.value, label: e4.label, value: e4.value }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
30
31
|
};
|
|
31
32
|
} });
|
|
32
33
|
export {
|
|
@@ -44,7 +44,7 @@ const y = { key: 0 }, V = { key: 0 }, h = { key: 0 }, v = { key: 0 }, k = e({ __
|
|
|
44
44
|
return t(), o(J, { modelValue: D.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e4) => D.value = e4), title: "自定义参数", width: "800" }, { default: i(() => [n(I, { data: e3.pageDesign.variables, "row-key": "code", style: { width: "100%", "margin-bottom": "20px" }, size: "small", onRowDblclick: C, border: "", "tree-props": { children: "items" }, "default-expand-all": "" }, { default: i(() => [n(k3, { type: "index", width: "60", label: "序号" }), n(k3, { prop: "name", width: "200", label: "变量名" }, { default: i((e4) => [e4.row.$editing ? (t(), o(_2, { key: 1, style: { width: "120px" }, disabled: e4.row.disabled, modelValue: e4.row.name, "onUpdate:modelValue": (l3) => e4.row.name = l3, placeholder: "" }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])) : (t(), d("span", y, r(e4.row.name), 1))]), _: 1 }), n(k3, { prop: "alias", width: "140", label: "别名" }, { default: i((e4) => [e4.row.$editing ? (t(), o(_2, { key: 1, disabled: e4.row.disabled, modelValue: e4.row.alias, "onUpdate:modelValue": (l3) => e4.row.alias = l3, placeholder: "" }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])) : (t(), d("span", V, r(e4.row.alias), 1))]), _: 1 }), n(k3, { prop: "type", width: "130", label: "类型" }, { default: i((e4) => [e4.row.$editing ? (t(), o(U2, { key: 1, modelValue: e4.row.type, "onUpdate:modelValue": (l3) => e4.row.type = l3, onChange: (l3) => {
|
|
45
45
|
return a2 = l3, e4.$index, o2 = e4.row, void ("array" === a2 ? (o2.items = [], o2.items.push({ level: o2.level + 1, code: b(), name: "items", disabled: true, isArrayElement: true, alias: "", type: "object", defaultValue: "", items: [] })) : o2.items && o2.items.length > 0 && (o2.items = []));
|
|
46
46
|
var a2, o2;
|
|
47
|
-
}, placeholder: "" }, { default: i(() => [(t(), d(u, null, s($, (e5) => n(x2, { key: e5, label: e5, value: e5 }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : (t(), d("span", h, r(e4.row.type), 1))]), _: 1 }), n(k3, { prop: "defaultValue", width: "130", label: "
|
|
47
|
+
}, placeholder: "" }, { default: i(() => [(t(), d(u, null, s($, (e5) => n(x2, { key: e5, label: e5, value: e5 }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : (t(), d("span", h, r(e4.row.type), 1))]), _: 1 }), n(k3, { prop: "defaultValue", width: "130", label: "默认值" }, { default: i((e4) => [e4.row.$editing ? "string" === e4.row.type ? (t(), o(_2, { key: 1, modelValue: e4.row.defaultValue, "onUpdate:modelValue": (l3) => e4.row.defaultValue = l3, placeholder: "" }, null, 8, ["modelValue", "onUpdate:modelValue"])) : "int" === e4.row.type ? (t(), o(A2, { key: 2, modelValue: e4.row.defaultValue, "onUpdate:modelValue": (l3) => e4.row.defaultValue = l3, "controls-position": "right", placeholder: "" }, null, 8, ["modelValue", "onUpdate:modelValue"])) : "number" === e4.row.type ? (t(), o(_2, { key: 3, modelValue: e4.row.defaultValue, "onUpdate:modelValue": (l3) => e4.row.defaultValue = l3, type: "number", placeholder: "" }, null, 8, ["modelValue", "onUpdate:modelValue"])) : p("", true) : (t(), d("span", v, r(e4.row.defaultValue), 1))]), _: 1 }), n(k3, { align: "right", width: 90 }, { header: i(() => [n(R, { class: "box-item", effect: "dark", content: "添加变量", placement: "top" }, { default: i(() => [n(H2, { type: "primary", size: "small", icon: c(f), circle: "", onClick: z }, null, 8, ["icon"])]), _: 1 })]), default: i((e4) => [m("span", null, [n(G, { size: "small", style: { "margin-right": "10px" } }, { dropdown: i(() => [n(F, null, { default: i(() => ["object" === e4.row.type ? (t(), o(B, { key: 0, size: "small", onClick: (l3) => function(e5, l4) {
|
|
48
48
|
l4.items || (l4.items = []);
|
|
49
49
|
const a2 = E();
|
|
50
50
|
a2.level = l4.level + 1, l4.items.push(a2);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./config.vue3.js";
|
|
2
|
-
/* empty css
|
|
2
|
+
/* empty css */
|
|
3
3
|
import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = e(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = e(o, [["__scopeId", "data-v-52b49f1c"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as o, resolveComponent as n, createElementBlock as l, openBlock as a, createElementVNode as i, createVNode as r, createTextVNode as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as o, resolveComponent as n, createElementBlock as l, openBlock as a, createElementVNode as i, createVNode as r, createTextVNode as s, withCtx as u, unref as c, normalizeStyle as f } from "vue";
|
|
2
2
|
import { useLocalStorage as p } from "@vueuse/core";
|
|
3
3
|
import { Search as d, MagicStick as m } from "@element-plus/icons-vue";
|
|
4
4
|
import { EditorView as g, basicSetup as v } from "codemirror";
|
|
@@ -7,8 +7,8 @@ import { EditorState as b } from "@codemirror/state";
|
|
|
7
7
|
import "@codemirror/autocomplete";
|
|
8
8
|
import "@codemirror/language";
|
|
9
9
|
import { openSearchPanel as h } from "@codemirror/search";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import _ from "js-beautify";
|
|
11
|
+
const x = { style: { padding: "8px 16px", margin: "10px 0px", "background-color": "#f4f4f5" }, class: "pppp" }, C = { style: { color: "#909399", "font-size": "14px" } }, $ = { key: 0 }, P = { key: 1 }, U = { class: "editorTool" }, k = e({ __name: "config", props: { eventForm: { type: Object, default: () => ({}) } }, emits: ["fullScreen"], setup(e2, { expose: k2, emit: F }) {
|
|
12
12
|
const S = e2;
|
|
13
13
|
t(false);
|
|
14
14
|
const j = t({ theme: "default", fontSize: 14, searchOpen: false }), z = t(null), V = t(null), E = t(null), D = t({ backgroundColor: "#fff", color: "#333", border: "1px solid #ddd", overflow: "auto" });
|
|
@@ -46,7 +46,7 @@ const _ = { style: { padding: "8px 16px", margin: "10px 0px", "background-color"
|
|
|
46
46
|
}
|
|
47
47
|
function R() {
|
|
48
48
|
if (z.value) {
|
|
49
|
-
const e3 =
|
|
49
|
+
const e3 = _.js(S.eventForm.jsContent, { indent_level: 0, indent_size: 2, space_in_empty_paren: false, max_preserve_newlines: 2, preserve_newlines: true, jslint_happy: false, keep_array_indentation: false, keep_function_indentation: false, space_before_conditional: true, break_chained_methods: false, eval_code: false, unescape_strings: false, wrap_line_length: 0, end_with_newline: false });
|
|
50
50
|
z.value.dispatch({ changes: { from: 0, to: S.eventForm.jsContent.length, insert: e3 } });
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -61,7 +61,7 @@ const _ = { style: { padding: "8px 16px", margin: "10px 0px", "background-color"
|
|
|
61
61
|
e3 && S.eventForm && (e3.jsContent || (e3.jsContent = ""), Object.assign(S.eventForm, e3), (_a = z.value) == null ? void 0 : _a.dispatch({ changes: { from: 0, to: t2.length, insert: S.eventForm.jsContent } }));
|
|
62
62
|
} }), (t2, o2) => {
|
|
63
63
|
const p2 = n("el-input"), g2 = n("el-option"), v2 = n("el-select"), w2 = n("el-tooltip"), y2 = n("el-icon");
|
|
64
|
-
return a(), l("div", { style: { "padding-right": "20px" }, ref_key: "editorContentRef", ref: E }, [i("div",
|
|
64
|
+
return a(), l("div", { style: { "padding-right": "20px" }, ref_key: "editorContentRef", ref: E }, [i("div", x, [i("span", C, [o2[6] || (o2[6] = s(" function ")), "customFunc" === e2.eventForm.name ? (a(), l("span", $, [o2[3] || (o2[3] = s(" ( ")), o2[4] || (o2[4] = i("span", { class: "is_req" }, [i("span", { class: "cell--span required__label" })], -1)), r(p2, { size: "small", modelValue: e2.eventForm.funcParam, "onUpdate:modelValue": o2[0] || (o2[0] = (t3) => e2.eventForm.funcParam = t3), style: { width: "300px" }, title: "方法参数" }, null, 8, ["modelValue"]), o2[5] || (o2[5] = s(" ) "))])) : (a(), l("span", P, " ( params ) ")), o2[7] || (o2[7] = s("{ "))]), i("span", U, [r(w2, { class: "box-item", effect: "dark", content: "切换主题", placement: "top" }, { default: u(() => [r(v2, { class: "editorOption", onChange: B, modelValue: j.value.theme, "onUpdate:modelValue": o2[1] || (o2[1] = (e3) => j.value.theme = e3), placeholder: "", size: "small", style: { width: "120px" } }, { default: u(() => [r(g2, { label: "默认", value: "default" }), r(g2, { label: "VScodeDark", value: "vscodeDark" }), r(g2, { label: "Dracula", value: "dracula" }), r(g2, { label: "GithubLight", value: "githubLight" }), r(g2, { label: "GithubDark", value: "githubDark" }), r(g2, { label: "Eclipse", value: "eclipse" }), r(g2, { label: "XcodeLight", value: "xcodeLight" }), r(g2, { label: "XcodeDark", value: "xcodeDark" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), r(w2, { class: "box-item", effect: "dark", content: "切换字体大小", placement: "top" }, { default: u(() => [r(v2, { class: "editorOption", modelValue: j.value.fontSize, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => j.value.fontSize = e3), placeholder: "", onChange: B, size: "small", style: { width: "80px" } }, { default: u(() => [r(g2, { label: "12", value: 12 }), r(g2, { label: "14", value: 14 }), r(g2, { label: "16", value: 16 }), r(g2, { label: "18", value: 18 }), r(g2, { label: "20", value: 20 }), r(g2, { label: "22", value: 22 }), r(g2, { label: "24", value: 24 }), r(g2, { label: "26", value: 26 }), r(g2, { label: "28", value: 28 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), r(w2, { class: "box-item", effect: "dark", content: "打开搜索", placement: "top" }, { default: u(() => [r(y2, { class: "editorOption", onClick: H }, { default: u(() => [r(c(d))]), _: 1 })]), _: 1 }), r(w2, { class: "box-item", effect: "dark", content: "格式化代码", placement: "top" }, { default: u(() => [r(y2, { class: "editorOption", onClick: R }, { default: u(() => [r(c(m))]), _: 1 })]), _: 1 })]), i("div", { style: f(D.value), id: "cf-codemirror", ref_key: "codemirrorRef", ref: V }, null, 4), o2[8] || (o2[8] = i("span", { style: { color: "gray" } }, " }", -1))], 512);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as a, watch as l, resolveComponent as u, createElementBlock as o, openBlock as s, createElementVNode as i, createVNode as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as a, watch as l, resolveComponent as u, createElementBlock as o, openBlock as s, createElementVNode as i, createVNode as r, withDirectives as c, withCtx as m, vShow as d, unref as v, createTextVNode as f, toDisplayString as p, Fragment as g, renderList as b, createBlock as y } from "vue";
|
|
2
2
|
import { ElMessageBox as x, ElMessage as h } from "element-plus";
|
|
3
|
-
import C from "./config.
|
|
3
|
+
import C from "./config.vue2.js";
|
|
4
4
|
import { standardButtonOperations as E } from "../../../utils/assemblys-config.js";
|
|
5
|
-
import { findDesignItemByUuid as
|
|
5
|
+
import { findDesignItemByUuid as _, getUuidv4 as S, deepCopy as V } from "../../../utils/common-util.js";
|
|
6
6
|
import { usePageContextStore as k } from "../../../../../stores/page-store.js";
|
|
7
7
|
import { undoRedo as U } from "../../../../../stores/event-undo-redo-store.js";
|
|
8
8
|
import F from "../../../utils/eventBus.js";
|
|
9
9
|
const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style: { "user-select": "none" } }, j = { class: "amb-design-tool-item" }, N = { style: { "margin-left": "0px", display: "inline-block", width: "39px" } }, w = { class: "amb-design-tool-item", style: { "padding-right": "10px" } }, T = { class: "codemirror", style: { "margin-left": "20px", "margin-top": "-10px" } }, B = e({ __name: "page-event-content", props: { eventForm: {}, configure: {}, customEvent: {}, handleType: {} }, emits: ["changeSelectEvent", "addEvent", "changeSelectStandardEvent"], setup(e2, { expose: B2, emit: J }) {
|
|
10
|
-
const A = e2, L = U(), O = k(),
|
|
11
|
-
let
|
|
12
|
-
const
|
|
10
|
+
const A = e2, L = U(), O = k(), P = t(null), Z = t();
|
|
11
|
+
let I = t();
|
|
12
|
+
const q = E;
|
|
13
13
|
let R = A.customEvent;
|
|
14
|
-
const
|
|
15
|
-
function
|
|
14
|
+
const H = t({ jsContent: "" }), D = t({ jsContent: "" }), G = t(0), K = t(-1), M = t();
|
|
15
|
+
function Q() {
|
|
16
16
|
let e3 = false;
|
|
17
17
|
D.value && D.value.standardValues && D.value.standardValues.includes("true") && (e3 = true), D.value && (D.value.isStandard = e3);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const e3 =
|
|
19
|
+
function W() {
|
|
20
|
+
const e3 = H.value ? JSON.stringify(H.value) : null, t2 = D.value ? JSON.stringify(D.value) : null;
|
|
21
21
|
e3 && e3 !== t2 ? x.confirm("当前方法有修改,是否需要暂存?", "确认", { confirmButtonText: "确定", cancelButtonText: "忽略", type: "warning" }).then(() => {
|
|
22
|
-
false !==
|
|
22
|
+
false !== ee() && X();
|
|
23
23
|
}).catch((e4) => {
|
|
24
|
-
|
|
25
|
-
}) :
|
|
24
|
+
X();
|
|
25
|
+
}) : X();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function X() {
|
|
28
28
|
const e3 = { name: "customFunc", isStandard: false, jsContent: "" };
|
|
29
|
-
e3.uuid =
|
|
29
|
+
e3.uuid = S(), Y(e3);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
e3 = e3 || {},
|
|
31
|
+
function Y(e3) {
|
|
32
|
+
e3 = e3 || {}, H.value = e3, D.value = V(e3), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), L.clearSnapshot(), L.addSnapshot(D), G.value = 1, K.value = 0;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ee() {
|
|
35
35
|
if (!D.value) return x.confirm("编辑对象不存在,不需要保存!", "提示", { confirmButtonText: "确定", showCancelButton: false, type: "error" }), false;
|
|
36
36
|
const e3 = O.pageContext;
|
|
37
37
|
if (!e3) return x.confirm("页面设计对象不存在,不可保存!", "提示", { confirmButtonText: "确定", showCancelButton: false, type: "error" }), false;
|
|
@@ -39,7 +39,7 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
39
39
|
const e4 = D.value;
|
|
40
40
|
if (!e4.isStandard && !e4.jsContent) return h({ message: "方法内容不能为空!", type: "error" }), false;
|
|
41
41
|
if ("customFunc" == e4.name) {
|
|
42
|
-
e4.eventName && (e4.eventName = e4.eventName.trim());
|
|
42
|
+
if (e4.eventName && (e4.eventName = e4.eventName.trim()), !e4.funcParam) return h({ message: "自定义方法参数名不能为空!", type: "error" }), false;
|
|
43
43
|
const t3 = e4.eventName;
|
|
44
44
|
if (!t3) return h({ message: "方法名不能为空!", type: "error" }), false;
|
|
45
45
|
if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t3)) return h({ message: "方法名只能以字母、下划线或$开头,只能包含数字、字母或$!", type: "error" }), false;
|
|
@@ -72,26 +72,26 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
72
72
|
}
|
|
73
73
|
if (a2) {
|
|
74
74
|
if (Object.assign(a2, n2), e3.customEvents[l2] = a2, "customFunc" !== a2.name && a2.componentUuid) {
|
|
75
|
-
const t3 =
|
|
75
|
+
const t3 = _(e3, a2.componentUuid);
|
|
76
76
|
if (t3 && t3.events) {
|
|
77
77
|
const e4 = t3.events.findIndex((e5) => e5.name == a2.name && e5.componentUuid == a2.componentUuid);
|
|
78
78
|
e4 > -1 && (t3.events[e4] = a2);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
} else Object.assign(
|
|
82
|
-
|
|
81
|
+
} else Object.assign(H.value, n2), e3.customEvents.push(H.value);
|
|
82
|
+
H.value = n2, D.value = V(n2), h({ message: "暂存成功!", type: "success" });
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function te() {
|
|
85
85
|
x.confirm("确定要清除吗?", "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(() => {
|
|
86
86
|
!function() {
|
|
87
|
-
D.value &&
|
|
88
|
-
|
|
87
|
+
D.value && ne(D.value);
|
|
88
|
+
X();
|
|
89
89
|
}();
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function ne(e3) {
|
|
93
93
|
const t2 = e3, n2 = O.pageContext;
|
|
94
|
-
if (e3.isStandard)
|
|
94
|
+
if (e3.isStandard) ae(e3), le(t2, e3);
|
|
95
95
|
else if (n2 && n2.customEvents) for (let e4 = 0; e4 < n2.customEvents.length; e4++) {
|
|
96
96
|
let a2 = n2.customEvents[e4];
|
|
97
97
|
if ("customFunc" == t2.name) {
|
|
@@ -100,61 +100,61 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
} else if (a2.name == t2.name && t2.componentUuid == a2.componentUuid) {
|
|
103
|
-
|
|
103
|
+
ae(a2), n2.customEvents.splice(e4, 1), le(t2, a2);
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ae(e3) {
|
|
109
109
|
e3.eventName = null, e3.isStandard = false, e3.jsContent = "", e3.remark = "", e3.standardValues = [];
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const n2 = O.pageContext, a2 =
|
|
111
|
+
function le(e3, t2) {
|
|
112
|
+
const n2 = O.pageContext, a2 = _(n2, e3.componentUuid);
|
|
113
113
|
if (a2 && a2.events) {
|
|
114
114
|
const n3 = a2.events.findIndex((t3) => t3.name == e3.name && t3.componentUuid == e3.componentUuid);
|
|
115
115
|
n3 > -1 && (a2.events[n3] = t2);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
n(() => {
|
|
119
|
-
|
|
120
|
-
if (
|
|
119
|
+
Z.value = window.innerHeight, I.value = { overflow: "auto", height: Z.value + "px" }, F.$on("clearEvent", (e3) => {
|
|
120
|
+
if (ne(e3), D.value) {
|
|
121
121
|
const t2 = D.value;
|
|
122
|
-
"customFunc" == e3.name ? e3.uuid == t2.uuid &&
|
|
122
|
+
"customFunc" == e3.name ? e3.uuid == t2.uuid && X() : e3.componentUuid == t2.componentUuid && e3.name == t2.name && X();
|
|
123
123
|
}
|
|
124
124
|
}), F.$on("editEvent", (e3) => {
|
|
125
125
|
let t2 = false;
|
|
126
126
|
if (D.value && ("customFunc" == e3.name ? D.value.uuid == e3.uuid && (t2 = true) : D.value.componentUuid == e3.componentUuid && e3.name == D.value.name && (t2 = true)), t2) return;
|
|
127
127
|
null == e3.jsContent && (e3.jsContent = ""), null == e3.isStandard && (e3.isStandard = false, e3.standardValues = []), e3.isStandard && !e3.standardValues && (e3.standardValues = ["true"]);
|
|
128
|
-
const n2 =
|
|
128
|
+
const n2 = H.value ? JSON.stringify(H.value) : null, a2 = D.value ? JSON.stringify(D.value) : null;
|
|
129
129
|
n2 && n2 !== a2 ? x.confirm("当前方法有修改,是否需要暂存?", "确认", { confirmButtonText: "确定", cancelButtonText: "忽略", type: "warning" }).then(() => {
|
|
130
|
-
false !==
|
|
130
|
+
false !== ee() && Y(e3);
|
|
131
131
|
}).catch((t3) => {
|
|
132
|
-
|
|
133
|
-
}) :
|
|
132
|
+
Y(e3);
|
|
133
|
+
}) : Y(e3);
|
|
134
134
|
});
|
|
135
135
|
}), a(() => {
|
|
136
136
|
F.$off("clearEvent"), F.$off("editEvent");
|
|
137
|
-
}),
|
|
138
|
-
let
|
|
139
|
-
function
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
}), X();
|
|
138
|
+
let ue = false;
|
|
139
|
+
function oe() {
|
|
140
|
+
ue = true, L.undo(D), G.value = L.getTotalLen(), K.value = L.getCurrentIndex(), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), setTimeout(() => {
|
|
141
|
+
ue = false;
|
|
142
142
|
}, 100);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
function se() {
|
|
145
|
+
ue = true, L.record(D), G.value = L.getTotalLen(), K.value = L.getCurrentIndex(), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), setTimeout(() => {
|
|
146
|
+
ue = false;
|
|
147
147
|
}, 100);
|
|
148
148
|
}
|
|
149
149
|
return l(() => D, (e3) => {
|
|
150
|
-
|
|
150
|
+
ue || L.addSnapshot(D, function() {
|
|
151
151
|
G.value = L.getTotalLen(), K.value = L.getCurrentIndex();
|
|
152
152
|
});
|
|
153
153
|
}, { deep: true }), B2({ resize: function() {
|
|
154
|
-
|
|
154
|
+
P.value && P.value.resize && P.value.resize();
|
|
155
155
|
} }), (e3, t2) => {
|
|
156
|
-
const n2 = u("Plus"), a2 = u("el-icon"), l2 = u("el-divider"), x2 = u("Check"), h2 = u("View"), E2 = u("el-text"),
|
|
157
|
-
return s(), o("div", z, [i("div", $, [i("div", j, [i("label", { class: "amb-page-type", onClick:
|
|
156
|
+
const n2 = u("Plus"), a2 = u("el-icon"), l2 = u("el-divider"), x2 = u("Check"), h2 = u("View"), E2 = u("el-text"), _2 = u("el-input"), S2 = u("el-form-item"), V2 = u("el-checkbox"), k2 = u("el-checkbox-group"), U2 = u("el-option"), F2 = u("el-option-group"), B3 = u("el-select"), J2 = u("el-col"), A2 = u("el-row"), L2 = u("el-form");
|
|
157
|
+
return s(), o("div", z, [i("div", $, [i("div", j, [i("label", { class: "amb-page-type", onClick: W }, [r(a2, { size: 18 }, { default: m(() => [r(n2)]), _: 1 }), t2[5] || (t2[5] = i("label", null, "添加自定义方法", -1))]), r(l2, { direction: "vertical" }), c(i("label", N, null, 512), [[d, K.value < 1]]), c(i("label", { class: "amb-page-type", style: { "margin-left": "0px" }, onClick: oe }, t2[6] || (t2[6] = [i("span", { class: "iconfont icon-chexiaozuo", style: { "font-size": "20px" }, title: "撤销" }, null, -1)]), 512), [[d, K.value > 0]]), c(i("label", { class: "amb-page-type", onClick: se }, t2[7] || (t2[7] = [i("span", { class: "iconfont icon-chexiaoyou", style: { "font-size": "20px" }, title: "恢复" }, null, -1)]), 512), [[d, K.value > -1 && K.value + 1 < G.value]])]), c(i("div", w, [i("label", { class: "amb-page-type", onClick: t2[0] || (t2[0] = (e4) => ee()) }, [r(a2, { size: 18 }, { default: m(() => [r(x2)]), _: 1 }), t2[8] || (t2[8] = i("label", null, "确定", -1))]), r(l2, { direction: "vertical" }), i("label", { class: "amb-page-type", style: { "margin-left": "0px" }, onClick: te }, [r(a2, { size: 18 }, { default: m(() => [r(h2)]), _: 1 }), t2[9] || (t2[9] = i("label", null, "清除", -1))])], 512), [[d, D.value.name]])]), r(L2, { class: "amb-design-board", style: { "padding-top": "10px" }, ref_key: "formRef", ref: M, size: "small", model: v(R), "inline-message": "", "label-width": "80px" }, { default: m(() => [r(A2, null, { default: m(() => [r(S2, { label: "名称", style: { "min-width": "280px" }, required: "customFunc" == D.value.name }, { default: m(() => [c(r(E2, { type: "primary" }, { default: m(() => [f(p(D.value.title ? D.value.title + (D.value.componentLabel ? "(" + D.value.componentLabel + ")" : "") : D.value.componentLabel) + "." + p(D.value.name), 1)]), _: 1 }, 512), [[d, D.value.name && "customFunc" != D.value.name]]), c(r(_2, { modelValue: D.value.eventName, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => D.value.eventName = e4), title: "自定义方法名" }, null, 8, ["modelValue"]), [[d, "customFunc" == D.value.name]])]), _: 1 }, 8, ["required"]), c(r(k2, { modelValue: D.value.standardValues, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => D.value.standardValues = e4), onChange: Q }, { default: m(() => [r(V2, { value: "true", label: "标准功能" })]), _: 1 }, 8, ["modelValue"]), [[d, "customFunc" != D.value.name]]), c(r(B3, { disabled: !D.value.isStandard, modelValue: D.value.eventName, "onUpdate:modelValue": t2[3] || (t2[3] = (e4) => D.value.eventName = e4), placeholder: "请选择", filterable: "", style: { width: "240px", "margin-left": "10px" } }, { default: m(() => [(s(true), o(g, null, b(v(q), (e4) => (s(), y(F2, { key: e4.label, label: e4.label }, { default: m(() => [(s(true), o(g, null, b(e4.options, (e5) => (s(), y(U2, { key: e5.value, label: e5.label, value: e5.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["label"]))), 128))]), _: 1 }, 8, ["disabled", "modelValue"]), [[d, "customFunc" != D.value.name]]), r(J2, { span: 10 }, { default: m(() => [r(S2, { label: "描述" }, { default: m(() => [r(_2, { modelValue: D.value.remark, "onUpdate:modelValue": t2[4] || (t2[4] = (e4) => D.value.remark = e4) }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 })]), _: 1 }), c(i("div", T, [r(C, { eventForm: D.value, ref_key: "editorRef", ref: P }, null, 8, ["eventForm"])], 512), [[d, "customFunc" == D.value.name || "customFunc" != D.value.name && !D.value.isStandard]])]), _: 1 }, 8, ["model"])]);
|
|
158
158
|
};
|
|
159
159
|
} });
|
|
160
160
|
export {
|