【功能完善】文件列表: 添加复制链接功能

This commit is contained in:
jinmh716 2024-12-28 12:59:42 +08:00
parent 472da9274e
commit 74b62bf05e

View File

@ -95,6 +95,13 @@
/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="copyToClipboard(scope.row.url)"
>
复制链接
</el-button>
<el-button
link
type="danger"
@ -172,6 +179,13 @@ const openForm = () => {
formRef.value.open()
}
/** 复制到剪贴板方法 */
const copyToClipboard = (text: string) => {
navigator.clipboard.writeText(text).then(() => {
message.success('复制成功')
})
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {