diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index 58e5fed4..e82a2756 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -182,11 +182,21 @@ export default { this.identityCardFront = this.$route.params?.identityCardFront; this.driverInfo.lssueDate = this.$route.params?.lssueDate; this.drivingLicenceName = this.$route.params?.drivingLicenceName; - this.identityCardFrontList = [{ url : this.identityCardFront }]; - this.identityCardContraryList = [{ url : this.identityCardContrary }]; - this.drivingLicenceFrontList = [{ url : this.drivingLicenceFront }]; - this.drivingLicenceContraryList = [{ url : this.drivingLicenceContrary }]; - this.iconList = [{ url : this.icon }]; + if( this.identityCardFront ) { + this.identityCardFrontList = [{ url : this.identityCardFront }]; + } + if( this.identityCardContrary ) { + this.identityCardContraryList = [{ url : this.identityCardContrary }]; + } + if( this.drivingLicenceFront ) { + this.drivingLicenceFrontList = [{ url : this.drivingLicenceFront }]; + } + if( this.drivingLicenceContrary ) { + this.drivingLicenceContraryList = [{ url : this.drivingLicenceContrary }]; + } + if( this.icon ) { + this.iconList = [{ url : this.icon }]; + } const selectElement = document.getElementById('mySelect'); selectElement.addEventListener('change', function() { const selectedValue = selectElement.value;