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
chengen02
2024-05-22 15:17:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e8c38dbb72aefa4467a5a6b0a19fc4f208adb2ba
e8c38dbb
1 parent
6c4acb7c
-fix 修改page边距
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
View file @
e8c38db
...
...
@@ -5,7 +5,6 @@ import { Card3Component } from './cardview/Card3Component';
import { Card4Component } from './cardview/Card4Component';
import { Card5Component } from './cardview/Card5Component';
import { Card6Component } from './cardview/Card6Component';
import { Card9Component } from './cardview/Card9Component';
import { Card10Component } from './cardview/Card10Component';
import { Card11Component } from './cardview/Card11Component';
import { Card12Component } from './cardview/Card12Component';
...
...
@@ -48,8 +47,6 @@ export struct CardParser {
} else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle
.Card_13) {
Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_09) {
Card9Component({ contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_10) {
Card10Component({ compDTO: this.compDTO, contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_11) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
e8c38db
...
...
@@ -4,6 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import PageModel from '../viewmodel/PageModel';
import { CardParser } from './CardParser';
import { Card2Component } from './cardview/Card2Component';
import { Card9Component } from './cardview/Card9Component';
import { Card5Component } from './cardview/Card5Component';
import { AdvCardParser } from './cardViewAdv/AdvCardParser';
import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
...
...
@@ -63,64 +64,68 @@ export struct CompParser {
if (this.compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
if (this.compDTO.operDataList.length > this.audioItems.length) {
ZhCarouselLayout01({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
LiveHorizontalCardComponent({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO })
} else {
HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO })
}
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
ZhSingleRow02({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
ZhSingleRow03({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题
//ZhGridLayout02({ compDTO: this.compDTO })
CompNormalTitle({ compDTO: this.compDTO })
// Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
// Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡
ZhGridLayout02NewsContent({ compDTO: this.compDTO, operDataList: this.compDTO.operDataList })
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
// ZhSingleRow05({ compDTO })
// Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
// Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
ZhSingleRow06({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0] })
Divider().strokeWidth(8).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Card_09) {
//时间链卡
Card9Component({ contentDTO:this.compDTO.operDataList[0] })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: this.compDTO })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
// ZhSingleColumn05({ compDTO: compDTO })
// Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
// Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 })
Divider().strokeWidth(6).color('#f5f5f5')
...
...
@@ -129,10 +134,10 @@ export struct CompParser {
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
//Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
Divider().strokeWidth(
8
).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(
5
).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (!Number.isNaN(Number(this.compDTO.compStyle))) {
CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO });
Divider().strokeWidth(
8).color('#f5f5f5').padding({ left: 0, right: 0
})
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16
})
} else {
// Text(this.compDTO.compStyle)
// .width(CommonConstants.FULL_PARENT)
...
...
Please
register
or
login
to post a comment