2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 22:07:16 +08:00

fix(#612): 优化复制功能

This commit is contained in:
耗子
2025-03-18 02:41:06 +08:00
parent 03168a5652
commit f1246ee779
6 changed files with 36 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { renderIcon } from '@/utils'
import copy2clipboard from '@vavt/copy2clipboard'
import { NButton, NInput, NInputGroup, NPopconfirm, NTag } from 'naive-ui'
import database from '@/api/panel/database'
@@ -69,8 +70,9 @@ const columns: any = [
type: 'primary',
ghost: true,
onClick: () => {
navigator.clipboard.writeText(row.password)
window.$message.success('复制成功')
copy2clipboard(row.password).then(() => {
window.$message.success('复制成功')
})
}
},
{ default: () => '复制' }

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { renderIcon } from '@/utils'
import copy2clipboard from '@vavt/copy2clipboard'
import { NButton, NFlex, NInput, NInputGroup, NPopconfirm, NTag } from 'naive-ui'
import database from '@/api/panel/database'
@@ -63,8 +64,9 @@ const columns: any = [
type: 'primary',
ghost: true,
onClick: () => {
navigator.clipboard.writeText(row.password)
window.$message.success('复制成功')
copy2clipboard(row.password).then(() => {
window.$message.success('复制成功')
})
}
},
{ default: () => '复制' }