refactor(Exception): support original status values with not overrided (#3610)

This commit is contained in:
xachary 2024-02-20 17:25:00 +08:00 committed by GitHub
parent b233973974
commit 246d1be89e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -122,7 +122,13 @@
{() => btnText}
</Button>
),
icon: () => (icon ? <img src={icon} /> : null),
// antv status success | error | info | warning | 404 | 403 | 500
// ExceptionEnum 404 | 403 | 500
// success | error | info | warning
icon:
status && ExceptionEnum[status] === void 0
? () => (icon ? <img src={icon} /> : null)
: undefined,
}}
</Result>
);