Taro textarea组件穿透问题

在ios机型下,textarea组件由于层级太高导致文字穿透。

解决办法:替代元素

isShowTextArea ? <AtTextarea

      count={false}

      value={text || ''}

      onChange={this.changeText.bind(this)}
  
      onBlur={this.onBlur}

      maxLength={-1}

      placeholder='请输入...'

   />

: <View onclick={this.onFocus}>{text || '请输入...'}</View>    

js代码

onFocus = () => {
    this.setState({
      isShowTextArea: true
    })
}

onBlur = () => {
    this.setState({
      isShowTextArea: false
    })
}

 

posted @ 2021-06-09 15:59  文姬  阅读(454)  评论(0)    收藏  举报