小程序入门会遇到的一些问题

tabBar不显示问题

欢迎页是pages/index/index,但list的第一项不是pages/index/index就会tabBar不显示

"pages":[
    "pages/index/index",
    "pages/reserve/index",
    "pages/take/index",
    "pages/record/index",
    "pages/logs/logs"
  ],
"tabBar": {
    "list": [{
      "pagePath": "pages/reserve/index",
      "text": "预约",
      "iconPath": "icons/reserve_index.png",
      "selectedIconPath": "icons/reserve_index.png"
    },{
      "pagePath": "pages/take/index",
      "text": "取号",
      "iconPath": "icons/take_index.png",
      "selectedIconPath": "icons/take_index.png"
    },{
      "pagePath": "pages/record/index",
      "text": "预约历史",
      "iconPath": "icons/record_index.png",
      "selectedIconPath": "icons/record_index.png"
    }]

IView的button组件无法绑定submit事件

<view>
  <form bindsubmit="formSubmit">
    <i-panel title="预约信息">
      <i-input value="{{ IDcard }}" name="IDcard" type="number" title="身份证号" mode="wrapped" placeholder="请输入身份证号" />
      <i-input value="{{ phone }}" name="phone" type="number" title="联系电话" mode="wrapped" placeholder="请输入手机号" />
      <i-input value="{{ phone }}" name="reserveTime" type="number" title="预约时间" mode="wrapped" placeholder="如2020-06-05 15:30" />
    </i-panel>
    <i-button formType="submit" type="info" shape="circle">提交</i-button>
    <!-- <button form-type="submit" type="info" shape="circle">提交></button> -->
  </form>
</view>

第8行是iView中的组件按钮,点击的时候无法提交表单。所以如果要用表单那就别用iView中的组件按钮

iView的输入框无法输入

网上比较多的一种说法是获取不到焦点,但是1.0.0的版本已经修复了这个问题,所以还是输入不了的话,检查是不是引入了iView的输入框

<i-input value="{{ value2 }}" title="姓名" autofocus placeholder="请输入用户姓名" maxlength="100"/>

要加个maxlength才行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值