1、引入ElementUI
npm i element-ui -S
上面的命令等同于
npm install element-ui --save
2、注册到vue中
代码:
// elementUI 导入
import ElementUI from 'element-ui';
// 调用插件
Vue.use(ElementUI);
vue中的index.html入口文件中引入elementUI组件的css库,代码:
<head>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<head/>
posted on
浙公网安备 33010602011771号