fix(form): 当默认值为0时,select 远程选项初始化不正确

This commit is contained in:
roymondchen 2022-09-13 13:49:43 +08:00 committed by jia000
parent 3b23e7be6f
commit e8550728d1

View File

@ -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;
});