1:  登录后系统页面如下:

对应代码:

<template>
<div class="manage_page fillcontain">
<el-row style="height: 100%;">
<el-col :span="4" style="min-height: 100%; background-color: #324057;">
<el-menu :default-active="defaultActive" style="min-height: 100%;" theme="dark" router>
<el-menu-item index="manage"><i class="el-icon-menu"></i>首页</el-menu-item>
<el-submenu index="2">
<template slot="title"><i class="el-icon-document"></i>数据管理</template>
<!--<el-menu-item index="userList">用户列表</el-menu-item>-->
<el-menu-item index="shopList">卷宗管理</el-menu-item>
<!--<el-menu-item index="foodList">食品列表</el-menu-item>-->
<!--<el-menu-item index="orderList">订单列表</el-menu-item>-->
<el-menu-item index="adminList">管理员列表</el-menu-item>
</el-submenu>
<el-submenu index="3">
<template slot="title"><i class="el-icon-plus"></i>添加数据</template>
<el-menu-item index="addShop">创建用户</el-menu-item>
<!--<el-menu-item index="addGoods">添加商品</el-menu-item>-->
</el-submenu>
<!--<el-submenu index="4">-->
<!--<template slot="title"><i class="el-icon-star-on"></i>图表</template>-->
<!--<el-menu-item index="visitor">用户分布</el-menu-item>-->
<!--&lt;!&ndash; <el-menu-item index="newMember">用户数据</el-menu-item> &ndash;&gt;-->
<!--</el-submenu>-->
<!--<el-submenu index="5">-->
<!--<template slot="title"><i class="el-icon-edit"></i>编辑</template>-->
<!--&lt;!&ndash; <el-menu-item index="uploadImg">上传图片</el-menu-item> &ndash;&gt;-->
<!--<el-menu-item index="vueEdit">文本编辑</el-menu-item>-->
<!--</el-submenu>-->
<el-submenu index="6">
<template slot="title"><i class="el-icon-setting"></i>设置</template>
<el-menu-item index="adminSet">管理员设置</el-menu-item>
<!-- <el-menu-item index="sendMessage">发送通知</el-menu-item> -->
</el-submenu>
<el-submenu index="7">
<template slot="title"><i class="el-icon-warning"></i>说明</template>
<el-menu-item index="explain">说明</el-menu-item>
</el-submenu>
</el-menu>
</el-col>
<el-col :span="20" style="height: 100%;overflow: auto;">
<keep-alive>
<router-view></router-view>
</keep-alive>
</el-col>
</el-row>
</div>
</template> <script>
export default {
computed: {
defaultActive: function(){
return this.$route.path.replace('/', '');
}
},
}
</script> <style lang="less" scoped>
@import '../style/mixin';
.manage_page{ }
</style>

整体布局: 一行 (el-row)两列(el-col)

              第一列: 就是左边的菜单页面;

              第二列: 就是右边的主要显示区域;

el-menu :

      default-active:当前激活菜单的 index;

      router:  是否使用 vue-router 的模式,启用该模式会在激活导航时以 index 作为 path 进行路由跳转

 

keep-alive: 

   是 Vue 内置的一个组件,可以使被包含的组件保留状态,或避免重新渲染

比如 在“卷宗管理”和“管理员管理”来回点击切换的时候,如果有keep-alive,则不用每次都从后台请求数据,渲染页面,而是缓存起来,加速页面显示;

                                                                  如果没有keep-alive,则每次都从后台重新拿数据,渲染页面,页面显示缓慢。

九 Vue学习 manager页面布局的更多相关文章

  1. 10 Vue 学习 shortList页面

    1: shortList页面代码如下: <template> <div class="fillcontain"> <head-top></ ...

  2. 【Flutter学习】页面布局之其它布局处理

    一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...

  3. 【Flutter学习】页面布局之列表和表格处理

    一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...

  4. 【Flutter学习】页面布局之宽高尺寸处理

    一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...

  5. 【Flutter学习】页面布局之基础布局组件

    一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...

  6. xamarin学习之页面布局

    在android应中,需要注意3个文件,他们分别是:Main.axml,String.xml和Activity.cs. 1.布局文件Main.axml ,该文件保存在Resouses/layout的目 ...

  7. [Android学习笔记]页面布局

    线性布局:LinearLayout 1.集成ViewGroup,故可容纳多个View 2.线性布局,可设置水平或者垂直方向 相对布局:RelativeLayout

  8. (数据科学学习手札103)Python+Dash快速web应用开发——页面布局篇

    本文示例代码已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 这是我的系列教程Python+Dash快速web ...

  9. vue学习之四组件系统

    vue.js既然是框架,那就不能只是简单的完成数据模板引擎的任务,它还提供了页面布局的功能.本文详细介绍使用vue.js进行页面布局的强大工具,vue.js组件系统. 一.Vue.js组件系统 每一个 ...

随机推荐

  1. CGI FASTCGI php-fpm

    CGI(Common Gateway Interface) CGI全称是“公共网关接口”(Common Gateway Interface),HTTP服务器与你的或其它机器上的程序进行“交谈”的一种工 ...

  2. python MySQLdb Windows下安装教程及问题解决方法(python2.7)

    使用python访问mysql,需要一系列安装 linux下MySQLdb安装见  Python MySQLdb在Linux下的快速安装http://www.jb51.net/article/6574 ...

  3. HDU 1452 Happy 2004(唯一分解定理)

    题目链接:传送门 题意: 求2004^x的全部约数的和. 分析: 由唯一分解定理可知 x=p1^a1*p2^a2*...*pn^an 那么其约数和 sum = (p1^0+p1^1^-+p1^a1)* ...

  4. Android 异常解决方法【汇总】

    (1)异常:Android中引入第三方Jar包的方法(Java.lang.NoClassDefFoundError解决办法) 1.在工程下新建lib文件夹,将需要的第三方包拷贝进来.2.将引用的第三方 ...

  5. SpringMVC @ResponseBody和@RequestBody使用

    @ResponseBody用法 作用: 该注解用于将Controller的方法返回的对象,根据HTTP Request Header的Accept的内容,通过适当的HttpMessageConvert ...

  6. java array

    1 array变量 Type[] array_virable_name; 2 array对象 2.1 new Type[] array_virable_name = new Type[NUM]; 2. ...

  7. d[k]=eval(k)

    lk = ['oid', 'timestamp', 'signals', 'area', 'building', 'city', 'name', 'floor', 'industry', 'regio ...

  8. 谷歌postman插件的安装与使用

    下载地址:http://pan.baidu.com/s/1kTh1g4B 安装方法: 1.下载并解压 2.解压后.打开谷歌浏览器.选择很多其它工具→扩展程序,如图 3.勾选开发人员模式 4.选择载入正 ...

  9. pandas,apply并行计算的一个demo

    #!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2018-10-11 17:55:26 # @Author : Sheldon (thi ...

  10. API的理解和使用——键管理

    核心知识点: 1.键重命名:rename和renamenx,使用renamenx时newkey必须不存在,重命名后会使用del删除原来的键,如果值比较大也会会造成阻塞. 2.随机返回一个值:rando ...