-
Notifications
You must be signed in to change notification settings - Fork 121
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
How to use vuetify v2.x? #124
Comments
You should use the install file to add more option for the vue constructor. https://github.com/NeutroniumCore/Neutronium.SPA.Demo/blob/master/Neutronium.SPA.Demo/View/src/install.js |
@David-Desmaisons any hints on how to fix this? const vueRootInstanceOption = Object.assign({}, vueInstanceOption() || {}, {
render: h =>
h(App, {
props: {
viewModel: vm.ViewModel,
__window__: vm.Window
}
}),
vuetify: new Vuetify(opts),
data: vm
}); => this works fine with npm run serve Neutronium - Browser Log: Message: Error: Vuetify is not properly initialized, see https://vuetifyjs.com/getting-started/quick-start#bootstrapping-the-vuetify-object, source: , line number: 6, page: pack://application:,,,/View/dist/index.html If i added to entry.js const opts = {
theme: {
dark: true,
},
};
function buildVueOption(vm) {
var option = vueInstanceOption(vm);
option.vuetify = new Vuetify(opts);
option.render = function(h) {
const prop = {
props: {
viewModel: this.$data.ViewModel,
__window__: this.$data.Window
}
};
return h(App, prop);
};
return option;
} then no error, however i get nice black page! Any hints how to properly fix this. Would really be great to migrate the vuetify 2.x |
You add to use the function vueInstanceOption(vm) {
//...
const vuetify = new Vuetify(myOptions);
return {
// other stuff...,
vuetify,
};
} Check the https://github.com/David-Desmaisons/Ornette/ repo who is a working example using vuetify.2 In particular: https://github.com/David-Desmaisons/Ornette/blob/master/Ornette/View/src/install.js |
ok, excelent. Thanks for the updated sample. Must have checked before! |
As Vuetify 2.0 upgrade guide saying,
Vuetify must now be instantiated and passed to the initial Vue instance.
I added
option.vuetify = new Vuetify()
inbuildVueOption
ofentry.js
, but it didn't work but it worked in debug mode when I addedvuetify: new Vuetify()
invueRootInstanceOption
ofmain.js
.I can't figure out how to fix this, what's your suggestion?
Thanks!
The text was updated successfully, but these errors were encountered: