迁移到Vuetify 2.0 Beta(.5)时遇到麻烦

时间:2019-07-03 07:00:14

标签: javascript vue.js webpack vuejs2 vuetify.js

我在这里遵循了指南: https://next.vuetifyjs.com/en/getting-started/quick-start,最初我是通过摇树进行设置的,但是看到警告:摇树仅适用于生产模式下的webpack 4,因此我安装了vuetify加载程序,但这没有解决问题。 这是我的设置:

//src/plugins/vuetify.js:
import Vue from 'vue'

import Vuetify from 'vuetify/lib'

import {MdIcons} from "../assets/icons/mdIcons";
//import 'vuetify/src/stylus/app.styl'
import '../assets/stylus/main.styl'
const opts = {
    theme: {
        dark: true,
        themes: {
            light: {
                primary: '#4169E1',
                white: '#ffffff',
                accent: '#111',
                error: '#b71c1c',
                warning: '#DF9627',
                grayf1: '#F8F8F9',
                grayDE: '#EDEDEE',
                grayCE: '#969696',
                avatar: '#FC6A70',
                green: '#69B769'
            },
            dark: {
                primary: '#4169E1',
                white: '#ffffff',
                accent: '#111',
                error: '#b71c1c',
                warning: '#DF9627',
                grayf1: '#F8F8F9',
                grayDE: '#EDEDEE',
                grayCE: '#969696',
                avatar: '#FC6A70',
                green: '#69B769'
            }
        }

    },
    options: {
        themeVariations: ['primary', 'accent', 'white'],
        customProperties: true
    },
    icons: {
        iconfont: 'mdi', // default
        values: MdIcons
    }
}
Vue.use(Vuetify);
export default new Vuetify(opts)

//main.js:

import Vuetify from './plugins/vuetify'
...
new Vue({
                router,
                store,
                i18n,
                Vuetify,
                render: h => h(App),
...

我的所有组件都无法加载该页面,看起来像是1992年以来的页面,这是我所得到的示例错误:

vue.runtime.esm.js?2b0e:601 [Vue warn]: Unknown custom element: <v-pagination> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <SearchUsers> at src/components/SearchUsers.vue
       <UsersList> at src/views/UsersList.vue
         <App> at src/App.vue
           <Root>

package.json,其中似乎建议使用vuetify-loader / sass(最新版本的vuetify)。

sass-loader

编辑:我按照上面的文档中的说明安装了vuetify loader(使用vue-cli-plugin),另外我只是运行了npm install。 请帮忙!

0 个答案:

没有答案