类型 推荐组件 构建工具 expo 导航 @react-navigation/native 安全区域 react-native-safe-area-context 图标 @expo/vector-icons 抽屉 react-native-drawer-layout Tab选项 react-native-tab-view 手势 react-native-gesture-handler 动画 react-native-reanimated 页面滑动 react-native-pager-view 轮播 react-native-reanim...

import{useState,useRef}from'react' import{FlatList,View,Text,StyleSheet,TouchableOpacity}from'react-native' constCenter=()=>{ consttabs=["语文","数学","英语","政治","历史","地理"] const[active,setActive]=useState(0) constflatRef=useRef() constactiveTab=(index)=>{ setActive(index) flatRef.current.scro...

方案:通过轮询对比script的hash信息,不一致就触发更新操作新建utils/updateApp.js文件 import{ElMessageBox}from'element-plus' constgetHtml=async()=>{ returnawaitfetch('/').then(res=>res.text())//读取indexhtml } constparserScript=(html)=>{ constreg=newRegExp(/<script(?:\s+[^>])?>(.?)<\/script\s>/ig) retur...

  BfoZSuyqyafA   2023年11月02日   39   0   0 html前端前端html

处理重复请求:没有响应完成的请求,再去请求一个相同的请求,会把之前的请求取消掉 新增一个cancelRequest.js文件 importaxiosfrom"axios" constcancelTokens={} exportconstaddPending=(config)=>{ constrequestKey=getRequestKey(config) if(cancelTokens[requestKey]){ cancelTokens[requestKey].cancel('cancelrequest') } constsource=axios.CancelToken.so...

  BfoZSuyqyafA   2023年11月02日   34   0   0 开发语言iosJSONjavascript前端
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~