关于ant-design:antdesign-aselect

49次阅读

共计 367 个字符,预计需要花费 1 分钟才能阅读完成。

  • a-select 标签

<a-form-item
          :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门">
  <a-select  placeholder="请抉择" v-decorator="['departid',{rules: [{ required: true, message:'Please input your data!'}]}]" >
  <a-select-option v-for="d in departList" :key="d.departid" :value="d.departid">{{d.departname}}</a-select-option>
  </a-select>
</a-form-item>
        
  • 整体思路和 v -for 操作原生的 select 标签十分相似
  • 留神有 key 和 value 的值, 两个都要有

正文完
 0