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) => {
if (!file || !file.raw) {
if (!file?.raw) {
return false;
}
const reader = new FileReader();

View File

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

View File

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