From 0b95a0e4f045a2ce9412a073c4127eb4354a0166 Mon Sep 17 00:00:00 2001 From: lucky Date: Fri, 23 Jul 2021 10:30:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E6=8B=89=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=AE=9A=E6=9C=9F=E4=BB=BB=E5=8A=A1=E4=BC=A0=E5=8F=82=EF=BC=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- src/components/TimeLine/TimeLine.vue | 11 ++++---- src/components/TimeLine/component/TimeBox.vue | 25 +++++++++++++------ src/config/time.js | 17 +++++++++++++ src/main.js | 4 ++- src/pages/project/project.vue | 4 +-- src/store/home/state.js | 15 ----------- src/utils/time.js | 12 +++++++++ 8 files changed, 60 insertions(+), 31 deletions(-) create mode 100644 src/config/time.js diff --git a/CHANGELOG.md b/CHANGELOG.md index fff647f..7f73ad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-07-22) +# 0.1.0 (2021-07-23) ### 🌟 新功能 范围|描述|commitId @@ -15,6 +15,7 @@ - | 时间轴修改状态时提示框增加 | [e841392](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e841392) - | 提交到本地 | [9cbe411](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/9cbe411) - | 添加时间轴上下滚动 | [2b81bbc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/2b81bbc) + - | 引入dayjs | [29b8b93](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/29b8b93) - | db store | [6414c4f](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/6414c4f) - | indexedDB | [687394e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/687394e) - | post 封装 | [da52e94](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da52e94) diff --git a/src/components/TimeLine/TimeLine.vue b/src/components/TimeLine/TimeLine.vue index 62b0abb..c4c137f 100644 --- a/src/components/TimeLine/TimeLine.vue +++ b/src/components/TimeLine/TimeLine.vue @@ -20,9 +20,9 @@ id="scroll" > - 到顶啦 + 到顶啦 - 到底啦 + 到底啦 @@ -67,13 +67,14 @@ export default { // 滚动到底部 async handleScrollBottom() { if (this.bottomEnd) return; - // TODO: 时间基准点=最后一个任务的开始时间+当前时间颗粒度 + // 时间基准点=最后一个任务的开始时间+当前时间颗粒度 + const cycle = this.$t.time.computeCycle('天'); + const timeNode = this.$t.time.add(+this.tasks[this.tasks.length - 1].planStart, 1, cycle).valueOf(); const downQuery = { - timeNode: +this.tasks[this.tasks.length - 1].planStart, + timeNode, queryType: 1, queryNum: 6, }; - console.log('downQuery: ', downQuery); await this.$emit('getTasks', downQuery); }, diff --git a/src/components/TimeLine/component/TimeBox.vue b/src/components/TimeLine/component/TimeBox.vue index 1a2f3b6..814e20a 100644 --- a/src/components/TimeLine/component/TimeBox.vue +++ b/src/components/TimeLine/component/TimeBox.vue @@ -1,11 +1,10 @@