【发布时间】:2021-07-26 17:19:45
【问题描述】:
我正在使用 Vue 和带有 Web 组件的 Vuetify 构建应用程序;当我将 Vuetify 添加为 Web 组件时,CSS 样式 Vuetify 消失了。我尝试将<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vuetify/dist/vuetify.min.css"> 添加到demo.html 文件中,但这没有帮助。我的仓库是vuetify as web component。
我有我的 vue.config.js transpileDependencies: [ 'vuetify' ] 但这也没有帮助。
我需要注意 Vuetify 样式不起作用。
我尝试了以下页面。
- v-aoutocomplete not working with wc
- Vuetify: external page CSS breaks Vuetify's component style
- Custom Web Component image not showing
在我的 repo 中,您可以在 readme.MD 文件中看到步骤和复制以及我尝试过的选项。 我很高兴听到如何在 WC 中包含 vuetify 样式
【问题讨论】:
-
尝试将
import 'vuetify/dist/vuetify.min.css'添加到plugins/vuetify.js中。 -
试过但运气不好没有效果
标签: javascript vue.js vuejs2 vuetify.js web-component