提交 0fc791c7 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 dadb1266
......@@ -17,13 +17,13 @@ interface Emits {
(e: 'update:modelValue', modelValue: boolean): void
(e: 'update'): void
}
const uploadMultipleVideoRef = ref()
const uploadMultipleVideoRef = $ref<InstanceType<typeof UploadMultipleVideo> | null>(null)
const handleConfirm = () => {
emit('update:modelValue', false)
emit('update')
}
const handleCancel = () => {
const fileList = uploadMultipleVideoRef.value?.uploader?._uploadList || []
const fileList = uploadMultipleVideoRef?.uploader?._uploadList || []
if (fileList.length) {
for (const item of fileList) {
if (item.state === 'Uploading') {
......
......@@ -121,7 +121,7 @@ const handleView = () => {
function percentage(value: number) {
return parseFloat((value ? value * 100 : 0).toFixed(2))
}
defineExpose({ uploader, fileList })
defineExpose({ uploader, fileList: $$(fileList) })
</script>
<template>
<div class="upload-video" style="display: flex; flex-direction: column; align-items: flex-start">
......@@ -133,7 +133,7 @@ defineExpose({ uploader, fileList })
<div v-for="(item, index) in fileList" :key="index">
<div>
<span>{{ item.file.name }}</span>
<span>{{ item.file?.name }}</span>
<el-progress style="width: 200px" :percentage="percentage(item.loaded)" />
</div>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论