1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| import { floatToFixed2 } from '@/utils'
|
| // 格式化金额【分转元】
| // @ts-ignore
| export const fenToYuanFormat = (_, __, cellValue: any, ___) => {
| return `¥${floatToFixed2(cellValue)}`
| }
|
| export function PrefixInteger(num, length) {
| return (Array(length).join('0') + num).slice(-length);
| }
|
| export function formatTimeslot(timeslot: number): string {
| const strTimeslot = PrefixInteger( timeslot, 8 )
| return strTimeslot.slice(0,2) + ":" + strTimeslot.slice(2,4) + ' ~ ' + strTimeslot.slice(4,6) + ":" + strTimeslot.slice(6,8)
| }
|
|