问题描述
我在我的项目中使用 react-native-popup-menu。 代码
import React,{ Component } from 'react';
import { View,Image,Text,StyleSheet,FlatList } from 'react-native';
import { icons,COLORS } from '../../../../constants'
import {
MenuProvider,Menu,MenuOptions,MenuOption,MenuTrigger,} from 'react-native-popup-menu';
class Areas extends Component {
constructor(props) {
super(props);
this.state = {}
}
render() {
return (
<MenuProvider>
<View style={StyleSheet.conatiner}>
<View style={{ display: 'flex',flexDirection: 'row',paddingVertical: 16,borderRadius: 4,backgroundColor: "#F8F9FB",marginTop: 16,paddingLeft: 8,height: 80 }}>
<View style={{ flex: .8 }}>
<Text>Al falih school</Text>
</View>
<View style={{ flex: .2,justifyContent: 'center',alignItems: 'center' }}>
{/* <Image style={{height:15,width:15}} source={icons.ellipse} /> */}
<Menu>
<MenuTrigger children={<Image style={{ height: 15,width: 15 }} source={icons.ellipse} />} />
<MenuOptions>
<MenuOption onSelect={() => {
}} customStyles={{ paddingVertical: 8 }}>
<Text>Delete</Text>
</MenuOption>
</MenuOptions>
</Menu>
</View>
</View>
</View>
</MenuProvider>
);
}
}
const styles = StyleSheet.create({
conatiner: {
flex: 1,alignItems: 'center',}
});
export default Areas;
如截图所示,触发器旁边没有弹出菜单,如何找到菜单触发器旁边的弹出菜单? [1]:https://i.stack.imgur.com/vJqc0.jpg
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)