From 32af40ea593b0000f67a8e03a98626a6fbb3f92c Mon Sep 17 00:00:00 2001 From: msidolphin Date: Sat, 8 Jan 2022 19:49:21 +0800 Subject: [PATCH] fix(docs): [el-icon] fix svg icon cannot copied issue (#5208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(docs): [el-icon] fix svg icon cannot copied issue * Update docs/.vitepress/vitepress/components/globals/icons.vue * fix: format Co-authored-by: 三咲智子 --- docs/.vitepress/vitepress/components/globals/icons.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/vitepress/components/globals/icons.vue b/docs/.vitepress/vitepress/components/globals/icons.vue index f7cc02817e..a765f94061 100644 --- a/docs/.vitepress/vitepress/components/globals/icons.vue +++ b/docs/.vitepress/vitepress/components/globals/icons.vue @@ -33,7 +33,7 @@ const copySvgIcon = async (name, refs) => { if (copyIcon.value) { await copyContent(`<${hyphenate(name)} />`) } else { - const content = refs[name].querySelector('svg')?.outerHTML ?? '' + const content = refs[name]?.[0].querySelector('svg')?.outerHTML ?? '' await copyContent(content) } }