Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-frontM
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
云深项目组
beyond-clouds-frontM
Commits
23ed2e3a
Commit
23ed2e3a
authored
Mar 16, 2020
by
高浩杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
person中路由重定向失效???
parent
40828d3c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
39 deletions
+121
-39
components/moblie/nav.vue
+30
-8
pages/personal-center/like.vue
+53
-0
pages/personal-center/person.vue
+16
-6
pages/personal-center/person/fans.vue
+1
-25
pages/personal-center/person/following.vue
+21
-0
No files found.
components/moblie/nav.vue
View file @
23ed2e3a
...
...
@@ -24,8 +24,8 @@
>
<nuxt-link
style=
"color: #999;"
:to=
"
{path:path, query: {type:item.id}
}"
v-tap="() => toggle(item.id)"
>
:to=
"
path ?
{path: path, query: {type: item.id}} : {path: item.path
}"
>
{{
item
.
label
}}
</nuxt-link>
<yun-div
...
...
@@ -33,7 +33,7 @@
:height-v=
"4"
:border-r=
"[2,2,0,0]"
:margin-v=
"[16,0,0]"
:bg-color-v=
"
item.id === actived
? '#00AAE6' : '#fff'"
>
:bg-color-v=
"
(item.id === actived || item.path === actived)
? '#00AAE6' : '#fff'"
>
</yun-div>
</yun-div>
</yun-div>
...
...
@@ -45,7 +45,9 @@
bg-color-v=
"#fff"
:extend-style=
"
{position: 'absolute',right:0,top:0,overflow: 'visible'}"
>
<slot
v-if=
"!sort"
></slot>
<yun-div
v-else
:extend-style=
"
{
boxShadow: '-28px -0px 40px -22px rgba(0,0,0,.2) inset',
position:'relative',overflow: 'visible'}"
...
...
@@ -88,7 +90,11 @@ export default {
props
:
{
path
:
String
,
navList
:
Array
navList
:
Array
,
sort
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
...
...
@@ -99,17 +105,30 @@ export default {
}
},
mounted
()
{
this
.
toggle
(
this
.
$route
.
query
.
type
)
const
{
path
,
query
}
=
this
.
$route
if
(
this
.
$route
.
query
.
type
)
{
this
.
handleLabelRoute
(
query
.
type
)
}
else
{
this
.
handlePathRoute
(
path
)
}
},
watch
:
{
$route
:
function
()
{
this
.
toggle
(
this
.
$route
.
query
.
type
)
const
{
path
,
query
}
=
this
.
$route
if
(
this
.
$route
.
query
.
type
)
{
this
.
handleLabelRoute
(
query
.
type
)
}
else
{
this
.
handlePathRoute
(
path
)
}
}
},
methods
:
{
toggl
e
(
id
)
{
handleLabelRout
e
(
id
)
{
this
.
actived
=
id
},
handlePathRoute
(
path
)
{
this
.
actived
=
path
},
handleSort
()
{
this
.
showSort
=
!
this
.
showSort
},
...
...
@@ -126,17 +145,20 @@ export default {
color
:
#333333
!important
;
@extend
%animate-transition;
}
.sortLabel
{
@extend
%animate-transition;
&:hover
{
color
:
#00AAE6
;
}
}
.actived
{
display
:
inline-block
;
color
:
#00AAE6
!important
;
transition
:
0.5s
;
transform-origin
:
center
center
;
transform-origin
:
center
center
;
transform
:
rotate
(
180deg
);
}
</
style
>
pages/personal-center/like.vue
View file @
23ed2e3a
<
template
>
<yun-div>
<Nav
:sort=
"false"
:nav-list=
"navList"
:path=
"routesObject.personalCenter.like"
></Nav>
<project-card></project-card>
<project-card></project-card>
</yun-div>
</
template
>
<
script
>
import
Nav
from
"../../components/moblie/nav"
;
import
ProjectCard
from
"../../components/moblie/projectCard"
;
import
commonMixin
from
"../../components/moblie/commonMixin"
;
export
default
{
mixins
:
[
commonMixin
],
components
:
{
ProjectCard
,
Nav
},
data
()
{
return
{
navList
:
[
{
label
:
'项目'
,
id
:
'project'
},
{
label
:
'博客'
,
id
:
'blog'
},
{
label
:
'问答'
,
id
:
'answer'
},
{
label
:
'话题'
,
id
:
'topic'
},
{
label
:
'资讯'
,
id
:
'news'
},
{
label
:
'动态'
,
id
:
'dynamic'
},
]
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
pages/personal-center/person.vue
View file @
23ed2e3a
<
template
>
<yun-div
>
<nav-bar
:path=
"path"
:nav-list=
"navList"
></nav-bar>
<nav-bar
:nav-list=
"navList"
:sort=
"false"
>
<template>
<span
style=
"color: #00AAE6"
>
批量
</span>
</
template
>
</nav-bar>
<nuxt-child></nuxt-child>
<!-- <yun-dialog-->
<!-- title="添加备注"-->
...
...
@@ -30,21 +33,28 @@
<
script
>
import
NavBar
from
"../../components/moblie/nav"
;
import
pageConfig
from
'../../action/page-config'
import
FansCard
from
"../../components/moblie/fansCard"
;
import
commonMixin
from
"../../components/moblie/commonMixin"
;
import
pageConfig
from
'../../action/page-config'
export
default
{
mixins
:
[
commonMixin
],
components
:
{
FansCard
,
NavBar
},
created
()
{
this
.
changeRoute1
({
path
:
this
.
routesObject
.
personalCenter
.
person
.
fans
})
},
data
(){
return
{
path
:
pageConfig
.
routes
.
personalCenter
.
person
.
fans
,
navList
:
[
{
label
:
'粉丝'
,
id
:
'/fans'
path
:
pageConfig
.
routes
.
personalCenter
.
person
.
fans
},
{
label
:
'关注'
,
id
:
'/following'
path
:
pageConfig
.
routes
.
personalCenter
.
person
.
following
,
}
],
slotDialog
:
{
...
...
pages/personal-center/person/fans.vue
View file @
23ed2e3a
<
template
>
<yun-div>
<Nav></Nav>
<fans-card></fans-card>
</yun-div>
</
template
>
<
script
>
import
Nav
from
'../../../components/moblie/nav'
;
import
FansCard
from
"../../../components/moblie/fansCard"
;
export
default
{
components
:
{
FansCard
,
Nav
},
components
:
{
FansCard
},
data
()
{
return
{
path
:
'/project'
,
navList
:
[
{
label
:
'全部项目'
,
id
:
'all'
},
{
label
:
'前端框架'
,
id
:
'10'
}
]
}
},
created
()
{
if
(
this
.
$route
.
query
.
type
)
{
return
}
this
.
$router
.
replace
({
path
:
'/project'
,
query
:
{
type
:
'all'
}
})
}
}
</
script
>
...
...
pages/personal-center/person/following.vue
View file @
23ed2e3a
<
template
>
<yun-div>
<fans-card></fans-card>
</yun-div>
</
template
>
<
script
>
import
FansCard
from
"../../../components/moblie/fansCard"
;
export
default
{
components
:
{
FansCard
},
data
()
{
return
{
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
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