javascript - bootstrap-vue 的网格系统在使用 b-list-group-item 导航后中断
问题描述
我将 nuxt.js 与 bootstrap-vue 一起使用,当我使用 nuxt-link 在我的网站上导航时,网格系统会中断。基本上,当我将 URL 直接放在浏览器上时,会发生什么,比如“localhost:3000/contato”,它工作得很好。但是,如果我使用<b-list-group-item to="/contato">Contato</b-list-group-item>
css 就会完全中断。
它应该是什么样子? https://i.stack.imgur.com/D9UCN.png注意:这是用“错误的 css”刷新页面后的样子
使用它看起来像<b-list-group-item to="/contato">Contato</b-list-group-item>
什么? https://i.stack.imgur.com/mMPvf.png
这是代码:
<template>
<b-container>
<b-row align-h="between" cols="1" cols-lg="2" cols-sm="1" class="mt-4">
<b-col align-self="center">
<b-img
center
style="max-height: 200px;"
src="https://www.dovercourt.org/wp-content/uploads/2019/11/610-6104451_image-placeholder-png-user-profile-placeholder-image-png.jpg"
/>
<p style="text-align: center">{{ artist.name }}</p>
</b-col>
<b-col align-self="center">
<p id="description_text" class="text-justify" style="width: 100%">
{{ artist.description_text }}
</p>
</b-col>
</b-row>
<div class="w-100"></div>
<b-row cols="1" cols-lg="3" cols-sm="1">
<b-col>
<InstagramEmbed :url="artist.url1" />
</b-col>
<b-col>
<InstagramEmbed :url="artist.url2" />
</b-col>
<b-col>
<InstagramEmbed :url="artist.url3" />
</b-col>
</b-row>
</b-container>
</template>
<script>
import InstagramEmbed from 'vue-instagram-embed'
export default {
components: {
InstagramEmbed
},
data() {
return {
artist: this.$store.state.artistas.artistas.find(
(x) => x.id === parseInt(this.$route.params.id)
)
}
}
}
</script>
<style></style>
我试图将文本放在“InstagramEmbed”组件所在的位置,但我仍然得到相同的结果。
我尝试了所有可用的路由组件,但仍然得到相同的结果。
我有一个侧边栏,可以在可以使用导航栏上的按钮切换的页面之间导航。这是侧边栏:
<template>
<div class="mt-2">
<b-button
id="sidebar-button"
v-b-toggle.sidebar-1
style="background-color: #561b1f; color: #f3a40c;"
>
⬤
</b-button>
<b-sidebar id="sidebar-1" title="" shadow>
<div class="px-3 py-2">
<b-list-group>
<b-list-group-item to="/contato">Contato</b-list-group-item>
</b-list-group>
</div>
</b-sidebar>
</div>
</template>
<script>
export default {}
</script>
<style></style>
解决方案
推荐阅读
- java - 我怎样才能确保提供者
在新的异步线程中返回一个新的 MyFacade? - flutter - 如何在flutter中调用地图或将地图实例化到主类中?
- reactjs - 背景图片不显示
- python - Discord.py - 返回随机表情符号?
- angular - Angular 7 Material 自动完成选项未显示
- html - 如何使用 flex 将 iframe 拉伸到全屏?
- oracle - 从 Oracle 迁移到 PostgreSQL 的 ORA2PG 工具的 Oracle 版本要求
- time-complexity - 这个嵌套 for 循环的时间复杂度是多少?
- c++ - Cmake 交叉依赖
- python - 如何让 NLTK Punkt 句子标记器识别出现在句子中间或结尾的缩写词?