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