Skip to content

Dont Show select input in vue3 #1536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ehsan-zarei opened this issue Nov 6, 2021 · 1 comment
Open

Dont Show select input in vue3 #1536

ehsan-zarei opened this issue Nov 6, 2021 · 1 comment

Comments

@ehsan-zarei
Copy link

I use the following code in vue 3 :

main.js
import vSelect from 'vue-select'
import "vue-select/dist/vue-select.css";
const myApp = createApp(App);
myApp.component('v-select', vSelect.VueSelect);
myApp.use(router).mount('#app');

components
<v-select class="form-control" :options="options"></v-select>

but dont show select input when run project and following error in console

[Vue warn]: Failed to resolve component: v-select
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
at <Create onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > >
at <RouterView>
at <Layout onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > >
at <RouterView>
at <App>

@onekiloparsec
Copy link

Shouldn't it be simply myApp.component('v-select', vSelect); ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants