【发布时间】:2018-10-04 19:21:00
【问题描述】:
我正在尝试将 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/>"
});
我的组件.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>
【问题讨论】:
-
@Traxo 试过了,但还是一样
-
欲了解更多信息,请阅读本文:我的应用程序看起来不正确vuetifyjs.com/en/getting-started/…
标签: vuetify.js