08 2023 档案
摘要:180秒倒计时 const [count, setCount] = useState(0) setCount(180) useEffect(() => { clearTimeout(timer) timer = setTimeout(() => { if (count > 1) { setCount
阅读全文
摘要:import React from 'react' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { getRouter } from './config' import { Er
阅读全文
摘要:yarn add react-native-vdebug import React from 'react' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { getRouter
阅读全文
摘要:参考链接: https://chat.xutongbao.top/
阅读全文
摘要:https://expo.dev/accounts/xutongbao/projects npm install --global eas-cli && \eas init --id e32cf2c0-da5b-4a65-814a-4958d58f0ca7 eas init --id e32cf2c
阅读全文
摘要:import React from 'react' import ReactDOM from 'react-dom/client' import { Provider } from 'react-redux' import { HashRouter } from 'react-router-dom'
阅读全文
摘要:chatgpt: https://chat.xutongbao.top/ /* 监听rn消息 */ const eventListener = nativeEvent => { //解析数据actionType、extra const {actionType, extra} = nativeEven
阅读全文
摘要:rn登录后得到的token需要传递给网页,js获取到的浏览器信息需要传递给rn RN Index.js: import React from 'react' import { WebView } from 'react-native-webview' import useList from './u
阅读全文
摘要:const handleWechatQRCodeHeight = () => { const { wechatQRCode } = getAdminInfo() Image.getSize(wechatQRCode, (width, height) => { let wechatQRCodeHeig
阅读全文
摘要:import { StyleSheet } from 'react-native' const styles = StyleSheet.create({ mExchangeCopyText: {fontWeight: 'bold', color: '#1677ff', textDecorationL
阅读全文
摘要:装包: npx expo install expo-clipboard import * as Clipboard from 'expo-clipboard' const handleCopy = async (text) => { await Clipboard.setStringAsync(te
阅读全文
摘要:装包: yarn add native-base expo install react-native-svg@12.1.1 Index.js: import React from 'react' import { View, Text } from 'react-native' import use
阅读全文
摘要:router/config.js: import Login from '../views/light/login/Login' import Register from '../views/light/register/Index' import ForgetPassword from '../v
阅读全文
摘要:装包: yarn add @react-navigation/material-top-tabs react-native-tab-view npx expo install react-native-pager-view import React from 'react' import { Vie
阅读全文
摘要:--disable-web-security --user-data-dir=C:\MyChromeDevUserData "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --u
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Docum
阅读全文
摘要:Index.js: import React from 'react' import { View, Text, ScrollView, Image, Modal, TouchableWithoutFeedback, } from 'react-native' import useList from
阅读全文
摘要:import { Dimensions } from 'react-native' console.log('Dimensions', Dimensions.get('window')) 参考链接: https://www.reactnative.cn/docs/next/dimensions#%E
阅读全文
摘要:mMeArrowIcon: {fontSize: 30, color: '#999', transform: [{rotate: '180deg'}]}, <Icon name="arrow" style={styles.mMeArrowIcon}></Icon> 参考链接: https://rea
阅读全文
摘要:<Text style={styles.mMeNickname} ellipsizeMode="tail" numberOfLines={1} > {userInfo.nickname} </Text> 参考链接: https://www.reactnative.cn/docs/text#ellip
阅读全文