Browse Source

fix: 请求到任务时,自动滚动功能修改

carbasic
aBin 4 years ago
parent
commit
a1e074269e
  1. 3
      CHANGELOG.md
  2. 6
      src/components/Experience/Experience.vue
  3. 1
      src/components/TimeLine/TimeLine.vue
  4. 17
      src/pages/project/project.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-10-10)
# 0.1.0 (2021-10-12)
### 🌟 新功能
范围|描述|commitId
@ -105,6 +105,7 @@
范围|描述|commitId
--|--|--
- | 1.时间轴数据渲染 2.时间基准线 | [d643af2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d643af2)
- | 暴风眼相关修改 | [6e35490](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6e35490)
- | 插件bug解决 | [41257eb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/41257eb)
- | 初始展示角色修改 | [2ac4053](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2ac4053)
- | 调查问卷未读数计算修改 | [69677ce](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/69677ce)

6
src/components/Experience/Experience.vue

@ -1,7 +1,7 @@
<template>
<view class="role-box">
<img class="role-img" src="https://www.tall.wiki/staticrec/img/qcp-role.png" alt="" />
<view class="w-full change-role-btn flex flex-nowrap justify-between">
<view class="change-role-btn flex flex-row flex-nowrap">
<view
v-for="(item, index) in roles"
:key="index"
@ -105,12 +105,15 @@ export default {
position: relative;
}
.change-role-btn {
width: 100%;
position: absolute;
overflow-x: auto;
bottom: 12px;
left: 0;
padding: 0 12px;
}
.role-btn {
flex-shrink: 0;
border: 1px solid #fff;
height: 32px;
text-align: center;
@ -118,6 +121,7 @@ export default {
font-size: 12px;
color: #709dff;
padding: 0 8px;
margin: 0 8px;
border-radius: 12px;
}
.avtive-btn {

1
src/components/TimeLine/TimeLine.vue

@ -110,6 +110,7 @@ export default {
this.$t.storage.setStorageSync('taskId', ''); //
} else {
const item = this.tasks.find(task => task.detailId);
console.log(this.tasks);
if (item) {
this.setScrollToTaskId(`a${item.id}`);
} else {

17
src/pages/project/project.vue

@ -79,6 +79,7 @@ export default {
},
onLoad(options) {
console.log('this.$route.query: ', this.$route);
if (options.share && options.share === '1') {
this.shareInit(options);
} else {
@ -177,13 +178,13 @@ export default {
await this.getInitTasks(); //
//
let timer = null;
timer = setInterval(() => {
if (this.showScrollTo) {
clearInterval(timer);
this.$nextTick(() => this.$refs.timeLine.setScrollPosition());
}
}, 500);
// let timer = null;
// timer = setInterval(() => {
// if (this.showScrollTo) {
// clearInterval(timer);
// this.$nextTick(() => this.$refs.timeLine.setScrollPosition());
// }
// }, 1000);
},
// ||
@ -197,6 +198,7 @@ export default {
arr.push(task);
}
});
that.$nextTick(() => that.$refs.timeLine.setScrollPosition());
if (detailId !== -1) {
// 1
const { pageCount } = that.$t.task;
@ -349,6 +351,7 @@ export default {
* @param {object | null} options
*/
init(options) {
console.log('options: ', options);
if (!this.token) {
// tokenuserIdtoken
// token userId

Loading…
Cancel
Save