会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
帅气的骑士
博客园
首页
新随笔
联系
订阅
管理
2020年5月18日
react里面的upload上传及上传格式操作
摘要: import React from 'react' import { Form, Button, Upload, Icon, message, } from 'antd' export default @Form.create({ onValuesChange(_, values) { consol
阅读全文
posted @ 2020-05-18 20:42 帅气的骑士
阅读(3752)
评论(0)
推荐(0)
2020年5月13日
项目store文件
摘要: import { createStore, compose, combineReducers, applyMiddleware } from 'redux' import promise from 'redux-promise' import thunk from 'redux-thunk' imp
阅读全文
posted @ 2020-05-13 07:01 帅气的骑士
阅读(215)
评论(0)
推荐(0)
React里面的redux的简单使用
摘要: 第一步 actions文件: // export function getName (options) { // return { // type: "DATA", // payload: options // } // } 第二步 reducer文件: // const defaultState
阅读全文
posted @ 2020-05-13 06:54 帅气的骑士
阅读(169)
评论(0)
推荐(0)
2020年4月30日
React 数据持久化
摘要: 1. 安装 npm i redux-persist 2. 引入 import { persistStore } from 'redux-persist' import { PersistGate } from 'redux-persist/lib/integration/react' 3. Reac
阅读全文
posted @ 2020-04-30 09:46 帅气的骑士
阅读(1425)
评论(0)
推荐(0)
2020年4月24日
在react项目中使用Swiper模板
摘要: 第一步 : 首先我们必须引用Swiper官网的样式 否则布局就会很乱 第二步 : 网址 https://www.swiper.com.cn/demo/index.html 第三步 : 样式的引入可以在官网后台的Network里面的CSS查看
阅读全文
posted @ 2020-04-24 23:14 帅气的骑士
阅读(446)
评论(0)
推荐(0)
2020年1月8日
Redux的简单实例使用
摘要: 1.首先命令安装 npm install redux react-redux --save 2.在项目中找到index.js 插入代码 1 import React from 'react'; 2 import ReactDOM from 'react-dom'; 3 import App from
阅读全文
posted @ 2020-01-08 20:20 帅气的骑士
阅读(1595)
评论(0)
推荐(0)
2019年12月30日
类似vue的函数插槽
摘要: 1 <script type="text/babel"> 2 3 function Son(props){ 4 return ( 5 <div> 6 { 7 props.children 8 } 9 </div> 10 ) 11 } 12 function Abox(){ 13 return ( 1
阅读全文
posted @ 2019-12-30 11:35 帅气的骑士
阅读(148)
评论(0)
推荐(0)
React的slot插槽
摘要: 1 <script type="text/babel"> 2 class Abox extends React.Component{ 3 constructor(props) { 4 super(props); 5 6 } 7 render() { 8 return ( 9 <div classNa
阅读全文
posted @ 2019-12-30 11:29 帅气的骑士
阅读(2553)
评论(0)
推荐(0)
2019年12月29日
React组件传值(子传父)
摘要: 1 <script type="text/babel"> 2 //父亲 3 class Abox extends React.Component{ 4 constructor(props) { 5 super(props); 6 this.state = { 7 arr: [{ 8 "userNam
阅读全文
posted @ 2019-12-29 19:59 帅气的骑士
阅读(256)
评论(0)
推荐(0)
React里面的componentDidMount()钩子函数用法
摘要: 1 <body> 2 <div id="root"> 3 4 </div> 5 <script type="text/babel"> 6 class Box extends React.Component { 7 constructor(props) { 8 super(props) 9 this.
阅读全文
posted @ 2019-12-29 19:00 帅气的骑士
阅读(5535)
评论(0)
推荐(0)
下一页
公告