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

Merge pull request !631 from jinmh/master
This commit is contained in:
芋道源码 2025-01-04 01:30:37 +00:00 committed by Gitee
commit 7b7ce96c66
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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 {