mirror of
https://github.com/timepill/timepill-app.git
synced 2025-04-30 01:49:30 +08:00
修复欢迎页android无法通过物理键后退的问题
This commit is contained in:
parent
fcf86bc1aa
commit
0c02b59a89
1 changed files with 3 additions and 3 deletions
|
@ -59,18 +59,18 @@ export default class WebViewPage extends Component {
|
|||
|
||||
} else if(buttonId == 'open') {
|
||||
Linking.openURL(this.webViewState.url);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
goBack() {
|
||||
goBack = () => {
|
||||
if (this.webViewState.canGoBack) {
|
||||
this.webView.injectJavaScript('window.history.back();');
|
||||
|
||||
} else {
|
||||
Navigation.pop(this.props.componentId);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
onNavigationStateChange(event) {
|
||||
this.webViewState = event;
|
||||
|
|
Loading…
Reference in a new issue