Browse Source

fix: 时间轴自动滚动到对应位置修改

wrr
song 4 years ago
parent
commit
1c23019334
  1. 3
      CHANGELOG.md
  2. 15
      src/pages/project/project.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-09-14)
# 0.1.0 (2021-09-16)
### 🌟 新功能
范围|描述|commitId
@ -126,6 +126,7 @@
- | 修改时间轴定期任务加载逻辑 | [1977c00](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/1977c00)
- | 修改角色栏组件 | [a54c601](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a54c601)
- | 修改项目详情页返回首页bug | [e942887](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e942887)
- | 全局任务点击时保存角色id到本地 | [e1a17c5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e1a17c5)
- | 分享项目链接 | [d867239](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d867239)
- | 切换到默认项目角色没有激活状态的bug | [438d448](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/438d448)
- | 切换日历时查询小红点 | [7091789](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7091789)

15
src/pages/project/project.vue

@ -29,7 +29,7 @@ export default {
computed: {
...mapState('user', ['user', 'token']),
...mapState('role', ['visibleRoles', 'roleId']),
...mapState('task', ['timeNode', 'timeUnit', 'tasks', 'regularTask', 'newProjectInfo']),
...mapState('task', ['timeNode', 'timeUnit', 'tasks', 'regularTask', 'newProjectInfo', 'showSkeleton']),
...mapState('project', ['project']),
...mapGetters('task', ['timeGranularity']),
...mapGetters('project', ['projectId']),
@ -119,10 +119,17 @@ export default {
async initPlanTasks() {
this.setPrevPlaceholderTasks(); //
this.setNextPlaceholderTasks(); //
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); //
// // this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); //
await this.getInitTasks(); //
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); //
//
let timer = null;
timer = setInterval(() => {
if (!this.showSkeleton) {
clearInterval(timer);
this.$nextTick(() => this.$refs.timeLine.setScrollPosition());
}
}, 1000);
},
// ||

Loading…
Cancel
Save