Skip to content

Commit

Permalink
fix: select 兼容 options 为 null 的场景 (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Jul 11, 2023
1 parent 2fc6959 commit 228b85d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/select/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default defineComponent({
};
const baseOptions = computed(() => {
const allOptions = [...childOptions, ...props.options];
const allOptions = [...childOptions, ...(props.options || [])];
return allOptions.map((option) => {
return {
...option,
Expand Down Expand Up @@ -428,6 +428,7 @@ export default defineComponent({
hoverOptionValue.value = option.value;
}
} else {
// eslint-disable-next-line no-undefined
hoverOptionValue.value = undefined;
}
});
Expand Down

0 comments on commit 228b85d

Please sign in to comment.