uniapp 中 form表单 textarea的层级问题

 

背景:在微信小程序中textarea中的内容会在下拉框内容之上,

  

 

 

 

 代码如下:

 

                             <view class="bywin-column">
							<view class="title">
								<text>投诉对象</text>
								<text class="item-required">*</text>
							</view>
							<input @input='getTarget($event)' v-model="target.companyName" class="bywin-input" name="target" placeholder="请输入" />
							<view class="search-list" v-if="targetList.length>0">
								<scroll-view scroll-y="true" show-scrollbar="true" style="height: 200px">
									<view v-for="(value, j) in targetList" :key="value.orgId"
										class="search-list-item" @tap="selectTarget(value)">
										<text class="info">
											<text class="name">{{ value.companyName }}</text>
										</text>
									</view>
								</scroll-view>
							</view>
						</view>
						<view class="bywin-column-textarea">
							<view class="title">
								<text>投诉理由</text>
								<text class="item-required">*</text>
							</view>
							<textarea class="bywin-textarea" name="content" placeholder="请输入" />
						</view>

 解决方案:显示下拉框的时候 隐藏 textarea 

<textarea v-show="showTextArea" class="bywin-textarea" name="content" placeholder="请输入" />

原因:

 

posted @ 2021-12-15 14:14  诉诉飞飞  阅读(532)  评论(0)    收藏  举报