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