系统管理模块, 任务列表Scheduling 增加点击回到顶部的效果

This commit is contained in:
任珮宇 2024-03-07 14:35:17 +08:00
parent b992a4e35d
commit 34369b0544

View File

@ -10,7 +10,7 @@
</template> </template>
<!-- 标题结束 --> <!-- 标题结束 -->
<!-- 内容 --> <!-- 内容 -->
<div class="scheduling-list-content"> <div class="scheduling-list-content" ref="listContainer">
<div class="scheduling-list-item" v-for="item of schedulingInfo" :key="item.id"> <div class="scheduling-list-item" v-for="item of schedulingInfo" :key="item.id">
<h4 class="title"> <h4 class="title">
<span> <span>
@ -320,6 +320,9 @@ export default {
return return
} }
this.schedulingInfo = this.scheduleList[date.format(dateFormat)] this.schedulingInfo = this.scheduleList[date.format(dateFormat)]
this.$nextTick(() => {
this.$refs.listContainer.scrollTop = 0
})
}, },
// //
@ -699,12 +702,14 @@ export default {
} }
&-body { &-body {
height: calc(100% - 52px); height: calc(100% - 52px);
overflow: auto; // overflow: auto;
} }
} }
} }
&-content { &-content {
height: 100%;
padding: 0 12px; padding: 0 12px;
overflow: auto;
} }
&-item { &-item {
margin-top: 15px; margin-top: 15px;