feat(form): select支持clearable,filterable配置

This commit is contained in:
roymondchen 2023-04-25 11:37:01 +08:00
parent 315e83da19
commit af393e34fb
3 changed files with 4 additions and 3 deletions

View File

@ -534,7 +534,7 @@ const clearHandler = () => {
}; };
const excelHandler = (file: any) => { const excelHandler = (file: any) => {
if (!file || !file.raw) { if (!file?.raw) {
return false; return false;
} }
const reader = new FileReader(); const reader = new FileReader();

View File

@ -5,8 +5,8 @@
v-loading="loading" v-loading="loading"
class="m-select" class="m-select"
ref="tMagicSelect" ref="tMagicSelect"
clearable :clearable="typeof config.clearable !== 'undefined' ? config.clearable : true"
filterable :filterable="typeof config.filterable !== 'undefined' ? config.filterable : true"
:popper-class="`m-select-popper ${popperClass}`" :popper-class="`m-select-popper ${popperClass}`"
:size="size" :size="size"
:remote="remote" :remote="remote"

View File

@ -432,6 +432,7 @@ export interface SelectConfig extends FormItem, Input {
multiple?: boolean; multiple?: boolean;
valueKey?: string; valueKey?: string;
allowCreate?: boolean; allowCreate?: boolean;
filterable?: boolean;
group?: boolean; group?: boolean;
options: SelectConfigOption[] | SelectConfigGroupOption[] | SelectOptionFunction; options: SelectConfigOption[] | SelectConfigGroupOption[] | SelectOptionFunction;
remote: true; remote: true;