TencentBlueKing / bkui-vue3

Other
35 stars 57 forks source link

bugfix(table): 只有单行数据的表格在配置了表头隐藏后出现样式异常 #2160

Open Carlmac opened 1 month ago

Carlmac commented 1 month ago

Version / Branch / tag 2.0.1-beta.70.search.1

出了什么问题?(What Happened?)

  1. 当只有一行数据时,配置了表头隐藏后会在表格底部出现一行空白 image

  2. 同时,表格上边框过粗(理应是1px) image

如何复现?(How to reproduce?) 渲染如下vue组件即可看到

<template>
  <div class="about">
    <bk-table :data="tableData" :columns="tableCols" :border="['outer', 'row']" :thead="{ isShow: false }" />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const tableCols = ref([
  {
    label: '行为',
    align: 'right',
    field: 'action',
    width: '200',
    index: 0,
  },
  {
    label: '键',
    field: 'key',
  },
  {
    label: '值',
    field: 'value',
  },
]);

const tableData = ref([
  {
    action: '设置',
    key: 'test-test',
    value: 'xxx',
  }
]);

</script>