super-page-designer 2.2.96 → 2.2.97
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/views/assemblys/common/common-icon-bind.vue.js +3 -3
- package/dist/es/components/design/views/assemblys/common/common-icon-bind.vue2.js +49 -47
- package/dist/es/components/design/views/design/page-event/{config.vue2.js → config.vue.js} +1 -1
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +1 -1
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
- package/dist/es/style.css +6 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./common-icon-bind.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import c from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = c(o, [["__scopeId", "data-v-608ccc5b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -4,89 +4,91 @@ import * as V from "@element-plus/icons";
|
|
|
4
4
|
import O from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
const U = { key: 0 }, j = { class: "amb-component-popover-left-menu-main" }, z = ["onClick"], P = { key: 1, style: { display: "flex", gap: "10px", "align-items": "center" } }, E = { key: 2 }, L = { key: 3, class: "amb-component-popover-icon-list-scroll", style: { overflow: "auto" } }, S = { class: "amb-component-popover-icon-grid" }, T = ["onClick"], N = { key: 4, style: { "text-align": "right" } }, q = e({ __name: "common-icon-bind", props: { iconType: String, iconValue: String, size: { type: String, default: "small" }, showLabel: { type: Boolean, default: false } }, emits: ["update:modelValue"], setup(e2, { emit: q2 }) {
|
|
6
6
|
var _a, _b;
|
|
7
|
-
const M = q2, B = e2, R = l([]), D = l([]), F = l([]), G = l([{ value: "ElementUI", label: "ElementUI" }, { value: "ambIcon", label: "Amb图标库" }, { value: "ambColorIcon", label: "Amb彩色图标库", dataList: [] }, { value: "custom", label: "自定义" }]);
|
|
7
|
+
const M = q2, B = e2, R = l([]), D = l([]), F = l([]), G = l([]), H = l([{ value: "ElementUI", label: "ElementUI" }, { value: "ambIcon", label: "Amb图标库" }, { value: "ambColorIcon", label: "Amb彩色图标库", dataList: [] }, { value: "custom", label: "自定义" }]);
|
|
8
8
|
l(false);
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
let e3 =
|
|
13
|
-
return
|
|
9
|
+
const J = l(1), K = l(B.iconType ?? ((_b = (_a = H.value) == null ? void 0 : _a[0]) == null ? void 0 : _b.value)), Q = l("");
|
|
10
|
+
Q.value = B.iconValue;
|
|
11
|
+
const W = l({}), X = l(""), Y = l(), Z = l(false), ee = o(() => ["ElementUI"].includes(K.value) ? R.value : ["ambIcon"].includes(K.value) ? D.value : ["ambColorIcon"].includes(K.value) ? F.value : G.value), le = o(() => {
|
|
12
|
+
let e3 = ee.value ?? [];
|
|
13
|
+
return X.value && (e3 = e3.filter((e4) => [e4.label ?? "", e4.value ?? ""].some((e5) => {
|
|
14
14
|
var _a2;
|
|
15
|
-
return (_a2 = e5.toLowerCase()) == null ? void 0 : _a2.includes(
|
|
16
|
-
}))), e3.slice(0, 50 *
|
|
17
|
-
}),
|
|
18
|
-
|
|
15
|
+
return (_a2 = e5.toLowerCase()) == null ? void 0 : _a2.includes(X.value.toLowerCase());
|
|
16
|
+
}))), e3.slice(0, 50 * J.value);
|
|
17
|
+
}), oe = () => {
|
|
18
|
+
le.value.length > 0 && !Z.value && ee.value.length > le.value.length && !X.value && J.value++;
|
|
19
19
|
};
|
|
20
|
-
const
|
|
21
|
-
if (!(
|
|
20
|
+
const ae = async () => {
|
|
21
|
+
if (!(G.value.length > 0)) {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
Z.value = true;
|
|
24
24
|
const e3 = await O.post(window.$vueApp.config.globalProperties.baseAPI + "/component/general-icon/query", { pageSize: 200, pageNo: 1 }), l2 = (e3 == null ? void 0 : e3.data) ?? [], o2 = [];
|
|
25
25
|
for (let e4 of l2) o2.push({ value: e4.iconName, label: e4.iconName });
|
|
26
|
-
|
|
26
|
+
W.value.customOptions = o2, G.value = o2;
|
|
27
27
|
} catch (e3) {
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
Z.value = false;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
function
|
|
32
|
+
function ne(e3) {
|
|
33
33
|
var l2;
|
|
34
|
-
|
|
34
|
+
J.value = 1, K.value = e3, "ElementUI" === (l2 = K.value) ? R.value = W.value.elementUIOptions : "custom" === l2 ? ae() : ["ambIcon"].includes(l2) ? (async () => {
|
|
35
35
|
var _a2, _b2, _c;
|
|
36
36
|
if (!(D.value.length > 0)) {
|
|
37
37
|
try {
|
|
38
|
-
|
|
38
|
+
Z.value = true;
|
|
39
39
|
let e4 = `${window.location.origin}${window.location.pathname}font-icon/iconfont.json`;
|
|
40
40
|
((_c = (_b2 = (_a2 = window.$vueApp) == null ? void 0 : _a2.config) == null ? void 0 : _b2.globalProperties) == null ? void 0 : _c.fontIconAddress) && (e4 = `${window.$vueApp.config.globalProperties.fontIconAddress}/iconfont.json`);
|
|
41
41
|
const l3 = await fetch(e4, { mode: "cors" }).then((e5) => e5.json()), { css_prefix_text: o2, glyphs: a2 = [] } = l3 ?? {};
|
|
42
42
|
D.value = a2.map((e5) => ({ label: e5.name, value: `${o2}${e5.font_class}` }));
|
|
43
43
|
} catch (e4) {
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
Z.value = false;
|
|
46
46
|
}
|
|
47
47
|
})() : ["ambColorIcon"].includes(l2) && async function() {
|
|
48
48
|
var _a2, _b2, _c;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
if (!(F.value.length > 0)) {
|
|
50
|
+
try {
|
|
51
|
+
Z.value = true;
|
|
52
|
+
let e4 = `${window.location.origin}${window.location.pathname}font-icon/iconfont.json`;
|
|
53
|
+
((_c = (_b2 = (_a2 = window.$vueApp) == null ? void 0 : _a2.config) == null ? void 0 : _b2.globalProperties) == null ? void 0 : _c.fontIconAddress) && (e4 = `${window.$vueApp.config.globalProperties.fontIconAddress}-color/iconfont.json`);
|
|
54
|
+
const l3 = await fetch(e4, { mode: "cors", headers: { "Content-Type": "application/json" } }).then((e5) => e5.json()), { css_prefix_text: o2, glyphs: a2 = [] } = l3 ?? {};
|
|
55
|
+
F.value = a2.map((e5) => ({ label: e5.name, value: `${o2}${e5.font_class}` }));
|
|
56
|
+
} catch (e4) {
|
|
57
|
+
}
|
|
58
|
+
Z.value = false;
|
|
56
59
|
}
|
|
57
|
-
Y.value = false;
|
|
58
60
|
}();
|
|
59
61
|
}
|
|
60
|
-
function ne() {
|
|
61
|
-
var _a2, _b2;
|
|
62
|
-
(_b2 = (_a2 = X.value) == null ? void 0 : _a2.hide) == null ? void 0 : _b2.call(_a2);
|
|
63
|
-
}
|
|
64
62
|
function te() {
|
|
65
|
-
|
|
63
|
+
var _a2, _b2;
|
|
64
|
+
(_b2 = (_a2 = Y.value) == null ? void 0 : _a2.hide) == null ? void 0 : _b2.call(_a2);
|
|
66
65
|
}
|
|
67
66
|
function ue() {
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
Q.value = "", M("update:modelValue", "", ""), Y.value.hide();
|
|
68
|
+
}
|
|
69
|
+
function ie() {
|
|
70
|
+
if (X.value = X.value.trim(), !X.value) return void ElMessage.warning("请输入图标名!");
|
|
71
|
+
const e3 = W.value.customOptions || [];
|
|
70
72
|
let l2 = false;
|
|
71
|
-
for (let o3 of e3) if (o3.value ===
|
|
73
|
+
for (let o3 of e3) if (o3.value === X.value) {
|
|
72
74
|
l2 = true;
|
|
73
75
|
break;
|
|
74
76
|
}
|
|
75
|
-
|
|
76
|
-
const o2 =
|
|
77
|
-
if (
|
|
77
|
+
K.value = "custom", Q.value = X.value;
|
|
78
|
+
const o2 = X.value;
|
|
79
|
+
if (X.value = "", M("update:modelValue", K.value, Q.value), Y.value.hide(), !l2) {
|
|
78
80
|
const e4 = { iconName: o2 };
|
|
79
81
|
O.post(window.$vueApp.config.globalProperties.baseAPI + "/bs/general-icon/get-or-create", e4).then((e5) => {
|
|
80
|
-
"custom" ==
|
|
82
|
+
"custom" == K.value && ae();
|
|
81
83
|
}).catch((e5) => {
|
|
82
84
|
ElMessage.warning("保存图标失败!");
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
|
-
function
|
|
88
|
+
function ce() {
|
|
87
89
|
_(() => {
|
|
88
90
|
!function() {
|
|
89
|
-
if (!
|
|
91
|
+
if (!W.value.elementUIOptions) {
|
|
90
92
|
if (!window.temp_Icon_Options) {
|
|
91
93
|
const e3 = [];
|
|
92
94
|
for (const [l2, o2] of Object.entries(V)) e3.push({ value: l2, label: l2, component: o2 });
|
|
@@ -95,17 +97,17 @@ const U = { key: 0 }, j = { class: "amb-component-popover-left-menu-main" }, z =
|
|
|
95
97
|
return o2.localeCompare(a2);
|
|
96
98
|
}), window.temp_Icon_Options = e3;
|
|
97
99
|
}
|
|
98
|
-
|
|
100
|
+
W.value.elementUIOptions = window.temp_Icon_Options;
|
|
99
101
|
}
|
|
100
|
-
}(),
|
|
102
|
+
}(), ne(K.value);
|
|
101
103
|
});
|
|
102
104
|
}
|
|
103
105
|
return l(), (l2, o2) => {
|
|
104
|
-
const _2 = a("el-icon"), V2 = a("el-input"), O2 = a("el-button"), q3 = a("el-tooltip"), B2 = a("el-scrollbar"), R2 = a("el-col"), D2 = a("el-empty"), F2 = a("el-tag"),
|
|
105
|
-
return e2.showLabel ? (i(), t("span", U, c(
|
|
106
|
-
return o3 = e3,
|
|
106
|
+
const _2 = a("el-icon"), V2 = a("el-input"), O2 = a("el-button"), q3 = a("el-tooltip"), B2 = a("el-scrollbar"), R2 = a("el-col"), D2 = a("el-empty"), F2 = a("el-tag"), G2 = a("SuperIcon"), J2 = a("el-row"), W2 = a("el-popover"), ae2 = n("infinite-scroll"), se = n("loading");
|
|
107
|
+
return e2.showLabel ? (i(), t("span", U, c(Q.value), 1)) : (i(), u(W2, { key: 1, ref_key: "popoverRef", ref: Y, "popper-class": "amb-component-popover-main", trigger: "click", width: 540 }, { reference: s(() => [v(V2, { readonly: "", size: e2.size, onClick: ce, modelValue: Q.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => Q.value = e3), placeholder: "请选择" }, { suffix: s(() => [p(v(_2, { style: { cursor: "pointer" }, onClick: h(ue, ["stop"]) }, { default: s(() => [v(r(A))]), _: 1 }, 512), [[b, Q.value]])]), _: 1 }, 8, ["size", "modelValue"])]), default: s(() => [v(J2, null, { default: s(() => [v(q3, { effect: "dark", content: "关闭", placement: "top-end" }, { default: s(() => [v(O2, { type: "text", class: "amb-component-popover-close-btn", icon: r(k), onClick: te }, null, 8, ["icon"])]), _: 1 }), v(R2, { span: 8 }, { default: s(() => [m("div", j, [v(B2, { "max-height": "100%" }, { default: s(() => [(i(true), t(d, null, f(H.value, (e3) => (i(), t("div", { class: g(["amb-popover-menu-item", e3.value == K.value ? "is-active" : ""]), onClick: (l3) => ne(e3.value) }, [v(_2, null, { default: s(() => [p(v(r(I), null, null, 512), [[b, e3.value == K.value]])]), _: 2 }, 1024), m("span", null, c(e3.label), 1)], 10, z))), 256))]), _: 1 })])]), _: 1 }), p((i(), u(R2, { span: 16, style: { "padding-left": "10px" }, class: "amb-component-popover-icon-list-view" }, { default: s(() => [K.value ? y("", true) : (i(), u(D2, { key: 0, description: "请选择类型", "image-size": 80 })), K.value ? (i(), t("div", P, [v(V2, { modelValue: X.value, "onUpdate:modelValue": o2[1] || (o2[1] = (e3) => X.value = e3), placeholder: "搜索", size: "default", "prefix-icon": r(x), clearable: "", style: { flex: "1 1 auto" } }, null, 8, ["modelValue", "prefix-icon"]), ["custom"].includes(K.value) && X.value && !le.value.length ? (i(), u(q3, { key: 0, effect: "dark", content: "创建该图标", placement: "top-end" }, { default: s(() => [v(O2, { type: "primary", circle: "", icon: r($), onClick: ie }, null, 8, ["icon"])]), _: 1 })) : y("", true)])) : y("", true), ["custom"].includes(K.value) ? (i(), t("div", E, [v(_2, null, { default: s(() => [v(r(C))]), _: 1 }), o2[4] || (o2[4] = m("span", { style: { "margin-left": "5px" } }, "输入图标名后点击加号按钮添加", -1)), o2[5] || (o2[5] = w(" ")), v(q3, null, { content: s(() => o2[2] || (o2[2] = [w(" 1.支持fa图标,图标名称详见官网:https://fontawesome.com.cn/v4/icons-ui/; "), m("br", null, null, -1), w(" 2.支持svg图标,需以svg-img-开头,接svg内容,如:svg-img-xxxxxx. ")])), default: s(() => [v(F2, { type: "primary" }, { default: s(() => o2[3] || (o2[3] = [w("更多")])), _: 1 })]), _: 1 })])) : y("", true), K.value ? p((i(), t("div", L, [le.value.length || Z.value ? y("", true) : (i(), u(D2, { key: 0, description: "没有相关图标", "image-size": 80 })), m("div", S, [(i(true), t(d, null, f(le.value, (e3) => (i(), u(q3, { key: e3.value, effect: "dark", content: e3.label, placement: "top" }, { default: s(() => [m("div", { class: "amb-component-popover-icon-grid-item", onClick: (l3) => {
|
|
108
|
+
return o3 = e3, Q.value = o3.value, M("update:modelValue", K.value, Q.value), void Y.value.hide();
|
|
107
109
|
var o3;
|
|
108
|
-
} }, [v(
|
|
110
|
+
} }, [v(G2, { iconType: K.value, iconValue: e3.value }, null, 8, ["iconType", "iconValue"])], 8, T)]), _: 2 }, 1032, ["content"]))), 128))])])), [[ae2, oe]]) : y("", true), K.value ? (i(), t("div", N, c(le.value.length) + " / " + c(ee.value.length), 1)) : y("", true)]), _: 1 })), [[se, Z.value]])]), _: 1 })]), _: 1 }, 512));
|
|
109
111
|
};
|
|
110
112
|
} });
|
|
111
113
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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 m, withCtx as c, vShow as d, unref as v, createTextVNode as p, toDisplayString as f, 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.vue.js";
|
|
4
4
|
import { standardButtonOperations as E } from "../../../utils/assemblys-config.js";
|
|
5
5
|
import { findDesignItemByUuid as S, getUuidv4 as V, deepCopy as k } from "../../../utils/common-util.js";
|
|
6
6
|
import { usePageContextStore as _ } from "../../../../../stores/page-store.js";
|
|
@@ -16,7 +16,7 @@ import "@codemirror/autocomplete";
|
|
|
16
16
|
import "@codemirror/language";
|
|
17
17
|
import "@codemirror/search";
|
|
18
18
|
import "js-beautify";
|
|
19
|
-
/* empty css
|
|
19
|
+
/* empty css */
|
|
20
20
|
import "../../../utils/assemblys-config.js";
|
|
21
21
|
import "../../../../../stores/page-store.js";
|
|
22
22
|
import "../../../../../stores/event-undo-redo-store.js";
|
package/dist/es/style.css
CHANGED
|
@@ -930,25 +930,25 @@ fieldset.amb-design-item-selected {
|
|
|
930
930
|
}
|
|
931
931
|
._amb-page-container_1k9lg_1 ._amb-page-container-header_1k9lg_6 ~ ._amb-page-container-main_1k9lg_9 {
|
|
932
932
|
height: calc(100vh - 60px);
|
|
933
|
-
}.amb-component-popover-icon-list-view[data-v-
|
|
933
|
+
}.amb-component-popover-icon-list-view[data-v-608ccc5b] {
|
|
934
934
|
display: flex;
|
|
935
935
|
flex-direction: column;
|
|
936
936
|
gap: 10px;
|
|
937
937
|
overflow: hidden;
|
|
938
938
|
height: 300px;
|
|
939
939
|
}
|
|
940
|
-
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll[data-v-
|
|
940
|
+
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll[data-v-608ccc5b] {
|
|
941
941
|
flex: 1 1 auto;
|
|
942
942
|
overflow: auto;
|
|
943
943
|
}
|
|
944
|
-
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid[data-v-
|
|
944
|
+
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid[data-v-608ccc5b] {
|
|
945
945
|
display: grid;
|
|
946
946
|
grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
|
|
947
947
|
grid-gap: 15px;
|
|
948
948
|
padding: 0;
|
|
949
949
|
list-style: none;
|
|
950
950
|
}
|
|
951
|
-
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid .amb-component-popover-icon-grid-item[data-v-
|
|
951
|
+
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid .amb-component-popover-icon-grid-item[data-v-608ccc5b] {
|
|
952
952
|
position: relative;
|
|
953
953
|
width: 40px;
|
|
954
954
|
height: 40px;
|
|
@@ -960,11 +960,11 @@ fieldset.amb-design-item-selected {
|
|
|
960
960
|
border-radius: 5px;
|
|
961
961
|
line-height: 1;
|
|
962
962
|
}
|
|
963
|
-
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid .amb-component-popover-icon-grid-item svg[data-v-
|
|
963
|
+
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid .amb-component-popover-icon-grid-item svg[data-v-608ccc5b] {
|
|
964
964
|
width: 24px;
|
|
965
965
|
height: 24px;
|
|
966
966
|
}
|
|
967
|
-
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid .amb-component-popover-icon-grid-item[data-v-
|
|
967
|
+
.amb-component-popover-icon-list-view .amb-component-popover-icon-list-scroll .amb-component-popover-icon-grid .amb-component-popover-icon-grid-item[data-v-608ccc5b]:hover {
|
|
968
968
|
background-color: var(--el-menu-active-color);
|
|
969
969
|
color: var(--el-color-white);
|
|
970
970
|
}.runtime-page-container-tabs-view[data-v-f64cf23d] > .el-tabs__content > .el-tab-pane {
|