Modal 组件 react-native-modal

码农软件 · 软件分类 · 其他(Others) · 2019-07-21 06:59:03

软件介绍

react-native-modal 是 React Native 的 <Modal> 组件。

使用示例:

'use strict';
var React = require('react-native');
var Modal = require('react-native-modal');
var { AppRegistry, StyleSheet, View, Text } = React;
class App extends React.Component {
    constructor() {
        this.state = {
          isModalOpen: false
        };
    }
    openModal() {
        this.setState({isModalOpen: true});
    }
    closeModal() {
        this.setState({isModalOpen: false});
    }
    render() {
        return (
            <View style={styles.page}>
                <Text onPress={() => this.openModal()}>
                    Open Modal.
                </Text>
                <Modal isVisible={this.state.isModalOpen} onClose={() => this.closeModal()}>
                    <Text>Hello world!</Text>
                </Modal>
            </View>
        );
    }
}
var styles = StyleSheet.create({
    page: {
        flex: 1,
        position: 'absolute',
        bottom: 0,
        left: 0,
        right: 0,
        top: 0
    }
});
AppRegistry.registerComponent('App', () => App);


本文地址:https://codercto.com/soft/d/10592.html

移动的帝国

移动的帝国

曾航、刘羽、陶旭骏 / 浙江大学出版社 / 2014-1-1 / 48.00

日本是全世界移动互联网最发达的国家之一,堪称移动的帝国。在手机游戏、手机支付、移动医疗、移动电子商务、手机电视等方面,日本都充当了全球移动互联网的试验田。 曾经傲视全球的日本运营商将怎样面对转型的挑战?iPhone来势汹汹,如何打破封闭的日本移动互联网体系?日本在智能手机时代的手机游戏、O2O、移动医疗、移动广告等方面,涌现出了哪些值得借鉴的商业模式? 本书作者团队先后数次前往日本调研......一起来看看 《移动的帝国》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具