小程序 textarea 穿透

Posted by Xiaosa's Blog on April 27, 2020

小程序的textArea组件会在安卓上出现穿透问题 , 无法被覆盖

解决方法 :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
   <View className='text-area-content'
    onClick={() => this.setState({hiddenTextArea: false})}>
                  {!illnessDesc.symptomDesc 
                  ? 
                  <View className='placeholder'>
                    <Text>请描述症状
                    </Text>
                  </View> 
                  :
                   null
                   }
                  {hiddenTextArea? <View className='text-area-view'>{illnessDesc.symptomDesc}</View>
                    :<Textarea
                    value={illnessDesc.symptomDesc}
                    onBlur={()=>this.onFirstTABlur()}
                      // placeholder='请描述症状'
                    // placeholderClass={'placeholderclass'}
                  />}