@hlw-uni/mp-vue 1.1.19 → 1.1.21

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": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "hlw-uni Vue 组件库 — 供小程序业务方使用的 UI 组件集合",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -239,20 +239,27 @@ const handleGetPhoneNumber = (item: HlwMenuItem, event: unknown) => {
239
239
  }
240
240
  }
241
241
 
242
- /* open-type button 模式:去除微信 button 原生样式 */
242
+ /* open-type button 模式:去除微信 button 原生样式,对齐 .hlw-menu-item 布局 */
243
243
  .hlw-menu-item-btn {
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: space-between;
244
247
  width: 100%;
245
248
  margin: 0;
246
249
  padding: 24rpx 32rpx;
247
250
  background: transparent;
248
251
  color: inherit;
249
252
  font-size: inherit;
253
+ font-weight: inherit;
250
254
  line-height: inherit;
251
255
  border-radius: 0;
256
+ border: none;
252
257
  text-align: left;
258
+ box-sizing: border-box;
253
259
 
254
260
  &::after {
255
261
  border: none;
262
+ display: none;
256
263
  }
257
264
  }
258
265
 
@@ -2,7 +2,7 @@
2
2
  <view v-if="show" class="hlw-modal-mask" @tap.self="onMask">
3
3
  <view class="hlw-modal" :class="{ 'hlw-modal--show': show }" @tap.stop>
4
4
  <view v-if="title" class="hlw-modal-title">{{ title }}</view>
5
- <view class="hlw-modal-body">
5
+ <view class="hlw-modal-body" :style="{ padding: props.bodyPadding }">
6
6
  <slot />
7
7
  </view>
8
8
  <slot name="footer">
@@ -31,6 +31,8 @@ interface Props {
31
31
  confirmText?: string;
32
32
  cancelText?: string;
33
33
  closeOnMask?: boolean;
34
+ /** 内容区内边距。默认 `32rpx`,需要自定义内容贴边时传 `"0"` */
35
+ bodyPadding?: string;
34
36
  }
35
37
 
36
38
  const props = withDefaults(defineProps<Props>(), {
@@ -40,6 +42,7 @@ const props = withDefaults(defineProps<Props>(), {
40
42
  confirmText: "确定",
41
43
  cancelText: "取消",
42
44
  closeOnMask: true,
45
+ bodyPadding: "32rpx",
43
46
  });
44
47
 
45
48
  const emit = defineEmits<{ "update:show": [value: boolean]; confirm: []; cancel: [] }>();
@@ -94,7 +97,6 @@ function onCancel() {
94
97
  }
95
98
 
96
99
  .hlw-modal-body {
97
- padding: 32rpx;
98
100
  font-size: var(--font-base, 28rpx);
99
101
  color: #475569;
100
102
  text-align: center;