sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

unplugin-vue-components support #1788

Open colinblaise opened 11 months ago

colinblaise commented 11 months ago

I'm using vue-select 3 on vue2 and I am trying to get typing in the template using unplugin-vue-components.

I'm attempting to write my own resolver with no luck.

function VueSelectResolver(): ComponentResolver[] {
  const resolvers: ComponentResolver[] = [
    {
      type: "component",
      resolve: name => {
        if (name === "VSelect") {
          console.log(name);

          return {
            name: "default",
            from: "vue-select/src/components/Select.vue",
          };
        }
      },
    },
  ];
  return resolvers;
}

I've also tried variations including setting from = "@types/vue-select" which doesn't appear to work either.

If anoyne wants to help find a working implementation of a resolver to use for unplugin-vue-components, that would be sweet.