bge-ui 1.5.1 → 1.5.3

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 CHANGED
@@ -8753,7 +8753,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8753
8753
  const children = DialogBody.value.children;
8754
8754
  for (let i = 0; i < children.length; i++) {
8755
8755
  const child = children[i];
8756
- offsetHeight += child.offsetHeight;
8756
+ const styles = window.getComputedStyle(child);
8757
+ const marginTop = parseFloat(styles.getPropertyValue("margin-top"));
8758
+ const marginBottom = parseFloat(styles.getPropertyValue("margin-bottom"));
8759
+ offsetHeight += child.offsetHeight + marginTop + marginBottom;
8757
8760
  }
8758
8761
  height.value = 48 + 64 + 16 + Number(offsetHeight);
8759
8762
  }
package/dist/style.css CHANGED
@@ -1267,7 +1267,6 @@ to {
1267
1267
  transform: translate(-50%, -50%);
1268
1268
  height: 160px;
1269
1269
  padding: 32px 0;
1270
- overflow: hidden;
1271
1270
  }
1272
1271
  .bge-dialog .bge-dialog__header {
1273
1272
  padding: 0 32px;
@@ -1616,6 +1615,8 @@ to {
1616
1615
  font-size: 14px;
1617
1616
  align-items: center;
1618
1617
  align-self: stretch;
1618
+ overflow-y: auto;
1619
+ max-height: 224px;
1619
1620
  }
1620
1621
  .bge-select .bge-select__wrapper .bge-select__inner {
1621
1622
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -84,7 +84,11 @@ function updateHeight() {
84
84
  const children = DialogBody.value.children
85
85
  for (let i = 0; i < children.length; i++) {
86
86
  const child = children[i]
87
- offsetHeight += child.offsetHeight
87
+ // 从样式对象中获取顶部和底部的margin值
88
+ const styles = window.getComputedStyle(child)
89
+ const marginTop = parseFloat(styles.getPropertyValue('margin-top'));
90
+ const marginBottom = parseFloat(styles.getPropertyValue('margin-bottom'));
91
+ offsetHeight += child.offsetHeight + marginTop + marginBottom
88
92
  }
89
93
  height.value = 48 + 64 + 16 + Number(offsetHeight)
90
94
  }
@@ -158,7 +162,6 @@ defineExpose({
158
162
  transform: translate(-50%, -50%);
159
163
  height: 160px;
160
164
  padding: 32px 0;
161
- overflow: hidden;
162
165
 
163
166
  .bge-dialog__header {
164
167
  padding: 0 32px;
@@ -110,6 +110,8 @@ const emits = defineEmits([
110
110
  font-size: 14px;
111
111
  align-items: center;
112
112
  align-self: stretch;
113
+ overflow-y: auto;
114
+ max-height: 224px;
113
115
 
114
116
  .bge-select__inner {
115
117
  display: flex;