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
guochunsong
2024-02-03 15:16:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
94aa5e2611a7ee6aa0092f1a8d43ed3f0cff6880
94aa5e26
1 parent
4b4b9297
appstyle: 13 card
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
sight_harmony/wdComponent/src/main/ets/components/view/SingleImageCardAppComponent.ets
sight_harmony/wdComponent/src/main/ets/components/view/SingleImageCardAppComponent.ets
0 → 100644
View file @
94aa5e2
import { Action, CompDTO, ContentDTO, Params } from 'wdBean';
import { CompStyle } from 'wdConstant';
import { Logger } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
const TAG = 'SingleImageCardAppComponent';
const FULL_PARENT: string = '100%';
/**
* 单图卡-3行标题/2行标题
* 枚举值13
*
* 重磅推荐/精选/电视剧/电影/综艺/短剧/更多>/
*/
@Entry
@Component
export struct SingleImageCardAppComponent {
@State compDTO: CompDTO = {} as CompDTO
// @State compDTO: CompDTO = {
// operDataList: [
// {
// coverSize: '660*371',
// coverType: 1,
// coverUrl: 'https://cdnjdphoto.aikan.pdnews.cn/zhbj-20240116/image/content/a9028e7011bb440e94ba7c63d80b39b7.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// newsTitle: '时政微观察丨从外贸“成绩单”看中国经济新亮色',
// } as ContentDTO
// ]
// } as CompDTO
aboutToAppear() {
}
build() {
Column() {
Text(this.compDTO.operDataList[0].newsTitle)
.fontSize(16)
.fontWeight(FontWeight.Bold)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
Image(this.compDTO.operDataList[0].coverUrl)
.borderRadius(5)
.aspectRatio(3 / 2)
.padding({ top: 10 })
Image($r('app.media.icon_share'))
.width(16)
.height(16)
.margin(10)
}.alignItems(HorizontalAlign.End)
.margin(16)
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment