types: reduce any

This commit is contained in:
chenjiahan
2021-03-02 20:12:52 +08:00
parent 6e5329cbe0
commit 7f4651bbbf
3 changed files with 11 additions and 4 deletions

View File

@@ -109,7 +109,7 @@ export default createComponent({
if (status === 'normal') {
return '';
}
return (props as any)[`${status}Text`] || t(status);
return props[`${status}Text` as const] || t(status);
};
const renderStatus = () => {