super-page-runtime 2.3.0-tmp2 → 2.3.2-sit1
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/runtime/utils/api/page-expose-util.js +25 -25
- package/dist/es/components/runtime/utils/events/validator-util.js +94 -87
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +4 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +152 -152
- package/dist/es/components/runtime/utils/page-init-util.js +5 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +81 -29
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +185 -158
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +130 -114
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +31 -10
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +41 -25
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +38 -38
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +21 -21
- package/dist/es/style.css +17 -8
- package/package.json +2 -2
|
@@ -1,44 +1,96 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t,
|
|
2
|
-
import { ElTabs as
|
|
3
|
-
import
|
|
4
|
-
import { SuperIcon as
|
|
5
|
-
import { handleAfterInitEvent as
|
|
6
|
-
import { $t as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { defineComponent as e, ref as t, watch as n, onMounted as o, nextTick as a, resolveComponent as i, createBlock as c, openBlock as l, unref as u, normalizeClass as r, normalizeStyle as s, withCtx as p, createElementBlock as f, createCommentVNode as d, Fragment as g, renderList as m, createElementVNode as b, toDisplayString as y, withModifiers as v, createTextVNode as h } from "vue";
|
|
2
|
+
import { ElTabs as x, ElTabPane as C } from "element-plus";
|
|
3
|
+
import T from "../../object-render.vue.js";
|
|
4
|
+
import { SuperIcon as E } from "agilebuilder-ui";
|
|
5
|
+
import { handleAfterInitEvent as k, handleEvent as N } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { $t as V } from "../../../../utils/i18n-util.js";
|
|
7
|
+
import { isPromise as _ } from "../../../../utils/page-helper-util.js";
|
|
8
|
+
const w = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: w2 }) {
|
|
9
|
+
const A = e2, P = t(""), j = t([]);
|
|
10
|
+
A.configure.items.forEach((e3) => {
|
|
11
|
+
e3.code || (e3.code = e3.index);
|
|
12
|
+
}), P.value = A.configure.props.defaultOpen ? A.configure.props.defaultOpen : 1;
|
|
13
|
+
const O = t(null), R = A.configure.runtime ? A.configure.runtime : {}, B = R.style, z = R.class, I = R.headerStyle;
|
|
14
|
+
function S(e3, t2) {
|
|
15
|
+
return N(e3, A.pageContext, A.configure, "before-leave", { activeName: e3, oldActiveName: t2 }) ?? true;
|
|
13
16
|
}
|
|
14
17
|
function D(e3, t2) {
|
|
15
18
|
const n2 = { pane: e3, ev: t2 }, o2 = e3.paneName;
|
|
16
|
-
return
|
|
19
|
+
return A.pageContext.activeTab = o2, A.pageContext.activeLabel = n2.label, N(o2, A.pageContext, A.configure, "tab-click", n2);
|
|
17
20
|
}
|
|
18
|
-
function
|
|
21
|
+
function F(e3) {
|
|
19
22
|
const t2 = { paneName: e3 };
|
|
20
|
-
return
|
|
23
|
+
return A.pageContext.activeTab = e3, N(e3, A.pageContext, A.configure, "tab-change", t2);
|
|
21
24
|
}
|
|
22
|
-
function
|
|
23
|
-
const t2 = { paneName: e3 };
|
|
24
|
-
|
|
25
|
+
function L(e3) {
|
|
26
|
+
const t2 = { paneName: e3 }, n2 = N(e3, A.pageContext, A.configure, "tab-remove", t2);
|
|
27
|
+
_(n2) ? n2.then((t3) => {
|
|
28
|
+
false !== t3 && U(e3);
|
|
29
|
+
}) : false !== n2 && U(e3);
|
|
30
|
+
}
|
|
31
|
+
function U(e3) {
|
|
32
|
+
P.value === e3 && A.configure.items.forEach((t2, n2) => {
|
|
33
|
+
if (t2.code === e3) {
|
|
34
|
+
const e4 = A.configure.items[n2 + 1] || A.configure.items[n2 - 1];
|
|
35
|
+
e4 && void 0 !== e4.code && (P.value = e4.code);
|
|
36
|
+
}
|
|
37
|
+
}), j.value.includes(e3) || j.value.push(e3);
|
|
25
38
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
39
|
+
function q() {
|
|
40
|
+
return N(null, A.pageContext, A.configure, "tab-add");
|
|
28
41
|
}
|
|
29
|
-
function
|
|
42
|
+
function G(e3, t2) {
|
|
30
43
|
const n2 = { paneName: e3, action: t2 };
|
|
31
|
-
return
|
|
44
|
+
return N(e3, A.pageContext, A.configure, "edit", n2);
|
|
45
|
+
}
|
|
46
|
+
function H() {
|
|
47
|
+
const e3 = N(A.configure.items, A.pageContext, A.configure, "tab-reset");
|
|
48
|
+
_(e3) ? e3.then((e4) => {
|
|
49
|
+
j.value = [];
|
|
50
|
+
}) : false !== e3 && (j.value = []);
|
|
32
51
|
}
|
|
33
|
-
return n(() => {
|
|
34
|
-
|
|
52
|
+
return n(j, (e3) => {
|
|
53
|
+
e3 && e3.length > 0 ? e3.forEach((e4) => {
|
|
54
|
+
const t2 = document.getElementById("tab-" + e4);
|
|
55
|
+
t2 && (t2.style.display = "none");
|
|
56
|
+
}) : A.configure.items.forEach((e4) => {
|
|
57
|
+
const t2 = document.getElementById("tab-" + e4.code);
|
|
58
|
+
t2 && (t2.style.display = "");
|
|
59
|
+
});
|
|
60
|
+
}, { deep: true }), o(() => {
|
|
61
|
+
a(() => {
|
|
35
62
|
let e3 = [];
|
|
36
|
-
|
|
37
|
-
t2.code && e3.push(document.
|
|
38
|
-
}),
|
|
63
|
+
A.configure.items.forEach((t2) => {
|
|
64
|
+
t2.code && e3.push(document.getElementById("tab-" + t2.code));
|
|
65
|
+
}), k(null, A.pageContext, A.configure, { componentRef: O.value, tabsDom: e3, entity: A.pageContext.entity.data, pageData: A.pageContext.entity.page });
|
|
66
|
+
});
|
|
67
|
+
}), w2({ thisRef: O, activeName: P, hiddenPanes: j, resetTab: H, hiddenTabPanes: function(e3) {
|
|
68
|
+
if (Array.isArray(e3)) {
|
|
69
|
+
const t2 = [];
|
|
70
|
+
e3.forEach((e4) => {
|
|
71
|
+
j.value.includes(e4) || t2.push(e4);
|
|
72
|
+
}), t2.length > 0 && j.value.push(...t2);
|
|
73
|
+
}
|
|
74
|
+
}, showTabPanes: function(e3) {
|
|
75
|
+
Array.isArray(e3) && e3.forEach((e4) => {
|
|
76
|
+
const t2 = j.value.indexOf(e4);
|
|
77
|
+
t2 > -1 && j.value.splice(t2, 1);
|
|
39
78
|
});
|
|
40
|
-
}
|
|
79
|
+
}, showTabPanesOnly: function(e3) {
|
|
80
|
+
const t2 = [];
|
|
81
|
+
A.configure.items.forEach((n2) => {
|
|
82
|
+
e3.includes(n2.code) || t2.push(n2.code);
|
|
83
|
+
}), j.value = [...new Set(t2)];
|
|
84
|
+
}, hiddenTabPanesOnly: function(e3) {
|
|
85
|
+
const t2 = [];
|
|
86
|
+
A.configure.items.forEach((n2) => {
|
|
87
|
+
e3.includes(n2.code) && t2.push(n2.code);
|
|
88
|
+
}), j.value = [...new Set(t2)];
|
|
89
|
+
} }), (e3, t2) => {
|
|
90
|
+
const n2 = i("el-button");
|
|
91
|
+
return l(), c(u(x), { ref_key: "thisRef", ref: O, modelValue: P.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => P.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: s(u(B)), class: r([u(z), "runtime-page-container-tabs-view"]), closable: e3.configure.props.closable, "before-leave": S, onTabClick: D, onTabChange: F, onTabRemove: L, onTabAdd: q, onEdit: G }, { default: p(() => [(l(true), f(g, null, m(A.configure.items, (t3, n3) => (l(), c(u(C), { key: n3, label: t3.label, name: t3.code, style: s({ display: false === t3.show ? "none" : "" }), lazy: !!e3.configure.props.lazy }, { label: p(() => [t3.iconType && t3.iconValue ? (l(), c(u(E), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : d("", true), b("span", { style: s(u(I)) }, y(u(V)(t3.label)), 5)]), default: p(() => [(e3.configure.props.isFullyRendered ?? 1) || t3.code === P.value ? (l(true), f(g, { key: 0 }, m(t3.items, (t4) => (l(), c(T, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128)) : d("", true)]), _: 2 }, 1032, ["label", "name", "style", "lazy"]))), 128)), e3.configure.props.resetable ? (l(), c(u(C), { key: 0, disabled: "", name: "-1" }, { label: p(() => [e3.configure.props.resetable ? (l(), c(n2, { key: 0, type: "text", circle: "", onClick: v(H, ["stop"]) }, { default: p(() => [h(y(e3.configure.props.resetButtonName || "重置"), 1)]), _: 1 })) : d("", true)]), _: 1 })) : d("", true)]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class", "closable"]);
|
|
92
|
+
};
|
|
41
93
|
} });
|
|
42
94
|
export {
|
|
43
|
-
|
|
95
|
+
w as default
|
|
44
96
|
};
|