{"id":13402228,"url":"https://github.com/riophae/vue-treeselect","last_synced_at":"2025-05-14T00:04:46.181Z","repository":{"id":37335319,"uuid":"105648519","full_name":"riophae/vue-treeselect","owner":"riophae","description":"A multi-select component with nested options support for Vue.js","archived":false,"fork":false,"pushed_at":"2024-02-13T00:10:52.000Z","size":2455,"stargazers_count":2944,"open_issues_count":322,"forks_count":515,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-05-05T09:04:16.758Z","etag":null,"topics":["component","dropdown","javascript","select","tree","vue"],"latest_commit_sha":null,"homepage":"https://vue-treeselect.js.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riophae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-10-03T12:22:10.000Z","updated_at":"2025-04-30T12:16:23.000Z","dependencies_parsed_at":"2022-07-12T13:00:29.671Z","dependency_job_id":"8d080aa1-adea-431b-8947-fc0c24243c22","html_url":"https://github.com/riophae/vue-treeselect","commit_stats":{"total_commits":584,"total_committers":21,"mean_commits":27.80952380952381,"dds":"0.046232876712328785","last_synced_commit":"9ae16b651c7c3a92b9a831fdab8466ca88eb7756"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riophae%2Fvue-treeselect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riophae%2Fvue-treeselect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riophae%2Fvue-treeselect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riophae%2Fvue-treeselect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riophae","download_url":"https://codeload.github.com/riophae/vue-treeselect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043291,"owners_count":22004915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component","dropdown","javascript","select","tree","vue"],"created_at":"2024-07-30T19:01:13.208Z","updated_at":"2025-05-14T00:04:45.962Z","avatar_url":"https://github.com/riophae.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","UI组件","Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["形成","UI Components","Form"],"readme":"# vue-treeselect\n[![npm](https://badgen.now.sh/npm/v/@riophae/vue-treeselect)](https://www.npmjs.com/package/@riophae/vue-treeselect) [![Build](https://badgen.now.sh/circleci/github/riophae/vue-treeselect)](https://circleci.com/gh/riophae/vue-treeselect/tree/master) [![Coverage](https://badgen.net/codecov/c/github/riophae/vue-treeselect)](https://codecov.io/gh/riophae/vue-treeselect?branch=master)\n![npm monthly downloads](https://badgen.now.sh/npm/dm/@riophae/vue-treeselect)\n![jsDelivr monthly hits](https://badgen.net/jsdelivr/hits/npm/@riophae/vue-treeselect) [![Known vulnerabilities](https://snyk.io/test/npm/@riophae/vue-treeselect/badge.svg)](https://snyk.io/test/npm/@riophae/vue-treeselect) ![License](https://badgen.net/github/license/riophae/vue-treeselect)\n\n\u003e A multi-select component with nested options support for Vue.js\n\n![Vue-Treeselect Screenshot](https://raw.githubusercontent.com/riophae/vue-treeselect/master/screenshot.png)\n\n### Features\n\n- Single \u0026 multiple select with nested options support\n- Fuzzy matching\n- Async searching\n- Delayed loading (load data of deep level options only when needed)\n- Keyboard support (navigate using \u003ckbd\u003eArrow Up\u003c/kbd\u003e \u0026 \u003ckbd\u003eArrow Down\u003c/kbd\u003e keys, select option using \u003ckbd\u003eEnter\u003c/kbd\u003e key, etc.)\n- Rich options \u0026 highly customizable\n- Supports a wide range of browsers (see [below](#browser-compatibility))\n- RTL support\n\n*Requires Vue 2.2+*\n\n### Getting Started\n\nIt's recommended to install vue-treeselect via npm, and build your app using a bundler like [webpack](https://webpack.js.org/).\n\n```bash\nnpm install --save @riophae/vue-treeselect\n```\n\nThis example shows how to integrate vue-treeselect with your [Vue SFCs](https://vuejs.org/v2/guide/single-file-components.html).\n\n```vue\n\u003c!-- Vue SFC --\u003e\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\"\u003e\n    \u003ctreeselect v-model=\"value\" :multiple=\"true\" :options=\"options\" /\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  // import the component\n  import Treeselect from '@riophae/vue-treeselect'\n  // import the styles\n  import '@riophae/vue-treeselect/dist/vue-treeselect.css'\n\n  export default {\n    // register the component\n    components: { Treeselect },\n    data() {\n      return {\n        // define the default value\n        value: null,\n        // define options\n        options: [ {\n          id: 'a',\n          label: 'a',\n          children: [ {\n            id: 'aa',\n            label: 'aa',\n          }, {\n            id: 'ab',\n            label: 'ab',\n          } ],\n        }, {\n          id: 'b',\n          label: 'b',\n        }, {\n          id: 'c',\n          label: 'c',\n        } ],\n      }\n    },\n  }\n\u003c/script\u003e\n```\n\nIf you just don't want to use webpack or any other bundlers, you can simply include the standalone UMD build in your page. In this way, make sure Vue as a dependency is included before vue-treeselect.\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003c!-- include Vue 2.x --\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/vue@^2\"\u003e\u003c/script\u003e\n    \u003c!-- include vue-treeselect \u0026 its styles. you can change the version tag to better suit your needs. --\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.umd.min.js\"\u003e\u003c/script\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.min.css\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"app\"\u003e\n      \u003ctreeselect v-model=\"value\" :multiple=\"true\" :options=\"options\" /\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n  \u003cscript\u003e\n    // register the component\n    Vue.component('treeselect', VueTreeselect.Treeselect)\n\n    new Vue({\n      el: '#app',\n      data: {\n        // define the default value\n        value: null,\n        // define options\n        options: [ {\n          id: 'a',\n          label: 'a',\n          children: [ {\n            id: 'aa',\n            label: 'aa',\n          }, {\n            id: 'ab',\n            label: 'ab',\n          } ],\n        }, {\n          id: 'b',\n          label: 'b',\n        }, {\n          id: 'c',\n          label: 'c',\n        } ],\n      },\n    })\n  \u003c/script\u003e\n\u003c/html\u003e\n```\n\n### Documentation \u0026 Live Demo\n\n[Visit the website](https://vue-treeselect.js.org/)\n\nNote: please use a desktop browser since the website hasn't been optimized for mobile devices.\n\n### Browser Compatibility\n\n- Chrome\n- Edge\n- Firefox\n- IE ≥ 9\n- Safari\n\nIt should function well on IE9, but the style can be slightly broken due to the lack of support of some relatively new CSS features, such as `transition` and `animation`. Nevertheless it should look 90% same as on modern browsers.\n\n### Bugs\n\nYou can use this [pen](https://codepen.io/riophae/pen/MExgzP) to reproduce bugs and then [open an issue](https://github.com/riophae/vue-treeselect/issues/new).\n\n### Contributing\n\n1. Fork \u0026 clone the repo\n2. Install dependencies by `yarn` or `npm install`\n3. Check out a new branch\n4. `npm run dev` \u0026 hack\n5. Make sure `npm test` passes\n6. Push your changes \u0026 file a pull request\n\n### Credits\n\nThis project is inspired by [vue-multiselect](https://github.com/monterail/vue-multiselect), [react-select](https://github.com/JedWatson/react-select) and [Ant Design](https://github.com/ant-design/ant-design/). Special thanks go to their respective authors!\n\nSome icons used in this project:\n\n  - \"link\" icon made by [Smashicons](https://www.flaticon.com/authors/smashicons) is licensed under [CC 3.0 BY](https://creativecommons.org/licenses/by/3.0/)\n  - \"spinner\" icon from [SpinKit](https://github.com/tobiasahlin/SpinKit) is licensed under the [MIT License](https://github.com/tobiasahlin/SpinKit/blob/master/LICENSE)\n  - \"caret\" icon made by [Dave Gandy](https://www.flaticon.com/authors/dave-gandy) is licensed under [CC 3.0 BY](https://creativecommons.org/licenses/by/3.0/)\n  - \"delete\" icon made by [Freepik](https://www.flaticon.com/authors/freepik) is licensed under [CC 3.0 BY](https://creativecommons.org/licenses/by/3.0/)\n  - \"checkmark symbol\" \u0026 \"minus symbol\" icons made by [Catalin Fertu](https://www.flaticon.com/authors/catalin-fertu) are licensed under [CC 3.0 BY](https://creativecommons.org/licenses/by/3.0/)\n\n### License\n\nCopyright (c) 2017-present [Riophae Lee](https://github.com/riophae).\n\nReleased under the [MIT License](https://github.com/riophae/vue-treeselect/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friophae%2Fvue-treeselect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friophae%2Fvue-treeselect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friophae%2Fvue-treeselect/lists"}