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
wangyong_wd
2024-04-08 16:47:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4d9f17a96e4b95bb7853f5737c165a384080ad3f
4d9f17a9
1 parent
51183ea4
播报推荐列表弹窗添加
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
5 deletions
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/RecommendLists.ets
sight_harmony/features/wdComponent/src/main/resources/base/element/color.json
sight_harmony/features/wdComponent/src/main/resources/base/media/broadcast_pause.png
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/RecommendLists.ets
View file @
4d9f17a
import { CompInfoBean, CompDTO } from 'wdBean'
import { CompInfoBean, CompDTO
, CompList
} from 'wdBean'
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from '../../utils/ProcessUtils';
/**
* 播报--今日推荐列表
*/
...
...
@@ -9,6 +8,12 @@ import { ProcessUtils } from '../../utils/ProcessUtils';
@Component
export struct RecommendLists {
@Prop recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐-组件信息
recommendDialog: CustomDialogController = new CustomDialogController({
builder: CustomDialogExample({
recommendLists: this.recommendCompInfoBean?.compList
}),
offset: { dx: 0, dy: 0 }
})
build() {
Column(){
...
...
@@ -32,7 +37,7 @@ export struct RecommendLists {
.justifyContent(FlexAlign.Center)
.margin({top: 5})
.onClick(() => {
// console.log(1
)
this.recommendDialog.open(
)
})
}
}
...
...
@@ -62,9 +67,65 @@ export struct RecommendLists {
ProcessUtils.processPage(item.operDataList[0])
})
}
}
@Builder
recommendListItem() {
@CustomDialog
struct CustomDialogExample {
controller: CustomDialogController
@Prop recommendLists: CompList[]
build() {
Column(){
Text('推荐列表')
.fontSize($r('app.float.selected_text_size'))
.fontWeight(500)
.fontColor($r('app.color.color_323232'))
.height(57)
.width(CommonConstants.FULL_WIDTH)
.padding({left: 16})
Divider()
List(){
ForEach(this.recommendLists, (item: CompDTO, index: number) => {
ListItem(){
this.listItem(item, index)
}
.onClick(() => {
ProcessUtils.processPage(item.operDataList[0])
this.controller.close()
})
})
}.layoutWeight(1)
Divider()
Text('取消')
.fontSize($r('app.float.font_size_16'))
.fontColor($r('app.color.color_323232'))
.width(CommonConstants.FULL_WIDTH)
.height(57)
.textAlign(TextAlign.Center)
.onClick(() => {
this.controller.close()
})
}
.height('80%')
}
@Builder listItem(item: CompDTO,index: number) {
Row(){
Text(String(index+1))
.width(24)
.height(24)
.textAlign(TextAlign.Center)
.fontSize($r('app.float.font_size_14'))
.fontColor($r('app.color.color_48505A'))
Text(item.operDataList[0].newsTitle)
.layoutWeight(1)
.maxLines(1)
.textOverflow({overflow:TextOverflow.Ellipsis})
.margin({left: 16})
.fontSize($r('app.float.font_size_16'))
.fontColor($r('app.color.color_212228'))
}
.width(CommonConstants.FULL_WIDTH)
.height(54)
.padding({left: 16, right: 16})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/color.json
View file @
4d9f17a
...
...
@@ -127,6 +127,14 @@
{
"name"
:
"color_EEEEEE"
,
"value"
:
"#EEEEEE"
},
{
"name"
:
"color_323232"
,
"value"
:
"#323232"
},
{
"name"
:
"color_48505A"
,
"value"
:
"#48505A"
}
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/broadcast_pause.png
View file @
4d9f17a
19.1 KB
|
W:
|
H:
1.95 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Please
register
or
login
to post a comment