图片预览

      ``  
    

``
•methods处
//点击图片预览区,即模拟点击文件选择组件
handleClick: function() {
document.getElementById('coverFile').click();
},
//图片预览
getFile: function() {
this.file = event.target.files[0];
var windowURL = window.URL || window.webkitURL;
this.course.cover = windowURL.createObjectURL(this.file);
this.show = false;
}

你可能感兴趣的:(图片预览)