美文网首页
react-native 爬坑经历

react-native 爬坑经历

作者: 你美你媚儿 | 来源:发表于2019-03-01 11:29 被阅读0次

    常见问题总结:

    react native 常见问题总结 - 简书

    1. unable to load script from assets ‘index.android bundle’ ,make sure your bundle is packaged correctly or youu’re runing a packager server

    react-native 最新版本爬坑经历(unable to load script from assets 和could not connect to development server.) - jasonzds的博客 - CSDN博客

    2. 安卓tabbar不显示图片,showIcon 默认为false

    需要配置tabBarOptions:{

    showIcon:true

    }

    3.透明色:’transparent‘

    4.Text文字间距:lineHeight属性    textAlignVertical(垂直居中,在IOS无效,需要包裹View)

    5.键盘自适应及点击空白消失 react-native-keyboard-aware-scroll-view

    6.teaset TabView activeIcon图片颜色更改

    TabView.Sheet 的 activeIcon 属性默认使用 Theme.tvBarBtnIconActiveTintColor 作为 tintColor,有两种方法实现使用图标原来的颜色,一是在代码入口处删除 Theme.tvBarBtnIconActiveTintColor 设置,影响所有 TabView.Sheet:

    Theme.set({tvBarBtnIconActiveTintColor:undefined});

    二是自行渲染 activeIcon 组件:

    <TabView.Sheettitle='Home'icon={require('../icons/home.png')}  activeIcon={<Image style={{height:20, width:20}} source={require('../icons/home_active.png')}/>}>

    7.axios请求数据时,setState失效的问题,注意_this

    相关文章

      网友评论

          本文标题:react-native 爬坑经历

          本文链接:https://www.haomeiwen.com/subject/jgzruqtx.html