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. 迁移,移动.vagrant.d目录

    默认在 C:\Users\***\.vagrant.d 然后下面有boxes目录 想迁移到其它目录 setx VAGRANT_HOME "/d/.vagrant.d/" setx ...

  2. 删除rabbitmq的队列和队列中的数据

      访问http://{rabbitmq安装IP}:15672,帐号guest,密码guest(也可以使用自己创建的帐号). 登录后访问http://{rabbitmq安装IP}:15672/#/qu ...

  3. 【Android开发-5】界面装修,五大布局你选谁

    前言:假设要开一家店,门店装修是非常重要的事情.有钱都请专门的建筑设计公司来设计装修,没钱的仅仅能自己瞎折腾.好不好看全凭自己的感觉.像Android开发.在移动端大家看到的界面视觉不咋滴,一般连打开 ...

  4. href=http:// href=// 的区别,src=http:// src=// 的区别。 链接里不带http,链接里直接使用双斜线 // 有什么不同。http://和//有什么区别?

    其实很简单,当一个连接用双斜线 // 开头时表示如果浏览器当前使用的是https协议,那么就加载https协议的脚本,否则使用http,这保证了页面所有资源使用同一协议. 其实是有人将其做为规范来实践 ...

  5. Python --- Scrapy 命令(转)

    Scrapy 命令 分为两种: 全局命令 和 项目命令 . 全局命令:在哪里都能使用. 项目命令:必须在爬虫项目里面才能使用. 全局命令 C:\Users\AOBO>scrapy -h Scra ...

  6. python书写日志的重要性?

    转自:https://blog.csdn.net/weixin_43063753/article/details/82899395 程序为什么要写日志?#为了能够在程序在运行过程中记录错误,方便维护, ...

  7. maven工作的过程

    1 建立各个module之间的依赖关系 2 越底层的依赖的module先生成 3 下载远程库中的依赖 4 先生成本地被依赖的module 问题是,如何保证本次module和远程库中的包不重名?

  8. 我的Android进阶之旅------>Android如何去除GridView的按下或点击选中后的背景效果

    今天用GridView做了一个界面,自己自定好了一个组件,并且设置好了点击和不点击组件时候的效果,但是运行的时候发现在我定义好的背景下面还有一层不知道哪儿来的背景,严重影响了我自定义的组件的效果. 后 ...

  9. python 安装coreml

    2.安装pip,  下载get-pip.py, https://bootstrap.pypa.io/get-pip.py,然后Python 这个文件,如果没有权限就加sudo 3.安装coreml:这 ...

  10. linux字符设备学习笔记【原创】

    1.申请设备号 int register_chrdev_region(dev_t from, unsigned count, const char *name) 指定从设备号from开始,申请coun ...