Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
74b62bf0
authored
Dec 28, 2024
by
jinmh716
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能完善】文件列表: 添加复制链接功能
parent
472da927
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
src/views/infra/file/index.vue
+14
-0
No files found.
src/views/infra/file/index.vue
View file @
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment