You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
392 B
15 lines
392 B
export function formatPoint(value) {
|
|
return Number(value || 0).toLocaleString('zh-CN')
|
|
}
|
|
|
|
export function formatDate(value) {
|
|
if (!value) return '-'
|
|
const date = new Date(value)
|
|
if (Number.isNaN(date.getTime())) return value
|
|
return `${date.getMonth() + 1}月${date.getDate()}日`
|
|
}
|
|
|
|
export function maskPhone(phone = '') {
|
|
return phone.replace(/^(\d{3})\d{4}(\d+)/, '$1****$2')
|
|
}
|