当前位置: 首页 > wzjs >正文

江门网站快速排名51自学网官网入口

江门网站快速排名,51自学网官网入口,网站建设需要懂什么,零基础网页设计培训机构1. 安装ElementUI ElementUI是基于 Vue 2.0 的桌面端组件库。使用之前,需要在项目文件夹中安装ElementUI,在终端中输入以下命令,进行安装。 npm i element-ui -S并在main.js中引入ElementUI 2. 使用elmentUI组件进行页面布局 2.1 清空原…

1. 安装ElementUI

ElementUI是基于 Vue 2.0 的桌面端组件库。使用之前,需要在项目文件夹中安装ElementUI,在终端中输入以下命令,进行安装。

npm i element-ui -S

并在main.js中引入ElementUI
在这里插入图片描述

2. 使用elmentUI组件进行页面布局

2.1 清空原有页面样式

App.vue

<template><div id="app"><router-view/></div>
</template>

HomeView.vue

<template><div class="home"></div>
</template>
<script>export default {name: 'HomeView',}
</script>

Aboutview.vue

<template><div class="about"></div>
</template>

2.2 拷贝elmentUI布局样式到App.vue

在 ElementUI上找到下面的实例以及对应的代码。
在这里插入图片描述

<el-container style="height: 500px; border: 1px solid #eee"><el-aside width="200px" style="background-color: rgb(238, 241, 246)"><el-menu :default-openeds="['1', '3']"><el-submenu index="1"><template slot="title"><i class="el-icon-message"></i>导航一</template><el-menu-item-group><template slot="title">分组一</template><el-menu-item index="1-1">选项1</el-menu-item><el-menu-item index="1-2">选项2</el-menu-item></el-menu-item-group><el-menu-item-group title="分组2"><el-menu-item index="1-3">选项3</el-menu-item></el-menu-item-group><el-submenu index="1-4"><template slot="title">选项4</template><el-menu-item index="1-4-1">选项4-1</el-menu-item></el-submenu></el-submenu><el-submenu index="2"><template slot="title"><i class="el-icon-menu"></i>导航二</template><el-menu-item-group><template slot="title">分组一</template><el-menu-item index="2-1">选项1</el-menu-item><el-menu-item index="2-2">选项2</el-menu-item></el-menu-item-group><el-menu-item-group title="分组2"><el-menu-item index="2-3">选项3</el-menu-item></el-menu-item-group><el-submenu index="2-4"><template slot="title">选项4</template><el-menu-item index="2-4-1">选项4-1</el-menu-item></el-submenu></el-submenu><el-submenu index="3"><template slot="title"><i class="el-icon-setting"></i>导航三</template><el-menu-item-group><template slot="title">分组一</template><el-menu-item index="3-1">选项1</el-menu-item><el-menu-item index="3-2">选项2</el-menu-item></el-menu-item-group><el-menu-item-group title="分组2"><el-menu-item index="3-3">选项3</el-menu-item></el-menu-item-group><el-submenu index="3-4"><template slot="title">选项4</template><el-menu-item index="3-4-1">选项4-1</el-menu-item></el-submenu></el-submenu></el-menu></el-aside><el-container><el-header style="text-align: right; font-size: 12px"><el-dropdown><i class="el-icon-setting" style="margin-right: 15px"></i><el-dropdown-menu slot="dropdown"><el-dropdown-item>查看</el-dropdown-item><el-dropdown-item>新增</el-dropdown-item><el-dropdown-item>删除</el-dropdown-item></el-dropdown-menu></el-dropdown><span>王小虎</span></el-header><el-main><el-table :data="tableData"><el-table-column prop="date" label="日期" width="140"></el-table-column><el-table-column prop="name" label="姓名" width="120"></el-table-column><el-table-column prop="address" label="地址"></el-table-column></el-table></el-main></el-container>
</el-container><style>.el-header {background-color: #B3C0D1;color: #333;line-height: 60px;}.el-aside {color: #333;}
</style><script>export default {data() {const item = {date: '2016-05-02',name: '王小虎',address: '上海市普陀区金沙江路 1518 弄'};return {tableData: Array(20).fill(item)}}};
</script>

**注意:**把代码放在的上面。
在这里插入图片描述

运行样式效果如下:
在这里插入图片描述

2.3 创建全局样式文件并引入

2.3.1 创建global.css文件

上面的样式与浏览器有间隙,需要创建一个global.css用于写全局样式。截图如下:
在这里插入图片描述
global.css代码如下:

body {/*设置距离屏幕的边距*/margin: 0;padding: 0;/*    隐藏溢出 清除浮动*/overflow: hidden;
}
/*把所有的元素变成盒状模型:应用“box-sizing: border-box;”样式后,盒子border和padding的参数值是被包含在width和height之内的。*/
* {/*外边距不会额外占用1px的像素*/box-sizing: border-box;}

2.3.2 在main.js中引入这个css文件

在这里插入图片描述

import '@/assets/global.css'

在这里插入图片描述

2.3.3 调试侧边栏、头部、表格组件样式

(1)去掉默认展开第1和第3个菜单栏的样式(蓝色选中)
在这里插入图片描述
(2)左侧侧边栏向下拉满
添加红框内的代码
在这里插入图片描述
(3)去布局组件的边框
删除蓝色选中的代码,使上下左右都完全贴屏。
在这里插入图片描述
(4)创建一个manager.css文件
用于写页面样式,同样main.js中引入这个css文件。
在这里插入图片描述

2.3.4 更换侧边栏图标(可选)

在ElementUI icon中找到喜欢的图标
在这里插入图片描述
复制图标类名 更换下图红色框框的值
在这里插入图片描述

最终样式:
在这里插入图片描述
最终代码:
App.vue

<template><div><el-container style="height: 500px;"><!--      侧边栏--><el-aside  class="m-aside"><!--        logo和系统名称--><div class="m-sysName" ><img src="@/assets/logo.png" alt="" width="10%"><span class="m-nameText">xxx系统</span></div><!--        侧边菜单栏--><el-menu class="el-menu" ><el-submenu index="1"><template slot="title"><i class="el-icon-user"></i>用户管理</template><el-menu-item index="1-1">选项1</el-menu-item><el-menu-item index="1-2">选项2</el-menu-item></el-submenu><el-submenu index="2"><template slot="title"><i class="el-icon-news"></i>信息管理</template><el-menu-item index="2-1">选项1</el-menu-item><el-menu-item index="2-2">选项2</el-menu-item></el-submenu><el-submenu index="3"><template slot="title"><i class="el-icon-set-up"></i>系统设置</template><el-menu-item index="3-1">选项1</el-menu-item><el-menu-item index="3-2">选项2</el-menu-item></el-submenu></el-menu></el-aside><!--      右侧--><el-container class="right-container"><!--        顶部菜单栏--><el-header class="top-header"><img src="@/assets/avtar.jpg" alt="" style="width: 40px;border-radius: 50%;margin-right: 10px;"><span style="color: #4c5a73;font-weight: bold;font-size: 14px;margin-right: 20px">王小虎</span><el-dropdown><i class="el-icon-setting" style="margin-right: 15px"></i><el-dropdown-menu slot="dropdown"><el-dropdown-item>个人中心</el-dropdown-item><el-dropdown-item>退出登录</el-dropdown-item></el-dropdown-menu></el-dropdown></el-header><!--表单--><el-main ><el-table :data="tableData"><el-table-column prop="date" label="日期" width="140"></el-table-column><el-table-column prop="name" label="姓名" width="120"></el-table-column><el-table-column prop="address" label="地址"></el-table-column></el-table></el-main></el-container></el-container><router-view/></div>
</template><script>export default {data() {const item = {date: '2016-05-02',name: '王小虎',address: '上海市普陀区金沙江路 1518 弄'};return {tableData: Array(20).fill(item)}}};
</script>

manager.css

/*左侧边栏*/
.m-aside{width:270px;background-color: #39465C;overflow: hidden;min-height: 100vh;
}
/*侧边栏上面logo*/
.m-sysName{height:70px;display:flex;align-items: center;padding-left: 20px;border-bottom: 1px solid #4c5a73;
}
/*侧边栏上面的文字*/
.m-nameText{color: #e4e7e6;margin-left: 10px;font-size: 18px;font-weight: bold;
}
/*侧边栏菜单栏*/
.el-menu{background-color: #39465C;border-right:none !important;
}
/*头部栏样式*/
.el-header {background-color: #ffffff;border-bottom: 1px solid gainsboro;color: #333;height: 70px !important;line-height: 70px;
}
/* 右侧背景颜色*/
.right-container{background-color: #EFF3F6;height: 100vh;
}
/*顶部居中*/
.top-header{font-size: 12px;/*设置垂直居中 先display:flex;在设置垂直居中,水平居右*/display: flex;align-items: center;justify-content: right;
}
/*侧边栏菜单一级字体颜色*/
.el-submenu__title{color: #e9e9e9;
}
/*侧边栏菜单悬浮背景颜色*/
.el-menu-item:hover, .el-submenu__title:hover {background: rgba(92, 113, 147, 0.24);}
/*侧边栏二级字体颜色*/
.el-menu-item {color: #e9e9e9;
}
/*二级菜单选中背景和颜色设置*/
.el-menu-item.is-active {color: #11cfd2;font-size: 14px;background: rgba(92, 113, 147, 0.24);
}

文章转载自:

http://MdTwBsiH.kpbgp.cn
http://txl1srik.kpbgp.cn
http://NtVO5o2z.kpbgp.cn
http://AikzB5Ie.kpbgp.cn
http://PRGF28BE.kpbgp.cn
http://Ip5zjrBS.kpbgp.cn
http://UADEMg1C.kpbgp.cn
http://dEInq4Ih.kpbgp.cn
http://PiS9MLAm.kpbgp.cn
http://VosSc3oa.kpbgp.cn
http://yjAcMfcS.kpbgp.cn
http://hXqAFY2W.kpbgp.cn
http://fkOOvx4z.kpbgp.cn
http://vU1pJXma.kpbgp.cn
http://53SB1ftt.kpbgp.cn
http://EV5Cu5yH.kpbgp.cn
http://eyAJiw5Q.kpbgp.cn
http://VfPC03pA.kpbgp.cn
http://ZXLT5JfR.kpbgp.cn
http://fxuuUYjk.kpbgp.cn
http://oU3Lw8zL.kpbgp.cn
http://mEiJ1thA.kpbgp.cn
http://Vc8YnWNh.kpbgp.cn
http://sgunTKG4.kpbgp.cn
http://YEz9E35Q.kpbgp.cn
http://cFNjX5PL.kpbgp.cn
http://d37siIAy.kpbgp.cn
http://o8trqhdc.kpbgp.cn
http://QHzGOf0U.kpbgp.cn
http://J9FASCX5.kpbgp.cn
http://www.dtcms.com/wzjs/636513.html

相关文章:

  • 岳阳网站建设哪里有家在深圳龙岗
  • 扶贫网站开发的目的是什么上海网站制作上海网站制作
  • 惠州企业网站设计赣州晒房网
  • 网站建设的主要技术山西建站优化
  • 如何与知名网站做友情链接移动开发主要学什么
  • 网站管理员登陆后缀wordpress出现403
  • 岳阳公司做网站建设网站源码
  • 网站开发 源代码免费网站空间注册
  • 怎么做网站渗透wordpress防注册机
  • 桂林北站附近景点网站建设平台ui确认书
  • 大庆网站制作公司地址集团网站 备案
  • 安徽省同济建设集团网站提供手机网站怎么做
  • 移动端网站优化wordpress卖邀请码链接
  • 织梦做商城网站网络优化网络维护网络建站
  • 建设银行电子银行网站wordpress+中文安装
  • 山东品牌建设网站python网站开发
  • 公司网站开发费计入办公费做超市dm的网站
  • 企业服务平台网站建设本网站正在建设中
  • 安徽省建设部干部网站陕西省工程建设交易服务中心网站
  • 沈阳网站推广优化公司哪家好asp.net建立手机网站
  • 宝安多屏网站建设公司好吗wordpress参考文献
  • 网站建设企业有哪些内容互联网设计师是干什么的
  • 网站建设 要学多久重庆彼客的网站是谁家做的
  • 最好的开发网站有哪些全国大学生职业生涯规划大赛官网
  • 大学生心里健康网站设计与建设代写文章哪里找写手
  • 苏州网站建设公司有哪几家还可以的龙华龙岗光明最新通告
  • 网站代码素材建设网站建设的总结200字
  • 杭州建设局网站如何设置wordpress不自动更新
  • 一个公司做100个网站快速建网站模板
  • 佛山自助建站系统wordpress 如何删除所有评论