08 2020 档案

摘要:Chrome设置跨域访问方式--disable-web-security不生效原因,以及出现--disable-web-security,但是实际上浏览器不能跨域访问的原因: 1、设置跨域,在chrome快捷方式右键‘属性’,‘快捷方式’,‘目标’ 路径最后边按一下空格,再添加以下代码: --arg 阅读全文
posted @ 2020-08-30 20:23 Samve 阅读(2694) 评论(0) 推荐(1) 编辑
摘要:React脚手架create-react-app不支持less,因此需要配置webpack的webpack.config.js文件。 在使用React脚手架的时候,可能发现是没有webpack.config.js文件的。运行npm run eject,会多出两个目录config和scripts,此时 阅读全文
posted @ 2020-08-25 21:44 Samve 阅读(2456) 评论(0) 推荐(1) 编辑
摘要:package.json: { "name": "antd-demo", "version": "0.1.0", "private": true, "dependencies": { "@ant-design/icons": "^4.2.1", "@babel/core": "7.9.0", "@s 阅读全文
posted @ 2020-08-20 21:22 Samve 阅读(259) 评论(0) 推荐(0) 编辑
摘要:package.json: { "name": "antd-demo", "version": "0.1.0", "private": true, "dependencies": { "@ant-design/icons": "^4.2.1", "@babel/core": "7.9.0", "@s 阅读全文
posted @ 2020-08-20 21:21 Samve 阅读(1287) 评论(0) 推荐(0) 编辑
摘要:一、通过import方式(适用于插入静态图片): import React from 'react' import logo from './asset/logo.jpg' export default class Login extends React.Component { render() { 阅读全文
posted @ 2020-08-16 22:37 Samve 阅读(4046) 评论(0) 推荐(0) 编辑
摘要:import React from 'react'; import { Modal, Form, Input, Button, InputNumber, Select, Checkbox, Radio } from 'antd'; const { Option } = Select; const { 阅读全文
posted @ 2020-08-12 21:34 Samve 阅读(795) 评论(0) 推荐(0) 编辑
摘要:React或Vue有时需要将打包好的项目跑一下看下效果,但又不能直接打开,这时可以简单使用serve工具,步骤如下: 首先安装serve: npm i serve -g 接下来在cmd中打开打包好的文件所在目录(一般是build文件夹),然后执行 serve 即可 阅读全文
posted @ 2020-08-09 22:13 Samve 阅读(5483) 评论(0) 推荐(1) 编辑
摘要:import React from 'react' import { Row, Col, Space, Table, Button, notification, Pagination } from 'antd'; import axios from 'axios' export default cl 阅读全文
posted @ 2020-08-07 21:22 Samve 阅读(3094) 评论(0) 推荐(0) 编辑
摘要:import React from 'react' import { Form, Input, Button, Select } from 'antd'; const { Option } = Select; const { TextArea } = Input; const layout = { 阅读全文
posted @ 2020-08-07 21:19 Samve 阅读(988) 评论(0) 推荐(0) 编辑
摘要:全局设置 初始化的时候直接添加: let uploader = new WebUploader.Uploader({ ... formData: { filesize: 1024000 } ... }); 初始化以后添加: uploader.options.formData.filesize = 1 阅读全文
posted @ 2020-08-05 21:35 Samve 阅读(1677) 评论(0) 推荐(0) 编辑
摘要:一、什么是redux: Redux 是 JavaScript 状态容器,提供可预测化的状态管理。可以让你构建一致化的应用,运行于不同的环境(客户端、服务器、原生应用),并且易于测试。Redux 除了和 React 一起用外,还支持其它界面库。 它体小精悍(只有2kB,包括依赖)。 二、安装与引入: 阅读全文
posted @ 2020-08-04 21:24 Samve 阅读(194) 评论(0) 推荐(0) 编辑

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