mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 19:58:09 +08:00
fix: formatter func parameter type miss (#6186)
* fix: formatter func parameter type miss * fix: lint prettier and other type miss
This commit is contained in:
parent
12b8e93649
commit
8ef1e305bb
@ -212,7 +212,7 @@ const valueEquals = function (a: Array<Date> | any, b: Array<Date> | any) {
|
||||
}
|
||||
|
||||
const parser = function (
|
||||
date: Date | string,
|
||||
date: string | number | Date,
|
||||
format: string,
|
||||
lang: string
|
||||
): Dayjs {
|
||||
@ -223,7 +223,11 @@ const parser = function (
|
||||
return day.isValid() ? day : undefined
|
||||
}
|
||||
|
||||
const formatter = function (date: number | Date, format: string, lang: string) {
|
||||
const formatter = function (
|
||||
date: string | number | Date,
|
||||
format: string,
|
||||
lang: string
|
||||
) {
|
||||
if (isEmpty(format)) return date
|
||||
if (format === 'x') return +date
|
||||
return dayjs(date).locale(lang).format(format)
|
||||
|
Loading…
Reference in New Issue
Block a user