chore: clean code

This commit is contained in:
Mirtle
2026-03-26 17:52:31 +08:00
parent 17a04afe39
commit ff1da70fbd
7 changed files with 11 additions and 15 deletions

View File

@@ -63,8 +63,6 @@ end
-- 数值转换为中文
local function number2cnChar(num, flag, digitUnit, wordFigure) --flag=0中文小写反之为大写
local result = ""
if tonumber(flag) < 1 then
digitUnit = digitUnit or { [1] = "", [2] = "亿" }
wordFigure = wordFigure or { [1] = "", [2] = "", [3] = "", [4] = "" }
@@ -73,6 +71,7 @@ local function number2cnChar(num, flag, digitUnit, wordFigure) --flag=0中文小
wordFigure = wordFigure or { [1] = "", [2] = "", [3] = "", [4] = "" }
end
local lens = string.len(num)
local result
if lens < 5 then
result = formatNum(num, flag)
elseif lens < 9 then