We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e508da7 + 74b62bf commit 7b7ce96Copy full SHA for 7b7ce96
src/views/infra/file/index.vue
@@ -95,6 +95,13 @@
95
/>
96
<el-table-column label="操作" align="center">
97
<template #default="scope">
98
+ <el-button
99
+ link
100
+ type="primary"
101
+ @click="copyToClipboard(scope.row.url)"
102
+ >
103
+ 复制链接
104
+ </el-button>
105
<el-button
106
link
107
type="danger"
@@ -172,6 +179,13 @@ const openForm = () => {
172
179
formRef.value.open()
173
180
}
174
181
182
+/** 复制到剪贴板方法 */
183
+const copyToClipboard = (text: string) => {
184
+ navigator.clipboard.writeText(text).then(() => {
185
+ message.success('复制成功')
186
+ })
187
+}
188
+
175
189
/** 删除按钮操作 */
176
190
const handleDelete = async (id: number) => {
177
191
try {
0 commit comments