陈剑华

fix: 标签问题优化,图集详情ui优化

... ... @@ -78,7 +78,8 @@ export struct Card11Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
}.alignContent(Alignment.TopStart)
... ...
... ... @@ -95,7 +95,8 @@ export struct Card20Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
.width('100%')
... ...
... ... @@ -87,7 +87,8 @@ export struct Card2Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
.width('100%')
... ...
... ... @@ -74,7 +74,8 @@ export struct Card3Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
}.alignContent(Alignment.TopStart)
... ...
... ... @@ -85,7 +85,8 @@ export struct Card4Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
.width('100%')
... ...
... ... @@ -115,7 +115,8 @@ export struct Card5Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
}.alignContent(Alignment.TopStart)
... ...
... ... @@ -86,7 +86,8 @@ export struct Card6Component {
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
.width('100%')
... ...
... ... @@ -205,13 +205,19 @@ struct CarouselLayout01CardView {
.backgroundColor(0xf5f5f5)
.borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0)
Row()
.width(CommonConstants.FULL_PARENT)
.height(60)
.linearGradient({
direction: GradientDirection.Top, // 渐变方向:to Top/从下往上
colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]]
})
Stack() {
Row()
.width(CommonConstants.FULL_PARENT)
.height(60)
.linearGradient({
direction: GradientDirection.Top, // 渐变方向:to Top/从下往上
colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]]
})
}
.width(CommonConstants.FULL_PARENT)
.height(CommonConstants.FULL_PARENT)
.alignContent(Alignment.Bottom)
Column() {
// 这里用于展示轮播图右上角信息,这里只对直播类型的展示
if (this.item.objectType === '2' || this.item.objectType === '4') {
... ... @@ -246,7 +252,8 @@ struct CarouselLayout01CardView {
getNotesContentWidth(
this.item.seoTags || this.item.newTags,
this.item.objectType,
this.item.objectLevel
this.item.objectLevel,
this.item.top
)
)
}
... ...
... ... @@ -20,9 +20,10 @@ export function getNotesContentWidth(
newTags?: string,
objectType?: number | string,
objectLevel?: number | string,
top?: number,
fontSize?: string | number | Resource
) {
let textContent: string = returnTypeTitleFn(newTags, objectType, objectLevel)
let textContent: string = ''
let px = 0
const paddingRightAndLeft = vp2px(8)
const marginRight = vp2px(6);
... ... @@ -30,7 +31,7 @@ export function getNotesContentWidth(
if(objectType == '5'){
textContent = returnTypeTitleFn('', objectType, objectLevel)
} else {
textContent = returnTypeTitleFn(newTags)
textContent = returnTypeTitleFn(newTags, undefined, undefined, top)
}
if (textContent) {
... ... @@ -57,7 +58,8 @@ export function getNotesContentWidth(
export function returnTypeTitleFn(
newTags?: string,
objectType?: number | string,
objectLevel?: number | string
objectLevel?: number | string,
top?: number
): string {
if (newTags) {
return newTags
... ... @@ -74,5 +76,8 @@ export function returnTypeTitleFn(
if (objectType == 8) {
return '文章'
}
if (top === 1) {
return '置顶'
}
return ''
}
\ No newline at end of file
... ...
... ... @@ -254,12 +254,17 @@ export struct MultiPictureDetailPageComponent {
if (this.followStatus == '0') {
Button({ type: ButtonType.Normal, stateEffect: true }) {
Row() {
Text('+关注').fontSize(12).fontColor(0xffffff)
Image($r('app.media.add'))
.width(12)
.height(12)
.margin({right: 3})
Text('关注').fontSize(12).fontColor(0xffffff)
}.alignItems(VerticalAlign.Center)
}
.borderRadius(4)
.backgroundColor('#ED2800')
.width(48)
.width(54)
.height(24)
.onClick(() => {
this.handleAccention()
... ... @@ -398,9 +403,8 @@ export struct MultiPictureDetailPageComponent {
.lineHeight(22)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({
top: 4,
left: 18,
bottom: 4,
bottom: 8,
right: 18
})
.maxLines(32)
... ...