feat: 文件库

This commit is contained in:
wang_fan_w 2024-07-11 00:02:16 +08:00
parent b87a62647d
commit 20621a4bbf
3 changed files with 7 additions and 3 deletions

View File

@ -240,7 +240,6 @@ const list = ref<any>([]);
const getList = () => { const getList = () => {
try { try {
loading.value = true; loading.value = true;
console.log("搜索", originalList.value);
setTimeout(() => { setTimeout(() => {
list.value = shuffleArray(originalList.value); list.value = shuffleArray(originalList.value);
loading.value = false; loading.value = false;
@ -266,6 +265,10 @@ const shuffleArray = (arr: any) => {
} }
return arr; return arr;
}; };
defineExpose({
getList
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -30,7 +30,6 @@ const emit = defineEmits(["onNode"]);
const onNode = (selectedKeys: Array<string>) => { const onNode = (selectedKeys: Array<string>) => {
let list = findParentsTailRecursive(treeData.value, selectedKeys[0]); let list = findParentsTailRecursive(treeData.value, selectedKeys[0]);
console.log("节点", list);
emit("onNode", list); emit("onNode", list);
}; };

View File

@ -15,7 +15,7 @@
</a-breadcrumb> </a-breadcrumb>
</div> </div>
<a-divider margin="0" /> <a-divider margin="0" />
<FileTable class="file-table-style" /> <FileTable ref="FileTableRef" class="file-table-style" />
</div> </div>
</div> </div>
</div> </div>
@ -26,9 +26,11 @@
import FileTree from "@/views/file-management/document-library/components/file-tree.vue"; import FileTree from "@/views/file-management/document-library/components/file-tree.vue";
import FileTable from "@/views/file-management/document-library/components/file-table.vue"; import FileTable from "@/views/file-management/document-library/components/file-table.vue";
const FileTableRef = ref();
const breadcrumb = ref<any>([]); const breadcrumb = ref<any>([]);
const onNode = (list: any) => { const onNode = (list: any) => {
breadcrumb.value = list; breadcrumb.value = list;
FileTableRef.value && FileTableRef.value.getList();
}; };
</script> </script>