App/Pages/Home11.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。



import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    TouchableOpacity,
    Image,
    ScrollView,
    ListView,
    PixelRatio,
    Platform
} from 'react-native';
import Common from '../Commom/constants';

export default class Home11 extends Component {
    constructor(props) {
        super(props);
        // console.log(props)

    }
    render() {
        let imageHeight= this.props.module.moduleHeight / 2 ;
        let imageWidth = this.props.module.moduleWidth / 2;

        // console.log('imageHeight====>' + imageHeight);
        return (

            <View style={{flexDirection: 'column', alignItems: 'stretch', justifyContent: 'center',backgroundColor: 'rgb(240, 240, 240)'}}>
                <View style={{ alignItems: 'center',flexDirection: 'row', backgroundColor: 'rgb(240, 240, 240)', height: this.props.module.moduleTitle !== '' ? 30 : 0 }}>
                    <View style={{backgroundColor:'red',width:5,height: this.props.module.moduleTitle !== '' ? 20 : 0}}>
                    </View>
                    <Text style={{marginLeft:10,fontSize:15 }}>{this.props.module.moduleTitle}</Text>
                </View>
                <TouchableOpacity
                    activeOpacity={0.75}
                    onPress={()=>{alert('我是11')} }
                    style={{ alignItems: 'center' }}
                    >

                    <Image
                        source={{ uri: this.props.module.moduleDetail[0].image }}
                        style={{ width: Common.window.width , height: Common.window.width *imageHeight/ imageWidth}}
                        />
                </TouchableOpacity>

            </View>

        );
    }
}







后面还有 8 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。