1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Select at 0 in the table (#403)

When the select is empty in the table it shows the value 0 you should place it white
This commit is contained in:
elsiosanchez 2020-03-11 21:46:35 -04:00 committed by GitHub
parent f0f0c81f03
commit a51989f3ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -634,6 +634,8 @@ export default {
referenceType: field.referenceType,
number: row[field.columnName]
})
} else if (field.componentPath === 'FieldSelect' && this.isEmptyValue(row['DisplayColumn_' + field.columnName]) && row[field.columnName] === 0) {
return field.defaultValue
}
return row['DisplayColumn_' + field.columnName] || row[field.columnName]
},