【React】 npm 常用的插件
npm install –save-dev package.json 安装环境
https://segmentfault.com/a/1190000008489881 全局
https://www.cnblogs.com/sese/p/10119511.html 安装package.json 依赖包
www.npmjs.com/ npm 官网
"devDependencies": {
"antd": "^3.19.1", //antd组件
import { Card, Button, Table, Form, Select,Modal, message } from 'antd';
const FormItem = Form.Item; const Option = Select.Option;
"axios": "^0.18.0", //异步
import axios from 'axios';
"draftjs-to-html": "^0.8.4", 富文本编辑器 转为 html:<p>富文本标签</p>
// 设置 成为 html标签 import draftjs from 'draftjs-to-html';
"react-draft-wysiwyg": "^1.13.2", 富文本插件
import { EditorState } from 'draft-js'; // 富文本的 内容数据值
"echarts": "^4.2.1", 图表
import echartTheme from './../echartTheme'; import echarts from 'echarts/lib/echarts'; // 导入柱状图 import 'echarts/lib/chart/bar'; 柱形 bar 折线 line k线 lines import 'echarts/lib/component/tooltip'; import 'echarts/lib/component/title'; import 'echarts/lib/component/legend'; import 'echarts/lib/component/markPoint'; import ReactEcharts from 'echarts-for-react'; |
"echarts-for-react": "^2.0.15-beta.0", react 中的图表 配合 echarts
"less-loader": "^5.0.0", less 也没用它
"react-router-dom": "^5.0.0", react 路由
import { HashRouter as Router,Route,Link} from 'react-router-dom';
"redux": "^4.0.1", 共享数据
"styled-components": "^4.2.0" 我喜欢的 自主封装 标签 支持 less 语法格式
import styled from 'styled-components';
}
多媒体查询 机制 设置响应式PC + 移动
react-responsive https://www.npmjs.com/package/react-responsive