exploria-ui 2026.3.6 → 2026.4.13
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/components/advanced/EParallaxScrolling/EParallaxScrolling.vue.d.ts +3 -0
- package/dist/components/advanced/EWatermark/EWatermark.vue.d.ts +25 -34
- package/dist/components/{data → basic}/EAvatar/EAvatar.vue.d.ts +2 -0
- package/dist/components/data/ETimeline/ETimeline.vue.d.ts +8 -1
- package/dist/components/data/ETimeline/ETimelineItem.vue.d.ts +3 -0
- package/dist/components/form/ESelect/ESelect.vue.d.ts +1 -0
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +7 -7
- package/dist/directives/ESizeOb.d.ts +1 -1
- package/dist/directives/index.d.ts +4 -4
- package/dist/directives/index.js +1 -1
- package/dist/index.css +1 -1
- package/dist/node_modules/.pnpm/three@0.180.0/node_modules/three/examples/jsm/libs/fflate.module.js +2 -5
- package/dist/packages/exploria-ui/src/components/advanced/EParallaxScrolling/EParallaxScrolling.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/advanced/EParallaxScrolling/EParallaxScrolling.vue_vue_type_script_setup_true_lang.js +26 -22
- package/dist/packages/exploria-ui/src/components/advanced/EWatermark/EWatermark.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/advanced/EWatermark/EWatermark.vue_vue_type_script_setup_true_lang.js +61 -63
- package/dist/packages/exploria-ui/src/components/{data → basic}/EAvatar/EAvatar.vue.js +2 -2
- package/dist/packages/exploria-ui/src/components/basic/EAvatar/EAvatar.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/packages/exploria-ui/src/components/basic/EBadge/EBadge.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/ECarousel/ECarousel.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/ECodeCollapse/ECodeCollapse.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/EImage.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/EList.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/ETable/ETable.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/ETimeline/ETimeline.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/ETimeline/ETimeline.vue_vue_type_script_setup_true_lang.js +16 -15
- package/dist/packages/exploria-ui/src/components/data/ETimeline/ETimelineItem.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/data/ETimeline/ETimelineItem.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/packages/exploria-ui/src/components/feedback/EDialog/EDialog.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/feedback/EDrawer/EDrawer.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/feedback/EDrawer/EDrawer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/packages/exploria-ui/src/components/feedback/EPopover.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/feedback/ETooltip.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EColorPicker.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EConditionGroup/EConditionGroup.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EConditionGroup/EConditionGroup.vue_vue_type_script_setup_true_lang.js +72 -56
- package/dist/packages/exploria-ui/src/components/form/EFileSelector.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EForm.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EFormItem.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EInput/EInput.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/EInput/EInput.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/packages/exploria-ui/src/components/form/ESelect/ESelect.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/ESelect/ESelect.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/packages/exploria-ui/src/components/form/ESlider.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/form/ETimePicker.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/navigation/EDropdown.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/navigation/ETabs/ETabs.vue.js +1 -1
- package/dist/packages/exploria-ui/src/components/navigation/ETabs/ETabs.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/packages/exploria-ui/src/utils/EDomUtil.js +21 -10
- package/dist/plugins/EPreloadImageBuilder.d.ts +5 -0
- package/dist/plugins/ESvgPolyfill.d.ts +3 -0
- package/dist/plugins/ESvgSpriteBuilder.d.ts +6 -0
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +7793 -0
- package/dist/utils/EDomUtil.d.ts +7 -0
- package/dist/utils/EThreeUtil.d.ts +2 -2
- package/package.json +11 -11
- package/dist/packages/exploria-ui/src/components/data/EAvatar/EAvatar.vue_vue_type_script_setup_true_lang.js +0 -14
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
1
|
+
import e from "../../../directives/ESizeOb.js";
|
|
2
|
+
import t from "../../basic/EButton/EButton.vue.js";
|
|
3
|
+
import "../../../../../../directives/index.js";
|
|
4
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, openBlock as p, reactive as m, ref as h, renderList as g, renderSlot as _, unref as v, withCtx as y, withDirectives as b } from "vue";
|
|
3
5
|
//#region src/components/form/EConditionGroup/EConditionGroup.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "condition-group-left",
|
|
7
|
-
style: {
|
|
8
|
-
marginTop: "8px",
|
|
9
|
-
marginBottom: "8px"
|
|
10
|
-
}
|
|
11
|
-
}, _ = { class: "e-condition-group__right" }, v = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "left",
|
|
14
|
-
style: {
|
|
15
|
-
marginTop: "8px",
|
|
16
|
-
marginBottom: "8px"
|
|
17
|
-
}
|
|
18
|
-
}, y = 32, b = 16, x = c({
|
|
6
|
+
var x = { class: "e-condition-group" }, S = { class: "e-condition-group__right" }, C = 16, w = u({
|
|
19
7
|
__name: "EConditionGroup",
|
|
20
8
|
props: {
|
|
21
9
|
conditionGroup: {},
|
|
@@ -23,79 +11,107 @@ var h = { class: "e-condition-group" }, g = {
|
|
|
23
11
|
size: { default: "medium" }
|
|
24
12
|
},
|
|
25
13
|
emits: ["update:condition-group"],
|
|
26
|
-
setup(
|
|
27
|
-
let
|
|
14
|
+
setup(u, { emit: w }) {
|
|
15
|
+
let T = h(0), E = w, D = r({
|
|
28
16
|
get() {
|
|
29
|
-
return
|
|
17
|
+
return u.conditionGroup;
|
|
30
18
|
},
|
|
31
19
|
set(e) {
|
|
32
|
-
|
|
20
|
+
E("update:condition-group", e);
|
|
33
21
|
}
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
}), O = m({
|
|
23
|
+
firstGroup: 0,
|
|
24
|
+
lastGroup: 0
|
|
25
|
+
}), k = m([{
|
|
26
|
+
firstRow: 0,
|
|
27
|
+
lastRow: 0
|
|
28
|
+
}]);
|
|
29
|
+
return (r, m) => (p(), o("div", x, [D.value.length >= 2 ? (p(), o("div", {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "condition-group-left",
|
|
32
|
+
style: f({
|
|
33
|
+
marginTop: O.firstGroup / 2 + "px",
|
|
34
|
+
marginBottom: T.value + O.lastGroup / 2 + C + "px"
|
|
35
|
+
})
|
|
36
|
+
}, [...m[1] ||= [s("div", { class: "or-line" }, null, -1), s("div", { class: "or-icon" }, "OR", -1)]], 4)) : a("", !0), s("div", S, [(p(!0), o(n, null, g(D.value, (i, h) => b((p(), o("div", {
|
|
37
|
+
key: h,
|
|
38
|
+
class: d(["e-condition-group__right__item", u.size])
|
|
39
|
+
}, [i.length >= 2 ? (p(), o("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "left",
|
|
42
|
+
style: f({
|
|
43
|
+
marginTop: (k[h]?.firstRow || 0) / 2 + "px",
|
|
44
|
+
marginBottom: (k[h]?.lastRow || 0) / 2 + C + T.value + "px"
|
|
45
|
+
})
|
|
46
|
+
}, [...m[2] ||= [s("div", { class: "and-line" }, null, -1), s("div", { class: "and-icon" }, "AND", -1)]], 4)) : a("", !0), s("div", {
|
|
39
47
|
class: "right",
|
|
40
|
-
style:
|
|
41
|
-
}, [(
|
|
42
|
-
key: `group-${
|
|
48
|
+
style: f({ rowGap: C + "px" })
|
|
49
|
+
}, [(p(!0), o(n, null, g(i, (n, a) => b((p(), o("div", {
|
|
50
|
+
key: `group-${h}-row-${a}`,
|
|
43
51
|
style: {
|
|
44
52
|
display: "flex",
|
|
45
53
|
"column-gap": "8px"
|
|
46
54
|
}
|
|
47
55
|
}, [
|
|
48
|
-
|
|
49
|
-
row:
|
|
50
|
-
groupIndex:
|
|
51
|
-
rowIndex:
|
|
56
|
+
_(r.$slots, "default", {
|
|
57
|
+
row: n,
|
|
58
|
+
groupIndex: h,
|
|
59
|
+
rowIndex: a
|
|
52
60
|
}, void 0, !0),
|
|
53
|
-
|
|
54
|
-
size:
|
|
55
|
-
onClick: (e) =>
|
|
61
|
+
l(t, {
|
|
62
|
+
size: u.size,
|
|
63
|
+
onClick: (e) => D.value[h].splice(a + 1, 0, u.defaultValueMap)
|
|
56
64
|
}, {
|
|
57
|
-
default:
|
|
65
|
+
default: y(() => [...m[3] ||= [c(" 添加 ", -1)]]),
|
|
58
66
|
_: 1
|
|
59
67
|
}, 8, ["size", "onClick"]),
|
|
60
|
-
|
|
68
|
+
l(t, {
|
|
61
69
|
type: "danger",
|
|
62
|
-
size:
|
|
63
|
-
disabled:
|
|
70
|
+
size: u.size,
|
|
71
|
+
disabled: D.value.flat().length === 1,
|
|
64
72
|
onClick: (e) => {
|
|
65
|
-
|
|
73
|
+
D.value[h].splice(a, 1), D.value[h].length === 0 && D.value.splice(h, 1), D.value.flat().length === 0 && D.value.push([u.defaultValueMap]);
|
|
66
74
|
}
|
|
67
75
|
}, {
|
|
68
|
-
default:
|
|
76
|
+
default: y(() => [...m[4] ||= [c(" 删除 ", -1)]]),
|
|
69
77
|
_: 1
|
|
70
78
|
}, 8, [
|
|
71
79
|
"size",
|
|
72
80
|
"disabled",
|
|
73
81
|
"onClick"
|
|
74
82
|
])
|
|
75
|
-
]))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
])), [[v(e), (e, t, r) => {
|
|
84
|
+
n.length >= 2 && (k[h] || (k[h] = {
|
|
85
|
+
firstRow: 0,
|
|
86
|
+
lastRow: 0
|
|
87
|
+
}), a === 0 && (k[h].firstRow = r.clientHeight), a === i.length - 1 && (k[h].lastRow = r.clientHeight));
|
|
88
|
+
}]])), 128)), l(t, {
|
|
89
|
+
style: { "align-self": "flex-start" },
|
|
90
|
+
size: u.size,
|
|
91
|
+
disabled: D.value.flat().length === 1,
|
|
79
92
|
onClick: (e) => {
|
|
80
|
-
|
|
93
|
+
D.value.splice(h, 1), D.value.length === 0 && D.value.push([u.defaultValueMap]);
|
|
81
94
|
}
|
|
82
95
|
}, {
|
|
83
|
-
default:
|
|
96
|
+
default: y(() => [...m[5] ||= [c(" 删除条件组 ", -1)]]),
|
|
84
97
|
_: 1
|
|
85
98
|
}, 8, [
|
|
86
99
|
"size",
|
|
87
|
-
"style",
|
|
88
100
|
"disabled",
|
|
89
101
|
"onClick"
|
|
90
|
-
])], 4)], 2))
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
])], 4)], 2)), [[v(e), (e, t, n) => {
|
|
103
|
+
i.length >= 2 && (h === 0 && (O.firstGroup = n.clientHeight), h === D.value.length - 1 && (O.lastGroup = n.clientHeight));
|
|
104
|
+
}]])), 128)), b((p(), i(t, {
|
|
105
|
+
size: u.size,
|
|
106
|
+
style: { "align-self": "flex-start" },
|
|
107
|
+
onClick: m[0] ||= (e) => D.value.push([u.defaultValueMap])
|
|
94
108
|
}, {
|
|
95
|
-
default:
|
|
109
|
+
default: y(() => [...m[6] ||= [c(" 添加条件组 ", -1)]]),
|
|
96
110
|
_: 1
|
|
97
|
-
}, 8, ["size"
|
|
111
|
+
}, 8, ["size"])), [[v(e), (e, t, n) => {
|
|
112
|
+
T.value = n.clientHeight / 2;
|
|
113
|
+
}]])])]));
|
|
98
114
|
}
|
|
99
115
|
});
|
|
100
116
|
//#endregion
|
|
101
|
-
export {
|
|
117
|
+
export { w as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./EFileSelector.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/EFileSelector.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-831cf4ed"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./EForm.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/EForm.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-6cf7b0cb"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./EFormItem.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/EFormItem.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-ab5e70be"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./EInput.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/EInput/EInput.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-69d5d1e3"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./ESelect.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/ESelect/ESelect.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-89116412"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -8,6 +8,7 @@ var D = ["data-id"], O = ["onClick"], k = f({
|
|
|
8
8
|
modelValue: {},
|
|
9
9
|
items: {},
|
|
10
10
|
size: { default: "medium" },
|
|
11
|
+
placeholder: { default: "请选择" },
|
|
11
12
|
placement: { default: "start" }
|
|
12
13
|
},
|
|
13
14
|
emits: ["update:model-value"],
|
|
@@ -38,7 +39,7 @@ var D = ["data-id"], O = ["onClick"], k = f({
|
|
|
38
39
|
M.value = !M.value, M.value ? (C(L)(), C(R)(n), m(U) ? U.value = C(z)(t) : U = C(z)(t)) : C(U)?.();
|
|
39
40
|
}, ["stop"])
|
|
40
41
|
}, [
|
|
41
|
-
u(S(f.items.find((e) => e.value ==
|
|
42
|
+
u(S(f.items.find((e) => e.value == f.modelValue)?.label || f.placeholder) + " ", 1),
|
|
42
43
|
t[6] ||= l("span", {
|
|
43
44
|
style: { "font-family": "'iconfont-select', serif" },
|
|
44
45
|
class: "icon-xia"
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./ESlider.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/ESlider.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-d88d59bb"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./ETimePicker.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/form/ETimePicker.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-99363d67"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./EDropdown.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/navigation/EDropdown.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-28395245"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -2,6 +2,6 @@ import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./ETabs.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/navigation/ETabs/ETabs.vue
|
|
5
|
-
var n = e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = e(t, [["__scopeId", "data-v-0eb13bc6"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -30,15 +30,18 @@ var y = ["onClick"], b = a({
|
|
|
30
30
|
let t = C.value.querySelector(`.e-tabs-header>.e-tabs-label${a.modelValue}`), n = C.value.querySelector(".e-tabs-header>.line");
|
|
31
31
|
n.style.transition = e ? "all 0.3s ease-in-out" : "none", a.placement.includes("left") || a.placement.includes("right") ? (n.style.top = t.offsetTop + "px", n.style.height = t.offsetHeight + "px", n.style.width = "2px", a.placement.includes("left") ? (n.style.right = "0px", n.style.left = "unset") : (n.style.left = "0px", n.style.right = "unset")) : (n.style.left = t.offsetLeft + "px", n.style.width = t.offsetWidth + "px", n.style.height = "2px", a.placement.includes("top") ? (n.style.bottom = "0px", n.style.top = "unset") : (n.style.top = "0px", n.style.bottom = "unset"));
|
|
32
32
|
}, T = (t, n, r = !0) => {
|
|
33
|
-
let i = C.value.querySelector(".e-tabs-content");
|
|
34
|
-
i.style.scrollBehavior = r ? "smooth" : "auto";
|
|
35
|
-
let s = i.querySelector(".e-tab-pane" + n);
|
|
33
|
+
let i = C.value.querySelector(".e-tabs-content").querySelector(".e-tab-pane" + n), s = r ? "smooth" : "auto";
|
|
36
34
|
t && e.scrollIntoView({
|
|
37
35
|
element: t,
|
|
38
|
-
block: "center"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
block: "center",
|
|
37
|
+
behavior: s
|
|
38
|
+
});
|
|
39
|
+
let c = a.placement.includes("left") || a.placement.includes("right");
|
|
40
|
+
e.scrollIntoView({
|
|
41
|
+
element: i,
|
|
42
|
+
behavior: s,
|
|
43
|
+
block: c ? "center" : "start",
|
|
44
|
+
...c ? {} : { inline: "center" }
|
|
42
45
|
}), x("update:modelValue", n), x("tabClick", n), o(() => {
|
|
43
46
|
w(r);
|
|
44
47
|
});
|
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
//#region src/utils/EDomUtil.ts
|
|
2
2
|
var e = class {
|
|
3
3
|
static scrollIntoView(e) {
|
|
4
|
-
let { element: t, block: n = "start", inline: r = "start" } = e;
|
|
4
|
+
let { element: t, block: n = "start", inline: r = "start", behavior: i = "auto" } = e;
|
|
5
5
|
if (!t) return;
|
|
6
|
-
let
|
|
7
|
-
if (!(
|
|
8
|
-
let
|
|
6
|
+
let a = t.parentElement;
|
|
7
|
+
if (!(a instanceof HTMLElement)) return;
|
|
8
|
+
let o = t.getBoundingClientRect(), { offsetTop: s, offsetLeft: c } = t, { clientHeight: l, clientWidth: u } = a, d = o.height, f = o.width, p = a.scrollTop, m = a.scrollLeft;
|
|
9
9
|
if (n) switch (n) {
|
|
10
10
|
case "center":
|
|
11
|
-
|
|
11
|
+
p = s - (l - d) / 2;
|
|
12
12
|
break;
|
|
13
13
|
case "end":
|
|
14
|
-
|
|
14
|
+
p = s + d - l;
|
|
15
15
|
break;
|
|
16
|
-
|
|
16
|
+
case "nearest":
|
|
17
|
+
s < a.scrollTop ? p = s : s + d > a.scrollTop + l && (p = s + d - l);
|
|
18
|
+
break;
|
|
19
|
+
default: p = s;
|
|
17
20
|
}
|
|
18
21
|
if (r) switch (r) {
|
|
19
22
|
case "center":
|
|
20
|
-
|
|
23
|
+
m = c - (u - f) / 2;
|
|
21
24
|
break;
|
|
22
25
|
case "end":
|
|
23
|
-
|
|
26
|
+
m = c + f - u;
|
|
27
|
+
break;
|
|
28
|
+
case "nearest":
|
|
29
|
+
c < a.scrollLeft ? m = c : c + f > a.scrollLeft + u && (m = c + f - u);
|
|
24
30
|
break;
|
|
25
|
-
default:
|
|
31
|
+
default: m = c;
|
|
26
32
|
}
|
|
33
|
+
a.scrollTo({
|
|
34
|
+
top: p,
|
|
35
|
+
left: m,
|
|
36
|
+
behavior: i
|
|
37
|
+
});
|
|
27
38
|
}
|
|
28
39
|
};
|
|
29
40
|
//#endregion
|