Commit 219000a0 by HoMeTown

feat: 收藏页的复制

parent b7cfa85b
...@@ -45,7 +45,9 @@ export const Collect: React.FC = () => { ...@@ -45,7 +45,9 @@ export const Collect: React.FC = () => {
showToast('您的浏览器不支持复制', 'error') showToast('您的浏览器不支持复制', 'error')
return return
} }
await navigator.clipboard.writeText(item.answer) const text = `问:${item.question}\n答:${item.answer}
`
await navigator.clipboard.writeText(text)
showToast('复制成功!快去分享吧!', 'success') showToast('复制成功!快去分享吧!', 'success')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment