We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { copyToClipboard, pasteFromClipboard } = useClipboard(); // 复制操作 const handleCopy =async () => { const displayText = "React 对象111"; // 外部显示的文本 const dataToCopy = { name: "React 对象", value: 123, description: "这是一个测试对象" }; // 要存储的数据 await copyToClipboard(displayText, dataToCopy); }; // 粘贴操作 const handlePaste = async () => { const data = await pasteFromClipboard(); setPastedData(data); };
获取粘贴板数据
在非项目粘贴显示内容
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Demo
获取粘贴板数据
在非项目粘贴显示内容
The text was updated successfully, but these errors were encountered: