mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
feat: 添加文件列表滚动事件处理,优化右键菜单显示逻辑
This commit is contained in:
parent
4c2425c758
commit
3339e6b442
@ -110,6 +110,7 @@
|
||||
@on-select-all-cancel="handleTableSelect"
|
||||
@on-select-all="handleTableSelect"
|
||||
@on-sort-change="handleTableSort"
|
||||
@on-scroll="onFileListScroll"
|
||||
context-menu
|
||||
stripe/>
|
||||
</div>
|
||||
@ -127,7 +128,8 @@
|
||||
@pointermove="onFileListPointerMove"
|
||||
@pointerup="onFileListPointerUp"
|
||||
@pointercancel="onFileListPointerUp"
|
||||
@pointerleave="onFileListPointerLeave">
|
||||
@pointerleave="onFileListPointerLeave"
|
||||
@scroll="onFileListScroll">
|
||||
<ul v-longpress="handleLongpress">
|
||||
<li v-for="item in fileList">
|
||||
<div
|
||||
@ -1181,10 +1183,12 @@ export default {
|
||||
this.$store.commit("longpress/clear")
|
||||
//
|
||||
if (type !== 'file') {
|
||||
!this.windowTouch && this.handleRightClick(event, null)
|
||||
return
|
||||
}
|
||||
const fileItem = this.fileList.find(item => item.id == data.fileId)
|
||||
if (!fileItem) {
|
||||
!this.windowTouch && this.handleRightClick(event, null)
|
||||
return
|
||||
}
|
||||
this.handleRightClick(event, fileItem)
|
||||
@ -1324,6 +1328,10 @@ export default {
|
||||
this.onFileListPointerUp();
|
||||
},
|
||||
|
||||
onFileListScroll() {
|
||||
this.contextMenuVisible = false;
|
||||
},
|
||||
|
||||
updateDragSelection(rect) {
|
||||
const container = this.$refs.blockFileList;
|
||||
if (!container || !rect) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user