react配置 less antd
发布时间:2020-12-15 09:33:39 所属栏目:百科 来源:网络整理
导读:react配置 less antd 一、react脚手架安装 全局安装 npm install -g create-react-app 创建react app create-react-app 项目名称 二、安装 yarn npm install -g yarn yarn使用: yarn init yarn add yarn remove yarn install react生命周期 getDefaultProps
react配置 less antd一、react脚手架安装
npm install -g create-react-app
create-react-app 项目名称 二、安装 yarnnpm install -g yarn yarn使用:
react生命周期 getDefaultProps getInitialState componentWillMount render componentDidMount componentReceiveProps shouldComponentUpdate componentWilUpdate componentDidUpdate componentWilUnmount 三、安装所需插件
yarn add react-router-dom axios less less-loader
四、安装antdyarn add antd 安装babel插件yarn add babel-plugin-import --dev 按需加载antd组件,快速定位: 查找limit或10000,在下面的options对象添加 plugins:[ ['import',[{libraryName:'antd',style:true}]] ],//因为要修改源码样式,这里的style配置为true webpack.config.prod.js修改 可能会报错
yarn add [email?protected]^2.7.3 yarn add moment --save 安装jsonpyarn add jsonp --save 遇到的坑
data.map((item,index)=>{ item.key=index }) 申请百度地图keyhttp://lbsyun.baidu.com/ 地图实现步骤
项目工程化(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |