yumaochao

fix: 标题过长省略

... ... @@ -4,7 +4,7 @@ import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { Notes } from './notes';
const TAG: string = 'Card4Component';
/**
... ... @@ -43,12 +43,12 @@ export struct Card4Component {
Column() {
//body
Column() {
//新闻标题
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
//新闻标题
Text() {
if (this.titleMarked) {
Span(this.str01)
... ... @@ -63,6 +63,8 @@ export struct Card4Component {
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
//三图
Stack(){
Row() {
... ... @@ -101,10 +103,6 @@ export struct Card4Component {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
}.alignContent(Alignment.TopStart)
//bottom 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
... ...
... ... @@ -38,7 +38,6 @@ export struct DetailVideoListPage {
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
this.openFullScreen()
const action: Action = router.getParams() as Action
if (action) {
this.contentId = action.params?.contentID || ''
... ...