0👍
In main.js
changed
import './plugins/vuetify'
to
import vuetify from './plugins/vuetify'**
and then add it into new Vue
instance like this:
new Vue({
...
vuetify,
...
}).$mount('#app')
for example, main.js
:
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import vuetify from './plugins/vuetify'
import 'material-design-icons-iconfont/dist/material-design-icons.css'
Vue.config.productionTip = false
new Vue({
router,
store,
vuetify,
render: h => h(App)
}).$mount('#app')
and vuetify.js
:
import Vue from 'vue'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
import colors from 'vuetify/es5/util/colors'
Vue.use(Vuetify)
export default new Vuetify({
iconfont: 'md',
theme: {
primary: colors.green.darken1,
secondary: colors.green.lighten4,
accent: colors.green.darken3
}
})
- [Vuejs]-Adding an object to a parent array
- [Vuejs]-Vuex/Firestore retrieve user data from another collection
Source:stackexchange.com