有关在自定义组件中添加 input 标签
发布于 5 年前 作者 qianxiuying 3230 次浏览 来自 问答

<view class="recipient-form-item">


  <label
    class="{{(value !== '' || focus)  ? 'narrow' : '' }}"
  >
    {{ label }}

  </label>


  <input
    type="text"
    value="{{ value }}"
    name="{{ name }}"
    bindinput="onInput"
    bindfocus="bindFocus"
    bindblur="bindBlur"

  />


</view>

在自定义组件中添加 input 标签无法使用自带 form 方法获取该 input 组件的值

求解

回到顶部