标签:tran prim bre font loading reac white nim 使用
npm i element-react --save npm install element-theme-default --save #主题
使用
import React from ‘react‘; import ReactDOM from ‘react-dom‘; import { Button } from ‘element-react‘; import ‘element-theme-default‘; ReactDOM.render(<Button type="primary">Hello</Button>, document.getElementById(‘app‘));
安装过程中报错
Compiling... Failed to compile. ./node_modules/element-react/dist/npm/es5/libs/animate/transition.js Module not found: Can‘t resolve ‘react-hot-loader‘ in ‘E:\selfweb\git_dev\react\my-app2\node_modules\element-react\dist\npm\es5\libs\animate‘
解决办法:
npm install react-hot-loader@next
element-react
标签:tran prim bre font loading reac white nim 使用
原文地址:https://www.cnblogs.com/dafei4/p/14407685.html