王士厅
import { ContentDTO, FrontLinkObject } from 'wdBean';
import { Logger } from 'wdKit/Index';
import { ProcessUtils } from 'wdRouter/Index';
import { CommentText } from '../comment/view/CommentText';
/**
* 早晚报,topic
... ... @@ -69,17 +71,25 @@ export struct topicInfoView {
Row(){
Text(this.frontLinkObject?.summary ?? "")
.fontSize(14)
.fontColor('#CCFFFFFF')
.maxLines(this.isExpansion?999:3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
Text(this.isExpansion?'收起':'展开').onClick(()=>{
this.isExpansion = !this.isExpansion
})
.fontSize(14)
.fontColor($r('app.color.white'))
CommentText({longMessage:this.frontLinkObject?.summary ?? "",fontSize:14,fontColor:'#CCFFFFFF',isMorningEveningPaper:true})
// Text(this.frontLinkObject?.summary ?? "")
// .fontSize(14)
// .fontColor('#CCFFFFFF')
// .maxLines(this.isExpansion?999:3)
// .textOverflow({ overflow: TextOverflow.Ellipsis })
// .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
// Logger.debug('TAG', `当前屏幕可见区域大小: currentRatio:' +${currentRatio}`)
// if (!isVisible && currentRatio <= 0.0) {
//
// }
// })
//
// Text(this.isExpansion?'收起':'展开').onClick(()=>{
// this.isExpansion = !this.isExpansion
// })
// .fontSize(14)
// .fontColor($r('app.color.white'))
}.alignItems(VerticalAlign.Bottom)
.alignRules({
left: { anchor: "__container__", align: HorizontalAlign.Start },
... ...
... ... @@ -32,6 +32,7 @@ export struct CommentText {
fontColor: ResourceColor = $r('app.color.color_222222')
// 测量文本宽度(单位px)
@State textWidth: number = 0;
isMorningEveningPaper:boolean = false
// constructor(longMessage?:string,) {
// super();
// this.longMessage = longMessage;
... ... @@ -108,6 +109,11 @@ export struct CommentText {
// if (this.maxLineMesssage.endsWith('\n')) {
// this.maxLineMesssage = this.maxLineMesssage.slice(0, this.maxLineMesssage.length - 1)
// }
///早晚报三行显示 展开功能显示末尾
if (this.isMorningEveningPaper) {
this.maxLineMesssage = this.maxLineMesssage.substring(0,this.maxLineMesssage.length - 7)
}
break
}
this.maxLineMesssage = element;
... ...
... ... @@ -9,7 +9,7 @@ const TAG = 'AboutPageUI';
@Component
export struct AboutPageUI {
@State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议','收集个人信息明示清单','第三方信息共享清单'];
@State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议','APP个人信息收集清单','第三方信息共享清单'];
@State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.'
@State version: string = '版本号:v'
dialogController: CustomDialogController = new CustomDialogController({
... ...
... ... @@ -95,6 +95,7 @@ struct LoginProtocolWebview {
}
}.width("100%")
.height("100%")
.backgroundColor(Color.White)
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
... ...