From b9353f91c7fe22f77871d0f837a2ff68c1cfb7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=BF=AA?= Date: Fri, 26 Nov 2021 10:42:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9B=BE=E6=A0=87attrs=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E5=8F=8A=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8#I4I60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/devui-vue/devui/icon/src/icon.tsx | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/packages/devui-vue/devui/icon/src/icon.tsx b/packages/devui-vue/devui/icon/src/icon.tsx index 16e45936..d5e6d395 100644 --- a/packages/devui-vue/devui/icon/src/icon.tsx +++ b/packages/devui-vue/devui/icon/src/icon.tsx @@ -18,7 +18,7 @@ export default defineComponent({ classPrefix: { type: String, default: 'icon' - }, + } }, setup(props) { return { @@ -27,20 +27,22 @@ export default defineComponent({ }, render() { const { name, size, color, classPrefix } = this - - return ( - <> - { - /^((https?):)?\/\//.test(name) - ? {name.split('/')[name.split('/').length - : - } - + return /^((https?):)?\/\//.test(name) ? ( + {name.split('/')[name.split('/').length + ) : ( + ) } -}) \ No newline at end of file +}) -- Gitee