super-page-runtime 2.2.44 → 2.2.46
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/views/assemblys/container/card/card-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +48 -40
- package/dist/es/style.css +23 -33
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./card-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const t = e(r, [["__scopeId", "data-v-
|
|
4
|
+
const t = e(r, [["__scopeId", "data-v-6e950bc1"]]);
|
|
5
5
|
export {
|
|
6
6
|
t as default
|
|
7
7
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as o, onMounted as i, nextTick as n, resolveComponent as r, createBlock as l, openBlock as s, unref as u, normalizeClass as a, normalizeStyle as p, createSlots as c, withCtx as f, createElementVNode as g, createElementBlock as m, Fragment as y, renderList as d, createCommentVNode as x, createTextVNode as v, toDisplayString as C } from "vue";
|
|
2
2
|
import { ElCard as b } from "element-plus";
|
|
3
3
|
import { SuperIcon as h } from "agilebuilder-ui";
|
|
4
|
-
import { ArrowUp as k, ArrowDown as
|
|
5
|
-
import
|
|
6
|
-
import { $t as
|
|
7
|
-
import { handleAfterInitEvent as
|
|
8
|
-
const
|
|
4
|
+
import { ArrowUp as k, ArrowDown as w } from "@element-plus/icons-vue";
|
|
5
|
+
import S from "../../object-render.vue.js";
|
|
6
|
+
import { $t as j } from "../../../../utils/i18n-util.js";
|
|
7
|
+
import { handleAfterInitEvent as T } from "../../../../utils/events/event-util.js";
|
|
8
|
+
const V = e({ __name: "card-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: V2 }) {
|
|
9
9
|
var _a, _b;
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const _ = e2;
|
|
11
|
+
_.configure.items || (_.configure.items = []);
|
|
12
12
|
const R = t(() => {
|
|
13
13
|
var _a2;
|
|
14
|
-
return [true, void 0].includes((_a2 =
|
|
15
|
-
}), z = o(null), D = o(!((_a =
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
return [true, void 0].includes((_a2 = _.configure.props) == null ? void 0 : _a2.isCollapse);
|
|
15
|
+
}), z = o(null), D = o(!((_a = _.configure.props) == null ? void 0 : _a.isCollapse) || false !== ((_b = _.configure.props) == null ? void 0 : _b.isCollapseShow)), q = _.configure.runtime ? _.configure.runtime : {}, A = q.style, B = q.class, E = q.headerStyle, F = q.contentStyle, G = () => R.value && (D.value = !D.value);
|
|
16
|
+
return i(() => {
|
|
17
|
+
n(() => {
|
|
18
|
+
T(null, _.pageContext, _.configure, { componentRef: z.value, entity: _.pageContext.entity.data, pageData: _.pageContext.entity.page });
|
|
19
19
|
});
|
|
20
|
-
}),
|
|
21
|
-
|
|
20
|
+
}), V2({ test: function() {
|
|
21
|
+
_.configure.props.title = "teee";
|
|
22
22
|
} }), (e3, t2) => {
|
|
23
23
|
const o2 = r("el-button");
|
|
24
|
-
return s(), l(u(b), { ref_key: "thisRef", ref: z, style: p([u(A), { "margin-top": "20px" }]), "data-collapse": String(D.value), class: a(["yx-card-box-main", u(B)]) }, c({ default: f(() => [g("div", { class: "yx-card-box-context", style: p(u(F)) }, [(s(true), m(y, null, d(e3.configure.items, (t3, o3) => (s(), l(
|
|
24
|
+
return s(), l(u(b), { ref_key: "thisRef", ref: z, style: p([u(A), { "margin-top": "20px" }]), "data-collapse": String(D.value), class: a(["yx-card-box-view-main", u(B)]) }, c({ default: f(() => [g("div", { class: "yx-card-box-view-context", style: p(u(F)) }, [(s(true), m(y, null, d(e3.configure.items, (t3, o3) => (s(), l(S, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))], 4)]), _: 2 }, [e3.configure.props.base.tittleShow ? { name: "header", fn: f(() => [g("div", { class: "yx-card-box-view-header", onClick: G }, [g("div", { class: "yx-card-box-view-title", style: p(u(E)) }, [e3.configure.props.iconType && e3.configure.props.iconValue ? (s(), l(u(h), { key: 0, iconType: e3.configure.props.iconType, iconValue: e3.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : x("", true), v(" " + C(u(j)(e3.configure.props.base.title)), 1)], 4), R.value ? (s(), l(o2, { key: 0, type: "text", icon: D.value ? u(k) : u(w), style: { margin: "-15px 0", "z-index": "1" } }, null, 8, ["icon"])) : x("", true)])]), key: "0" } : void 0]), 1032, ["style", "data-collapse", "class"]);
|
|
25
25
|
};
|
|
26
26
|
} });
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
V as default
|
|
29
29
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, createElementBlock as
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, createElementBlock as r, openBlock as s, createCommentVNode as u, createElementVNode as f, normalizeStyle as c, normalizeClass as d, renderSlot as p } from "vue";
|
|
2
|
+
const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 }, position: { type: String, default: "top", validator: (e2) => ["top", "bottom"].includes(e2) }, target: { type: [String, HTMLElement], default: () => window }, autoDetectParentScroll: { type: Boolean, default: true }, stickyInScrollContainer: { type: Boolean, default: true }, zIndex: { type: Number, default: 100 }, enableIntervalUpdate: { type: Boolean, default: true }, enableIntervalTime: { type: Number, default: 2e3 } }, emits: ["change"], setup(e2, { emit: v2 }) {
|
|
3
|
+
const m = e2, w = v2, x = t(null), y = t(null), h = t(false), g = t({}), b = t([]), T = t(window), B = t(0), I = t(null), E = () => {
|
|
4
|
+
try {
|
|
5
|
+
if (!y.value) return;
|
|
6
|
+
const e3 = y.value.getBoundingClientRect(), t2 = T.value;
|
|
7
|
+
if (t2 === window) {
|
|
8
|
+
const t3 = "top" === m.position ? e3.top <= m.offset : e3.bottom >= window.innerHeight - m.offset;
|
|
9
|
+
B.value = 0, S(t3, e3);
|
|
10
|
+
} else if (m.stickyInScrollContainer) {
|
|
11
|
+
const o2 = t2.getBoundingClientRect(), { isFixTop: n2, isFixBottom: i2, containerOffset: l2 } = ((e4) => {
|
|
12
|
+
const t3 = ["top"].includes(m.position), o3 = ["bottom"].includes(m.position);
|
|
13
|
+
if (!x.value) return { isTop: t3, isBottom: o3 };
|
|
14
|
+
const n3 = x.value.getBoundingClientRect(), i3 = n3.top - e4.top, l3 = n3.left - e4.left, a2 = e4.height - n3.height - i3, r2 = e4.top, s2 = window.innerHeight - e4.bottom;
|
|
15
|
+
return { isTop: t3, isBottom: o3, containerTop: r2, containerBottom: s2, containerOffset: t3 ? r2 : o3 ? s2 : 0, offsetTop: i3, offsetLeft: l3, offsetBottom: a2, isFixTop: t3 && i3 <= 0, isFixBottom: o3 && a2 <= 0 };
|
|
16
|
+
})(o2);
|
|
17
|
+
B.value = l2 ?? 0, S(n2 || i2 || false, e3);
|
|
18
|
+
}
|
|
19
|
+
} catch (e3) {
|
|
18
20
|
}
|
|
19
21
|
}, S = (e3, t2) => {
|
|
20
|
-
e3 !== h.value && (h.value = e3, w("change", e3),
|
|
22
|
+
e3 !== h.value && (h.value = e3, w("change", e3), g.value = e3 ? { width: `${t2.width}px`, height: `${t2.height}px` } : {});
|
|
21
23
|
}, C = () => {
|
|
22
24
|
requestAnimationFrame(E);
|
|
23
25
|
};
|
|
@@ -28,37 +30,43 @@ const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
28
30
|
}, 100);
|
|
29
31
|
};
|
|
30
32
|
o(() => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
n(() => {
|
|
35
|
+
try {
|
|
36
|
+
m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
|
|
37
|
+
const e3 = (() => {
|
|
38
|
+
if (m.autoDetectParentScroll && y.value) {
|
|
39
|
+
const e4 = [];
|
|
40
|
+
let t2 = y.value.parentElement;
|
|
41
|
+
for (; t2 && t2 !== document.body; ) {
|
|
42
|
+
const { overflowY: o2 } = window.getComputedStyle(t2);
|
|
43
|
+
/(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
|
|
44
|
+
}
|
|
45
|
+
return [...e4, window];
|
|
46
|
+
}
|
|
47
|
+
if ("string" == typeof m.target) {
|
|
48
|
+
const e4 = document.querySelector(m.target);
|
|
49
|
+
return [...e4 ? [e4] : [], window];
|
|
50
|
+
}
|
|
51
|
+
return [window];
|
|
52
|
+
})();
|
|
53
|
+
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
|
|
54
|
+
} catch (e3) {
|
|
45
55
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
b.value = e3, B.value = b.value[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E(), m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
|
|
49
|
-
});
|
|
56
|
+
});
|
|
57
|
+
}, 100);
|
|
50
58
|
}), i(() => {
|
|
51
|
-
|
|
59
|
+
T.value && b.value.forEach((e3) => e3.removeEventListener("scroll", C)), window.removeEventListener("resize", k), clearTimeout(L), I.value && clearInterval(I.value);
|
|
52
60
|
}), l(() => {
|
|
53
61
|
n(() => {
|
|
54
|
-
|
|
62
|
+
C();
|
|
55
63
|
});
|
|
56
64
|
});
|
|
57
65
|
const z = a(() => {
|
|
58
66
|
var _a;
|
|
59
|
-
return h.value ? { position: "fixed", width: `${(_a =
|
|
67
|
+
return h.value ? { position: "fixed", width: `${(_a = y.value) == null ? void 0 : _a.offsetWidth}px`, zIndex: m.zIndex, [m.position]: `${m.offset + B.value}px` } : { position: "relative" };
|
|
60
68
|
});
|
|
61
|
-
return (e3, t2) => (
|
|
69
|
+
return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: x, class: "yx-affix" }, [h.value ? (s(), r("div", { key: 0, style: c(g.value), class: "yx-affix-placeholder" }, null, 4)) : u("", true), f("div", { ref_key: "affixRef", ref: y, style: c(z.value), class: d({ "yx-affix-content": true, "is-fixed": h.value, "is-top": "top" === m.position, "is-bottom": "bottom" === m.position }) }, [p(e3.$slots, "default")], 6)], 512));
|
|
62
70
|
} });
|
|
63
71
|
export {
|
|
64
72
|
v as default
|
package/dist/es/style.css
CHANGED
|
@@ -1,43 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
.yx-card-box-view-main[data-v-6e950bc1] > .el-card__header {
|
|
2
3
|
position: relative;
|
|
3
4
|
}
|
|
4
|
-
.yx-card-box-main
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: row;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
align-items: center;
|
|
9
|
-
gap: 15px;
|
|
5
|
+
.yx-card-box-view-main .yx-card-box-view-header[data-v-6e950bc1] {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: 15px;
|
|
10
11
|
flex: 1 1 auto;
|
|
11
12
|
}
|
|
12
|
-
.yx-card-box-main
|
|
13
|
-
position: relative;
|
|
14
|
-
z-index: 2;
|
|
15
|
-
}
|
|
16
|
-
.yx-card-box-main[data-v-16a57b36] > .el-card__header .yx-card-box-header::after {
|
|
17
|
-
content: " ";
|
|
18
|
-
position: absolute;
|
|
19
|
-
left: 0;
|
|
20
|
-
top: 0;
|
|
21
|
-
bottom: 0;
|
|
22
|
-
right: 0;
|
|
23
|
-
z-index: 0;
|
|
24
|
-
}
|
|
25
|
-
.yx-card-box-main[data-v-16a57b36] > .el-card__header .yx-card-box-header .yx-card-box-title {
|
|
13
|
+
.yx-card-box-view-main .yx-card-box-view-title[data-v-6e950bc1] {
|
|
14
|
+
position: relative;
|
|
15
|
+
z-index: 2;
|
|
26
16
|
flex: 1 1 auto;
|
|
27
17
|
}
|
|
28
|
-
.yx-card-box-main[data-v-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
transform: translateX(-50%);
|
|
18
|
+
.yx-card-box-view-main .yx-card-box-view-title[data-v-6e950bc1]::after {
|
|
19
|
+
content: ' ';
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
right: 0;
|
|
25
|
+
z-index: 0;
|
|
37
26
|
}
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
}
|
|
27
|
+
.yx-card-box-view-main[data-collapse="false"][data-v-6e950bc1] > .el-card__body{
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
.el-form-item[data-v-96fc65d8] {
|
|
41
31
|
margin-bottom: 0px;
|
|
42
32
|
}
|
|
43
33
|
[data-v-16a29b68] .el-empty {
|