王士厅

fix: 【UI走查-卡片】折叠屏展开-图集卡

{
"ruleSet": [
"plugin:@performance/all"
]
}
\ No newline at end of file
... ...
... ... @@ -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 })
... ...
... ... @@ -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)
... ...
... ... @@ -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; // 角标宽高比
/**
... ...