mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-03 02:54:40 +08:00
chore(i18n): resolve ts type error
This commit is contained in:
parent
90b45b3a51
commit
b976933766
@ -39,7 +39,11 @@ export function useI18n(namespace?: string): {
|
||||
const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => {
|
||||
if (!key) return '';
|
||||
if (!key.includes('.') && !namespace) return key;
|
||||
return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters));
|
||||
|
||||
return (t as (arg0: string, ...arg: I18nTranslationRestParameters) => string)(
|
||||
getKey(namespace, key),
|
||||
...(arg as I18nTranslationRestParameters),
|
||||
);
|
||||
};
|
||||
return {
|
||||
...methods,
|
||||
|
Loading…
Reference in New Issue
Block a user