动态生产的TextInput文字内容怎么却分开来



  • 动态生产的TextInput文字内容怎么却分开来?怎么分别哪个值是哪个输入框的文字?
    

    this.showvals.map(item => {
    return (

    										<TextInput
    											placeholder="填写"
    											placeholderTextColor="#ACACAC"
    											onChangeText={this._onChangeled}
    											style={{
    												flex: 1,
    												color: '#5c5c5c',
    												fontSize: 14,
    												textAlign: 'center',
    												padding: 0
    											}}
    										/>
    								
    						);
    					})


  • 0_1509674614640_WX20171103-100311.png



  • @nfq6612 说:

    TextInput
    好,谢谢!



  • 点击事件(onPress)改成手势系统(...this._panResponder.panHandlers)又怎么传参数?

    const boxes = this.state.days.map((elem, index) => {
    let top = Math.floor(index / 4) * this._width;
    let left = (index % 4) * this._width;
    return (
    <View
    ref={'box' + index}
    {...this._panResponder.panHandlers}
    key={elem.key}
    style={[styles.touchBox, { top, left }]}
    underlayColor="#eee"
    >
    <View style={styles.boxContainer}>
    <Text style={styles.boxText}>Day{index + 1}</Text>
    {elem.isFA ? (
    <IconFA size={elem.size} name={elem.icon} style={[styles.boxIcon, { color: elem.color }]} />
    ) : (
    <Icon size={elem.size} name={elem.icon} style={[styles.boxIcon, { color: elem.color }]} />
    )}
    </View>
    </View>
    );
    });


Log in to reply