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
yumaochao
2024-05-24 14:21:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ae778a64d261fea5198f51d10e51a9e08d9d04ea
ae778a64
1 parent
c842ca33
fix:somebug
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
ae778a6
...
...
@@ -11,7 +11,7 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
@Observed
export class ContentDTO implements BaseDTO {
seoTags
?:string
;
seoTags
: string = ''
;
liveType?: string; // 直播新闻-直播状态
expIds: string = '';
itemId: string = '';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
ae778a6
...
...
@@ -50,13 +50,19 @@ export struct Card2Component {
Column() {
Column() {
Stack() {
//新闻标题
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
//Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
//Notes({ objectType: this.contentDTO.objectType })
}else if(this.contentDTO.objectType == '2'){
if(this.contentDTO.seoTags){
Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
}else if(this.contentDTO.newTags){
Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
}
}else {
if(this.contentDTO.newTags){
Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
...
...
@@ -76,7 +82,9 @@ export struct Card2Component {
.align(Alignment.Start)
.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' ? 35 : 0)
this.contentDTO.objectType == '5' ? 35 : 0 || (this.contentDTO.objectType === '2' && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5) ? 58 :
(this.contentDTO.objectType === '2' && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 0 || this.contentDTO.objectType === '5') ? 35 :
0 )
}.alignContent(Alignment.TopStart)
//.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
...
...
Please
register
or
login
to post a comment