vue.js - 如何隐藏或删除 bootstrap-vue b-table 中的标头字段?
问题描述
出于某种原因,我不想b-table
在我的网络中显示字段。换句话说,我不想显示表头字段。
但是我从来没有找到如何隐藏或删除 bootstrap-vue 中的字段(例如信息字段名称)。
请帮我。
我还有一个问题,为什么我可以通过cell(information)="row"
.
这是我的测试代码,你可以在操场上运行它。
预先感谢您的帮助。
<template>
<div>
<b-table
striped
hover
:items="items"
>
<template v-slot:cell(information)="row">
<p>{{row.item.information.test1}}</p>
<p>{{row.item.information.test2}}</p>
</template>
</b-table>
</div>
</template>
<script>
export default {
data() {
return {
items: [
{ information: { test1: 1, test2: 1 } },
{ information: { test1: 3, test2: 3 } },
{ information: { test1: 2, test2: 2 } },
{ information: { test1: 4, test2: 4 } }
]
};
}
};
</script>
解决方案
推荐阅读
- javascript - Kotlin 文件 Android Studio 中的“未解析的引用 js”
- lua - 如何使对象在Lua中从上到下移动?
- css - Bootstrap 4.1 卡片样式
- java - Android java应用程序,触摸时替换图像
- docker - Visual Studio Dockerfile 入口点覆盖解释?
- html - CSS 网格视图适合至少 2 个 div 的屏幕
- delphi - Chromium Embedded:TCefDomVisitorOwn.visit() 方法永远不会被执行
- android - EditText 和 TextView 中的 Null
- c# - 如何修复程序集 C# 加载失败?
- reactjs - 当服务器上的数据独立于reducer应用程序发生变化时,如何做到这一点