diff --git a/src/components/common/upload/index.vue b/src/components/common/upload/index.vue index b8b96bcf..49f876e9 100644 --- a/src/components/common/upload/index.vue +++ b/src/components/common/upload/index.vue @@ -717,17 +717,15 @@ onMounted(() => { // 监听点击事件 document.addEventListener('click', video_show); nextTick(() => { - setTimeout(() => { - // 获取分类 - if (common_store.common.attachment_category.length > 0) { - type_data_list.value = common_store.common.attachment_category; - type_data.value = [all_tree, ...common_store.common.attachment_category]; - upload_store.set_category(common_store.common.attachment_category); - upload_store.set_is_upload_api(true); - } else { - get_tree(); - } - }, 300); + // 获取分类 + if (common_store.common.attachment_category.length > 0) { + type_data_list.value = common_store.common.attachment_category; + type_data.value = [all_tree, ...common_store.common.attachment_category]; + upload_store.set_category(common_store.common.attachment_category); + upload_store.set_is_upload_api(true); + } else { + get_tree(); + } }); });