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