@@ -68,18 +68,23 @@ const AtFloatLayout = defineComponent({
68
68
e . stopPropagation ( )
69
69
}
70
70
71
- return ( ) => (
72
- h ( View , mergeProps ( attrs , {
71
+ return ( ) => {
72
+
73
+ const disableScroll = process . env . TARO_ENV === 'alipay' ? { disableScroll : true } : { }
74
+ const trapScroll = process . env . TARO_ENV === 'alipay' ? { trapScroll : true } : { }
75
+
76
+ return h ( View , mergeProps ( attrs , {
73
77
class : rootClass . value ,
74
78
catchMove : true ,
75
79
onTouchmove : handleTouchMove
76
80
} ) , {
77
81
default : ( ) => [
78
82
// overlay
79
- h ( View , {
83
+ h ( View , mergeProps ( disableScroll , {
80
84
class : 'at-float-layout__overlay' ,
81
85
onTap : close
82
- } ) ,
86
+ } ) ) ,
87
+
83
88
// container layout
84
89
h ( View , {
85
90
class : 'at-float-layout__container layout'
@@ -93,7 +98,10 @@ const AtFloatLayout = defineComponent({
93
98
class : 'layout-header__title'
94
99
} , { default : ( ) => props . title } ) ,
95
100
96
- h ( View , { class : 'layout-header__btn-close' , onTap : close } ) ,
101
+ h ( View , {
102
+ class : 'layout-header__btn-close' ,
103
+ onTap : close
104
+ } ) ,
97
105
]
98
106
} )
99
107
) ,
@@ -103,7 +111,7 @@ const AtFloatLayout = defineComponent({
103
111
class : 'layout-body'
104
112
} , {
105
113
default : ( ) => [
106
- h ( ScrollView , {
114
+ h ( ScrollView , mergeProps ( trapScroll , {
107
115
class : 'layout-body__content' ,
108
116
scrollX : props . scrollX ,
109
117
scrollY : props . scrollY ,
@@ -115,14 +123,14 @@ const AtFloatLayout = defineComponent({
115
123
onScroll : props . onScroll ,
116
124
onScrolltolower : props . onScrollToLower ,
117
125
onScrolltoupper : props . onScrollToUpper ,
118
- } , { default : ( ) => slots . default && slots . default ( ) } )
126
+ } ) , { default : ( ) => slots . default && slots . default ( ) } )
119
127
]
120
128
} )
121
129
]
122
130
} )
123
131
]
124
132
} )
125
- )
133
+ }
126
134
}
127
135
} )
128
136
0 commit comments