摘要: 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 帅气的骑士 阅读(3624) 评论(0) 推荐(0) 编辑
摘要: import { createStore, compose, combineReducers, applyMiddleware } from 'redux' import promise from 'redux-promise' import thunk from 'redux-thunk' imp 阅读全文
posted @ 2020-05-13 07:01 帅气的骑士 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 第一步 actions文件: // export function getName (options) { // return { // type: "DATA", // payload: options // } // } 第二步 reducer文件: // const defaultState  阅读全文
posted @ 2020-05-13 06:54 帅气的骑士 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 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 帅气的骑士 阅读(1397) 评论(0) 推荐(0) 编辑
摘要: 第一步 : 首先我们必须引用Swiper官网的样式 否则布局就会很乱 第二步 : 网址 https://www.swiper.com.cn/demo/index.html 第三步 : 样式的引入可以在官网后台的Network里面的CSS查看 阅读全文
posted @ 2020-04-24 23:14 帅气的骑士 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 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 帅气的骑士 阅读(1570) 评论(0) 推荐(0) 编辑
摘要: 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 帅气的骑士 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 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 帅气的骑士 阅读(2533) 评论(0) 推荐(0) 编辑
摘要: 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 帅气的骑士 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 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 帅气的骑士 阅读(5512) 评论(0) 推荐(0) 编辑