Skip to content

Commit

Permalink
fix(select): 解决option含有其他key异常问题
Browse files Browse the repository at this point in the history
  • Loading branch information
blankzhang authored and blankzhang committed Jul 21, 2023
1 parent a56d353 commit d4fc0b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
26 changes: 1 addition & 25 deletions components/select/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,8 @@ export interface SelectOption {
label: string | number;
disabled?: boolean;
__cache?: boolean;
[key: string]: any;
}
// export interface BaseOption {
// disabled?: boolean;
// __cache?: boolean;
// }

// interface DefaultSelectOption extends BaseOption {
// value: string | number | boolean | object;
// label: string | number;
// }

// type CustomSelectOption<
// T extends string | number | symbol,
// U extends string | number | symbol,
// > = BaseOption &
// Record<T, string | number | boolean | object> &
// Record<U, string | number>;

// export type SelectOption<
// T extends string | number | symbol | undefined = undefined,
// U extends string | number | symbol | undefined = undefined,
// > = T extends string | number | symbol
// ? U extends string | number | symbol
// ? CustomSelectOption<T, U>
// : never
// : DefaultSelectOption;

export interface OptionChildren extends ToRefs<OptionProps> {
id: number;
Expand Down
8 changes: 0 additions & 8 deletions components/select/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ export const selectProps = {
default(): SelectOption[] {
return [];
},
// validator: function (value: SelectOption[]) {
// if (!this.valueField && !this.labelField) {
// return value.every((option) => {
// return 'value' in option && 'label' in option;
// });
// }
// return true;
// },
},
remote: {
type: Boolean,
Expand Down

0 comments on commit d4fc0b2

Please sign in to comment.