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.
Files changed (18) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +25 -25
  2. package/dist/es/components/runtime/utils/events/validator-util.js +94 -87
  3. package/dist/es/components/runtime/utils/page-helper-util.d.ts +4 -1
  4. package/dist/es/components/runtime/utils/page-helper-util.js +152 -152
  5. package/dist/es/components/runtime/utils/page-init-util.js +5 -2
  6. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
  7. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
  8. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +81 -29
  9. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +185 -158
  10. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +130 -114
  11. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +31 -10
  12. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +15 -15
  13. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +15 -15
  14. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +41 -25
  15. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +38 -38
  16. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +21 -21
  17. package/dist/es/style.css +17 -8
  18. package/package.json +2 -2
@@ -1,44 +1,96 @@
1
- import { defineComponent as e, ref as t, onMounted as n, nextTick as o, createBlock as a, openBlock as i, unref as l, normalizeClass as u, normalizeStyle as r, withCtx as c, createElementBlock as p, Fragment as s, renderList as f, createCommentVNode as g, createElementVNode as m, toDisplayString as d } from "vue";
2
- import { ElTabs as b, ElTabPane as y } from "element-plus";
3
- import v from "../../object-render.vue.js";
4
- import { SuperIcon as x } from "agilebuilder-ui";
5
- import { handleAfterInitEvent as C, handleEvent as T } from "../../../../utils/events/event-util.js";
6
- import { $t as h } from "../../../../utils/i18n-util.js";
7
- const k = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
- const k2 = e2, V = t(null);
9
- V.value = k2.configure.props.defaultOpen ? k2.configure.props.defaultOpen : 1;
10
- const N = t(null), _ = k2.configure.runtime ? k2.configure.runtime : {}, j = _.style, R = _.class, z = _.headerStyle;
11
- function A(e3, t2) {
12
- return T(e3, k2.pageContext, k2.configure, "before-leave", { activeName: e3, oldActiveName: t2 }) ?? true;
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 k2.pageContext.activeTab = o2, k2.pageContext.activeLabel = n2.label, T(o2, k2.pageContext, k2.configure, "tab-click", n2);
19
+ return A.pageContext.activeTab = o2, A.pageContext.activeLabel = n2.label, N(o2, A.pageContext, A.configure, "tab-click", n2);
17
20
  }
18
- function E(e3) {
21
+ function F(e3) {
19
22
  const t2 = { paneName: e3 };
20
- return k2.pageContext.activeTab = e3, T(e3, k2.pageContext, k2.configure, "tab-change", t2);
23
+ return A.pageContext.activeTab = e3, N(e3, A.pageContext, A.configure, "tab-change", t2);
21
24
  }
22
- function O(e3) {
23
- const t2 = { paneName: e3 };
24
- return T(e3, k2.pageContext, k2.configure, "tab-remove", t2);
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 S() {
27
- return T(null, k2.pageContext, k2.configure, "tab-add");
39
+ function q() {
40
+ return N(null, A.pageContext, A.configure, "tab-add");
28
41
  }
29
- function q(e3, t2) {
42
+ function G(e3, t2) {
30
43
  const n2 = { paneName: e3, action: t2 };
31
- return T(e3, k2.pageContext, k2.configure, "edit", n2);
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
- o(() => {
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
- k2.configure.items.forEach((t2) => {
37
- t2.code && e3.push(document.querySelector("." + t2.code));
38
- }), C(null, k2.pageContext, k2.configure, { componentRef: N.value, tabsDom: e3, entity: k2.pageContext.entity.data, pageData: k2.pageContext.entity.page });
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
- }), (e3, t2) => (i(), a(l(b), { ref_key: "thisRef", ref: N, modelValue: V.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => V.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: r(l(j)), class: u([l(R), "runtime-page-container-tabs-view"]), "before-leave": A, onTabClick: D, onTabChange: E, onTabRemove: O, onTabAdd: S, onEdit: q }, { default: c(() => [(i(true), p(s, null, f(e3.configure.items, (t3, n2) => (i(), a(l(y), { key: n2, label: t3.label, name: t3.index, lazy: !!e3.configure.props.lazy }, { label: c(() => [m("span", { class: u(t3.code) }, [t3.iconType && t3.iconValue ? (i(), a(l(x), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : g("", true), m("span", { style: r(l(z)) }, d(l(h)(t3.label)), 5)], 2)]), default: c(() => [(e3.configure.props.isFullyRendered ?? 1) || t3.index === V.value ? (i(true), p(s, { key: 0 }, f(t3.items, (t4, n3) => (i(), a(v, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128)) : g("", true)]), _: 2 }, 1032, ["label", "name", "lazy"]))), 128))]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class"]));
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
- k as default
95
+ w as default
44
96
  };