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-08-15 16:01:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9990e319a963317878e2b14eb96e96b8f3c0ce58
9990e319
1 parent
8f6926a8
fix: 【UI走查-卡片】折叠屏展开-图集卡
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
sight_harmony/code-linter.json5
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
sight_harmony/features/wdComponent/src/main/ets/utils/CompUtils.ets
sight_harmony/code-linter.json5
0 → 100644
View file @
9990e31
{
"ruleSet"
:
[
"plugin:@performance/all"
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
9990e31
...
...
@@ -211,16 +211,16 @@ export struct CompParser {
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(
'103%').padding({ left: 16, right: 16 }).margin({left: -6
})
Divider().strokeWidth(1).color('#f5f5f5').width(
CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10
})
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
Divider().strokeWidth(1).color('#f5f5f5').width(
'103%').padding({ left: 16, right: 16 }).margin({left: -6
})
Divider().strokeWidth(1).color('#f5f5f5').width(
CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10
})
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').width(
'103%').padding({ left: 16, right: 16 }).margin({left: -6
})
Divider().strokeWidth(1).color('#f5f5f5').width(
CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10
})
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
...
...
@@ -234,7 +234,7 @@ export struct CompParser {
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
Divider().strokeWidth(1).color('#f5f5f5').width(
'103%').padding({ left: 16, right: 16 }).margin({left: -6,
top:8})
Divider().strokeWidth(1).color('#f5f5f5').width(
CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({
top:8})
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
View file @
9990e31
...
...
@@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
import { CompUtils } from '../../utils/CompUtils';
const TAG = 'Card17Component';
...
...
@@ -57,7 +58,7 @@ export struct Card17Component {
}
}
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize(
$r('app.float.font_size_17')
)
.fontSize(
18
)
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
...
...
@@ -71,7 +72,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url || this.contentDTO.fullColumnImgUrls[0].fullUrl : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.
height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9
)
.
aspectRatio(CompUtils.ASPECT_RATIO_3_2
)
.borderRadius({
topLeft: $r('app.float.image_border_radius'),
bottomLeft: $r('app.float.image_border_radius'),
...
...
@@ -83,7 +84,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url || this.contentDTO.fullColumnImgUrls[1].fullUrl : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.
height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9
)
.
aspectRatio(CompUtils.ASPECT_RATIO_3_2
)
.margin({ bottom: 1 })
.borderRadius({
topRight: $r('app.float.image_border_radius'),
...
...
@@ -100,7 +101,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url || this.contentDTO.fullColumnImgUrls[2].fullUrl : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.
height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9
)
.
aspectRatio(CompUtils.ASPECT_RATIO_3_2
)
.margin({ top: 1 })
.borderRadius({
bottomRight: $r('app.float.image_border_radius'),
...
...
@@ -132,13 +133,13 @@ export struct Card17Component {
})
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO
, viewShowData: false
})
}
.padding({
left: 10,
right: 10,
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
top: 14,
bottom: 14
})
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/CompUtils.ets
View file @
9990e31
...
...
@@ -11,6 +11,7 @@ export class CompUtils {
public static readonly ASPECT_RATIO_1_1: number = 1;
public static readonly ASPECT_RATIO_2_1: number = 2;
public static readonly ASPECT_RATIO_3_4: number = 3 / 4;
public static readonly ASPECT_RATIO_3_2: number = 3 / 2;
public static readonly ASPECT_RATIO_16_9: number = 16 / 9;
public static readonly ASPECT_RATIO_75_45: number = 75 / 45; // 角标宽高比
/**
...
...
Please
register
or
login
to post a comment