Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
InJoyU
vue-element-admin
提交
c06baffb
V
vue-element-admin
项目概览
InJoyU
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
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,发现更多精彩内容 >>
提交
c06baffb
编写于
11月 27, 2017
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perf:format code
上级
f876b9b6
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
24 addition
and
25 deletion
+24
-25
src/components/Breadcrumb/index.vue
src/components/Breadcrumb/index.vue
+5
-5
src/components/ScrollBar/index.vue
src/components/ScrollBar/index.vue
+2
-2
src/components/ScrollPane/index.vue
src/components/ScrollPane/index.vue
+2
-2
src/styles/index.scss
src/styles/index.scss
+1
-0
src/styles/sidebar.scss
src/styles/sidebar.scss
+0
-2
src/views/layout/components/AppMain.vue
src/views/layout/components/AppMain.vue
+1
-1
src/views/layout/components/Sidebar/SidebarItem.vue
src/views/layout/components/Sidebar/SidebarItem.vue
+12
-12
src/views/layout/components/Sidebar/index.vue
src/views/layout/components/Sidebar/index.vue
+1
-1
未找到文件。
src/components/Breadcrumb/index.vue
浏览文件 @
c06baffb
...
...
@@ -19,6 +19,11 @@ export default {
levelList
:
null
}
},
watch
:
{
$route
()
{
this
.
getBreadcrumb
()
}
},
methods
:
{
getBreadcrumb
()
{
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
)
...
...
@@ -31,11 +36,6 @@ export default {
generateTitle
(
title
)
{
return
this
.
$t
(
'
route.
'
+
title
)
}
},
watch
:
{
$route
()
{
this
.
getBreadcrumb
()
}
}
}
</
script
>
...
...
src/components/ScrollBar/index.vue
浏览文件 @
c06baffb
<
template
>
<div
class=
'scroll-container'
ref=
'scrollContainer'
@
mousewheel=
"handleScroll"
>
<div
class=
'scroll-wrapper'
ref=
'scrollWrapper'
:style=
"
{top: top + 'px'}">
<div
class=
"scroll-container"
ref=
"scrollContainer"
@
mousewheel=
"handleScroll"
>
<div
class=
"scroll-wrapper"
ref=
"scrollWrapper"
:style=
"
{top: top + 'px'}">
<slot></slot>
</div>
</div>
...
...
src/components/ScrollPane/index.vue
浏览文件 @
c06baffb
<
template
>
<div
class=
'scroll-container'
ref=
'scrollContainer'
@
mousewheel=
"handleScroll"
>
<div
class=
'scroll-wrapper'
ref=
'scrollWrapper'
:style=
"
{left: left + 'px'}">
<div
class=
"scroll-container"
ref=
"scrollContainer"
@
mousewheel=
"handleScroll"
>
<div
class=
"scroll-wrapper"
ref=
"scrollWrapper"
:style=
"
{left: left + 'px'}">
<slot></slot>
</div>
</div>
...
...
src/styles/index.scss
浏览文件 @
c06baffb
@import
'./variables.scss'
;
@import
'./mixin.scss'
;
@import
'./transition.scss'
;
@import
'./element-ui.scss'
;
...
...
src/styles/sidebar.scss
浏览文件 @
c06baffb
@import
'./variables.scss'
;
#app
{
// 主体区域
.main-container
{
...
...
src/views/layout/components/AppMain.vue
浏览文件 @
c06baffb
<
template
>
<section
class=
"app-main"
style=
"min-height: 100%"
>
<transition
name=
"fade"
mode=
"out-in"
>
<keep-alive
:include=
'cachedViews'
>
<keep-alive
:include=
"cachedViews"
>
<router-view></router-view>
</keep-alive>
</transition>
...
...
src/views/layout/components/Sidebar/SidebarItem.vue
浏览文件 @
c06baffb
<
template
>
<div
class=
'menu-wrapper'
>
<div
class=
"menu-wrapper"
>
<template
v-for=
"item in routes"
>
<router-link
v-if=
"!item.hidden&&item.children&&item.children.length===1"
:to=
"item.path+'/'+item.children[0].path"
:key=
'item.children[0].name'
>
<router-link
v-if=
"!item.hidden&&item.children&&item.children.length===1"
: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'
>
<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>
<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>
</el-menu-item>
</router-link>
<el-submenu
v-if=
"!item.hidden&&item.children&&item.children.length>1"
:index=
"item.name||item.path"
:key=
'item.name'
>
<el-submenu
v-if=
"!item.hidden&&item.children&&item.children.length>1"
:index=
"item.name||item.path"
:key=
"item.name"
>
<template
slot=
"title"
>
<svg-icon
v-if=
'item.meta&&item.meta.icon'
:icon-class=
"item.meta.icon"
></svg-icon>
<span
v-if=
'item.meta&&item.meta.title'
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</span>
<svg-icon
v-if=
"item.meta&&item.meta.icon"
:icon-class=
"item.meta.icon"
></svg-icon>
<span
v-if=
"item.meta&&item.meta.title"
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</span>
</
template
>
<
template
v-if=
'!child.hidden'
v-for=
"child in item.children"
>
<sidebar-item
class=
'nest-menu'
v-if=
'child.children&&child.children.length>0'
:routes=
'[child]'
:key=
'child.path'
></sidebar-item>
<
template
v-if=
"!child.hidden"
v-for=
"child in item.children"
>
<sidebar-item
class=
"nest-menu"
v-if=
"child.children&&child.children.length>0"
:routes=
"[child]"
:key=
"child.path"
></sidebar-item>
<router-link
v-else
:to=
"item.path+'/'+child.path"
:key=
'child.name'
>
<router-link
v-else
:to=
"item.path+'/'+child.path"
:key=
"child.name"
>
<el-menu-item
:index=
"item.path+'/'+child.path"
>
<svg-icon
v-if=
'child.meta&&child.meta.icon'
:icon-class=
"child.meta.icon"
></svg-icon>
<span
v-if=
'child.meta&&child.meta.title'
>
{{
generateTitle
(
child
.
meta
.
title
)
}}
</span>
<svg-icon
v-if=
"child.meta&&child.meta.icon"
:icon-class=
"child.meta.icon"
></svg-icon>
<span
v-if=
"child.meta&&child.meta.title"
>
{{
generateTitle
(
child
.
meta
.
title
)
}}
</span>
</el-menu-item>
</router-link>
</
template
>
...
...
src/views/layout/components/Sidebar/index.vue
浏览文件 @
c06baffb
<
template
>
<scroll-bar>
<el-menu
mode=
"vertical"
unique-opened
:default-active=
"$route.path"
:collapse=
"isCollapse"
background-color=
"#304156"
text-color=
"#fff"
active-text-color=
"#409EFF"
>
<sidebar-item
:routes=
'permission_routers'
></sidebar-item>
<sidebar-item
:routes=
"permission_routers"
></sidebar-item>
</el-menu>
</scroll-bar>
</
template
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录