![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
五.react
react
Guan ri
翻身
展开
-
企业人事-react
https://www.html.cn/create-react-app/docs/getting-started/1.安装:npx create-react-app my-app2.显示webpack npm run eject3.路由:https://reactrouter.com/web/examplenpm i react-router-dom --save-devimport React from "react";import { BrowserRout...原创 2020-11-06 15:23:14 · 263 阅读 · 0 评论 -
css实现箭头图标 伪类 图标
使用伪类伪类一定要相对定位 ,设置 content:"",把border-left改为透明 和border-right改为透明把border-left改为透明left top right都为实心.则是一个方长方形...原创 2019-11-18 16:52:25 · 724 阅读 · 0 评论 -
react后台数据渲染(封装) loading 处理
//初始化数据componentDidMount(){this.request();}//调接口request=()=>{axios.get("https://www.easy-mock.com/mock/5d98c57b8c63954ea11dd31e/table").then((res)=>{console.l...原创 2019-10-07 00:12:32 · 952 阅读 · 0 评论 -
天气api -跨域axios-jsonp -Promise封装
1.天气apihttp://api.map.baidu.com/telematics/v3/weather?location=查询地区 &output=输出格式 &ak=开发者密钥url:'http://api.map.baidu.com/telematics/v3/weather?location='+encodeURIComponent(city)+'&out...原创 2019-10-01 14:48:35 · 440 阅读 · 0 评论 -
react1.安装 打包发布 生命周期
安装官网:https://reacttraining.com/react-router/web/guides/quick-start1.特点1.声明式编码(复用)vue/react 在data中声明数据 通过control渲染视图层2.组件化编码()3.高效的dom diff开发 创建虚拟dom 最小页面重绘4.单向数据流生态兄弟组件数据通信是通...原创 2019-09-08 21:32:09 · 306 阅读 · 0 评论 -
react-2 路由
在react 的app.js中在router.js页面嵌套路由1.通过hash<aclass="item"href="#page2"data-target="#info">page2</a><aclass="item"href="#page3"data-target="#detail">...原创 2019-09-17 21:55:44 · 142 阅读 · 0 评论 -
react 的bug
1.'React' must be in scope when using JSX react/react-in-jsx-scope问题importreactfrom 'react' 改成importReactfrom 'react' 小写react 改成React2.Error: Cannot find module 'resolve' at Fu...原创 2019-09-19 22:33:15 · 262 阅读 · 0 评论 -
react2-组件 & Props 显示与隐藏 阻止组件渲染
https://www.runoob.com/react/react-component-api.html概览 React 的组件可以定义为 class 或函数的形式用法如需定义 class 组件,需要继承React.Component:在React.Component的子类中有个必须定义的render()函数class Welcome extends Rea...原创 2019-09-28 01:06:12 · 386 阅读 · 0 评论 -
react3-this
thisjaijai(){this.setState({count:this.state.count+=1})}jianjian=()=>{this.setState({count:this.state.count-=1})...原创 2019-09-29 16:19:17 · 90 阅读 · 0 评论 -
react4-webpack中 脚手架 less antd 按需加载 Router 安装配置 暴露webpack配置文件 calc计算属性
1.安装脚手架npm install -g create-react-appcreate-react-app my-appcd my-appnpm start2.安装所需的插件yarn add react-router-dom axios less-loader less3.安装AntDyarn add antd4.安装babel-plugin-impor...原创 2019-09-29 16:34:53 · 523 阅读 · 0 评论 -
react5-共享单车结构
src目录下新建resource文件resource子目录assets菜单文件menuconfi.jsconstmenuList=[{title:'首页',key:'/home'},{title:'UI',key:'/ui',children:...原创 2019-09-30 15:53:41 · 327 阅读 · 0 评论