@hlw-uni/mp-vue 2.1.17 → 2.1.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-vue",
3
- "version": "2.1.17",
3
+ "version": "2.1.19",
4
4
  "description": "hlw-uni 小程序运行时 — Vue 组件 + composables + theme + http + 工具集(合并自原 mp-core)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -215,10 +215,6 @@ const showDivider = computed(() => {
215
215
  /* 内容区 */
216
216
  .hlw-card-body {
217
217
  width: 100%;
218
-
219
- &--padded {
220
- padding: 24rpx 28rpx;
221
- }
222
218
  }
223
219
 
224
220
  /* 底部 */
@@ -13,14 +13,14 @@
13
13
 
14
14
  <scroll-view
15
15
  class="hlw-page-content"
16
- :class="bodyClass"
17
- :style="bodyStyle"
18
16
  :scroll-y="true"
19
17
  :enable-flex="true"
20
18
  :enhanced="true"
21
19
  :show-scrollbar="false"
22
20
  >
23
- <slot />
21
+ <view class="hlw-page-body" :class="bodyClass" :style="bodyStyle">
22
+ <slot />
23
+ </view>
24
24
  </scroll-view>
25
25
 
26
26
  <view class="hlw-page-footer">
@@ -48,9 +48,12 @@ interface Props {
48
48
  title?: string;
49
49
  isBack?: boolean;
50
50
  bgClass?: string;
51
- /** 透传到 scroll-view 内容区的 class,常用于直接挂 .container */
51
+ /**
52
+ * 透传到 scroll-view 内层 view 包裹(不是 scroll-view 本身)的 class,常用于直接挂 .container。
53
+ * 用 view 包裹是因为 mp-weixin 的 scroll-view 是原生组件,flex/gap 行为跟普通 view 不一致。
54
+ */
52
55
  bodyClass?: ClassValue;
53
- /** 透传到 scroll-view 内容区的 style */
56
+ /** 透传到内层 view 包裹的 style,规则同 bodyClass */
54
57
  bodyStyle?: StyleValue;
55
58
  }
56
59
 
@@ -84,6 +87,12 @@ const props = withDefaults(defineProps<Props>(), {
84
87
  width: 100%;
85
88
  }
86
89
 
90
+ .hlw-page-body {
91
+ width: 100%;
92
+ display: flex;
93
+ flex-direction: column;
94
+ }
95
+
87
96
  .hlw-page-footer {
88
97
  flex-shrink: 0;
89
98
  }