[当我尝试导入下拉菜单时
import {Dropdown} from 'react-native-material-dropdown'
给我这个错误:
<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS82aVI3ZS5qcGcifQ==” alt =“在此处输入图像描述”>
这是最新版本中材料下拉列表的问题。您需要在itemTextStyle: Text.propTypes.style
文件中注释..\node_modules\react-native-material-dropdown\src\components\dropdown
。
并在以下位置删除Animated
中的Animated.Text.propTypes.style
:词缀/索引助手/索引标签/索引react-native-material-textfield
并在以上三个文件的每一个中添加import { Animated, Text} from 'react-native';
。
供参考,请看:https://github.com/n4kz/react-native-material-dropdown/issues/224#issuecomment-614734400