
react native
web小洋
这个作者很懒,什么都没留下…
展开
-
React Native TextInput 收起键盘
问题描述:React Native 在iOS端使用TextInput弹起键盘时,收起不了解决方案:// 先引入KeyboardAvoidingView组件,需要ScrollView组件配合使用import { KeyboardAvoidingView, ScrollView, TextInput } from 'react-native';<KeyboardAvoidingView behavior="padding" style={{ flex: 1 }}>原创 2022-04-12 14:55:11 · 1280 阅读 · 0 评论 -
Ant Design Mobile RN 使用加载中......
import { Toast } from '@ant-design/react-native'; getData = () => { // 创建加载 this.key = Toast.loading('加载中...', 0, null, false); try { // 获取数据,等待加载中... ...... // 获取成功完成加载 Toast.remove(this.key); } catch (e.原创 2022-03-26 16:02:05 · 752 阅读 · 0 评论 -
ant-design/react-native 使用Picker组件点击无效
问题描述:ant-design/react-native 使用Picker组件点击无效解决方案:<Picker data={data} value={this.state.value} cols={1} onOk={(v) => this.ok(v)}> // 需要在这里添加内容 <IconComp color="#ffffff" size={25} name="ios-menu" /></Picker>...原创 2021-12-15 16:12:43 · 1675 阅读 · 1 评论 -
Task :rn-fetch-blob:compileDebugJavaWithJavac FAILED
问题描述:开发react native项目时,使用rn-fetch-blob插件报错:Task :rn-fetch-blob:compileDebugJavaWithJavac FAILED解决方案:1、npm install --save rn-fetch-blob2、react-native link rn-fetch-blob3、确保以下文件中都有这些字段1、 /android/settings.gradle...+ include ':rn-fetch-bl..原创 2021-10-25 16:05:57 · 2389 阅读 · 0 评论 -
React Native Android开发不同分辨率下占满屏幕
问题描述:开发中想要占满屏幕,但是无法兼容所有屏幕,在有些分辨率下可以,有些不行解决方案:1、在utils中创建screen.js文件2、在screen.js中编辑如下代码import { Dimensions } from 'react-native';const { width: _width, height: _height } = Dimensions.get('window');export const w = 1;export const h = 1;e...原创 2021-05-08 10:51:32 · 791 阅读 · 0 评论