上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页
摘要: Chrome设置跨域访问方式--disable-web-security不生效原因,以及出现--disable-web-security,但是实际上浏览器不能跨域访问的原因: 1、设置跨域,在chrome快捷方式右键‘属性’,‘快捷方式’,‘目标’ 路径最后边按一下空格,再添加以下代码: --arg 阅读全文
posted @ 2020-08-30 20:23 Samve 阅读(2290) 评论(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 阅读(2444) 评论(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 阅读(250) 评论(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 阅读(1223) 评论(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 阅读(3970) 评论(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 阅读(765) 评论(0) 推荐(0) 编辑
摘要: React或Vue有时需要将打包好的项目跑一下看下效果,但又不能直接打开,这时可以简单使用serve工具,步骤如下: 首先安装serve: npm i serve -g 接下来在cmd中打开打包好的文件所在目录(一般是build文件夹),然后执行 serve 即可 阅读全文
posted @ 2020-08-09 22:13 Samve 阅读(5370) 评论(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 阅读(2934) 评论(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 阅读(977) 评论(0) 推荐(0) 编辑
摘要: 全局设置 初始化的时候直接添加: let uploader = new WebUploader.Uploader({ ... formData: { filesize: 1024000 } ... }); 初始化以后添加: uploader.options.formData.filesize = 1 阅读全文
posted @ 2020-08-05 21:35 Samve 阅读(1631) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页