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
wangliang_wd
2024-10-22 14:12:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cc20e9dbaa1b3edd4d3fe8f75a971ed98c88adf2
cc20e9db
1 parent
68d38605
feat:优化人民号主页发布数处理
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/NumberFormatterUtils.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/commons/wdKit/src/main/ets/utils/NumberFormatterUtils.ets
View file @
cc20e9d
...
...
@@ -16,7 +16,8 @@ export class NumberFormatterUtils {
// 处理 1万到1亿之间的数字,使用万作为单位,小数点后为0则不显示
const wanUnit = num / 10000;
const formattedWan = wanUnit.toFixed(1);
return formattedWan.endsWith('.0') ? `${Math.floor(wanUnit)}万` : `${formattedWan}万`;
const wanUnitW = wanUnit.toFixed(0)
return formattedWan.endsWith('.0') ? `${wanUnitW}万` : `${formattedWan}万`;
} else {
// 数字达到1亿及以上时,转换为亿并处理小数点后为0的情况
const yiUnit = num / 100000000;
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
cc20e9d
...
...
@@ -1114,11 +1114,7 @@ struct createImg {
if (picWidth && picHeight) {
let imageH = 305
let sizeH = this.compWidth * picHeight / picWidth
if (sizeH > imageH) {
return sizeH
}else {
return imageH
}
return Math.max(sizeH,imageH)
} else {
return 305; //普通图
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
cc20e9d
...
...
@@ -207,11 +207,7 @@ struct createImg {
if (picWidth && picHeight) {
let imageH = 305
let sizeH = this.compWidth * picHeight / picWidth
if (sizeH > imageH) {
return sizeH
}else {
return imageH
}
return Math.max(sizeH,imageH)
} else {
return 305; //普通图
}
...
...
Please
register
or
login
to post a comment