Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
5340f483
Unverified
Commit
5340f483
authored
Mar 22, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: page-view meta info #132
parent
a7f04177
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
PageView.vue
src/layouts/PageView.vue
+2
-12
No files found.
src/layouts/PageView.vue
View file @
5340f483
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<div
class=
"page-header-index-wide"
>
<div
class=
"page-header-index-wide"
>
<slot>
<slot>
<!-- keep-alive -->
<!-- keep-alive -->
<route
-view
ref=
"content"
></route
-view>
<route
r-view
ref=
"content"
></router
-view>
</slot>
</slot>
</div>
</div>
</div>
</div>
...
@@ -50,12 +50,10 @@
...
@@ -50,12 +50,10 @@
<
script
>
<
script
>
import
PageHeader
from
'@/components/PageHeader'
import
PageHeader
from
'@/components/PageHeader'
import
RouteView
from
'./RouteView'
export
default
{
export
default
{
name
:
'PageView'
,
name
:
'PageView'
,
components
:
{
components
:
{
RouteView
,
PageHeader
PageHeader
},
},
props
:
{
props
:
{
...
@@ -88,21 +86,13 @@ export default {
...
@@ -88,21 +86,13 @@ export default {
updated
()
{
updated
()
{
this
.
getPageHeaderInfo
()
this
.
getPageHeaderInfo
()
},
},
computed
:
{
getPageTitle
()
{
return
this
.
$route
.
meta
.
title
}
},
methods
:
{
methods
:
{
getPageHeaderInfo
()
{
getPageHeaderInfo
()
{
// eslint-disable-next-line
// eslint-disable-next-line
this
.
pageTitle
=
(
typeof
(
this
.
title
)
===
'string'
||
!
this
.
title
)
?
this
.
title
:
this
.
$route
.
meta
.
title
this
.
pageTitle
=
(
typeof
(
this
.
title
)
===
'string'
||
!
this
.
title
)
?
this
.
title
:
this
.
$route
.
meta
.
title
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
const
content
=
this
.
$refs
.
content
&&
this
.
$refs
.
content
.
$children
[
0
]
const
content
=
this
.
$refs
.
content
if
(
content
)
{
if
(
content
)
{
this
.
description
=
content
.
description
this
.
description
=
content
.
description
this
.
linkList
=
content
.
linkList
this
.
linkList
=
content
.
linkList
...
...
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