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
陈剑华
2024-05-15 16:15:15 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
6360089d440a7e812384832ca6aaa99f6357f6ed
6360089d
2 parents
df5e6648
2016defe
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
18 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
6360089
//缩略标题
import { CommonConstants } from 'wdConstant'
import { ContentDTO } from 'wdBean'
import { DateTimeUtils } from 'wdKit'
import { CommonConstants } from 'wdConstant';
import { ContentDTO } from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { Notes } from './notes';
const TAG = 'Card11Component';
/**
...
...
@@ -16,12 +17,21 @@ export struct Card11Component {
build() {
Column() {
Text(this.contentDTO.newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.width(CommonConstants.FULL_WIDTH)
Stack() {
if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text(this.contentDTO.newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
// 评论等信息
CardSourceInfo({ contentDTO: this.contentDTO })
}.width(CommonConstants.FULL_WIDTH)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
6360089
import { ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { CommonConstants } from 'wdConstant'
;
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { Notes } from './notes';
/**
* 卡片样式:"appStyle":"3"
...
...
@@ -14,10 +15,17 @@ export struct Card3Component {
build() {
Column() {
Text(this.contentDTO.newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
Stack() {
if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text(this.contentDTO.newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
// 评论等信息
CardSourceInfo({ contentDTO: this.contentDTO })
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
6360089
...
...
@@ -22,13 +22,12 @@ export struct Card5Component {
build() {
Stack() {
Image(this.loadImg ? this.contentDTO.coverUrl : '')
.backgroundColor(0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.autoResize(true)
.borderRadius($r('app.float.image_border_radius'))
if (this.titleShowPolicy === 1) {
if (this.titleShowPolicy === 1
|| this.titleShowPolicy === null
) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
...
...
Please
register
or
login
to post a comment