在很多产品中都会涉及到下拉菜单选择功能,用的最好的当属美团了,其效果如下:
要实现上面的效果,在原生中比较好做,直接使用PopWindow组件即可。...如果使用React Native开发上面的效果,需要注意几个问题:
1、 在下拉的时候有动画过度效果;
2、下拉菜单出现后点击菜单项,菜单项可选择,并触发对应的事件;
3、下拉菜单中的项目可以配置;
要实现弹框效果...(props.index, props.subindex, props.data);
}
return (
onPress={onPress...= StyleSheet.create({
scroll: {flex: 1, backgroundColor: '#fff'},
bgContainer: {position: 'absolute...height},
bg: {flex: 1, backgroundColor: 'rgba(50,50,50,0.2)'},
content: {
position: 'absolute