Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Vue-Select and Vue-Treeselect never got a stable Vue 3 release, so we replaced them

Описание и применение

В приложении, мигрируемом с Vue 2.7 на Vue 3, компоненты vue-select и vue-treeselect не поддерживают стабильную версию Vue 3. Создан компонент Vue Pick, совместимый с обеими версиями, что позволило заменить старые выпадающие списки и без проблем перейти на Vue 3.

Задача

The app uses vue-select and vue-treeselect, which lack stable Vue 3 support, hindering migration from Vue 2.7 to Vue 3.

Результат

Replacing vue-select and vue-treeselect with Vue Pick enabled a smooth migration from Vue 2.7 to Vue 3, preserving dropdown functionality without additional runtime dependencies.

Рабочий процесс

  • Identify incompatible dropdown libraries (vue-select, vue-treeselect).
  • Search for Vue 3 compatible forks – found only Vue 3‑only forks.
  • Decide to create a cross‑version component.
  • Develop Vue Pick with same props as original libraries, supporting search, multiselect, tree select, and server‑loaded children.
  • Deploy Vue Pick in place of old selects while still on Vue 2.7.
  • When migrating to Vue 3, change import path from "vue-pick/vue2" to "vue-pick".
  • Verify functionality remains unchanged.

Доказательства

vue-select only supports Vue 3 through its 4.0 beta, and the last beta came out in November 2022.

Источник

vue-treeselect's last release was in October 2019, and it only runs on Vue 2.

Источник

So I wrote Vue Pick, one component that runs on both Vue 2.7 and Vue 3 with the same props.

Источник

The only change at that point is the import path, vue-pick/vue2 to vue-pick.

Источник

  • Дата записи: 2026-10-03T10:41:05.801Z