antd vue select選擇器的使用


單選模式搜索選中

https://www.antdv.com/components/select-cn/#API

主要用到的api

image-20201208104807867

主要代碼

組件
<a-select
        mode="multiple"
        :value="form.role"
        style="width: 100%"
        :showArrow="true"
        //filterOption 觸發輸入過濾
        :filterOption="selectInput"
        placeholder="請選擇角色"
        @change="changeRole"
>


method
//下拉選擇,輸入過濾
selectInput(inputValue, option){
    //console.log(inputValue, option,111111)
    return (
        option.componentOptions.children[0].text.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0
    );
},

效果

image-20201208105614471


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM