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
douaojie
2024-04-25 16:43:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f250f74f72de3b9a49bbe6c3df3cbd708f06c467
f250f74f
1 parent
36a76555
fix: 头图卡标题不显示
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
View file @
f250f74
...
...
@@ -7,6 +7,7 @@ export interface CompDTO {
cityCode: string;
compStyle: string;
compType: string;
// dataSourceRequest: any[];
districtCode: string;
extraData?: string;
...
...
@@ -15,6 +16,7 @@ export interface CompDTO {
imgSize: string;
innerUrl: string;
linkUrl: string;
// meddleDataList: any[];
name: string;
objectId: string; // 跳转页面id?
...
...
@@ -29,6 +31,7 @@ export interface CompDTO {
subType: string;
imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2
audioDataList: AudioDTO[];
titleShowPolicy: string | number;
/**
* 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING )
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
f250f74
...
...
@@ -20,8 +20,8 @@ import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
import { ZhGridLayout02 } from './compview/ZhGridLayout02';
import { Card5Component } from './cardview/Card5Component';
import { Card2Component } from './cardview/Card2Component';
import { Card5Component } from './cardview/Card5Component';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
/**
...
...
@@ -71,7 +71,7 @@ export struct CompParser {
ZhSingleRow06({ compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ contentDTO: compDTO.operDataList[0] })
Card5Component({ contentDTO: compDTO.operDataList[0]
, titleShowPolicy: compDTO.titleShowPolicy
})
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ contentDTO: compDTO.operDataList[0] })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
f250f74
...
...
@@ -20,6 +20,7 @@ export struct Card5Component {
// newsTitle: '今天是周日,天气阴天,明天是周一。',
// objectType: '6'
} as ContentDTO;
@State titleShowPolicy: number | string = 1
build() {
Stack() {
...
...
@@ -27,7 +28,7 @@ export struct Card5Component {
.width(CommonConstants.FULL_WIDTH)
.autoResize(true)
.borderRadius($r('app.float.image_border_radius'))
if (this.
contentDTO.titleShow
=== 1 && this.contentDTO.newsTitle) {
if (this.
titleShowPolicy
=== 1 && this.contentDTO.newsTitle) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
...
...
Please
register
or
login
to post a comment