删除文件夹/文件添加确认删除弹出确认框
This commit is contained in:
@@ -64,15 +64,20 @@
|
|||||||
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
||||||
<el-icon><Download /></el-icon>
|
<el-icon><Download /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-popconfirm
|
||||||
v-if="activePath && activePath != '/'"
|
width="220"
|
||||||
type="danger"
|
confirm-button-text="确认"
|
||||||
@click="handleDelDirOrFile(item)"
|
cancel-button-text="取消"
|
||||||
size="small"
|
:title="item?.type == 'file' ? '是否确认删除当前文件?' : '是否确认删除当前文件夹?'"
|
||||||
circle
|
@confirm="handleDelDirOrFile(item)"
|
||||||
|
@cancel="cancelEvent"
|
||||||
>
|
>
|
||||||
|
<template #reference>
|
||||||
|
<el-button v-if="activePath && activePath != '/'" type="danger" size="small" circle>
|
||||||
<el-icon><Delete /></el-icon>
|
<el-icon><Delete /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
</div>
|
</div>
|
||||||
<img v-if="item?.type == 'dir'" @click="handleIntoDir(item)" src="@/assets/img/wenjianjia.svg" />
|
<img v-if="item?.type == 'dir'" @click="handleIntoDir(item)" src="@/assets/img/wenjianjia.svg" />
|
||||||
<img
|
<img
|
||||||
@@ -355,6 +360,8 @@ const handleDelDirOrFile = (row: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//取消删除
|
||||||
|
const cancelEvent = () => {}
|
||||||
|
|
||||||
//下载文件
|
//下载文件
|
||||||
const fileRef = ref()
|
const fileRef = ref()
|
||||||
|
|||||||
Reference in New Issue
Block a user