美文网首页
elementui的使用

elementui的使用

作者: Amy_yqh | 来源:发表于2018-07-12 10:47 被阅读0次

elementUI的使用

安装

cnpm install element-ui -S

引入

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'//css要单独引入

使用

Vue.use(ElementUI)

安装依赖

使用vue-cli创建的项目没有自带style-loader和file-loader,需要安装配置

cnpm install style-loader -D
cnpm install file-loader -D

在webpack.config.js文件中添加配置

      {
        test: /\.css$/,
        loader:'style-loader!css-loader'
      },
      {
        test: /\.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
        loader: 'file-loader'
      },  

相关文章

网友评论

      本文标题:elementui的使用

      本文链接:https://www.haomeiwen.com/subject/jywlbxtx.html