Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
c06baffb
Commit
c06baffb
authored
7 years ago
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf:format code
parent
f876b9b6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
25 deletions
+24
-25
index.vue
src/components/Breadcrumb/index.vue
+5
-5
index.vue
src/components/ScrollBar/index.vue
+2
-2
index.vue
src/components/ScrollPane/index.vue
+2
-2
index.scss
src/styles/index.scss
+1
-0
sidebar.scss
src/styles/sidebar.scss
+0
-2
AppMain.vue
src/views/layout/components/AppMain.vue
+1
-1
SidebarItem.vue
src/views/layout/components/Sidebar/SidebarItem.vue
+12
-12
index.vue
src/views/layout/components/Sidebar/index.vue
+1
-1
No files found.
src/components/Breadcrumb/index.vue
View file @
c06baffb
...
@@ -19,6 +19,11 @@ export default {
...
@@ -19,6 +19,11 @@ export default {
levelList
:
null
levelList
:
null
}
}
},
},
watch
:
{
$route
()
{
this
.
getBreadcrumb
()
}
},
methods
:
{
methods
:
{
getBreadcrumb
()
{
getBreadcrumb
()
{
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
)
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
)
...
@@ -31,11 +36,6 @@ export default {
...
@@ -31,11 +36,6 @@ export default {
generateTitle
(
title
)
{
generateTitle
(
title
)
{
return
this
.
$t
(
'route.'
+
title
)
return
this
.
$t
(
'route.'
+
title
)
}
}
},
watch
:
{
$route
()
{
this
.
getBreadcrumb
()
}
}
}
}
}
</
script
>
</
script
>
...
...
This diff is collapsed.
Click to expand it.
src/components/ScrollBar/index.vue
View file @
c06baffb
<
template
>
<
template
>
<div
class=
'scroll-container'
ref=
'scrollContainer'
@
mousewheel=
"handleScroll"
>
<div
class=
"scroll-container"
ref=
"scrollContainer"
@
mousewheel=
"handleScroll"
>
<div
class=
'scroll-wrapper'
ref=
'scrollWrapper'
:style=
"
{top: top + 'px'}">
<div
class=
"scroll-wrapper"
ref=
"scrollWrapper"
:style=
"
{top: top + 'px'}">
<slot></slot>
<slot></slot>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/components/ScrollPane/index.vue
View file @
c06baffb
<
template
>
<
template
>
<div
class=
'scroll-container'
ref=
'scrollContainer'
@
mousewheel=
"handleScroll"
>
<div
class=
"scroll-container"
ref=
"scrollContainer"
@
mousewheel=
"handleScroll"
>
<div
class=
'scroll-wrapper'
ref=
'scrollWrapper'
:style=
"
{left: left + 'px'}">
<div
class=
"scroll-wrapper"
ref=
"scrollWrapper"
:style=
"
{left: left + 'px'}">
<slot></slot>
<slot></slot>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/styles/index.scss
View file @
c06baffb
@import
'./variables.scss'
;
@import
'./mixin.scss'
;
@import
'./mixin.scss'
;
@import
'./transition.scss'
;
@import
'./transition.scss'
;
@import
'./element-ui.scss'
;
@import
'./element-ui.scss'
;
...
...
This diff is collapsed.
Click to expand it.
src/styles/sidebar.scss
View file @
c06baffb
@import
'./variables.scss'
;
#app
{
#app
{
// 主体区域
// 主体区域
.main-container
{
.main-container
{
...
...
This diff is collapsed.
Click to expand it.
src/views/layout/components/AppMain.vue
View file @
c06baffb
<
template
>
<
template
>
<section
class=
"app-main"
style=
"min-height: 100%"
>
<section
class=
"app-main"
style=
"min-height: 100%"
>
<transition
name=
"fade"
mode=
"out-in"
>
<transition
name=
"fade"
mode=
"out-in"
>
<keep-alive
:include=
'cachedViews'
>
<keep-alive
:include=
"cachedViews"
>
<router-view></router-view>
<router-view></router-view>
</keep-alive>
</keep-alive>
</transition>
</transition>
...
...
This diff is collapsed.
Click to expand it.
src/views/layout/components/Sidebar/SidebarItem.vue
View file @
c06baffb
<
template
>
<
template
>
<div
class=
'menu-wrapper'
>
<div
class=
"menu-wrapper"
>
<template
v-for=
"item in routes"
>
<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'
>
<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>
<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>
<span
v-if=
"item.children[0].meta&&item.children[0].meta.title"
>
{{
generateTitle
(
item
.
children
[
0
].
meta
.
title
)
}}
</span>
</el-menu-item>
</el-menu-item>
</router-link>
</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"
>
<template
slot=
"title"
>
<svg-icon
v-if=
'item.meta&&item.meta.icon'
:icon-class=
"item.meta.icon"
></svg-icon>
<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>
<span
v-if=
"item.meta&&item.meta.title"
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</span>
</
template
>
</
template
>
<
template
v-if=
'!child.hidden'
v-for=
"child in item.children"
>
<
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>
<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"
>
<el-menu-item
:index=
"item.path+'/'+child.path"
>
<svg-icon
v-if=
'child.meta&&child.meta.icon'
:icon-class=
"child.meta.icon"
></svg-icon>
<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>
<span
v-if=
"child.meta&&child.meta.title"
>
{{
generateTitle
(
child
.
meta
.
title
)
}}
</span>
</el-menu-item>
</el-menu-item>
</router-link>
</router-link>
</
template
>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/views/layout/components/Sidebar/index.vue
View file @
c06baffb
<
template
>
<
template
>
<scroll-bar>
<scroll-bar>
<el-menu
mode=
"vertical"
unique-opened
:default-active=
"$route.path"
:collapse=
"isCollapse"
background-color=
"#304156"
text-color=
"#fff"
active-text-color=
"#409EFF"
>
<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>
</el-menu>
</scroll-bar>
</scroll-bar>
</
template
>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment