Skip to content

Commit 5340f48

Browse files
committed
fix: page-view meta info #132
1 parent a7f0417 commit 5340f48

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/layouts/PageView.vue

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<div class="page-header-index-wide">
4242
<slot>
4343
<!-- keep-alive -->
44-
<route-view ref="content"></route-view>
44+
<router-view ref="content"></router-view>
4545
</slot>
4646
</div>
4747
</div>
@@ -50,12 +50,10 @@
5050

5151
<script>
5252
import PageHeader from '@/components/PageHeader'
53-
import RouteView from './RouteView'
5453
5554
export default {
5655
name: 'PageView',
5756
components: {
58-
RouteView,
5957
PageHeader
6058
},
6159
props: {
@@ -88,21 +86,13 @@ export default {
8886
updated () {
8987
this.getPageHeaderInfo()
9088
},
91-
computed: {
92-
93-
getPageTitle () {
94-
return this.$route.meta.title
95-
}
96-
97-
},
9889
methods: {
9990
getPageHeaderInfo () {
10091
// eslint-disable-next-line
10192
this.pageTitle = (typeof(this.title) === 'string' || !this.title) ? this.title : this.$route.meta.title
10293
10394
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
104-
const content = this.$refs.content && this.$refs.content.$children[0]
105-
95+
const content = this.$refs.content
10696
if (content) {
10797
this.description = content.description
10898
this.linkList = content.linkList

0 commit comments

Comments
 (0)