1.图片,视频显示流数据,拿到流之后,根据BLOB生成URL,直接插入连接显示
const res = await this.$http.attachmentApi.uploadFile(formData, 0)
this.loading = false
if (res.code === ConstantField.RQ_SUCCESS) {
this.videoList.push(res.data)
const videoData = await this.getFileArrayBuffer(res.data.id)
const videoBlob = new Blob([videoData])
const videoUrl = window.URL.createObjectURL(videoBlob)
this.playerOptions.sources[0].src = videoUrl
const imageData = await this.getFileArrayBuffer(res.data.imgPicId)
const blob = new Blob([imageData])
const imageUrl = window.URL.createObjectURL(blob)
// 设置后端传回的缩略图,自定义视频前两帧黑屏
this.playerOptions.poster = imageUrl
2-问题描述
在ant-dialog中嵌套使用List的滚动加载功能,vue-infinite-scroll配合使用时,滚动和初始时,都无法触发loadmore
问题链接:https://github.com/ElemeFE/vue-infinite-scroll/issues/147
1.弹窗启动时,未经过mounted生命周期,所以未绑定成功滚动事件
2.获得监听滚动函数的element时(getScrollEventTarget),也就是滚动的容器时,未能拿到overflowY的值,是根据这个值去返回当前滚动容器的元素。否则拿不到返回window的值