Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-06-26 16:32:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
35e8a119a1c046f222eee8faa2cf4df6a5b0cf02
35e8a119
1 parent
c336f6f7
fix: 18271 全域-规则_数字显示规则-展示交互问题
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
35e8a11
...
...
@@ -76,8 +76,15 @@ export struct CardSourceInfo {
const num2: string = num.slice(-4, -3); // 千
return num2 === '0' ? num1 + '万' : num1 + '.' + num2 + '万'
} else if (Number.parseInt(num) > 99999999) {
const num1: string = num.slice(0, -8); // 亿
const num2: string = num.slice(-8, -7);
let num1: string = num.slice(0, -8); // 亿
let num2: string = num.slice(-8, -7);
const num3: string = `0.${num.slice(-7, -6)}`
if (Math.round(Number(num3)) > Number(num3)) {
if (`${Number(num2) + 1}`.length === 2) {
num1 = `${Number(num1) + 1}`
num2 = '0'
}
}
return num2 === '0' ? num1 + '亿' : num1 + '.' + num2 + '亿'
}
return num
...
...
Please
register
or
login
to post a comment