From 6a58fc6a22dd7000e1f22235fd199a6afe3cb951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E5=A3=B0?= <36142424+kkwwang@users.noreply.github.com> Date: Wed, 12 Dec 2018 16:41:06 +0800 Subject: [PATCH] Update index.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决svg文件中有‘-’ 时无法正确识别 --- src/icons/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icons/index.js b/src/icons/index.js index 75d9407..6d7b10e 100644 --- a/src/icons/index.js +++ b/src/icons/index.js @@ -22,6 +22,6 @@ const iconList = svgFiles.keys().map(item => svgFiles(item)) export default { // 获取图标icon-(*).svg名称列表, 例如[shouye, xitong, zhedie, ...] getNameList () { - return iconList.map(item => item.default.id.split('-')[1]) + return iconList.map(item => item.default.id.replace('icon-', '')) } }