vue项目常用依赖安装②——element-ui

一、介绍

Element-Ul是饿了么前端团队推出的一款基于Vue.js 2.0 的桌面端UI框架,中文官方地址如下:Element-Ul官网

二、安装
npm install element-ui -S
三、配置

1. 在main.js文件中 引入 element 组件 :

// 程序入口:环境依赖,插件
import Vue from 'vue'
// 引入根组件
import App from './App'
// 引入路由配置
import router from './router'
// 关闭生产模式下给出的提示
Vue.config.productionTip = false
//引入ElementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
// 定义实例
new Vue({
  el: '#app',
  router,// 注入框架中
  components: { App },
  template: '<App/>'
})

2. 在静态文件下static文件夹创建css文件夹下的一个全局公用common.css :

在这里插入图片描述
3. 全局公用common.css 代码如下(按自己需求来写css) :

@charset"utf-8";
 body {
    margin: 0 auto;
    background: #fbfbfb;
    font-family:"Microsoft YaHei", "Arial";
    font-size: 13px;
    color: #383838;
    position: relative;
}
html {
    padding: 0;
    height: 0;
    overflow-y: scroll;
}
ul, ol, dl, dd, h1, h2, h3, h4, h5, h6, p, input, button {
    margin: 0;
    padding: 0;
}
ul, ol {
    list-style: none;
}
img {
    border: none;
}
.lf {
    float: left;
}
.rt {
    float: right;
}
input, button, textarea {
    outline: none;
    font-family:"Microsoft YaHei";
}
a {
    color: #383838;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
em {
    font-style: normal;
}
.link {
    display: block;
    width: 100%;
}
input, button, textarea, select, optgroup, option {
    font-family: inherit;
    font-size: 100%;
    font-style: inherit;
    font-weight: inherit;
}
ul, li, dl, dt, dd, ol {
    display: block;
    list-style: none;
}
img {
    border: 0;
}
.clear {
    clear: both;
    height: 0;
}
.clear-fix:after, .clearfix:after {
    content:".";
    display: block;
    height: 0;
    font-size: 0;
    clear: both;
    visibility: hidden;
}
a {
    text-decoration: none;
    outline: 0;
}
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

你说的誓言°变失言

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值