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-09-27 14:44:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7df2c546e2f255fa3e3ba91292e9dfbb53cc6c17
7df2c546
1 parent
ff8db9c2
feat:优化早晚主色取值
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
7df2c54
...
...
@@ -249,8 +249,7 @@ export struct MorningEveningPaperComponent {
// 图片转换为PixelMap对象
// const pixelMap: image.PixelMap = await image2PixelMap(item.icon);
// console.log(TAG, "compInfoBean compStyle = " + imageUrl)
if (this.pageInfoBean.backgroundColor.length > 0){
if (this.pageInfoBean.backgroundColor.length > 0 && this.pageInfoBean.topicInfo?.frontLinkObject != undefined){
let colorDatas = ColorUtils.hexColorValueToRGB(this.pageInfoBean.backgroundColor)
let color = ColorUtils.getMorningEveningPaperRgb({red:colorDatas[0],green:colorDatas[1],blue:colorDatas[2],alpha:1})
this.mixedBgColor = "#ff" + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0');
...
...
@@ -258,6 +257,7 @@ export struct MorningEveningPaperComponent {
}
if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) {
const imageSource: image.ImageSource | undefined = await getPicture(imageUrl)
this.pickColor(imageSource)
} else {
...
...
Please
register
or
login
to post a comment