├── src
├── index.ts
├── main.ts
├── components
│ ├── models.ts
│ ├── chevron.svg
│ ├── helpers.ts
│ ├── treeViewNode.vue
│ └── treeView.vue
├── vite-env.d.ts
└── App.vue
├── .vscode
└── extensions.json
├── tsconfig.node.json
├── .gitignore
├── index.html
├── tsconfig.json
├── vite.config.ts
├── LICENSE
├── package.json
├── public
└── vite.svg
├── README.md
└── yarn.lock
/src/index.ts:
--------------------------------------------------------------------------------
1 | import TreeView from "./components/treeView.vue";
2 |
3 | export { TreeView };
4 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3 | }
4 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import { createApp } from "vue";
2 | import App from "./App.vue";
3 |
4 | createApp(App).mount("#app");
5 |
--------------------------------------------------------------------------------
/src/components/models.ts:
--------------------------------------------------------------------------------
1 | export type TreeViewSelectionMode = "independent" | "leaf";
2 |
3 | export interface TreeViewNodeItem {
4 | id: number;
5 | name: string;
6 | children?: TreeViewNodeItem[];
7 | }
8 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
3 | A tree view component for Vue 3.
7 | 8 | ## 🚀 Installation 9 | 10 | Install using your package manager of choice: 11 | 12 | ```bash 13 | yarn add vue-tree-view 14 | ``` 15 | 16 | ## 📺 Demo 17 | 18 | https://matija-components.vercel.app/tree-view 19 | 20 | ## ⚙️ Usage 21 | 22 | Import the component locally or define it globally and include the css file: 23 | 24 | ```vue 25 | 26 |