Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Administrator
web-monitor
Commits
b97b370f
Commit
b97b370f
authored
Nov 24, 2017
by
Pan
Committed by
花裤衩
Nov 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf:format code
parent
37b6253e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
30 deletions
+32
-30
index.vue
src/components/Breadcrumb/index.vue
+7
-7
index.vue
src/components/ScrollBar/index.vue
+2
-2
404.vue
src/views/404.vue
+1
-1
index.vue
src/views/dashboard/index.vue
+3
-2
AppMain.vue
src/views/layout/components/AppMain.vue
+4
-3
Navbar.vue
src/views/layout/components/Navbar.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
index.vue
src/views/login/index.vue
+1
-1
No files found.
src/components/Breadcrumb/index.vue
View file @
b97b370f
<
template
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<transition-group
name=
"breadcrumb"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
:key=
"item.path"
v-if=
'item.meta.title'
>
<span
v-if=
'item.redirect==="noredirect"||index==levelList.length-1'
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
:key=
"item.path"
v-if=
"item.meta.title"
>
<span
v-if=
"item.redirect==='noredirect'||index==levelList.length-1"
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<router-link
v-else
:to=
"item.redirect||item.path"
>
{{
item
.
meta
.
title
}}
</router-link>
</el-breadcrumb-item>
</transition-group>
...
...
@@ -19,6 +19,11 @@ export default {
levelList
:
null
}
},
watch
:
{
$route
()
{
this
.
getBreadcrumb
()
}
},
methods
:
{
getBreadcrumb
()
{
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
)
...
...
@@ -28,11 +33,6 @@ export default {
}
this
.
levelList
=
matched
}
},
watch
:
{
$route
()
{
this
.
getBreadcrumb
()
}
}
}
</
script
>
...
...
src/components/ScrollBar/index.vue
View file @
b97b370f
<
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/views/404.vue
View file @
b97b370f
...
...
@@ -9,7 +9,7 @@
</div>
<div
class=
"bullshit"
>
<div
class=
"bullshit__oops"
>
OOPS!
</div>
<div
class=
"bullshit__info"
>
版权所有
<a
class=
'link-type'
href=
'https://wallstreetcn.com'
target=
'_blank'
>
华尔街见闻
</a></div>
<div
class=
"bullshit__info"
>
版权所有
<a
class=
"link-type"
href=
"https://wallstreetcn.com"
target=
'_blank'
>
华尔街见闻
</a></div>
<div
class=
"bullshit__headline"
>
{{
message
}}
</div>
<div
class=
"bullshit__info"
>
请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
</div>
<a
href=
"/"
class=
"bullshit__return-home"
>
返回首页
</a>
...
...
src/views/dashboard/index.vue
View file @
b97b370f
<
template
>
<div
class=
"dashboard-container"
>
<div
class=
'dashboard-text'
>
name:
{{
name
}}
</div>
<div
class=
'dashboard-text'
>
role:
<span
v-for=
'role in roles'
:key=
'role'
>
{{
role
}}
</span></div>
<div
class=
"dashboard-text"
>
name:
{{
name
}}
</div>
<div
class=
"dashboard-text"
>
role:
<span
v-for=
'role in roles'
:key=
'role'
>
{{
role
}}
</span></div>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'dashboard'
,
computed
:
{
...
...
src/views/layout/components/AppMain.vue
View file @
b97b370f
<
template
>
<section
class=
"app-main"
>
<transition
name=
"fade"
mode=
"out-in"
>
<!--
<router-view
:key=
"key"
></router-view>
-->
<router-view
:key=
"key"
></router-view>
</transition>
</section>
...
...
@@ -10,9 +11,9 @@
export
default
{
name
:
'AppMain'
,
computed
:
{
key
()
{
return
this
.
$route
.
name
!==
undefined
?
this
.
$route
.
name
+
+
new
Date
()
:
this
.
$route
+
+
new
Date
()
}
//
key() {
//
return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
//
}
}
}
</
script
>
src/views/layout/components/Navbar.vue
View file @
b97b370f
...
...
@@ -8,7 +8,7 @@
<i
class=
"el-icon-caret-bottom"
></i>
</div>
<el-dropdown-menu
class=
"user-dropdown"
slot=
"dropdown"
>
<router-link
class=
'inlineBlock'
to=
"/"
>
<router-link
class=
"inlineBlock"
to=
"/"
>
<el-dropdown-item>
Home
</el-dropdown-item>
...
...
src/views/layout/components/Sidebar/SidebarItem.vue
View file @
b97b370f
<
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'
>
{{
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"
>
{{
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'
>
{{
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"
>
{{
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'
>
{{
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"
>
{{
child
.
meta
.
title
}}
</span>
</el-menu-item>
</router-link>
</
template
>
...
...
src/views/layout/components/Sidebar/index.vue
View file @
b97b370f
<
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=
'routes'
></sidebar-item>
<sidebar-item
:routes=
"routes"
></sidebar-item>
</el-menu>
</scroll-bar>
</
template
>
...
...
src/views/login/index.vue
View file @
b97b370f
...
...
@@ -22,7 +22,7 @@
Sign in
</el-button>
</el-form-item>
<div
class=
'tips'
>
<div
class=
"tips"
>
<span
style=
"margin-right:20px;"
>
username: admin
</span>
</span>
password: admin
</span>
</div>
...
...
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