Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,13 @@
/>
</div>
</div>
<div class="flex-1 table-wrapper">
<div class="flex-1">
<AgTable
ref="tableRef"
v-model:table-data="tableData"
:api-method="getTableData"
:columns="columns"
:max-height="tableMaxHeight"
:show-selection="isShowSelection"
:show-first-full-row="selectedRows.length > 0"
table-row-key="id"
Expand Down Expand Up @@ -287,7 +288,7 @@
@done="isComponentLoading = false"
@deleted-success="handleDeleteSuccess"
@updated="handleUpdated"
@on-jump="(id: number | any) => handleShowInfo(id)"
@on-jump="(id: number) => handleShowInfo(id)"
@on-update-plugin="handleUpdatePlugin"
/>
</div>
Expand Down Expand Up @@ -459,6 +460,7 @@ import VersionDiff from '@/components/version-diff/Index.vue';
import ResourceDocSlider from '../components/ResourceDocSlider.vue';
import RenderTagOverflow from '@/components/render-tag-overflow/Index.vue';
import { useRouteQuery } from '@vueuse/router';
import { useWindowSize } from '@vueuse/core';

interface ApigwIDropList extends IDropList { tooltips?: string }

Expand Down Expand Up @@ -950,6 +952,35 @@ const columns = computed<PrimaryTableProps['columns']>(() => {
return cols;
});

// 表格最大高度
const tableMaxHeight = computed(() => {
const viewportHeight = useWindowSize().height.value;
// 通知栏高度
const globalNoticeCompHeight = featureFlagStore.isEnabledNotice ? 40 : 0;
// 导航栏高度
const navBarHeight = 52;
// 路由标题高度
const routeTitleHeight = 52;
// 页面上下padding
const pageVerticalPadding = 40;
// 版本提示高度
const versionAlertHeight = (versionConfigs.needNewVersion && isCollapsed.value) ? 52 : 0;
// 操作栏高度
const operationBarHeight = 48;
// 分页器高度
const paginationHeight = 64;
// 获取表格的最大可视化区域
const usableHeight = viewportHeight
- globalNoticeCompHeight
- navBarHeight
- routeTitleHeight
- pageVerticalPadding
- versionAlertHeight
- operationBarHeight
- paginationHeight;
return usableHeight;
});

watch(
isCollapsed,
() => {
Expand Down Expand Up @@ -1809,10 +1840,6 @@ onMounted(() => {
height: 100%;
}

.table-wrapper {
overflow-y: auto;
}

.resource-setting-layout {

:deep(.bk-resize-layout-aside-content) {
Expand Down
Loading