swiper中的textarea bug
发布于 6 年前 作者 ewei 6956 次浏览 来自 问答

切换的时候textarea 会错位

<swiper style="width: 100%; height: 100%;" indicator-dots="true" bindchange="onDayChange">
  <swiper-item wx:key="idx" wx:for-index="idx" data-index="{{idx}}" wx:for="{{backgroundImages}}">
    <view style="background: url({{pageBackgroundImage}}) no-repeat center top; background-size: auto 100%; width: 100%; height: 100%;">
       
      <view style="padding-top: 350rpx; font-size: 30rpx; text-align: center; display: flex; width: 100%; justify-content: center;">
        <textarea style="width: 400rpx; height: 220rpx;" placeholder="请输入你要说的语句"  id="inputwisdom_{{idx}}" bindinput="getWisdom" />
      </view>
 
      <view style="font-size: 27rpx; text-align: center; display: flex; width: 100%; justify-content: center;">
          <input class="input" maxlength="400" placeholder="{{authorTipStr}}" id="yourname_{{idx}}" bindinput="getName"/>
      </view>
       
      <view style="text-align: center; display: flex; width: 100%; justify-content: center; padding-top: 10rpx;">
          <button bindtap="send" id="iofoSend_{{index}}" size="mini">下载图片</button>
      </view>
 
      <view id="foot" style="font-size: 27rpx; width: 150rpx; position:absolute; bottom: 20rpx; right: 80rpx; display: {{birthdayPeopleDisplay}}">
        <input id ="allperson_{{idx}}" placeholder="生日人名字" bindinput="getYourName"/>
      </view>
    </view>
  </swiper-item>
</swiper>
5 回复

 textarea不能用  换一种把  view可以滑动的

如果不放在swiper中,只能在swiper上层再加个view,这样的话swiper就无法滑动了,你有什么好的办法实现这样的效果吗

同样回到这个问题,你解决了吗

 把view加在swiper下层啊

 他层级最高,不建议在可以移动的控件里面使用,官方不是说了吗

回到顶部