antdvue 下拉分组如何搜索

新手上路,请多包涵

image.png官网只提供了分组 跟搜索两个案例,怎么在分组的时候同时也能搜索呢? :filter-option="filterOption" 并不能拿到分组后的值

阅读 3.1k
2 个回答

你用的这个组件不支持,你用image.png这个组件是支持的,支持二级的筛选,它有个这个方法,image.png,image.png

新手上路,请多包涵

分组和搜索
<a-select style="width: 200px"

          show-search
          @change="handleChange">
  <a-select-opt-group>
    <span slot="label">
      <a-icon type="user" />Manager
    </span>
    <a-select-option value="jack">
      Jack
    </a-select-option>
    <a-select-option value="lucy">
      Lucy
    </a-select-option>
  </a-select-opt-group>
  <a-select-opt-group label="Engineer">
    <a-select-option value="Yiminghe">
      yiminghe
    </a-select-option>
  </a-select-opt-group>
</a-select>
推荐问题