mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-10 17:42:50 +08:00
fix(copy): Mobile compatibility issues.
This commit is contained in:
@@ -200,10 +200,12 @@ async function saveAdvancedSettings() {
|
||||
}
|
||||
|
||||
// 快捷复制到剪贴板
|
||||
function copyValue(value: string) {
|
||||
async function copyValue(value: string) {
|
||||
try {
|
||||
copyToClipboard(value)
|
||||
$toast.success('已复制到剪贴板')
|
||||
let success
|
||||
success = copyToClipboard(value)
|
||||
if (await success) $toast.success('已复制到剪贴板')
|
||||
else $toast.error(`复制失败:可能是浏览器不支持或被用户阻止!`)
|
||||
} catch (error) {
|
||||
$toast.error('复制失败!')
|
||||
console.log(error)
|
||||
|
||||
Reference in New Issue
Block a user