图片查看 0 && !imgLoading" @load="imageLoaded" @error="imageLoadedFailed" alt="" > export default { data() { return { isVisible: this.fileImageData.show, currentIndex: '', imgDataArr: [], currentImage: '', imgLoading: true } }, props: { fileImageData: Object }, watch:{ currentIndex: { hanler(newV){ if(this.imgDataArr.length > 0) { const formData = new FormData() formData.append('file', this.imgDataArr[newV].attId) const res = downloadFileImage(formData) res.then(blob => { if(blob instanceof Blob) { const url = window.URL.createObjectURL(blob) this.currentImage = url } }) } } } }, mounted() { this.getImage() }, methods: { getImage() { const arr = [] this.fileImageData.imageData.map(item => { arr.push({attId:item.attId}) }) this.imgDataArr = arr this.currentIndex = 0 }, imageLoaded() { this.imgLoading = false }, imageLoadedFailed() { this.imgLoading = false } } } 这是子组件,上面这样写,弹窗打开的时候没有加载状态,是什么原因