Skip to content

Commit

Permalink
fix(form): 当默认值为0时,select 远程选项初始化不正确
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen authored and jia000 committed Sep 13, 2022
1 parent 3b23e7b commit e855072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/form/src/fields/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export default defineComponent({
onBeforeMount(() => {
if (!props.model) return;
const v = props.model[props.name];
if (Array.isArray(v) ? v.length : v) {
if (Array.isArray(v) ? v.length : typeof v !== 'undefined') {
getInitOption().then((data) => {
options.value = data;
});
Expand Down

0 comments on commit e855072

Please sign in to comment.