在electron-vue项目中使用element-ui

1.安装element-ui

npm install element-ui -S

2.在main.js中

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

注意index.css的路径不要出错:

在node_modules文件夹里

node_modules\element-ui\lib\theme-chalk

其中,可以在package.json中查看版本号,以验证是否安装成功

  "dependencies": {
    "element-ui": "^2.6.3",
  },

3.在组件中使用element-ui代码

扫描二维码关注公众号,回复: 5615585 查看本文章

猜你喜欢

转载自www.cnblogs.com/wuhefeng/p/10576128.html