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-28 16:02:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b07ffec6bfdc75fdebcf1d51138c145d6ceb074c
b07ffec6
1 parent
f674c282
fix: 19928 横划卡配置跳转到外链,跳转后页面比例与安卓不一致,且无返回按钮,见截图
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 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 @
b07ffec
...
...
@@ -25,6 +25,7 @@ export struct WdWebComponent {
@State subjectData : string = ''
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
@State userAgent:string = 'Mozilla/5.0 (Phone; OpenHarmony 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 ArkWeb/4.1.6.1 Mobile automobile/792 Android'
currentChanged(){
///折叠屏转换
...
...
@@ -54,6 +55,9 @@ export struct WdWebComponent {
let url: string = event.data.getRequestUrl().toString()
return this.onLoadIntercept(url);
})
.onControllerAttached(() => {
this.webviewControl.setCustomUserAgent(this.userAgent);
})
}
}
...
...
sight_harmony/products/phone/src/main/ets/pages/web/DefaultWebPage.ets
View file @
b07ffec
...
...
@@ -19,15 +19,6 @@ struct DefaultWebPage {
build() {
Column() {
Column() {
WdWebComponent({
webviewControl: this.webviewControl,
webUrl: this.webUrl,
isPageEnd: $isPageEnd
})
}.layoutWeight(1)
Row() {
Button({ type: ButtonType.Normal }) {
Image($r("app.media.back_icon_black"))
...
...
@@ -42,6 +33,14 @@ struct DefaultWebPage {
}.width("100%").height(44)
.alignItems(VerticalAlign.Center)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
Column() {
WdWebComponent({
webviewControl: this.webviewControl,
webUrl: this.webUrl,
isPageEnd: $isPageEnd
})
}.layoutWeight(1)
}
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT).padding({
...
...
Please
register
or
login
to post a comment