Commit 7b7ce96c by 芋道源码 Committed by Gitee

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

Merge pull request !631 from jinmh/master
parents e508da7f 74b62bf0
......@@ -97,6 +97,13 @@
<template #default="scope">
<el-button
link
type="primary"
@click="copyToClipboard(scope.row.url)"
>
复制链接
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['infra:file:delete']"
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment