Authored by zhouxl

rn升级 —review by 宏勇

... ... @@ -17,12 +17,11 @@ let {
let NativeViewPager = requireNativeComponent('YH_ViewPager', YH_ViewPager);
let NativeVerticalViewPager = requireNativeComponent('YH_VerticalViewPager',YH_ViewPager);
var UIManager = require('UIManager');
type Event = Object;
// var ViewPagerConsts = YH_ViewPagerView.Constants;
import {Keyboard} from 'react-native'
import {Keyboard,UIManager} from 'react-native'
export type ViewPagerScrollState = $Enum<{
idle: string,
dragging: string,
... ...
... ... @@ -9,14 +9,12 @@ import {
View,
Dimensions,
TouchableOpacity,
WebView,
LayoutAnimation,
Platform,
} from 'react-native';
import WKWebView from 'react-native-wkwebview-reborn'
import { WebView } from 'react-native-webview';
const BODY_TAG_PATTERN = /\<\/ *body\>/;
... ... @@ -110,34 +108,24 @@ export default class DetailText extends React.Component {
}
return (
<View style={{width: width,height: this.state.realContentHeight,backgroundColor: 'white'}}>
{
Platform.OS == 'ios' ?
<WKWebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}}
source= {{html: codeInject(text), baseUrl: ''}}
scrollEnabled={false}
javaScriptEnabled={true}
decelerationRate="normal"
domStorageEnabled={true}
onNavigationStateChange={this.handleNavigationChange}
onShouldStartLoadWithRequest={hasLink?this.shouldStartLoadWithRequest:null}
>
</WKWebView>
:
<WebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}}
source= {{html: codeInject(text), baseUrl: ''}}
scrollEnabled={false}
javaScriptEnabled={true}
decelerationRate="normal"
domStorageEnabled={true}
onNavigationStateChange={this.handleNavigationChange}
onShouldStartLoadWithRequest={hasLink?this.shouldStartLoadWithRequest:null}
>
</WebView>
}
</View>
<View style={{width: width, height: this.state.realContentHeight, backgroundColor: 'white'}}>
<WebView style={{
width: width - 40,
height: this.state.realContentHeight,
backgroundColor: 'white',
marginRight: 20,
marginLeft: 20
}}
source={{html: codeInject(text), baseUrl: ''}}
scrollEnabled={false}
javaScriptEnabled={true}
decelerationRate="normal"
domStorageEnabled={true}
onNavigationStateChange={this.handleNavigationChange}
onShouldStartLoadWithRequest={hasLink ? this.shouldStartLoadWithRequest : null}
>
</WebView>
</View>
);
}
};
... ...
This diff could not be displayed because it is too large.
... ... @@ -10,27 +10,27 @@
"build:android": "react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output index.android.bundle --assets-dest bundle/",
"bundle": "sh replace-custom-components-file.sh && node bundle.js"
},
"peerDependencies": {
"react": "^16.3.2"
},
"dependencies": {
"@react-native-community/cameraroll": "^1.2.1",
"apsl-react-native-button": "^3.1.1",
"babel": "^6.23.0",
"create-react-class": "^15.6.3",
"deprecated-react-native-listview": "^0.0.6",
"htmlparser2-without-node-native": "^3.9.2",
"immutable": "^3.8.2",
"key-mirror": "^1.0.1",
"lodash": "^4.17.10",
"md5": "^2.2.1",
"moment": "^2.22.1",
"object-assign": "^4.1.1",
"prop-types": "^15.6.1",
"query-string": "^6.1.0",
"react": "^16.9.0",
"react-immutable-proptypes": "^2.1.0",
"react-native": "^0.61.2",
"peerDependencies": {
"react": "^16.3.2"
},
"dependencies": {
"@react-native-community/cameraroll": "^1.2.1",
"apsl-react-native-button": "^3.1.1",
"babel": "^6.23.0",
"create-react-class": "^15.6.3",
"deprecated-react-native-listview": "^0.0.6",
"htmlparser2-without-node-native": "^3.9.2",
"immutable": "^3.8.2",
"key-mirror": "^1.0.1",
"lodash": "^4.17.10",
"md5": "^2.2.1",
"moment": "^2.22.1",
"object-assign": "^4.1.1",
"prop-types": "^15.6.1",
"query-string": "^6.1.0",
"react": "^16.9.0",
"react-immutable-proptypes": "^2.1.0",
"react-native": "^0.61.2",
"react-native-device-info": "^0.21.5",
"react-native-fabric": "^0.5.1",
"react-native-fetch-blob": "^0.10.8",
... ... @@ -43,9 +43,10 @@
"react-native-simple-store": "^1.3.0",
"react-native-smart-toast": "^1.1.1",
"react-native-swipeable": "^0.6.0",
"react-native-swiper": "^1.5.13",
"react-native-swiper": "^1.6.0-rc.3",
"react-native-switch-pro": "^0.4.11",
"react-native-view-shot": "^2.4.0",
"react-native-webview": "^7.5.2",
"react-native-wkwebview-reborn": "1.22.0",
"react-redux": "^5.0.7",
"react-static-container": "^1.0.2",
... ...
... ... @@ -3105,6 +3105,11 @@ escape-html@^1.0.3, escape-html@~1.0.3:
resolved "http://npm.yohops.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-regexp@2.0.0:
version "2.0.0"
resolved "http://127.0.0.1:8081/repository/npm-all/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "http://npm.yohops.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
... ... @@ -4207,7 +4212,7 @@ inquirer@^7.0.0:
strip-ansi "^5.1.0"
through "^2.3.6"
invariant@*, invariant@^2.2.2, invariant@^2.2.4:
invariant@*, invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4"
resolved "http://npm.yohops.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=
... ... @@ -6662,10 +6667,10 @@ react-native-swipeable@^0.6.0:
dependencies:
prop-types "^15.5.10"
react-native-swiper@^1.5.13:
version "1.5.14"
resolved "http://npm.yohops.com/react-native-swiper/-/react-native-swiper-1.5.14.tgz#1c6f949ca377186300f972bb0f30d24062c899aa"
integrity sha1-HG+UnKN3GGMA+XK7DzDSQGLImao=
react-native-swiper@^1.6.0-rc.3:
version "1.6.0-rc.3"
resolved "http://127.0.0.1:8081/repository/npm-all/react-native-swiper/-/react-native-swiper-1.6.0-rc.3.tgz#ece82906d908c6a78a0b75fa41982ffc2cd2fb20"
integrity sha1-7OgpBtkIxqeKC3X6QZgv/CzS+yA=
dependencies:
prop-types "^15.5.10"
... ... @@ -6681,6 +6686,14 @@ react-native-view-shot@^2.4.0:
resolved "http://npm.yohops.com/react-native-view-shot/-/react-native-view-shot-2.6.0.tgz#3b23675826f67658366352c4b97b59a6aded2f43"
integrity sha1-OyNnWCb2dlg2Y1LEuXtZpq3tL0M=
react-native-webview@^7.5.2:
version "7.5.2"
resolved "http://127.0.0.1:8081/repository/npm-all/react-native-webview/-/react-native-webview-7.5.2.tgz#9da3006e03636faaa9d05f3abff46cd40bfb80f9"
integrity sha1-naMAbgNjb6qp0F86v/Rs1Av7gPk=
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
react-native-wkwebview-reborn@1.22.0:
version "1.22.0"
resolved "http://npm.yohops.com/react-native-wkwebview-reborn/-/react-native-wkwebview-reborn-1.22.0.tgz#f870d0f409d30783265f4a2a3ff91d23991b3128"
... ...