新建复制粘贴方法

This commit is contained in:
tao
2026-01-12 17:14:39 +08:00
parent 0361053f67
commit 70021db98f

View File

@@ -0,0 +1,8 @@
import { message } from "ant-design-vue";
// 复制到剪贴板
export const handleCopy = async (text: string | number | undefined) => {
if (!text) return;
await navigator.clipboard.writeText(String(text));
message.success(`已复制: ${text}`);
};