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
})
}
浙公网安备 33010602011771号