update
This commit is contained in:
@@ -3,7 +3,14 @@
|
||||
<div ref="dragRef" class="btn" @click="openFun" @mousedown="startDragFun">
|
||||
<el-icon :class="{ 'icon-animation': uploading }" :size="22"><Upload /></el-icon>
|
||||
</div>
|
||||
<el-drawer title="上传列表" v-model="listVisible" size="400" :modal="false" modal-penetrable>
|
||||
<el-drawer
|
||||
title="上传列表"
|
||||
v-model="listVisible"
|
||||
size="400"
|
||||
:modal="false"
|
||||
modal-penetrable
|
||||
@close="closeFun"
|
||||
>
|
||||
<div v-if="listData.length > 0" class="remove-btn">
|
||||
<el-link type="primary" @click="emptyFun">清空列表</el-link>
|
||||
</div>
|
||||
@@ -88,6 +95,9 @@ emitter.on('ADD_UPLOAD_FILE', (addData: any) => {
|
||||
}
|
||||
taskStatusObj[data.uploadTaskId][data.businessId] = data.status;
|
||||
initFun(addData);
|
||||
if (!userCloseFlag.value) {
|
||||
listVisible.value = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -283,6 +293,20 @@ const initDragFun = () => {
|
||||
el.style.top = y + 'px';
|
||||
}
|
||||
};
|
||||
|
||||
const userCloseFlag = ref(false);
|
||||
let userCloseTimeOut: any = null;
|
||||
const closeFun = () => {
|
||||
userCloseFlag.value = true;
|
||||
if (userCloseTimeOut) {
|
||||
clearTimeout(userCloseTimeOut);
|
||||
userCloseTimeOut = null;
|
||||
}
|
||||
userCloseTimeOut = setTimeout(() => {
|
||||
userCloseFlag.value = false;
|
||||
// 用户自己关闭弹框后,20s内不会自动打开列表
|
||||
}, 20000);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user