Skip to content

Commit

Permalink
优化滚动条自动滚动
Browse files Browse the repository at this point in the history
  • Loading branch information
MarSeventh committed Sep 27, 2024
1 parent 3b94c97 commit 4c5def3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/UploadForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ watch: {
handler() {
if (this.fileList.length > this.fileListLength) {
this.$nextTick(() => {
this.$refs.scrollContainer.setScrollTop(this.$refs.scrollContainer.wrapRef.scrollHeight)
setTimeout(() => {
this.$refs.scrollContainer.setScrollTop(this.$refs.scrollContainer.wrapRef.scrollHeight)
}, 100)
})
}
this.fileListLength = this.fileList.length
Expand Down Expand Up @@ -686,7 +688,7 @@ methods: {
transition: all 0.3s ease;
}
.upload-list-dashboard.list-scrolled {
background-color: rgba(255, 255, 255, 0.8);
background-color: rgba(255, 255, 255, 0.7);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.upload-list-dashboard-title {
Expand Down

0 comments on commit 4c5def3

Please sign in to comment.