@hlw-uni/mp-vue 1.1.20 → 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
|
@@ -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;
|