随笔- 41  文章- 0  评论- 2  阅读- 15450 

随笔分类 -  react

react 微信h5跳转小程序
摘要:componentDidMount() { this.getWxConfig() } getWxConfig () { // 请求后台接口拿到 data信息 wx.config({ debug: false, appId: data.appId, // 必填,公众号的唯一标识 timestamp: 阅读全文
posted @ 2021-10-09 09:34 Yseraaa 阅读(654) 评论(0) 推荐(0) 编辑
react 项目搭建 3 - 路由配置
摘要:1. 这里使用react-router-config配置静态路由 npm install react-router-dom--save npm install react-router-config --save "react-router-config": "^5.1.1", "react-rou 阅读全文
posted @ 2021-09-28 14:16 Yseraaa 阅读(682) 评论(0) 推荐(0) 编辑
react 项目搭建 4 - 配置mobx状态管理
摘要:1. 安装 mobx mobx-react npm install mobx mobx-react --save "mobx": "^6.3.3", "mobx-react": "^7.2.0" 2. 安装 @babel/plugin-proposal-decorators 装饰器 npm inst 阅读全文
posted @ 2021-09-28 13:59 Yseraaa 阅读(119) 评论(0) 推荐(0) 编辑
react 项目搭建 2 -全局配置scss
摘要:在不使用npm run eject暴露配置的情况下 1. 安装 node-sass sass-resources-loader npm install node-sass sass-resources-loader --save "node-sass": "^6.0.1", "sass-resour 阅读全文
posted @ 2021-09-28 13:46 Yseraaa 阅读(339) 评论(0) 推荐(0) 编辑
记录ios 微信浏览器获取音频时长
摘要:// 判断是否是微信浏览器 function is_wxBrowser() { return /micromessenger/.test(navigator.userAgent.toLowerCase()); } // 判断是否是ios系统 function is_iOS () { return / 阅读全文
posted @ 2021-07-23 10:19 Yseraaa 阅读(369) 评论(0) 推荐(0) 编辑
react-router-dom
摘要:1. 安装 npm install react-router-dom --save --dev 2. 新建 router.js import React from 'react'; import {BrowserRouter as Router, Route, Switch} from 'react 阅读全文
posted @ 2020-12-16 11:55 Yseraaa 阅读(73) 评论(0) 推荐(0) 编辑
react base(一)
摘要:1. 插值表达式: {} 是一对单大括号 2. 和html的属性差异: class => className defaultValue => value checked => defaultCheckedinnerHTML => dangerouslySetInnerHTMLfor => htmlF 阅读全文
posted @ 2020-12-11 15:04 Yseraaa 编辑
react 项目搭建 1 - 脚手架初始化
摘要:1.首先安装好Node.js 2.安装最新版react npx create-react-app my-app cd my-app npm run start 3.打开浏览器 http://localhost:3000 4.版本: 阅读全文
posted @ 2020-12-10 14:34 Yseraaa 阅读(65) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示