diff --git a/package.json b/package.json index 5bc5dd96..248dcfd7 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "vue-ls": "^3.2.1", "vue-router": "^3.0.6", "vuejs-logger": "^1.5.3", - "vuex": "^3.1.1" + "vuex": "^3.1.1", + "vue-count-to": "^1.0.13" }, "devDependencies": { "@babel/polyfill": "^7.4.4", diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index f575db1a..af32dcb3 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -1,102 +1,58 @@ - - - - + + + + - - - - + + + + - - + + + - 文章总访问共 {{ countsData.visitCount }} 次 + 文章总访问共 + 次 + + - + + - - + + - - 博客建立于 {{ countsData.birthday | moment }} - + 博客建立于 {{ countsData.birthday | moment }} - + + - + - + - + - + - + - + + --> @@ -157,25 +97,13 @@ - - + + - 速记 - + 速记 + + @@ -188,45 +116,24 @@ /> - 保存 + 保存 - - + + - 操作记录 - - + 操作记录 + + + + - + {{ item.type }} @@ -245,17 +152,10 @@ destroyOnClose @close="()=>this.logDrawerVisiable = false" > - + - + {{ item.type }} @@ -274,17 +174,11 @@ /> - - + - + 清空操作日志 @@ -303,16 +197,19 @@ import postApi from '@/api/post' import logApi from '@/api/log' import adminApi from '@/api/admin' import journalApi from '@/api/journal' +import countTo from 'vue-count-to' export default { name: 'Dashboard', mixins: [mixin, mixinDevice], components: { PageView, AnalysisCard, - RecentCommentTab + RecentCommentTab, + countTo }, data() { return { + startVal: 0, logType: logApi.logType, activityLoading: true, writeLoading: true, diff --git a/src/views/dashboard/components/AnalysisCard.vue b/src/views/dashboard/components/AnalysisCard.vue index 60038f07..847eee2a 100644 --- a/src/views/dashboard/components/AnalysisCard.vue +++ b/src/views/dashboard/components/AnalysisCard.vue @@ -7,9 +7,7 @@ - - {{ title }} - + {{ title }} @@ -17,7 +15,13 @@ - {{ typeof number === 'function' && number() || number }} + + @@ -25,8 +29,12 @@