bge-ui 1.4.9 → 1.5.1
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/index.js +6 -4
- package/package.json +1 -1
- package/src/dialog/index.vue +7 -4
package/dist/index.js
CHANGED
|
@@ -8736,11 +8736,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8736
8736
|
const children = DialogBody.value.children;
|
|
8737
8737
|
for (let i = 0; i < children.length; i++) {
|
|
8738
8738
|
const child = children[i];
|
|
8739
|
-
|
|
8740
|
-
|
|
8739
|
+
const styles = window.getComputedStyle(child);
|
|
8740
|
+
const marginTop = parseFloat(styles.getPropertyValue("margin-top"));
|
|
8741
|
+
const marginBottom = parseFloat(styles.getPropertyValue("margin-bottom"));
|
|
8742
|
+
offsetHeight += child.offsetHeight + marginTop + marginBottom;
|
|
8741
8743
|
}
|
|
8742
8744
|
opacity.value = 1;
|
|
8743
|
-
height.value = 48 + 64 + Number(offsetHeight);
|
|
8745
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight);
|
|
8744
8746
|
});
|
|
8745
8747
|
}
|
|
8746
8748
|
}, {
|
|
@@ -8753,7 +8755,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8753
8755
|
const child = children[i];
|
|
8754
8756
|
offsetHeight += child.offsetHeight;
|
|
8755
8757
|
}
|
|
8756
|
-
height.value = 48 + 64 + Number(offsetHeight);
|
|
8758
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight);
|
|
8757
8759
|
}
|
|
8758
8760
|
function close() {
|
|
8759
8761
|
height.value = "160";
|
package/package.json
CHANGED
package/src/dialog/index.vue
CHANGED
|
@@ -65,11 +65,14 @@ watch(() => [props.visible, props.resetState], ([value]) => {
|
|
|
65
65
|
const children = DialogBody.value.children
|
|
66
66
|
for (let i = 0; i < children.length; i++) {
|
|
67
67
|
const child = children[i]
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
// 从样式对象中获取顶部和底部的margin值
|
|
69
|
+
const styles = window.getComputedStyle(child)
|
|
70
|
+
const marginTop = parseFloat(styles.getPropertyValue('margin-top'));
|
|
71
|
+
const marginBottom = parseFloat(styles.getPropertyValue('margin-bottom'));
|
|
72
|
+
offsetHeight += child.offsetHeight + marginTop + marginBottom
|
|
70
73
|
}
|
|
71
74
|
opacity.value = 1
|
|
72
|
-
height.value = 48 + 64 + Number(offsetHeight)
|
|
75
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight)
|
|
73
76
|
})
|
|
74
77
|
}
|
|
75
78
|
}, {
|
|
@@ -83,7 +86,7 @@ function updateHeight() {
|
|
|
83
86
|
const child = children[i]
|
|
84
87
|
offsetHeight += child.offsetHeight
|
|
85
88
|
}
|
|
86
|
-
height.value = 48 + 64 + Number(offsetHeight)
|
|
89
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight)
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
|