Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Add BBTableHeaderCell so we can hide/show column header on breakpoint
Tianzhou Chen616e651e82a2
diff --git a/frontend/src/bbkit/BBTable/BBTable.vue b/frontend/src/bbkit/BBTable/BBTable.vueindex b6c3b5cc2d..46691f4eee 100644--- a/frontend/src/bbkit/BBTable/BBTable.vue+++ b/frontend/src/bbkit/BBTable/BBTable.vue@@ -30,15 +30,7 @@</th><template v-if="section.list.length > 0"><tr v-if="showHeader" class="bg-gray-50">- <th- v-for="(column, index) in columnList"- :key="index"- scope="col"- class="py-3 text-left text-xs font-medium text-gray-500 capitalize tracking-wider"- :class="index == 0 ? 'pl-4' : 'pl-2'"- >- {{ column.title }}- </th>+ <slot name="header" /></tr><trv-for="(item, j) in section.list"diff --git a/frontend/src/bbkit/BBTable/BBTableHeaderCell.vue b/frontend/src/bbkit/BBTable/BBTableHeaderCell.vuenew file mode 100644index 0000000000..2e3373c93f--- /dev/null+++ b/frontend/src/bbkit/BBTable/BBTableHeaderCell.vue@@ -0,0 +1,26 @@+<template>+ <th+ scope="col"+ class="text-left text-xs font-medium text-gray-500 capitalize tracking-wider py-3"+ :class="`pl-` + leftPadding"+ >+ {{ title }}+ </th>+</template>++<script lang="ts">+export default {+ name: "BBTableHeaderCell",+ props: {+ title: {+ required: true,+ type: String,+ },+ leftPadding: {+ type: Number,+ default: 2,+ },+ },+ setup(props, ctx) {},+};+</script>diff --git a/frontend/src/bbkit/BBTable/index.ts b/frontend/src/bbkit/BBTable/index.tsindex d165b2651c..566433634c 100644--- a/frontend/src/bbkit/BBTable/index.ts+++ b/frontend/src/bbkit/BBTable/index.ts@@ -1,5 +1,6 @@import BBTable from "./BBTable.vue";import BBTableCell from "./BBTableCell.vue";+import BBTableHeaderCell from "./BBTableHeaderCell.vue";import BBTableTabFilter from "./BBTableTabFilter.vue";-export { BBTable, BBTableCell, BBTableTabFilter };+export { BBTable, BBTableCell, BBTableHeaderCell, BBTableTabFilter };diff --git a/frontend/src/bbkit/index.ts b/frontend/src/bbkit/index.tsindex 793ed3dfff..38f0251044 100644--- a/frontend/src/bbkit/index.ts+++ b/frontend/src/bbkit/index.ts@@ -8,7 +8,12 @@ import BBSelect from "./BBSelect.vue";import BBStepBar from "./BBStepBar.vue";import BBTab from "./BBTab.vue";import BBTabPanel from "./BBTabPanel.vue";-import { BBTable, BBTableCell, BBTableTabFilter } from "./BBTable";+import {+ BBTable,+ BBTableCell,+ BBTableHeaderCell,+ BBTableTabFilter,+} from "./BBTable";export {BBAlert,@@ -23,5 +28,6 @@ export {BBTabPanel,BBTable,BBTableCell,+ BBTableHeaderCell,BBTableTabFilter,};diff --git a/frontend/src/components/TaskTable.vue b/frontend/src/components/TaskTable.vueindex f3d852d5e6..81b909158b 100644--- a/frontend/src/components/TaskTable.vue+++ b/frontend/src/components/TaskTable.vue@@ -5,6 +5,40 @@:showHeader="true"@click-row="clickTask">+ <template v-slot:header>+ <BBTableHeaderCell+ class="w-4 table-cell"+ :title="state.columnList[0].title"+ />+ <BBTableHeaderCell+ class="w-4 table-cell"+ :title="state.columnList[1].title"+ />+ <BBTableHeaderCell+ class="w-4 table-cell"+ :title="state.columnList[2].title"+ />+ <BBTableHeaderCell+ class="w-24 table-cell"+ :title="state.columnList[3].title"+ />+ <BBTableHeaderCell+ class="table-cell"+ :title="state.columnList[4].title"+ />+ <BBTableHeaderCell+ class="w-12 hidden sm:table-cell"+ :title="state.columnList[5].title"+ />+ <BBTableHeaderCell+ class="w-32 hidden md:table-cell"+ :title="state.columnList[6].title"+ />+ <BBTableHeaderCell+ class="w-36 hidden sm:table-cell"+ :title="state.columnList[7].title"+ />+ </template><template v-slot:body="{ rowData: task }"><BBTableCell :leftPadding="4" class="w-4 table-cell"><TaskStatusIcondiff --git a/frontend/src/main.js b/frontend/src/main.jsindex cd877ec3e9..b134317bf9 100644--- a/frontend/src/main.js+++ b/frontend/src/main.js@@ -19,6 +19,7 @@ import {BBTabPanel,BBTable,BBTableCell,+ BBTableHeaderCell,BBTableTabFilter,} from "./bbkit";import { isDevOrDemo, humanizeTs, sizeToFit } from "./utils";@@ -52,5 +53,6 @@ app.component("BBTabPanel", BBTabPanel).component("BBTable", BBTable).component("BBTableCell", BBTableCell)+ .component("BBTableHeaderCell", BBTableHeaderCell).component("BBTableTabFilter", BBTableTabFilter).mount("#app");