We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f49952 commit 1432018Copy full SHA for 1432018
packages/doc/src/components/markdown/index.tsx
@@ -62,7 +62,10 @@ function copyAction() {
62
const timer = null
63
item.onclick = () => {
64
if (timer) return
65
- const parent = item.parentNode
+ let parent = item.parentNode
66
+ if (parent.className !== 'code-box') {
67
+ parent = parent.parentNode
68
+ }
69
const code = parent.querySelectorAll('pre code')[0]
70
copyToClipboard(code.innerText)
71
toast.success('复制成功!', {
0 commit comments