Skip to content

Commit

Permalink
feat(form): select支持clearable,filterable配置
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Apr 25, 2023
1 parent 315e83d commit af393e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/form/src/containers/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ const clearHandler = () => {
};
const excelHandler = (file: any) => {
if (!file || !file.raw) {
if (!file?.raw) {
return false;
}
const reader = new FileReader();
Expand Down
4 changes: 2 additions & 2 deletions packages/form/src/fields/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions packages/form/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af393e3

Please sign in to comment.