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
陈剑华
2024-08-30 09:43:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4a542971a11f0925ad3b659fd743fb0ed08edea3
4a542971
1 parent
3ab37aa3
fix: defaultWebPage
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
sight_harmony/products/phone/src/main/ets/pages/web/DefaultWebPage.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
View file @
4a54297
...
...
@@ -19,6 +19,7 @@ export struct WdWebComponent {
receiveH5SendToNativeData: (dataString:string | undefined) => void = () =>{
}
@Prop isDefaultPage: boolean = false;
@Prop webUrl: string = ''
@Prop @Watch('onReloadStateChanged') reload: number = 0
@Link isPageEnd: boolean
...
...
@@ -56,9 +57,11 @@ export struct WdWebComponent {
return this.onLoadIntercept(url);
})
// 添加之后影响了专题详情页中 点击稿件进详情的操作,这里先临时注释
// .onControllerAttached(() => {
// this.webviewControl.setCustomUserAgent(this.userAgent);
// })
.onControllerAttached(() => {
if (this.isDefaultPage) {
this.webviewControl.setCustomUserAgent(this.userAgent);
}
})
}
}
...
...
sight_harmony/products/phone/src/main/ets/pages/web/DefaultWebPage.ets
View file @
4a54297
...
...
@@ -38,7 +38,8 @@ struct DefaultWebPage {
WdWebComponent({
webviewControl: this.webviewControl,
webUrl: this.webUrl,
isPageEnd: $isPageEnd
isPageEnd: $isPageEnd,
isDefaultPage: true
})
}.layoutWeight(1)
}
...
...
Please
register
or
login
to post a comment