mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-17 04:15:07 +08:00
chore: 规范不符合eslint校验规则的代码
This commit is contained in:
@ -41,6 +41,7 @@ export const useI18n = (
|
||||
const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => {
|
||||
if (!key) return ''
|
||||
if (!key.includes('.') && !namespace) return key
|
||||
//@ts-ignore
|
||||
return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters))
|
||||
}
|
||||
return {
|
||||
|
@ -5,6 +5,7 @@ const TIME_AGO_MESSAGE_MAP: {
|
||||
'zh-CN': UseTimeAgoMessages
|
||||
en: UseTimeAgoMessages
|
||||
} = {
|
||||
// @ts-ignore
|
||||
'zh-CN': {
|
||||
justNow: '刚刚',
|
||||
past: (n) => (n.match(/\d/) ? `${n}前` : n),
|
||||
@ -17,6 +18,7 @@ const TIME_AGO_MESSAGE_MAP: {
|
||||
minute: (n) => `${n} 分钟`,
|
||||
second: (n) => `${n} 秒`
|
||||
},
|
||||
// @ts-ignore
|
||||
en: {
|
||||
justNow: 'just now',
|
||||
past: (n) => (n.match(/\d/) ? `${n} ago` : n),
|
||||
|
Reference in New Issue
Block a user