|
@@ -4,7 +4,7 @@
|
|
|
<div class="bigBox" style="height: 250px; overflow: auto;" v-if="fileList?.length">
|
|
|
<template v-for="(item, index) in fileList" :key="index">
|
|
|
<!-- 循环盒子 -->
|
|
|
- <div class="flexBox" @contextmenu="props.handleRowClick(item)">
|
|
|
+ <div class="flexBox" @contextmenu="rightClick(item, $event)">
|
|
|
<!-- 图片 -->
|
|
|
<div class="imgBox">
|
|
|
<img :src="getImage(item.fileType)" alt="" style="vertical-align: middle;cursor: pointer;">
|
|
@@ -84,10 +84,6 @@ export default {
|
|
|
type: Function,
|
|
|
required: true
|
|
|
},
|
|
|
- handleRowClick: {
|
|
|
- type: Function,
|
|
|
- required: true
|
|
|
- },
|
|
|
thisFolder: {
|
|
|
type: Object,
|
|
|
required: true
|
|
@@ -256,29 +252,32 @@ export default {
|
|
|
return ImgFile.elseFile
|
|
|
}
|
|
|
}
|
|
|
- function rightClick(row, event) {
|
|
|
- event.preventDefault()
|
|
|
- isFolder.value = "N"
|
|
|
- clickRow.value = row
|
|
|
- xz.value = event.pageX
|
|
|
- yz.value = event.pageY
|
|
|
- copyRow.value = row
|
|
|
- clickRowId.value = row.docId
|
|
|
- copyDirId.value = row.dirId
|
|
|
- copySpaceId.value = row.spaceId
|
|
|
- copyFileId.value = row.fileId
|
|
|
- copyFileSize.value = row.fileSize
|
|
|
- copyFileType.value = row.fileType
|
|
|
- nameForm.value.name = row.fileName
|
|
|
- copyFileName.value = row.fileName
|
|
|
- if (cliCC.value === true) {
|
|
|
- cliCC.value = false
|
|
|
- } else {
|
|
|
- cliCC.value = true
|
|
|
- }
|
|
|
- }
|
|
|
+ // function rightClick(row, event) {
|
|
|
+ // event.preventDefault()
|
|
|
+ // isFolder.value = "N"
|
|
|
+ // clickRow.value = row
|
|
|
+ // xz.value = event.pageX
|
|
|
+ // yz.value = event.pageY
|
|
|
+ // copyRow.value = row
|
|
|
+ // clickRowId.value = row.docId
|
|
|
+ // copyDirId.value = row.dirId
|
|
|
+ // copySpaceId.value = row.spaceId
|
|
|
+ // copyFileId.value = row.fileId
|
|
|
+ // copyFileSize.value = row.fileSize
|
|
|
+ // copyFileType.value = row.fileType
|
|
|
+ // nameForm.value.name = row.fileName
|
|
|
+ // copyFileName.value = row.fileName
|
|
|
+ // if (cliCC.value === true) {
|
|
|
+ // cliCC.value = false
|
|
|
+ // } else {
|
|
|
+ // cliCC.value = true
|
|
|
+ // }
|
|
|
+ // }
|
|
|
//对mouseCli数组进行筛选,实现菜单的区分显示
|
|
|
- const filterMouseCli = () => {
|
|
|
+ const rightClick = (row,e)=>{
|
|
|
+ emit("handleRowClick", row,null,e)
|
|
|
+ }
|
|
|
+ const filterMouseCli = () => {
|
|
|
const canPreviewArray = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps', 'csv', 'fods', 'ods', 'ots', 'xls', 'xlsm', 'xlsx', 'xlt', 'xltm', 'xltx', 'fodp', 'odp', 'otp', 'pot', 'potm', 'potx', 'pps', 'ppsm', 'ppsx', 'ppt', 'pptm', 'pptx']
|
|
|
const typeArr = ['.png', '.jpg', '.jpeg', '.JPG', '.mp3', '.mp4']
|
|
|
const imgTypeArr = ['.png', '.jpg', '.jpeg', '.JPG']
|