# Treecatalogue **Repository Path**: mycodelxy/treecatalogue ## Basic Information - **Project Name**: Treecatalogue - **Description**: 自封装树形结构目录组件 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-05-27 - **Last Updated**: 2024-10-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 介绍 一个自封装的树形结构目录组件 在线访问地址 http://111.230.42.108:8002/ # 依赖 vue3 + Vite + ant Design Vue # 使用 1) onRemove 支持删除目录中的任意类型节点 2) onCreate 支持给现有目录新增任意类型节点 3) onRename 支持给任意类型节点重命名 4) onClick 支持接收任意节点的点击触发事件 - 使用方式 ```js ``` - 数据结构: ```js const treeData = ref([ { id:1, label:'a', value:'1', children:[ { id:2, label:'a-a', value:'2', children:[ { id:3, label:'a-a-a', value:'3', children:[] }, { id:4, label:'a-a-b', value:'4', children:[] } ] } ] }, { id:5, label:'b', value:'5', children:[ { id:6, label:'b-a', value:'6', children:[ { id:7, label:'b-a-a', value:'7', children:[] }, { id:8, label:'b-a-b', value:'8', children:[] } ] } ] }, { id:9, label:'c', value:'9', children:[ { id:10, label:'c-a', value:'10', children:[] } ] } ]) ```