From 5d5c283e993c7448433a8d0269512bbbc52e0116 Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Sun, 7 Apr 2024 18:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B8=E6=9C=BA=E6=96=B0=E5=A2=9E=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/driverAdd.vue | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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;