微信小程序form按钮失效

wxml

<view>
  <form bindsubmit="formSubmit" bindreset="formReset">
    <view class="itemContainer">
      <view class="iconAndText">
        <image class="icons" src="../../images/must_write.png"></image>
        <view class="icon_text">企业名称</view>
      </view>
      <view class="placeholderCon">
        <input class="placeholder" placeholder-style='text-align:right' placeholder="请输入" auto-focus/>
      </view>
    </view>
    <view class="itemContainer">
      <view class="iconAndText">
        <image class="icons" src="../../images/must_write.png"></image>
        <view class="icon_text">联系电话</view>
      </view>
      <view class="placeholderCon">
        <input type="number" maxlength="11" class="placeholder" placeholder-style='text-align:right' placeholder="请输入" auto-focus/>
      </view>
    </view>
    <view class="btn-area">
      <button class="sub_but" formType="submit">提交</button>
    </view>
  </form>
</view>

去掉 auto-focus 就可以

posted @ 2020-12-04 13:51  糖糖Y  阅读(820)  评论(0编辑  收藏  举报