touxiang
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
}
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { countadd, countdel } from '@/api/base';
|
||||
import { useI18n } from '@/utils/i18n';
|
||||
import { uploadflie } from '@/utils/vod';
|
||||
import { defineComponent, onMounted } from "vue";
|
||||
@@ -84,9 +85,11 @@ export default defineComponent({
|
||||
//之后就可以愉快的将blob数据发送至后端啦,可根据自己情况进行发送,我这里用的是axios
|
||||
// 第三个参数为文件名,可选填.
|
||||
const file = new File([blob], 'name.png',{type: "image/png"});
|
||||
countadd()
|
||||
const res = await uploadflie(file, (info: any) => {
|
||||
console.log(info);
|
||||
});
|
||||
countdel()
|
||||
ctx.emit("upload", res)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user