```
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Chen Xueming">
<title>Home Demo</title>
<script type="text/javascript" src="../../node_modules/vue/dist/vue.js"></script>
<script src="../../node_modules/element-ui/lib/index.js"></script>
<script src="../../node_modules/vuex/dist/vuex.js"></script>
<link rel="stylesheet" href="../../node_modules/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.css">
<style>
body {
margin: 0px;
}
html,
body,
#home,
.el-container,
#leftNav,
ul.el-menu {
height: 100%;
}
#leftNav {
width: auto !important;
background-color: #5EAA23;
display: flex;
flex-direction: column;
}
#leftNav .nav-logo {
height: 50px !important;
padding-left: 15px;
color: #fff;
font-size: 16px;
font-weight: 400;
z-index: 999;
font-family: RionaSans, helvetica, arial, verdana, sans-serif;
}
#leftNav .el-menu-vertical {
overflow-x: hidden;
height: 100%;
}
.el-menu-vertical:not(.el-menu--collapse) {
width: 260px;
}
#leftNav .el-menu {
background-color: #5EAA23;
border-right: none;
}
#leftNav .el-menu .el-menu-item {
background-color: #5EAA23 !important;
color: #fff;
}
.el-submenu__title{
color: #fff;
}
#leftNav .el-menu .el-menu-item.is-active {
background-color: #6cdf15 !important
}
#leftNav .el-menu-item-group__title {
padding: 0px !important;
}
#leftNav .el-submenu {
background-color: #5EAA23 !important;
}
.hideNav {
float: right;
cursor: pointer;
padding-right: 20px;
}
#header {
height: 50px !important;
background-color: #69BE28 !important;
display: flex;
justify-content: space-between;
}
.header-tools {
display: flex;
flex-direction: row;
}
.header-tools li {
list-style: none;
margin-left: 13px;
margin-right: 13px;
}
.header-tools .fullScreen {
cursor: pointer;
color: #fff;
}
.header-tools.el-dropdown-link {
cursor: pointer;
}
.header-tools .avatar img{
margin-top: 0px;
}
</style>
</head>
<body>
<div id="home">
<el-container>
<!-- 左侧导航栏 -->
<el-aside id="leftNav">
<div class="nav-logo">
<p v-if="isCollapse">
<b> </b>
<span class="hideNav" @click="collapse"><i class="fa fa-indent fa-lg"></i></span></p>
<p v-else>
<b>GPLM</b>
<span class="hideNav" @click="collapse"><i class="fa fa-indent fa-lg"></i></span>
</p>
</div>
<el-menu :collapse="isCollapse" default-active="1" :collapse-transition="true" class="el-menu-vertical"
@open="handleOpen" @close="handleClose">
<el-menu-item index="0">
<i class="el-icon-s-home"></i>
<span slot="title">主页</span>
</el-menu-item>
<el-submenu index="1">
<template slot="title">
<i class="el-icon-location"></i>
<span>导航一</span>
</template>
<el-menu-item-group>
<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-submenu>
<el-menu-item index="2">
<i class="el-icon-menu"></i>
<span slot="title">导航二</span>
</el-menu-item>
<el-menu-item index="3">
<i class="el-icon-setting"></i>
<span slot="title">导航三</span>
</el-menu-item>
<el-submenu index="4">
<template slot="title">
<i class="el-icon-location"></i>
<span>导航一</span>
</template>
<el-menu-item-group>
<el-menu-item index="4-1">选项1</el-menu-item>
<el-menu-item index="4-2">选项2</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu index="5">
<template slot="title">
<i class="el-icon-location"></i>
<span>导航一</span>
</template>
<el-menu-item-group>
<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-submenu>
<el-submenu index="6">
<template slot="title">
<i class="el-icon-location"></i>
<span>导航一</span>
</template>
<el-menu-item-group>
<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-submenu>
<el-submenu index="7">
<template slot="title">
<i class="el-icon-location"></i>
<span>导航一</span>
</template>
<el-menu-item-group>
<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-submenu>
</el-menu>
</el-aside>
<el-container>
<el-header id="header">
<span><i></i></span>
<ul class="header-tools">
<li class="fullScreen" @click="fullScreen">
<el-tooltip class="item" effect="dark" content="全屏" placement="bottom"><i
class="fa fa-arrows-alt fa-lg"></i>
</el-tooltip>
</li>
<li>
<el-dropdown>
<div>
<span class="el-dropdown-link"><i class="fa fa-language fa-lg"></i> 中文<i class="el-icon-arrow-down el-icon--right"></i>
</span>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="cn">中文</el-dropdown-item>
<el-dropdown-item command="en">English</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
<li>
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link">
Oscar<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="info">基本信息</el-dropdown-item>
<el-dropdown-item command="editPassword">修改密码</el-dropdown-item>
<el-dropdown-item command="logout" divided>退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
<li class="avatar"><el-avatar size="small" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar></li>
</ul>
</el-header>
<el-container>
<el-main>Main</el-main>
</el-container>
</el-container>
</el-container>
</div>
<script>
var store = new Vuex.Store({
state: {
isCollapse: false
},
mutations: {
collapse(state, arg) {
state.isCollapse = !state.isCollapse
}
},
actions: {
collapse ({commit}, arg) {
commit("collapse", arg)
}
},
getters: { isCollapse: state => state.isCollapse },
modules: {
}
});
new Vue({
el: '#home',
store,
data: function () {
return {
visible: false,
isCollapse: true
}
}, methods: {
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
handleClose(key, keyPath) {
console.log(key, keyPath);
},
collapse() {
this.isCollapse = !this.isCollapse;
},
fullScreen(){
}
}
})
</script>
</body>
</html>
```
- 引入篇
- 基础篇
- 快速入手
- 名词解释
- Vue语法
- Vue安装
- Vue实例
- 模板语法
- 计算属性和侦听器
- Class与Style绑定
- 条件渲染
- 列表渲染
- 事件处理
- 表单输入绑定
- 组件基础
- 进阶篇
- 常用模块
- 单文件组件
- 快速学会Vue Router路由
- Vue Route 进阶使用
- Vuex 与状态管理
- Axios
- Mock.js
- data数据显示在页面
- Vue生命周期
- Vue按需加载组件
- 国际化
- 页面加载进度条 -NProgress
- 自定义主题颜色
- 开发篇
- Vue入门——创建并运行一个Vue项目
- Vue + Element UI 项目创建
- 使用Vue ui项目创建工具在网页中创建Vue项目
- Vue项目创建入门实例
- Vue CLI
- 创建项目
- 使用Visual Studio Code 开发Vue项目
- 高级篇
- 组件深入
- Vue+Element
- Vue + ElementUI 主题颜色切换
- 工具篇
- 在线代码编辑器
- 开发工具(IDE,集成开发环境)
- npm(JavaScript包管理工具)介绍
- Node.js(npm)在Windows下安装
- webpack介绍
- webpack快速实例
- webpack
- 快速入门实例
- 安装
- 概念
- Nodejs
- 基础
- npm
- 命令参考
- 命令
- 模块安装
- Babel
- 问题解决篇
- ERROR Failed to get response from https://registry.yarnpkg.com/vue-cli-version -marker
- Vue常见问题
- You are using the runtime-only build of Vue where the template compiler is not
- yarn 报unable to get local issuer certificate
- yarn There appears to be trouble with your network connection. Retrying
- Expected Boolean, got String with value "true".
- 项目篇
- 项目创建
- 项目设计
- 页面
- 开发问题
- 后端
- Spring Boot + Activiti 工作流框架搭建之一
- Spring Boot + Activiti 工作流框架搭建之二
- 工作流
- Java流程框架
- Activiti
- 页面风格
- green
- blue
- orange
- 参考篇
- 好的Git项目
- Vue的在线js
- 指令
- 开发说明
- JavaScript 高级
- export和import
- JS模块化规范对比以及在Node.js的实现
- Storage
- ES2015
- scss
- CSS、Sass、SCSS