Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Remove top level hierarchy in BBTable
天舟f9371a5d8317
diff --git a/frontend/src/bbkit/BBTable/BBTable.vue b/frontend/src/bbkit/BBTable/BBTable.vueindex a571bc5b0e..163f1bdbb9 100644--- a/frontend/src/bbkit/BBTable/BBTable.vue+++ b/frontend/src/bbkit/BBTable/BBTable.vue@@ -1,103 +1,104 @@<template>- <div class="border-block-border" :class="borderVisibility">- <table class="min-w-full divide-y divide-block-border">- <thead v-if="showHeader && !sectionDataSource" class="bg-gray-50">- <tr>+ <table+ class="min-w-full divide-y divide-block-border"+ :class="borderVisibility"+ >+ <thead v-if="showHeader && !sectionDataSource" class="bg-gray-50">+ <tr>+ <th+ v-for="(column, index) in columnList"+ :key="index"+ scope="col"+ class="+ py-2+ text-left text-xs+ font-medium+ text-gray-500+ tracking-wider+ "+ :class="index == 0 ? 'pl-4' : 'pl-2'"+ >+ {{ column.title }}+ </th>+ </tr>+ </thead>++ <template v-if="sectionDataSource">+ <template v-for="(section, i) in sectionDataSource" :key="i">+ <tbody class="bg-normal divide-y divide-block-border"><th- v-for="(column, index) in columnList"- :key="index"- scope="col"+ v-if="!compactSection || sectionDataSource.length > 1"+ :colspan="columnList.length"class="- py-2- text-left text-xs+ text-left+ pl-4+ pt-4+ pb-2+ py-text-base+ leading-6font-medium- text-gray-500- tracking-wider+ text-gray-900"- :class="index == 0 ? 'pl-4' : 'pl-2'">- {{ column.title }}- </th>- </tr>- </thead>-- <template v-if="sectionDataSource">- <template v-for="(section, i) in sectionDataSource" :key="i">- <tbody class="bg-normal divide-y divide-block-border">- <th- v-if="!compactSection || sectionDataSource.length > 1"- :colspan="columnList.length"- class="- text-left- pl-4- pt-4- pb-2- py-text-base- leading-6- font-medium- text-gray-900- "- >- <template v-if="section.link">- <router-link :to="section.link" class="normal-link">- {{ section.title }}- </router-link>- </template>- <template v-else>+ <template v-if="section.link">+ <router-link :to="section.link" class="normal-link">{{ section.title }}- </template>- </th>- <template v-if="section.list.length > 0">- <tr v-if="showHeader" class="bg-gray-50">- <slot name="header" />- </tr>- <tr- v-for="(item, j) in section.list"- :key="j"- :class="rowClickable ? 'cursor-pointer hover:bg-gray-200' : ''"- @click.stop="- () => {- if (rowClickable) {- $emit('click-row', i, j);- }- }- "- >- <slot name="body" :rowData="item" />- </tr>+ </router-link></template><template v-else>- <tr>- <td- :colspan="columnList.length"- class="text-center text-gray-400"- >- -- </td>- </tr>+ {{ section.title }}</template>- </tbody>- </template>- </template>- <template v-else>- <tbody class="bg-normal divide-y divide-block-border">- <tr- v-for="(item, index) in dataSource"- :key="index"- :class="rowClickable ? 'cursor-pointer hover:bg-gray-200' : ''"- @click.stop="- () => {- if (rowClickable) {- $emit('click-row', 0, index);+ </th>+ <template v-if="section.list.length > 0">+ <tr v-if="showHeader" class="bg-gray-50">+ <slot name="header" />+ </tr>+ <tr+ v-for="(item, j) in section.list"+ :key="j"+ :class="rowClickable ? 'cursor-pointer hover:bg-gray-200' : ''"+ @click.stop="+ () => {+ if (rowClickable) {+ $emit('click-row', i, j);+ }}+ "+ >+ <slot name="body" :rowData="item" />+ </tr>+ </template>+ <template v-else>+ <tr>+ <td+ :colspan="columnList.length"+ class="text-center text-gray-400"+ >+ -+ </td>+ </tr>+ </template>+ </tbody>+ </template>+ </template>+ <template v-else>+ <tbody class="bg-normal divide-y divide-block-border">+ <tr+ v-for="(item, index) in dataSource"+ :key="index"+ :class="rowClickable ? 'cursor-pointer hover:bg-gray-200' : ''"+ @click.stop="+ () => {+ if (rowClickable) {+ $emit('click-row', 0, index);}- "- >- <slot name="body" :rowData="item" />- </tr></tbody- ></template>- </table>- </div>+ }+ "+ >+ <slot name="body" :rowData="item" />+ </tr></tbody+ ></template>+ </table></template><script lang="ts">