vue2中使用antd vueUI 二次封装远程搜索下拉框组件,支持滚动分页,单选和多选,最多选择数量限制,滚动获取数据防抖
具体组件代码如下
<template>
<a-select
:disabled="disabled"
:mode="mode"
:maxTagCount="maxTagCount"
show-search
allowClear
:filterOption="false"
:label-in-value="labelInValue"
:placeholder="placeholderStr"
style="width: 100%"
:not-found-content="fetching ? undefined : notFoundContent"
@search="handleSearch1"
@change="handleChange"
@popupScroll="popupScroll1"
:value="selectValue"
:getPopupContainer="(node) => node.parentNode"
>
<a-select-option
v-for="item in dataOptions"
:disabled="item.disabled"
:key="item.id"
:value="item[optionValueKey]"
>{
{ item[optionLabelKey] }}</a-select-option
>
<a-select-option :disabled="true" key="loading"
><a-spin :spinning="fetching">
<div style="height: 20px; text-align: c


379

被折叠的 条评论
为什么被折叠?



