<a @click=“setimg(item.images)”>测试 <iframe id=“IframeReportImg” v-show=“iframeShow” :src=“iframeSrc” @click=“downloadimg()”>121321
setimg(imgurl){
const vm = this
console.log('imgurl',imgurl)
if(vm.iframeSrc !== imgurl[0]){
vm.iframeSrc = imgurl[0]
vm.downloadimg()
}else{
}
},
downloadimg(){
console.log(32121)
if(this.iframeSrc !== 'about:blank'){
window.frames["IframeReportImg"].document.execCommand("SaveAs");
}
}
vue 写的一个保存图片
到 window.frames["IframeReportImg"].document.execCommand("SaveAs");这步骤
提示execCommand of undefined
求各位大佬救救我...