Skip to content

Commit dea3bd4

Browse files
Amber-Nan杨楠
andauthored
fix(SpeedDial): 修复 Android 点击事件失效及拖拽失效问题 (#286) (#300)
* fix:发布 iOS 应用商店:一. 创建AppID * fix:发布 iOS 应用商店优化排版 * fix:ios应用商店文档更新及排版优化 * fix:修改环境安装文档语法错误及部分内容优化 * fix:更新ios应用发布流程 * fix:ios应用商店发布更新 * fix:更新ios及安卓应用商店发布 * fix:安卓上架更新 * fix:增加button自定义文本实例 * fix:增加checkBox复选框size调整及文档描述效果展示 * doc:更新文档导入图片 * doc(website): Update Readme.md * fix:修复SpeedDial Android 点击事件失效及拖拽失效问题 #286 Co-authored-by: 杨楠 <yangnan@nihaosi.com>
1 parent 1d9b5b7 commit dea3bd4

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

packages/core/src/SpeedDial/index.tsx

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -136,32 +136,31 @@ function SpeedDial(props: SpeedDialProps) {
136136
return (
137137
<View>
138138
<Animated.View
139-
style={{ transform: [{ translateX: pan.x }, { translateY: pan.y }] }}
139+
style={[styles.viewPosition, { transform: [{ translateX: pan.x }, { translateY: pan.y }] }]}
140140
// {...panResponder.panHandlers}
141141
>
142-
<View style={[styles.viewPosition, { bottom: bottom - MainHeight, right: right }]}>
143-
{success &&
144-
children.map((item, i) => (
145-
<Animated.View
146-
style={[
147-
styles.fadingContainer,
148-
{
149-
// Bind opacity to animated value
150-
opacity: fadeAnim[i],
151-
},
152-
]}
153-
key={i}
154-
>
155-
<Item {...item} move={panResponder.panHandlers} />
156-
</Animated.View>
157-
))}
158-
<View {...panResponder.panHandlers}>
159-
<TouchableOpacity activeOpacity={1} onPress={onOpenHome}>
160-
<View style={[styles.homeContainer, { ...style }]} {...other}>
161-
{iconName === 'plus' ? PlusDom : CloseDom}
162-
</View>
163-
</TouchableOpacity>
164-
</View>
142+
{success &&
143+
children.map((item, i) => (
144+
<Animated.View
145+
style={[
146+
styles.fadingContainer,
147+
{
148+
// Bind opacity to animated value
149+
opacity: fadeAnim[i],
150+
},
151+
]}
152+
key={i}
153+
>
154+
<Item {...item} move={panResponder.panHandlers} />
155+
</Animated.View>
156+
))}
157+
158+
<View {...panResponder.panHandlers} style={{ alignItems: 'flex-end' }}>
159+
<TouchableOpacity activeOpacity={1} onPress={onOpenHome}>
160+
<View style={[styles.homeContainer, { ...style }]} {...other}>
161+
{iconName === 'plus' ? PlusDom : CloseDom}
162+
</View>
163+
</TouchableOpacity>
165164
</View>
166165
</Animated.View>
167166
</View>
@@ -175,10 +174,8 @@ const styles = StyleSheet.create({
175174
},
176175
viewPosition: {
177176
position: 'absolute',
178-
// bottom: 350 - MainHeight,
179-
// right: 40,
180-
zIndex: 9999,
181-
alignItems: 'flex-end',
177+
bottom: 350 - MainHeight,
178+
right: 40,
182179
},
183180

184181
homeContainer: {

0 commit comments

Comments
 (0)