Unverified Commit 48cd4a7c authored by Licho's avatar Licho Committed by GitHub

feat: l function force to return string type for just string (#2083)

* refactor: package uri wrong, and trivial optimization * feat: l function force to return string type for just string * Spotless Apply --------- Co-authored-by: 's avatarleechor <leechor@users.noreply.github.com>
parent aaea19e2
...@@ -25,7 +25,7 @@ export const imgStyle = { ...@@ -25,7 +25,7 @@ export const imgStyle = {
height: 42, height: 42,
}; };
export const MONTH_LIST :any = { export const MONTH_LIST = {
'01': l('global.month.january'), '01': l('global.month.january'),
'02': l('global.month.february'), '02': l('global.month.february'),
'03': l('global.month.march'), '03': l('global.month.march'),
...@@ -40,7 +40,7 @@ export const MONTH_LIST :any = { ...@@ -40,7 +40,7 @@ export const MONTH_LIST :any = {
'12': l('global.month.december'), '12': l('global.month.december'),
}; };
export const WEEK_LIST :any = [ export const WEEK_LIST = [
l('global.week.sunday'), l('global.week.sunday'),
l('global.week.monday'), l('global.week.monday'),
l('global.week.tuesday'), l('global.week.tuesday'),
...@@ -48,4 +48,4 @@ export const WEEK_LIST :any = [ ...@@ -48,4 +48,4 @@ export const WEEK_LIST :any = [
l('global.week.thursday'), l('global.week.thursday'),
l('global.week.friday'), l('global.week.friday'),
l('global.week.saturday') l('global.week.saturday')
]; ];
\ No newline at end of file
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
import { getIntl } from '@umijs/max'; import { getIntl } from '@umijs/max';
export const l = (id: string, defaultMessage?: string, value?: {}) => { export const l = (id: string, defaultMessage?: string, value?: {}) : string => {
return getIntl().formatMessage({ id, defaultMessage }, value); return getIntl().formatMessage({ id, defaultMessage }, value);
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment