我正在尝试将Vuetify集成到我的现有Vue项目中,但颜色显示不正确。我遵循https://vuetifyjs.com/en/getting-started/quick-start -> 现有应用程序的指南。
CSS文件似乎已经正确加载,因为按钮似乎带有阴影并且有一些点击效果。然而,颜色和文本显示不正确:
我的main.js
import Vue from "vue";
import App from "./App";
import Vuetify from "vuetify";
import router from "./router";
import "../node_modules/vuetify/dist/vuetify.min.css";
Vue.config.productionTip = false;
Vue.use(Vuetify);
/* eslint-disable no-new */
new Vue({
el: "#app",
router,
components: { App },
template: "<App/>"
});
我的component.vue
<template>
<div class="hello">
<v-btn color="success">Success</v-btn>
<v-btn color="error">Error</v-btn>
<v-btn color="warning">Warning</v-btn>
<v-btn color="info">Info</v-btn>
</div>
</template>
<script>
... // Removed for simplicity
</script>
<style lang="stylus" scoped>
@import '../../node_modules/vuetify/src/stylus/main' // Ensure you are using stylus-loader
</style>