javascript - Vuetify Chip breaks in Production
问题描述
I am using v-chip to act as an info-banner, the v-chip is within a Vue-Leaflet map. The chip is based on this one here, I was trying to adapt it to my project. Locally I managed to achieve my goal as shown by the picture below;
The issue occurs when I deploy my new v-chip feature with firebase hosting, the chip breaks as shown below;
For some reason, it is not showing as it should in production. Here is a link to the current deployed implementation. This is the Repo and the code line between lines 72 and 79, below is the code snippert,
<div class="text-center">
<span class="ma-2 v-chip v-chip--outlined v-chip--pill theme--light v-size--default deep-purple accent-4 deep-purple--text text--accent-4">
<span class="v-chip__content">
<i aria-hidden="true" class="v-icon notranslate v-icon--left mdi mdi-information-outline theme--light"></i>
${placeholder}
</span>
</span>
</div>`
Things I have tried
- I tried to pick out the differences between My code pen example versus Deployed app by inspecting the classes used by both chips and both chips used the exact same classes, therefore ruling out missing class.
- I have tried copying the CSS directly inspecting the CSS in classes used by the codePen example and implementing it in the local repo just for good measure.
解决方案
您没有调用 v-chip 组件,如果您想获取所有样式,即使您没有在应用程序中调用它,请更改 /src/plugins/ 中的 vuetify.js:
添加缩小样式:
import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import "vuetify/dist/vuetify.min.css"; // Add this
Vue.use(Vuetify);
export default new Vuetify({
});
推荐阅读
- java - kafka-clients 包中的 AdminClient 线程安全吗?
- python - 如何从 BeautifulSoup 请求中抽象出两个项目
- macos - 从多个目录移动多个文件
- ansible - Jinja2 - for 循环中的全局变量更新
- c++ - 递归地将给定的字符串转换为它所代表的数字
- git - 如何在 SourceTree 中包含丢失的文件?
- java - 如何使用 AWS 运行我的 map-reduce 程序?
- angular - 如何定期从后端 SignalR 的新时间数据更新时钟
- scala - 当它被扩展时,它是特征的一部分吗?
- c# - 我无法将列表视图项目保存到数据库