zoukankan      html  css  js  c++  java
  • react native 遇到的坑

    1.项目中新加入组件,应执行npm install命令

    2.项目执行react-native run-android 报错,应进入android目录,执行gradlew.bat clean命令

    3.ListView引用函数,应先在构造器中进行this绑定

    constructor(props) {
           
            this.renderItem = this.renderItem.bind(this);
    }
    
    onPressIcon(uid, aid) {
            const {navigator} = this.props;
            InteractionManager.runAfterInteractions(() => {
                navigator.push({
                    component: LoadMyTeamMemberInfoContainer,
                    name: '成员详细',
                    uid: uid,
                    aid: aid
                });
            });
    }
    
    <ListView
                    initialListSize={1}
                    dataSource={dataSource}
                    renderRow={this.renderItem}
                    onEndReached={this.onEndReached.bind(this,dataState)}
                    onEndReachedThreshold={0}
                    renderFooter={this.renderFooter.bind(this,dataState)}
                    refreshControl={
                      <RefreshControl
                        refreshing={dataState.isRefreshing}
                        onRefresh={this.onRefresh.bind(this)}
                        title="加载中..."
                        colors={COLOR_REFRESH_CONTROL}
                      />
                    }
                />
    
    <TouchableOpacity
                            onPress={this.onPressIcon.bind(this,doctor.id,doctor.applyId)}>
                            <View style={styles.opeContent}>
                                <View>
                                    <Text style={styles.textDefault}><Text style={styles.textWeight}>状态:</Text><Text
                                        style={styles.textRed}>{doctor.state}</Text></Text>
                                </View>
                                <View style={styles.opeRightContent}>
                                    <Text style={[styles.textDefault,styles.textOpe]}>查看详情></Text>
                                </View>
                            </View>
                        </TouchableOpacity>

      

  • 相关阅读:
    php中获取各种路径
    大型网站系统架构演化之路
    404、500、502等HTTP状态码介绍
    Linux 查看进程和删除进程
    mysql中FIND_IN_SET的使用方法
    PHP导出Excel 数字末尾变0或小数点解决办法
    PHP API接口测试小工具
    要慎用mysql的enum字段的原因
    mysql 导入&导出sql文件
    Linux下php安装memcache扩展
  • 原文地址:https://www.cnblogs.com/luoxiaolei/p/5558770.html
Copyright © 2011-2022 走看看