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

Merge pull request !631 from jinmh/master
This commit is contained in:
芋道源码 authored and Gitee committed 2025-01-04 01:30:37 +00:00
commit 7b7ce96c66
1 file changed
+14
+14
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 {