摘要:
Chrome设置跨域访问方式--disable-web-security不生效原因,以及出现--disable-web-security,但是实际上浏览器不能跨域访问的原因: 1、设置跨域,在chrome快捷方式右键‘属性’,‘快捷方式’,‘目标’ 路径最后边按一下空格,再添加以下代码: --arg 阅读全文
摘要:
React脚手架create-react-app不支持less,因此需要配置webpack的webpack.config.js文件。 在使用React脚手架的时候,可能发现是没有webpack.config.js文件的。运行npm run eject,会多出两个目录config和scripts,此时 阅读全文
摘要:
package.json: { "name": "antd-demo", "version": "0.1.0", "private": true, "dependencies": { "@ant-design/icons": "^4.2.1", "@babel/core": "7.9.0", "@s 阅读全文
摘要:
package.json: { "name": "antd-demo", "version": "0.1.0", "private": true, "dependencies": { "@ant-design/icons": "^4.2.1", "@babel/core": "7.9.0", "@s 阅读全文
摘要:
一、通过import方式(适用于插入静态图片): import React from 'react' import logo from './asset/logo.jpg' export default class Login extends React.Component { render() { 阅读全文
摘要:
import React from 'react'; import { Modal, Form, Input, Button, InputNumber, Select, Checkbox, Radio } from 'antd'; const { Option } = Select; const { 阅读全文
摘要:
React或Vue有时需要将打包好的项目跑一下看下效果,但又不能直接打开,这时可以简单使用serve工具,步骤如下: 首先安装serve: npm i serve -g 接下来在cmd中打开打包好的文件所在目录(一般是build文件夹),然后执行 serve 即可 阅读全文
摘要:
import React from 'react' import { Row, Col, Space, Table, Button, notification, Pagination } from 'antd'; import axios from 'axios' export default cl 阅读全文
摘要:
import React from 'react' import { Form, Input, Button, Select } from 'antd'; const { Option } = Select; const { TextArea } = Input; const layout = { 阅读全文
摘要:
全局设置 初始化的时候直接添加: let uploader = new WebUploader.Uploader({ ... formData: { filesize: 1024000 } ... }); 初始化以后添加: uploader.options.formData.filesize = 1 阅读全文