运行
iPhone 6
仿真器
iPhone 7 Plus 10.2.1
iPhone 6
设备
"dependencies": {
"axios": "^0.15.3",
"native-base": "^2.0.13",
"react": "15.4.2",
"react-native": "^0.42.0",
"react-native-elements": "^0.10.0",
"react-native-image-slider": "^1.1.5",
"react-native-material-buttons": "^0.2.0",
"react-native-md-textinput": "^2.0.4",
"react-native-video": "^1.0.0",
"react-native-video-controls": "^1.1.1"
},
包JSON文件
import React, { Component} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
StatusBar,
KeyboardAvoidingView,
TabBarIOS,
Image
} from 'react-native';
import { Container, Content, Card, CardItem, Tabs, Tab, Left, Body,Thumbnail,Footer, FooterTab, Button, Icon } from 'native-base';
import VideoPlayer from 'react-native-video-controls';
export default class Test extends Component {
render() {
return (
<View style={styles.ViewContainer}>
<VideoPlayer
source={{ uri: 'https://vjs.zencdn.net/v/oceans.mp4' }}
navigator={ this.props.navigator }
/>
</View>
);
}
}
以下代码
window.calculator = window.calculator || {};
(function() {
var result;
var adding = function(one, two) {
var one1 = document.forms["myForm"]["one"].value;
var two2 = document.forms["myForm"]["two"].value;
var one=parseFloat(one.replace(/\,/g,''));
var two=parseFloat(two.replace(/\,/g,''));
result = parseInt(one1) + parseInt(two2);
console.log(result);
var number = document.getElementById("number");
number.innerHTML = result;
console.log(one, two, result)
return result;
}
window.calculator.init = function() {
document.getElementById('add').addEventListener('click', adding);
};
})();