From 4e579228e21cf99b315fc5403701e1cdd3ae833d Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期六, 02 十一月 2024 15:25:17 +0800 Subject: [PATCH] 打印小票 --- src/utils/formatter.ts | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/utils/formatter.ts b/src/utils/formatter.ts index 8777f32..6931319 100644 --- a/src/utils/formatter.ts +++ b/src/utils/formatter.ts @@ -5,3 +5,7 @@ export const fenToYuanFormat = (_, __, cellValue: any, ___) => { return `锟�${floatToFixed2(cellValue)}` } + +export function PrefixInteger(num, length) { + return (Array(length).join('0') + num).slice(-length); +} -- Gitblit v1.9.3