bootstrap-vue - 使用范围槽的引导 vue 表组件中的自定义列
问题描述
我正在尝试使用作用域插槽在引导 vue 表组件中添加自定义列,但没有任何反应。我看过一些例子并做了同样的事情。
查看字段报告和测试
<b-table v-if="ShowSpinner != true && SearchReportModel.ResultModel.Success == true" class="mt-5"
striped hover :items="SearchReportModel.ShortReportModelList" :fields="fields">
<template v-slot:cell(Report)="data">
<b-button>{{data.item.Originator}}Rad</b-button>
</template>
<template v-slot:cell(test)="data">
<!--{{data.ShortReportModel.Id}}--><p>Test</p>
</template>
</b-table>
<script>
import '../styles/scss/_report-search.scss'
import '../styles/scss/_main-text.scss'
export default {
name: 'ReportSearch',
data: function () {
return {
fields: [
'Id',
'RecordType',
'Originator',
'DateOpened',
'Title',
'Report',
{ key: 'test', label: 'testlabel'}
],
解决方案
推荐阅读
- python - R:大熊猫(Python)的df.info()是否有R等价物?
- python - 如何使用networkx查找强连接组件的子图
- spartacus-storefront - 覆盖页面模板,子组件从活动路由中丢失
- chart.js - 页面上的两个chartjs图表抛出数据未定义错误
- python - TypeError:“NoneType”对象不能用 bs4 下标
- python - 比较python中的两个列表
- c# - 允许文本换行和平滑滚动的 Winforms 控件
- javascript - VueJS - 羽毛图标的无效渲染
- laravel - Laravel 混合夹板块供应商
- google-apps-script - 触发谷歌表格