rilyu / teaset

A UI library for react native, provides 20+ pure JS(ES6) components, focusing on content display and action control.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在安卓上无法触发PopView下的点击事件

mingmingshen opened this issue · comments

commented

react-native:0.59.1
teaset:0.6.3

通过使用Overlay.PopView封装了一个气泡卡片组件,在IOS中可以正常触发点击事件,但在安卓系统上无效。

commented

export default class MenuPopover extends Component {

render() {
    const {menus, onClose, left, top} = this.props;
    return (
        <Overlay.PopView onDisappearCompleted={onClose}>
            <View style={{position: 'absolute', left, top: top + Theme.statusBarHeightFix}}>
                <View
                    style={{
                        width: 0,
                        height: 0,
                        alignSelf: 'flex-end',
                        marginRight: px2dp(10),
                        borderColor: 'transparent',
                        borderLeftWidth: px2dp(5),
                        borderRightWidth: px2dp(5),
                        borderBottomWidth: px2dp(16),
                        borderBottomColor: 'white'
                    }}/>
                <View style={styles.container}>
                    {menus.map((t, i) =>
                        <TouchableOpacity
                            onPress={() => {
                                onClose();
                                t.onPress();
                            }}
                            style={[styles.btn, {borderBottomWidth: i === menus.length - 1 ? 0 : 1}]}
                            key={i}>
                                <Icon name={t.icon} size={px2dp(18)} color={'#8c8c8c'}/>
                                <Text style={{fontSize: 12, marginLeft: px2dp(6), color: '#000000'}}>{t.title}</Text>
                        </TouchableOpacity>)}
                </View>
            </View>
        </Overlay.PopView>
    );
}

}

安卓上应该是子组件越界了

怎么解决的?