如何在VUE中为每个渲染组件添加自定义范围ID
嗨,我有一个情况,例如我想从不同服务器下载css
文件,其CSS将范围内附加了范围,如下所示。
[带有范围ID data-V-98b365f2
>]的CSS - 组件dell dell
.Dell[data-v-98b365f2]{
........
}
附加到head,上述CSS文件
现在在我的Vue
import Dell from './Dell.vue';
export default{
name:'Main-Component',
component:{Dell}, <-- here i want to attach above scope-id of downloaded css file i,e data-v-98b365f2
}
问题:如何在我的情况下使用给定范围ID渲染组件data-v-98b365f2
注意:我下载的文件范围ID即使改变我会得到它,也永远不会改变。
Hi i have a situation like i want to download css
files from different server whose css will have scoped attached to it, something like shown below.
[Downloaded css with scope id data-v-98b365f2
] - component Dell
.Dell[data-v-98b365f2]{
........
}
Append to head, the above css file
now in my vue
import Dell from './Dell.vue';
export default{
name:'Main-Component',
component:{Dell}, <-- here i want to attach above scope-id of downloaded css file i,e data-v-98b365f2
}
Question: how to render a component with given scope id in my case data-v-98b365f2
Note: my downloaded file scope-id will never change, even if changes i will get it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论