Skip to content

Commit 392d72c

Browse files
committed
fix:overflow
1 parent e195397 commit 392d72c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

vue/src/components/table/SLTable.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div class="w-full relative">
3-
<div class="relative overflow-auto" :class="maxW">
4-
<div class="w-full">
5-
<table class="w-full border-collapse table-auto border overflow-auto">
3+
<div class="relative w-full" :class="maxW">
4+
<div class="w-full overflow-auto border">
5+
<table class="w-full">
66
<!-- 标签用于对表格中的列进行组合,以便对其进行格式化 -->
77
<colgroup>
88
<col
@@ -27,13 +27,15 @@
2727
class="overflow-hidden"
2828
:class="item.style ? item.style : 'px-2 py-3'"
2929
:style="{ width: widths[index] + 'px' }"
30+
:title="item.title"
3031
>
3132
{{ item.title }}
3233
<!-- 拖拽点 -->
3334
<span
3435
class="w-1.5 h-full absolute right-0 top-0 hover:bg-positive-dimmer hover:opacity-20 cursor-col-resize"
3536
:class="activeColumnIndex === index ? 'bg-positive-highest' : ''"
3637
@mousedown="(e) => resize(e, index)"
38+
v-if="!column.unresizeable"
3739
></span>
3840
</div>
3941
</th>
@@ -51,6 +53,7 @@
5153
<td
5254
v-for="(item, index) in column"
5355
:key="item.key"
56+
:title="dataColumn[item.key]"
5457
class="overflow-hidden"
5558
:class="`${'swanlab-table-column-' + index} ${resize_index === -1 ? 'hover:bg-blue-100' : ''}`"
5659
@mouseover="() => (hoverColumnIndex = index)"

vue/src/layouts/MainLayout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<slot name="left"></slot>
66
</div>
77
<!-- 右侧主体区域 -->
8-
<div class="w-full h-full overflow-auto">
8+
<div class="w-full h-full overflow-hidden">
99
<slot></slot>
1010
</div>
1111
</div>

vue/src/views/experiment/pages/index/components/ExperimentConfig.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$t('experiment.index.config.help.config')
99
}}</SLHelp>
1010
</div>
11-
<SLTable :column="column" :data="configs" high-light />
11+
<SLTable :column="column" :data="configs" />
1212
</div>
1313
<div v-if="summaries?.length !== 0">
1414
<div class="flex items-center pb-4" v-if="summaries?.length !== 0">
@@ -17,7 +17,7 @@
1717
>{{ $t('experiment.index.config.help.summary') }}
1818
</SLHelp>
1919
</div>
20-
<SLTable :column="column" :data="summaries" high-light />
20+
<SLTable :column="column" :data="summaries" />
2121
</div>
2222
</div>
2323
<div class="w-full h-6"></div>
@@ -31,7 +31,7 @@
3131
* @since: 2023-12-11 17:07:31
3232
**/
3333
import ExtendBlock from '@swanlab-vue/views/experiment/components/ExtendBlock.vue'
34-
import SLTable from '@swanlab-vue/components/SLTable.vue'
34+
import SLTable from '@swanlab-vue/components/table'
3535
import SLHelp from '@swanlab-vue/components/SLHelp.vue'
3636
import http from '@swanlab-vue/api/http'
3737
import { ref } from 'vue'

vue/src/views/home/HomeView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<div class="p-6">
2222
<h2 class="text-xl font-semibold mb-4">{{ $t('home.list.title') }}</h2>
2323
<!-- 实验表格 -->
24-
<SLTable :column="column" :data="experiments_table" high-light v-if="tags">
24+
<SLTable :column="column" :data="experiments_table" v-if="tags">
2525
<template v-slot:name="{ row }">
2626
<ExperimentName :name="row.name" :id="row.experiment_id" :color="row.color" />
2727
</template>

0 commit comments

Comments
 (0)