九 Vue学习 manager页面布局
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>-->
<!--<!– <el-menu-item index="newMember">用户数据</el-menu-item> –>-->
<!--</el-submenu>-->
<!--<el-submenu index="5">-->
<!--<template slot="title"><i class="el-icon-edit"></i>编辑</template>-->
<!--<!– <el-menu-item index="uploadImg">上传图片</el-menu-item> –>-->
<!--<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页面布局的更多相关文章
- 10 Vue 学习 shortList页面
1: shortList页面代码如下: <template> <div class="fillcontain"> <head-top></ ...
- 【Flutter学习】页面布局之其它布局处理
一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...
- 【Flutter学习】页面布局之列表和表格处理
一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...
- 【Flutter学习】页面布局之宽高尺寸处理
一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...
- 【Flutter学习】页面布局之基础布局组件
一,概述 Flutter中拥有30多种预定义的布局widget,常用的有Container.Padding.Center.Flex.Row.Colum.ListView.GridView.按照< ...
- xamarin学习之页面布局
在android应中,需要注意3个文件,他们分别是:Main.axml,String.xml和Activity.cs. 1.布局文件Main.axml ,该文件保存在Resouses/layout的目 ...
- [Android学习笔记]页面布局
线性布局:LinearLayout 1.集成ViewGroup,故可容纳多个View 2.线性布局,可设置水平或者垂直方向 相对布局:RelativeLayout
- (数据科学学习手札103)Python+Dash快速web应用开发——页面布局篇
本文示例代码已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 这是我的系列教程Python+Dash快速web ...
- vue学习之四组件系统
vue.js既然是框架,那就不能只是简单的完成数据模板引擎的任务,它还提供了页面布局的功能.本文详细介绍使用vue.js进行页面布局的强大工具,vue.js组件系统. 一.Vue.js组件系统 每一个 ...
随机推荐
- vsftpd 虚拟用户限定在虚拟用户目录
1.安装vsftpd yum -y install pam pam-devel db4 db4-tcl vsftpd 2.更名默认配置文件,以便恢复 cp /etc/vsftpd/vsftpd.con ...
- 图像处理之log---log算子
在图像中,边缘可以看做是位于一阶导数较大的像素处,因此,我们可以求图像的一阶导数来确定图像的边缘,像sobel算子等一系列算子都是基于这个思想的. 但是这存在几个问题:1. 噪声的影响,在噪声点处一阶 ...
- SQL ROW_NUMBER() 分页使用示例
ALTER PROC [dbo].[TestProPage] , AS BEGIN SELECT * FROM (SELECT *,ROW_NUMBER() OVER(ORDER BY IndexID ...
- 【LeetCode】Balanced Binary Tree 解题报告
[题目] Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced bi ...
- django mysql setting 设置
django mysql setting django mysql 设置 DATABASES = { 'default': { 'ENGINE': 'django.db.back ...
- (Android)react-native-splash-screen实践-解决react-native打包好后启动白屏的问题
1.安装 npm i react-native-splash-screen --save or yarn add react-native-splash-screen --save 2.自动配置 re ...
- 用JavaScript判断一个对象是否数组?
Q:如何判断一个对象是否为数组? A1:判断对象的constructor是否指向Array, 接着判断对应的特殊属性,如length,splice之类.这个很容易冒充. A2:使用instanceof ...
- ME11创建信息记录 Function
转自 http://blog.csdn.net/zeewjj/article/details/7941530 CALL FUNCTION 'ME_DIRECT_INPUT_INFORECORD' D ...
- Java反射详解(转)
原文地址:http://www.importnew.com/17616.html 动态语言 动态语言,是指程序在运行时可以改变其结构:新的函数可以被引进,已有的函数可以被删除等在结构上的变化.比如众所 ...
- JS的事件流概念*******
事件的概念 HTML中与javascript交互是通过事件驱动来实现的,例如鼠标点击事件.页面的滚动事件onscroll等等,可以向文档或者文档中的元素添加事件侦听器来预订事件. 事件流 事件流描述的 ...