File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 41
41
<div class =" page-header-index-wide" >
42
42
<slot >
43
43
<!-- keep-alive -->
44
- <route -view ref =" content" ></route -view >
44
+ <router -view ref =" content" ></router -view >
45
45
</slot >
46
46
</div >
47
47
</div >
50
50
51
51
<script >
52
52
import PageHeader from ' @/components/PageHeader'
53
- import RouteView from ' ./RouteView'
54
53
55
54
export default {
56
55
name: ' PageView' ,
57
56
components: {
58
- RouteView,
59
57
PageHeader
60
58
},
61
59
props: {
@@ -88,21 +86,13 @@ export default {
88
86
updated () {
89
87
this .getPageHeaderInfo ()
90
88
},
91
- computed: {
92
-
93
- getPageTitle () {
94
- return this .$route .meta .title
95
- }
96
-
97
- },
98
89
methods: {
99
90
getPageHeaderInfo () {
100
91
// eslint-disable-next-line
101
92
this .pageTitle = (typeof (this .title ) === ' string' || ! this .title ) ? this .title : this .$route .meta .title
102
93
103
94
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
104
- const content = this .$refs .content && this .$refs .content .$children [0 ]
105
-
95
+ const content = this .$refs .content
106
96
if (content) {
107
97
this .description = content .description
108
98
this .linkList = content .linkList
You can’t perform that action at this time.
0 commit comments