From 1e35976bd1759782238c3e5fe4f4d0b3ee05a4c5 Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Mon, 8 Jun 2020 17:40:47 +0800 Subject: [PATCH] perf: update result --- components/result/index.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/result/index.jsx b/components/result/index.jsx index a15307288..77953a754 100644 --- a/components/result/index.jsx +++ b/components/result/index.jsx @@ -35,7 +35,7 @@ export const ResultProps = { extra: PropTypes.any, }; -const renderIcon = (h, prefixCls, { status, icon }) => { +const renderIcon = (prefixCls, { status, icon }) => { if (ExceptionStatus.includes(`${status}`)) { const SVGComponent = ExceptionMap[status]; return ( @@ -49,8 +49,7 @@ const renderIcon = (h, prefixCls, { status, icon }) => { return
{iconNode}
; }; -const renderExtra = (h, prefixCls, extra) => - extra &&
{extra}
; +const renderExtra = (prefixCls, extra) => extra &&
{extra}
; const Result = { name: 'AResult', @@ -72,11 +71,11 @@ const Result = { return (
- {renderIcon(h, prefixCls, { status, icon })} + {renderIcon(prefixCls, { status, icon })}
{title}
{subTitle &&
{subTitle}
} {this.$slots.default &&
{this.$slots.default()}
} - {renderExtra(h, prefixCls, extra)} + {renderExtra(prefixCls, extra)}
); },