File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 22 <div class =" footer" >
33 <div class =" links" >
44 <a
5- href =" https://pro.ant.design /"
5+ href =" https://pro.loacg.com /"
66 target =" _blank"
77 >Pro 首页</a >
88 <a
Original file line number Diff line number Diff line change @@ -81,24 +81,27 @@ export default {
8181 }
8282 },
8383 mounted () {
84- this .getPageHeaderInfo ()
84+ this .getPageMeta ()
8585 },
8686 updated () {
87- this .getPageHeaderInfo ()
87+ this .getPageMeta ()
8888 },
8989 methods: {
90- getPageHeaderInfo () {
90+ getPageMeta () {
9191 // eslint-disable-next-line
9292 this .pageTitle = (typeof (this .title ) === ' string' || ! this .title ) ? this .title : this .$route .meta .title
9393
94- // 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
9594 const content = this .$refs .content
9695 if (content) {
97- this .description = content .description
98- this .linkList = content .linkList
99- this .extraImage = content .extraImage
100- this .search = content .search === true
101- this .tabs = content .tabs
96+ if (content .pageMeta ) {
97+ Object .assign (this , content .pageMeta )
98+ } else {
99+ this .description = content .description
100+ this .linkList = content .linkList
101+ this .extraImage = content .extraImage
102+ this .search = content .search === true
103+ this .tabs = content .tabs
104+ }
102105 }
103106 }
104107 }
You can’t perform that action at this time.
0 commit comments