🎈 perf: 优化 copy 兼容性

This commit is contained in:
preschooler
2025-12-28 22:14:42 +08:00
parent ee7c73b475
commit 394c94b67c
10 changed files with 47 additions and 44 deletions

View File

@@ -180,7 +180,7 @@ const handleFiles = (datas: CodegenApi.CodegenPreviewVO[]) => {
/** 复制 **/
const copy = async (text: string) => {
const { copy, copied, isSupported } = useClipboard({ source: text })
const { copy, copied, isSupported } = useClipboard({ legacy: true, source: text })
if (!isSupported) {
message.error(t('common.copyError'))
return