├── .babelrc ├── .gitignore ├── LICENSE.mit ├── README.md ├── demo ├── demo-app.vue ├── index.html └── index.js ├── dist ├── demo.html ├── vue3-treeselect.common.js ├── vue3-treeselect.common.js.map ├── vue3-treeselect.css ├── vue3-treeselect.umd.js ├── vue3-treeselect.umd.js.map ├── vue3-treeselect.umd.min.js └── vue3-treeselect.umd.min.js.map ├── docs ├── app.css ├── app.min.js └── index.html ├── package-lock.json ├── package.json ├── src ├── components │ ├── Control.vue │ ├── HiddenFields.vue │ ├── Input.vue │ ├── Menu.vue │ ├── MenuPortal.vue │ ├── MultiValue.vue │ ├── MultiValueItem.vue │ ├── Option.vue │ ├── Placeholder.vue │ ├── SingleValue.vue │ ├── Tip.vue │ ├── Treeselect.vue │ └── icons │ │ ├── Arrow.vue │ │ └── Delete.vue ├── constants.js ├── index.js ├── mixins │ └── treeselectMixin.js └── utils │ ├── .eslintrc.js │ ├── constant.js │ ├── createMap.js │ ├── debounce.js │ ├── deepExtend.js │ ├── find.js │ ├── identity.js │ ├── includes.js │ ├── index.js │ ├── isNaN.js │ ├── isPromise.js │ ├── last.js │ ├── noop.js │ ├── onLeftClick.js │ ├── once.js │ ├── quickDiff.js │ ├── removeFromArray.js │ ├── scrollIntoView.js │ ├── setupResizeAndScrollEventListeners.js │ ├── warning.js │ └── watchSize.js ├── styles ├── assets │ ├── checkbox-checked-disabled.png │ ├── checkbox-checked-disabled@2x.png │ ├── checkbox-checked-disabled@3x.png │ ├── checkbox-checked.png │ ├── checkbox-checked@2x.png │ ├── checkbox-checked@3x.png │ ├── checkbox-indeterminate-disabled.png │ ├── checkbox-indeterminate-disabled@2x.png │ ├── checkbox-indeterminate-disabled@3x.png │ ├── checkbox-indeterminate.png │ ├── checkbox-indeterminate@2x.png │ └── checkbox-indeterminate@3x.png └── style.less ├── tsconfig.json ├── vue.config.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/env", 4 | "@babel/typescript", 5 | "@vue/cli-plugin-babel/preset", 6 | "@vue/babel-preset-jsx" 7 | ], 8 | "plugins": [ 9 | "@vue/babel-plugin-jsx" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Editors 2 | .vscode/ 3 | .idea/ 4 | 5 | # Vagrant 6 | .vagrant/ 7 | 8 | # Mac/OSX 9 | .DS_Store 10 | 11 | # Windows 12 | Thumbs.db 13 | 14 | # Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore 15 | # Byte-compiled / optimized / DLL files 16 | __pycache__/ 17 | *.py[cod] 18 | *$py.class 19 | 20 | # C extensions 21 | *.so 22 | 23 | # Distribution / packaging 24 | .Python 25 | build/ 26 | develop-eggs/ 27 | 28 | downloads/ 29 | eggs/ 30 | .eggs/ 31 | lib/ 32 | lib64/ 33 | parts/ 34 | sdist/ 35 | var/ 36 | wheels/ 37 | *.egg-info/ 38 | .installed.cfg 39 | *.egg 40 | MANIFEST 41 | 42 | # PyInstaller 43 | # Usually these files are written by a python script from a template 44 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 45 | *.manifest 46 | *.spec 47 | 48 | # Installer logs 49 | pip-log.txt 50 | pip-delete-this-directory.txt 51 | 52 | # Unit test / coverage reports 53 | htmlcov/ 54 | .tox/ 55 | .nox/ 56 | .coverage 57 | .coverage.* 58 | .cache 59 | nosetests.xml 60 | coverage.xml 61 | *.cover 62 | .hypothesis/ 63 | .pytest_cache/ 64 | 65 | # Translations 66 | *.mo 67 | *.pot 68 | 69 | # Django stuff: 70 | *.log 71 | local_settings.py 72 | db.sqlite3 73 | 74 | # Flask stuff: 75 | instance/ 76 | .webassets-cache 77 | 78 | # Scrapy stuff: 79 | .scrapy 80 | 81 | # Sphinx documentation 82 | docs/_build/ 83 | 84 | # PyBuilder 85 | target/ 86 | 87 | # Jupyter Notebook 88 | .ipynb_checkpoints 89 | 90 | # IPython 91 | profile_default/ 92 | ipython_config.py 93 | 94 | # pyenv 95 | .python-version 96 | 97 | # celery beat schedule file 98 | celerybeat-schedule 99 | 100 | # SageMath parsed files 101 | *.sage.py 102 | 103 | # Environments 104 | .env 105 | .venv 106 | env/ 107 | venv/ 108 | ENV/ 109 | env.bak/ 110 | venv.bak/ 111 | 112 | # Spyder project settings 113 | .spyderproject 114 | .spyproject 115 | 116 | # Rope project settings 117 | .ropeproject 118 | 119 | # mkdocs documentation 120 | /site 121 | 122 | # mypy 123 | .mypy_cache/ 124 | .dmypy.json 125 | dmypy.json 126 | 127 | node_modules/ 128 | -------------------------------------------------------------------------------- /LICENSE.mit: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue3-treeselect 2 | [![npm](https://badgen.now.sh/npm/v/vue3-treeselect)](https://www.npmjs.com/package/vue3-treeselect) [![Coverage](https://badgen.net/codecov/c/github/megafetis/vue3-treeselect)](https://codecov.io/gh/megafetis/vue3-treeselect?branch=main) 3 | ![npm monthly downloads](https://badgen.now.sh/npm/dm/megafetis/vue3-treeselect) 4 | [![Known vulnerabilities](https://snyk.io/test/npm/megafetis/vue3-treeselect/badge.svg)](https://snyk.io/test/npm/megafetis/vue3-treeselect) ![License](https://badgen.net/github/license/megafetis/vue3-treeselect) 5 | 6 | > A multi-select component with nested options support for Vue 3. Thank to [riophae](https://github.com/riophae/vue-treeselect) and his sources and library for vue 2 taken as basis. 7 | 8 | Breaking changes from his library: 9 | 10 | * property `value` => `modelValue` 11 | * event `input` => `updated:modelValue` 12 | * Now use slots with `