From 38059d20351588c1eb3f929c8494cf61e7b3bc40 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 22 Nov 2019 21:44:39 +0800 Subject: [PATCH] style: remove useless code. --- src/components/Upload/UploadPhoto.vue | 138 ----------------------- src/views/dashboard/Dashboard.vue | 58 +--------- src/views/sheet/internal/JournalList.vue | 104 +---------------- 3 files changed, 2 insertions(+), 298 deletions(-) delete mode 100644 src/components/Upload/UploadPhoto.vue diff --git a/src/components/Upload/UploadPhoto.vue b/src/components/Upload/UploadPhoto.vue deleted file mode 100644 index 42b1a31d..00000000 --- a/src/components/Upload/UploadPhoto.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index c99cd7af..901388eb 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -51,9 +51,6 @@ :xs="12" :style="{ marginBottom: '12px' }" > - 次 - - @@ -220,26 +213,11 @@ placeholder="写点什么吧..." /> - - - - 保存 - @@ -354,7 +332,6 @@ import { PageView } from '@/layouts' import AnalysisCard from './components/AnalysisCard' import RecentCommentTab from './components/RecentCommentTab' import countTo from 'vue-count-to' -import UploadPhoto from '../../components/Upload/UploadPhoto.vue' import postApi from '@/api/post' import logApi from '@/api/log' @@ -367,12 +344,10 @@ export default { PageView, AnalysisCard, RecentCommentTab, - countTo, - UploadPhoto + countTo }, data() { return { - photoList: [], // showMoreOptions: false, startVal: 0, logType: logApi.logType, @@ -389,7 +364,6 @@ export default { content: '', photos: [] }, - journalPhotos: [], // 日志图片集合最多九张 logs: [], logPagination: { page: 1, @@ -450,18 +424,6 @@ export default { next() }, methods: { - // handlerPhotoUploadSuccess(response, file) { - // var callData = response.data.data - // var photo = { - // name: callData.name, - // url: callData.path, - // thumbnail: callData.thumbPath, - // suffix: callData.suffix, - // width: callData.width, - // height: callData.height - // } - // this.journalPhotos.push(photo) - // }, listLatestPosts() { postApi.listLatest(5).then(response => { this.postData = response.data.data @@ -485,8 +447,6 @@ export default { this.$router.push({ name: 'PostEdit', query: { postId: post.id } }) }, handleCreateJournalClick() { - // 给属性填充数据 - // this.journal.photos = this.journalPhotos if (!this.journal.content) { this.$notification['error']({ message: '提示', @@ -497,14 +457,8 @@ export default { journalApi.create(this.journal).then(response => { this.$message.success('发表成功!') this.journal = {} - // this.photoList = [] - // this.showMoreOptions = false }) }, - // handleUploadPhotoWallClick() { - // // 是否显示上传照片墙组件 - // this.showMoreOptions = !this.showMoreOptions - // }, handleShowLogDrawer() { this.logDrawerVisible = true this.loadLogs() @@ -541,13 +495,3 @@ export default { } } - - diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index 3e04c4ab..faeee261 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -75,29 +75,6 @@ slot-scope="item, index" :key="index" > - - - - -