<video v-if="videoSrc!==''" :src="videoSrc" id="avatar"></video> <i else class="el-icon-video-camera-solid"></i>
关于文件类型:
switch (this.switchData.type) {
case '1': this.switchData.accept = 'image/*'; break;
case '2': this.switchData.accept = 'audio/*'; break;
case '3': this.switchData.accept = 'video/*'; break;
case '4': this.switchData.accept = 'application/*'; break;
case '5': this.switchData.accept = 'application/*'; break;
}
isAccept = new RegExp(this.switchData.accept).test( 文件的类型);