摘要:
父组件,将this.props.navigation.navigate传入到子组件中 <CodeField push={this.props.navigation.navigate}></CodeField> 子组件,使用this.props.push('Home')来跳转 this.props.p 阅读全文
posted @ 2022-08-29 22:26
龙卷风吹毁停车场
阅读(45)
评论(0)
推荐(0)
摘要:
yarn add react-native-confirmation-code-field 文档地址: https://www.npmjs.com/package/react-native-confirmation-code-field import React, {Component} from 阅读全文
posted @ 2022-08-29 21:20
龙卷风吹毁停车场
阅读(99)
评论(0)
推荐(0)
摘要:
class类组件 父 <THButton clickPress={()=>alert(1)} style={{borderRadius: 20}}>获取验证码</THButton> btnSubimt=()=>{ alert(11) } 子 <TouchableOpacity onPress={th 阅读全文
posted @ 2022-08-29 14:29
龙卷风吹毁停车场
阅读(154)
评论(0)
推荐(0)
摘要:
默认情况下android是不支持gif和webp格式的,你需要在android/app/build.gradle 文件中根据需要手动添加以下模块 阅读全文
posted @ 2022-08-29 14:22
龙卷风吹毁停车场
阅读(168)
评论(0)
推荐(0)
摘要:
使用前先关闭debugger模式关闭谷歌,在打开调试工具,然后再打开debugger 1.使用谷歌浏览器来调试 不能查看标签结构 不能查看网络请求 2.使用rn推荐的工具react-native-debugger来调试 https://github.com/jhen0409/react-native 阅读全文
posted @ 2022-08-29 14:20
龙卷风吹毁停车场
阅读(129)
评论(0)
推荐(0)
摘要:
1、安装yarn add react-native-elements react-native-vector-icons 2、import {Icon} from ‘react-native-elements’ <Icon name=”roing” /> 注意: icon图标无法显示,需要配置 1) 阅读全文
posted @ 2022-08-29 14:16
龙卷风吹毁停车场
阅读(60)
评论(0)
推荐(0)
摘要:
放在index.js下AppRegistry.registerComponent(appName, () => App);之前 // 关闭黄色警告 console.ignoredYellowBox = ['Warning: BackAndroid is deprecated. Please use 阅读全文
posted @ 2022-08-29 14:14
龙卷风吹毁停车场
阅读(60)
评论(0)
推荐(0)
摘要:
官网地址: https://github.com/react-native-linear-gradient1.安装 yarn add react-native-linear-gradient 封装成简单的组件使用 使用 import THButton from '../../component/TH 阅读全文
posted @ 2022-08-29 14:13
龙卷风吹毁停车场
阅读(69)
评论(0)
推荐(0)
摘要:
在utils文件中新建styleKits.js import { Dimensions } from "react-native"; // 设计稿宽度 / 元素的宽度 = 手机屏幕 / 手机中的元素宽度 // =》 手机中的元素宽度 = 手机屏幕宽度 * 元素的宽度 / 设计稿的宽度 const s 阅读全文
posted @ 2022-08-29 14:00
龙卷风吹毁停车场
阅读(122)
评论(0)
推荐(0)
摘要:
新建一个request.js import axios from 'axios' import { BASE_URL } from './pathMap' const instance = axios.create({ baseURL: BASE_URL }) // 添加请求拦截器 instance 阅读全文
posted @ 2022-08-29 10:57
龙卷风吹毁停车场
阅读(504)
评论(0)
推荐(0)

浙公网安备 33010602011771号