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
wangliang_wd
2024-06-18 16:01:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1240dd1a1b03c6f77b30a3b4c5e46cce22f20fba
1240dd1a
1 parent
181c0905
feat:调整早晚报,调整人民号展示
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
1240dd1
...
...
@@ -68,8 +68,8 @@ export struct MorningEveningPaperComponent {
@Provide progressVal: number = 0;
@State mixedBgColor: string = ''
// 顶部安全高度赋值
@State topSafeHeight: number = 0;
@State bottomSafeHeight: number = 0;
@State topSafeHeight: number = px2vp(AppStorage.get<number>('topSafeHeight') || 0)
@State bottomSafeHeight: number = px2vp(AppStorage.get<number>('bottomSafeHeight') || 0)
@State isHasTopView: boolean = false;
@State scrollOffset: number = 0
@State currentStatus: number | string |undefined = 0;
...
...
@@ -121,11 +121,11 @@ export struct MorningEveningPaperComponent {
}
async aboutToAppear() {
let windowHight: window.Window = await window.getLastWindow(getContext(this));
//
let windowHight: window.Window = await window.getLastWindow(getContext(this));
// await windowHight.setWindowLayoutFullScreen(true);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
// this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
// this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
...
...
@@ -331,13 +331,14 @@ export struct MorningEveningPaperComponent {
.height('100%')
.objectFit(ImageFit.Contain)
Image($r('app.media.icon_listen'))
.width(24)
.height(24)
.margin({ left: 10 })
.width(20)
.height(20)
.margin({ left: 20 })
.alignSelf(ItemAlign.Start)
Text(`${this.pageInfoBean.topicInfo?.topicPattern === 1 ? '早上好' : this.pageInfoBean.topicInfo?.topicPattern === 2 ? '中午好' : '晚上好'}, 请收听今日新闻播报`)
.fontSize(14)
.fontWeight(FontWeight.Medium)
.margin({ left: 50 })
.fontColor(Color.Black)
.maxLines(1)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
1240dd1
...
...
@@ -346,7 +346,9 @@ export struct SearchResultContentComponent {
}.offset({ left: this.listLeft })
ListItem(){
if (this.data_rmh.length === 10){
this.itemEnd()
}
}.height('100%')
.margin({left:'23lpx'})
}
...
...
@@ -375,6 +377,8 @@ export struct SearchResultContentComponent {
console.info(TAG,'Pan start')
})
.onActionUpdate((event: GestureEvent) => {
///小于10个不展示滑动
if (this.data_rmh.length < 10) return;
if (event && this.isEnd) {
// console.log('event.offsetX',event.offsetX)
this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
...
...
@@ -384,6 +388,7 @@ export struct SearchResultContentComponent {
}
})
.onActionEnd((event: GestureEvent) => {
if (this.data_rmh.length < 10) return;
console.info(TAG,'Pan end')
this.listLeft = 0
// this.moreWidth = 20
...
...
Please
register
or
login
to post a comment