Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Commit eda65f6

Browse files
authored
Merge pull request #285 from suilyy/sig
fix: 修改本地html数据切换不生效的问题
2 parents 8ac93af + 506a72d commit eda65f6

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ msbuild.binlog
6262
example/msbuild.binlog
6363

6464
*.tgz
65+
harmony/rn_webview/oh-package-lock.json5
66+
harmony/rn_webview/BuildProfile.ets

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @react-native-oh-tpl/react-native-webview
22

3-
This project is based on [react-native-webview](https://github.com/react-native-webview/react-native-webview)
3+
This project is based on [react-native-webview@13.10.2](https://github.com/react-native-webview/react-native-webview/tree/v13.10.2)
44

55
## Documentation
66

harmony/rn_webview/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"main": "index.ets",
99
"version": "13.10.3-rc.2",
1010
"dependencies": {
11-
"@rnoh/react-native-openharmony": "0.72.59"
11+
"@rnoh/react-native-openharmony": "^0.72.59"
1212
}
1313
}

harmony/rn_webview/src/main/ets/RNCWebView.ets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,11 @@ export struct RNCWebView {
456456
private onDescriptorWrapperChange(descriptorWrapper: WebViewDescriptor) {
457457
this.initVariable()
458458
this.descriptorWrapper = descriptorWrapper
459-
if (this.html != "" && this.html != this.source.html) {
460-
Logger.debug(TAG, "[RNOH] html is update")
461-
this.html = this.source.html
459+
if (this.source.html != "" && this.html != this.source.html) {
462460
if (this.controllerAttached) {
463461
this.loadHtmlData(this.source.html, this.source.baseUrl)
462+
Logger.debug(TAG, "[RNOH] html is update")
463+
this.html = this.source.html
464464
}
465465
} else if (this.url != this.source.uri) {
466466
if (this.source.uri != "") {
@@ -502,7 +502,7 @@ export struct RNCWebView {
502502
}
503503
})
504504
}
505-
this.html = this.source.html
505+
// this.html = this.source.html
506506
this.webviewWidth = this.descriptorWrapper.layoutMetrics.frame.size.width
507507
this.webviewHeight = this.descriptorWrapper.layoutMetrics.frame.size.height
508508
this.scrollEnabled = this.descriptorWrapper.rawProps.scrollEnabled;

0 commit comments

Comments
 (0)