上传图片
This commit is contained in:
parent
de0a167cf5
commit
a5be937eb3
|
@ -48,6 +48,7 @@ const init = () => {
|
|||
if(res.rows && res.rows.length){
|
||||
// 过滤出图片和视频
|
||||
list.value = res.rows.filter( item => suffixAry.indexOf(getFileSuffix(item.fileShowName)) != -1)
|
||||
console.log(list.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -64,12 +65,13 @@ const fileUrl = computed(() => (item) =>{
|
|||
// 插入
|
||||
const onInsert = async (item) =>{
|
||||
loading.value = true
|
||||
const res = await fetch(item.fileFullPath)
|
||||
const bolb = await res.blob()
|
||||
const file = commUtils.blobToFile(bolb, item.fileShowName)
|
||||
|
||||
console.log('item', item)
|
||||
// const res = await fetch(item.fileFullPath)
|
||||
// const bolb = await res.blob()
|
||||
// const file = commUtils.blobToFile(bolb, item.fileShowName)
|
||||
const data=item.fileFullPath
|
||||
try {
|
||||
const data = await PPTApi.toRousrceUrl(file)
|
||||
// const data = await PPTApi.toRousrceUrl(file)
|
||||
if(videoSuffix.indexOf(getFileSuffix(item.fileShowName)) != -1){
|
||||
emit('insertMaterial',{ type: 'video', data })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue