This repository was archived by the owner on Dec 6, 2021. It is now read-only.
Commit 0a1b8a2 1 parent d34d7a8 commit 0a1b8a2 Copy full SHA for 0a1b8a2
File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,15 @@ const AtModal = defineComponent({
45
45
'at-modal--active' : state . _isOpened
46
46
} ) )
47
47
48
+ // to make sure button+button
49
+ // not having any top margin in h5
50
+ // may remove this if button+button margin fixed by Taro
51
+ const h5ButtonStyle = computed ( ( ) => {
52
+ return state . isWEB
53
+ ? 'margin-top: 0;'
54
+ : null
55
+ } )
56
+
48
57
watch ( ( ) => props . isOpened , ( val , oldVal ) => {
49
58
if ( val !== oldVal ) {
50
59
handleTouchScroll ( val )
@@ -141,6 +150,7 @@ const AtModal = defineComponent({
141
150
) ,
142
151
props . confirmText && (
143
152
h ( Button , {
153
+ style : h5ButtonStyle . value ,
144
154
onTap : handleConfirm
145
155
} , { default : ( ) => props . confirmText } )
146
156
)
Original file line number Diff line number Diff line change 50
50
</at-modal-content >
51
51
<at-modal-action >
52
52
<button @tap =" closeModal(1, '点击了取消')" >取消</button >
53
- <button @tap =" closeModal(1, '点击了确定')" >确定</button >
53
+ <button
54
+ style =" margin-top : 0 ;"
55
+ @tap =" closeModal(1, '点击了确定')"
56
+ >确定</button >
54
57
</at-modal-action >
55
58
</at-modal >
56
59
You can’t perform that action at this time.
0 commit comments