Browse Source

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

pull/3619/head
xachary 3 years ago
committed by GitHub
parent
commit
246d1be89e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      src/views/sys/exception/Exception.vue

8
src/views/sys/exception/Exception.vue

@ -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>
);

Loading…
Cancel
Save