-
Notifications
You must be signed in to change notification settings - Fork 295
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
Add support for global declaration of Vue components #154
Comments
@AbidKhairyAK were you able to figure this issue out or solve it? |
@icarter09 NO, |
@AbidKhairyAK thanks for heads up. I'll try to recreate the issue and dig into it. |
@AbidKhairyAK I don't believe this is supported. @sanketsahusoft can you add the 'Enhancement' label or 'Feature Request' label to this ticket? Thanks. |
Hi @AbidKhairyAK and @icarter09 , since I ran into the same issue today, I came up with quite a simple workaround just using the Vue plugin capability. import componentA from './componentA'
export default {
// The install method is all that needs to exist on the plugin object.
// It takes the global Vue object as well as user-defined options.
install(Vue) {
Vue.component('component-name', componentA)
}
} In your app entry file you can just use that plugin like this: import Vue from 'vue-native-core'
import components from './src/components'
Vue.use(components) I hope this helps, although the answer might have come a little late. |
Does vue native support global component feature?
i've tried this code but seems it doesn't work:
The text was updated successfully, but these errors were encountered: