- MENU
+ MENU
@@ -92,14 +102,40 @@ import { getSetting } from '@/api/user'
articleList: [],
backImageSrc: "~@/assets/img/widget-img1.jpg",
userSetting: {},
+ pagination: {
+ pageIndex: this.$route.query.page ? parseInt(decodeURI(this.$route.query.page)) : 1,
+ pageSize: 10,
+ total: 0,
+ },
+ scrollTop: 0
}
},
mounted() {
this.getSetting()
this.getMarkDown()
- const that = this
- window.onresize = function() {
- }
+ console.log('mounted')
+ },
+ // beforeRouteEnter (to, from, next) {
+ // console.log('beforeRouteEnter')
+ // next(vm => {
+ // console.log(vm.scrollTop)
+ // document.body.scrollTop = vm.scrollTop
+ // })
+ // },
+ // // beforeRouteUpdate (to, from, next) {
+ // // console.log('beforeRouteUpdate')
+ // // next()
+ // // },
+ // beforeRouteLeave(to, from, next) {
+ // to.meta.keepAlive = false;
+ // next();
+ // },
+ activated() {
+ console.log('activated',this.scrollTop)
+ },
+ deactivated() {
+ console.log('deactivated')
+ // this.scrollTop = document.documentElement.scrollTop || document.body.scrollTop
},
methods: {
getSetting() {
@@ -131,13 +167,18 @@ import { getSetting } from '@/api/user'
else
return null;
},
- onScroll() {
+ currentChange() {
+ this.$router.push(`?page=${this.pagination.pageIndex}`)
+ this.getMarkDown()
+ this.$refs.alBackTop.nextPageScrollTop()
},
getMarkDown() {
- markdownApi.getMarkdown().then((res) => {
+ markdownApi.getMarkdown({pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize}).then((res) => {
this.articleList = res.data
+ this.pagination.total = res.count
this.$nextTick(() => {
this.isLoading = false
+ this.pagination.pageIndex = parseInt(decodeURI(this.$route.query.page))
})
})
},
diff --git a/src/views/setting/articles/blogManager.vue b/src/views/setting/articles/blogManager.vue
index 6dbb250..8b27076 100644
--- a/src/views/setting/articles/blogManager.vue
+++ b/src/views/setting/articles/blogManager.vue
@@ -27,8 +27,14 @@
配置网站的 Logo,该选项仅作用于顶部导航条
导航栏操作按钮:
-
-
一个操作按钮包含两个部分:Font-awesome图标标签和链接,使用':'隔开。列如:{{example}}:https://github.com/jamebal
+
+
+ 一个操作按钮包含两个部分:
+ Font-awesome
+ 图标标签和链接,使用':'隔开(标签里的内容为该图标的简述)。
+
+ 列如:{{example}}:https://github.com/jamebal (建议不超过5项)
+
@@ -46,7 +52,7 @@ export default {
data() {
return {
activeNames: ['1'],
- example: '
',
+ example: '
github',
form: {
backgroundSite: '',
backgroundTextSite: '',