File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ export default {
5353 computed: {
5454 // 时间降序后的博客列表
5555 posts () {
56- this ._setPage (this ._getStoragePage ())
5756 let posts = this .$currentCategories .pages
5857 posts = this ._filterPostData (posts)
5958 this ._sortPostData (posts)
@@ -66,6 +65,7 @@ export default {
6665 },
6766
6867 mounted () {
68+ this ._setPage (this ._getStoragePage ())
6969 this .recoShow = true
7070 },
7171
@@ -90,6 +90,12 @@ export default {
9090 _getTimeNum (date ) {
9191 return parseInt (new Date (date .frontmatter .date ).getTime ())
9292 }
93+ },
94+
95+ watch: {
96+ $route () {
97+ this ._setPage (this ._getStoragePage ())
98+ }
9399 }
94100}
95101 </script >
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ export default {
4444 computed: {
4545 // 时间降序后的博客列表
4646 posts () {
47- this ._setPage (this ._getStoragePage ())
4847 let posts = this .$currentTags .pages
4948 posts = this ._filterPostData (posts)
5049 this ._sortPostData (posts)
@@ -53,6 +52,7 @@ export default {
5352 },
5453
5554 mounted () {
55+ this ._setPage (this ._getStoragePage ())
5656 this .recoShow = true
5757 },
5858
@@ -76,6 +76,12 @@ export default {
7676 this .$page .currentPage = page
7777 this ._setStoragePage (page)
7878 }
79+ },
80+
81+ watch: {
82+ $route () {
83+ this ._setPage (this ._getStoragePage ())
84+ }
7985 }
8086}
8187 </script >
You can’t perform that action at this time.
0 commit comments