图片信息
const reader = new FileReader()
reader.onload = (evt) => {
uploadImg.value = evt.target.result
imgValid.value = false
}
reader.readAsDataURL(files.value)
fileLoad.value = new FormData()
fileLoad.value.append('file', files.value)
参数信息处理
const ruleForm = reactive({
id: null,
groupId: null,
title: null,
describe: null,
isHot: false
})
fileLoad.value.append('course', new Blob([JSON.stringify(ruleForm)], { type: 'application/json' }))
``
网友评论