iOSでのトレインビューの挙動修正
This commit is contained in:
parent
2a3fd7774d
commit
209568df4c
@ -67,7 +67,7 @@ export default function Setting(props) {
|
||||
textAlignVertical: "center",
|
||||
}}
|
||||
>
|
||||
内部バージョン: 4.3.2
|
||||
内部バージョン: 4.3.3
|
||||
</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
</View>
|
||||
|
@ -1,18 +1,32 @@
|
||||
const WEBVIEW = "WEBVIEW";
|
||||
import React, { Component } from "react";
|
||||
import { StatusBar, View } from "react-native";
|
||||
import React, { Component, useRef } from "react";
|
||||
import { StatusBar, Platform, View } from "react-native";
|
||||
import { WebView } from "react-native-webview";
|
||||
const jss = `document.getElementById('Footer').style.display = 'none';`;
|
||||
export default function trainbase({ route, navigation }) {
|
||||
|
||||
export default function TrainBase({ route }) {
|
||||
const { info } = route.params;
|
||||
const webview = useRef();
|
||||
const jss = `document.getElementById('Footer').style.display = 'none';
|
||||
${
|
||||
Platform.OS == "ios" &&
|
||||
`document.getElementsByTagName("html")[0].style['font-size'] = '11px';`
|
||||
}`;
|
||||
//const jss = `alert("ほげ")`;
|
||||
console.log(info);
|
||||
return (
|
||||
<View style={{ height: "100%" }}>
|
||||
<WebView
|
||||
//useWebKit={true}
|
||||
ref={webview}
|
||||
source={{ uri: "https://train.jr-shikoku.co.jp/" + info }}
|
||||
useWebKit={true}
|
||||
originWhitelist={["https://train.jr-shikoku.co.jp"]}
|
||||
originWhitelist={[
|
||||
"https://train.jr-shikoku.co.jp",
|
||||
"https://train.jr-shikoku.co.jp/sp.html",
|
||||
]}
|
||||
mixedContentMode={"compatibility"}
|
||||
javaScriptEnabled={true}
|
||||
injectedJavaScript={jss}
|
||||
setSupportMultipleWindows={false}
|
||||
onMessage={(event) => {}}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user