随笔分类 - React-Native
摘要:github 官方地址: https://github.com/magicismight/react-native-root-toast 安装: npm install react-native-root-toast 详细使用参考文档
阅读全文
摘要:自定义的格式如代码中所示: require不能放在标签上 ListImage=()=>{ let ImageDate = [ { url: require('../../assets/temporaryAvatar/Ellipse.png') } ] return( <View> { Object.
阅读全文
摘要:github:https://github.com/react-native-svg/react-native-svg安装: yarn add react-native-svg@12.4.4 react-native-svg-uri 注意: 如果运行 yarn android 报错 Task :re
阅读全文
摘要:父组件,将this.props.navigation.navigate传入到子组件中 <CodeField push={this.props.navigation.navigate}></CodeField> 子组件,使用this.props.push('Home')来跳转 this.props.p
阅读全文
摘要:yarn add react-native-confirmation-code-field 文档地址: https://www.npmjs.com/package/react-native-confirmation-code-field import React, {Component} from
阅读全文
摘要:class类组件 父 <THButton clickPress={()=>alert(1)} style={{borderRadius: 20}}>获取验证码</THButton> btnSubimt=()=>{ alert(11) } 子 <TouchableOpacity onPress={th
阅读全文
摘要:默认情况下android是不支持gif和webp格式的,你需要在android/app/build.gradle 文件中根据需要手动添加以下模块
阅读全文
摘要:使用前先关闭debugger模式关闭谷歌,在打开调试工具,然后再打开debugger 1.使用谷歌浏览器来调试 不能查看标签结构 不能查看网络请求 2.使用rn推荐的工具react-native-debugger来调试 https://github.com/jhen0409/react-native
阅读全文
摘要:1、安装yarn add react-native-elements react-native-vector-icons 2、import {Icon} from ‘react-native-elements’ <Icon name=”roing” /> 注意: icon图标无法显示,需要配置 1)
阅读全文
摘要:放在index.js下AppRegistry.registerComponent(appName, () => App);之前 // 关闭黄色警告 console.ignoredYellowBox = ['Warning: BackAndroid is deprecated. Please use
阅读全文
摘要:官网地址: https://github.com/react-native-linear-gradient1.安装 yarn add react-native-linear-gradient 封装成简单的组件使用 使用 import THButton from '../../component/TH
阅读全文
摘要:在utils文件中新建styleKits.js import { Dimensions } from "react-native"; // 设计稿宽度 / 元素的宽度 = 手机屏幕 / 手机中的元素宽度 // =》 手机中的元素宽度 = 手机屏幕宽度 * 元素的宽度 / 设计稿的宽度 const s
阅读全文
摘要:新建一个request.js import axios from 'axios' import { BASE_URL } from './pathMap' const instance = axios.create({ baseURL: BASE_URL }) // 添加请求拦截器 instance
阅读全文

浙公网安备 33010602011771号