fix bug
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
v-if="vehicleDetail[item.prop]"
|
||||
:src="vehicleDetail[item.prop]"
|
||||
:preview-src-list="imageUrls"
|
||||
:initial-index="item.previewIndex"
|
||||
preview-teleported
|
||||
fit="cover"
|
||||
/>
|
||||
@@ -312,13 +313,18 @@ export default {
|
||||
);
|
||||
},
|
||||
imageFields() {
|
||||
let previewIndex = 0;
|
||||
return [
|
||||
['行驶证主页面', 'drivingLicenseImage'],
|
||||
['行驶证主页反页', 'drivingLicenseMainBack'],
|
||||
['行驶证副页正页', 'drivingLicenseViceFront'],
|
||||
['行驶证副页反页', 'drivingLicenseViceBack'],
|
||||
['道路运输证', 'roadTransportCertImage'],
|
||||
].map(([label, prop]) => ({ label, prop }));
|
||||
].map(([label, prop]) => {
|
||||
const item = { label, prop, previewIndex };
|
||||
if (this.vehicleDetail[prop]) previewIndex += 1;
|
||||
return item;
|
||||
});
|
||||
},
|
||||
imageUrls() {
|
||||
return this.imageFields.map(item => this.vehicleDetail[item.prop]).filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user