Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiaojiayu10
vue-element-admin
提交
6f2a7ce8
V
vue-element-admin
项目概览
xiaojiayu10
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6f2a7ce8
编写于
1月 24, 2018
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat[menu]: add alwaysShow option
上级
2e0d3fd0
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
20 addition
and
13 deletion
+20
-13
src/lang/en.js
src/lang/en.js
+2
-1
src/lang/zh.js
src/lang/zh.js
+11
-10
src/router/index.js
src/router/index.js
+6
-1
src/views/layout/components/Sidebar/SidebarItem.vue
src/views/layout/components/Sidebar/SidebarItem.vue
+1
-1
未找到文件。
src/lang/en.js
浏览文件 @
6f2a7ce8
...
...
@@ -42,7 +42,8 @@ export default {
exportExcel
:
'
Export Excel
'
,
selectExcel
:
'
Export Selected
'
,
uploadExcel
:
'
Upload Excel
'
,
exportZip
:
'
Zip
'
,
zip
:
'
Zip
'
,
exportZip
:
'
Export Zip
'
,
theme
:
'
Theme
'
,
clipboardDemo
:
'
Clipboard
'
,
i18n
:
'
I18n
'
...
...
src/lang/zh.js
浏览文件 @
6f2a7ce8
...
...
@@ -24,10 +24,10 @@ export default {
mixChart
:
'
混合图表
'
,
example
:
'
综合实例
'
,
Table
:
'
Table
'
,
dynamicTable
:
'
动态
t
able
'
,
dragTable
:
'
拖拽
t
able
'
,
inlineEditTable
:
'
t
able内编辑
'
,
complexTable
:
'
综合
t
able
'
,
dynamicTable
:
'
动态
T
able
'
,
dragTable
:
'
拖拽
T
able
'
,
inlineEditTable
:
'
T
able内编辑
'
,
complexTable
:
'
综合
T
able
'
,
treeTable
:
'
树形表格
'
,
customTreeTable
:
'
自定义树表
'
,
tab
:
'
Tab
'
,
...
...
@@ -38,13 +38,14 @@ export default {
page401
:
'
401
'
,
page404
:
'
404
'
,
errorLog
:
'
错误日志
'
,
excel
:
'
excel
'
,
exportExcel
:
'
export excel
'
,
selectExcel
:
'
export selected
'
,
uploadExcel
:
'
upload excel
'
,
exportZip
:
'
zip
'
,
excel
:
'
Excel
'
,
exportExcel
:
'
Export Excel
'
,
selectExcel
:
'
Export Selected
'
,
uploadExcel
:
'
Upload Excel
'
,
zip
:
'
Zip
'
,
exportZip
:
'
Export Zip
'
,
theme
:
'
换肤
'
,
clipboardDemo
:
'
c
lipboard
'
,
clipboardDemo
:
'
C
lipboard
'
,
i18n
:
'
国际化
'
},
navbar
:
{
...
...
src/router/index.js
浏览文件 @
6f2a7ce8
...
...
@@ -15,6 +15,9 @@ import Layout from '../views/layout/Layout'
/**
* hidden: true if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu, whatever its child routes length
* if not set alwaysShow, only more than one route under the children
* it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect if `redirect:noredirect` will no redirct in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
...
...
@@ -217,7 +220,9 @@ export const asyncRouterMap = [
path
:
'
/zip
'
,
component
:
Layout
,
redirect
:
'
/zip/download
'
,
children
:
[{
path
:
'
download
'
,
component
:
_import
(
'
zip/index
'
),
name
:
'
exportZip
'
,
meta
:
{
title
:
'
exportZip
'
,
icon
:
'
zip
'
}}]
alwaysShow
:
true
,
meta
:
{
title
:
'
zip
'
,
icon
:
'
zip
'
},
children
:
[{
path
:
'
download
'
,
component
:
_import
(
'
zip/index
'
),
name
:
'
exportZip
'
,
meta
:
{
title
:
'
exportZip
'
}}]
},
{
...
...
src/views/layout/components/Sidebar/SidebarItem.vue
浏览文件 @
6f2a7ce8
...
...
@@ -2,7 +2,7 @@
<div
class=
"menu-wrapper"
>
<template
v-for=
"item in routes"
v-if=
"!item.hidden&&item.children"
>
<router-link
v-if=
"item.children.length===1 && !item.children[0].children"
:to=
"item.path+'/'+item.children[0].path"
:key=
"item.children[0].name"
>
<router-link
v-if=
"item.children.length===1 && !item.children[0].children
&&!item.alwaysShow
"
:to=
"item.path+'/'+item.children[0].path"
:key=
"item.children[0].name"
>
<el-menu-item
:index=
"item.path+'/'+item.children[0].path"
:class=
"
{'submenu-title-noDropdown':!isNest}">
<svg-icon
v-if=
"item.children[0].meta&&item.children[0].meta.icon"
:icon-class=
"item.children[0].meta.icon"
></svg-icon>
<span
v-if=
"item.children[0].meta&&item.children[0].meta.title"
>
{{
generateTitle
(
item
.
children
[
0
].
meta
.
title
)
}}
</span>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录