mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(docs): [el-icon] fix svg icon cannot copied issue (#5208)
* fix(docs): [el-icon] fix svg icon cannot copied issue * Update docs/.vitepress/vitepress/components/globals/icons.vue * fix: format Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
This commit is contained in:
@@ -33,7 +33,7 @@ const copySvgIcon = async (name, refs) => {
|
||||
if (copyIcon.value) {
|
||||
await copyContent(`<el-icon><${hyphenate(name)} /></el-icon>`)
|
||||
} else {
|
||||
const content = refs[name].querySelector('svg')?.outerHTML ?? ''
|
||||
const content = refs[name]?.[0].querySelector('svg')?.outerHTML ?? ''
|
||||
await copyContent(content)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user