mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
migrate login page to composition API and typescript
This commit is contained in:
@@ -528,6 +528,20 @@ export function useI18n() {
|
||||
return textArray.join(separator);
|
||||
}
|
||||
|
||||
function getServerTipContent(tipConfig: Record<string, string>): string {
|
||||
if (!tipConfig) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const currentLanguage = getCurrentLanguageTag();
|
||||
|
||||
if (isString(tipConfig[currentLanguage])) {
|
||||
return tipConfig[currentLanguage];
|
||||
}
|
||||
|
||||
return tipConfig['default'] || '';
|
||||
}
|
||||
|
||||
function getCurrentLanguageTag(): string {
|
||||
return locale.value;
|
||||
}
|
||||
@@ -1298,6 +1312,7 @@ export function useI18n() {
|
||||
ti: translateIf,
|
||||
te: translateError,
|
||||
joinMultiText,
|
||||
getServerTipContent,
|
||||
// get current language info
|
||||
getCurrentLanguageTag,
|
||||
getCurrentLanguageInfo,
|
||||
|
||||
Reference in New Issue
Block a user