Skip to content

Commit

Permalink
fix: 新建联表关联关系很多组超出界面后新建按钮不见了 --bug=137379511
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasikeai committed Jan 22, 2025
1 parent 9e97d78 commit 29ddb2c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<template>
<scroll-faker
:style="{
height: links.length * 120 > 430 ? '430px' : `${links.length * 120}px`,
height: linksHeight > 430 ? '430px' : `${linksHeight}px`,
}">
<template
v-for="(link, index) in links"
Expand Down Expand Up @@ -184,6 +184,15 @@
});
const linkTableTableTypeList = ref<Array<Record<string, any>>>([]);

const linksHeight = computed(() => {
const totalLength = links.value.reduce((accumulator, item) => {
const linkFieldsLength = item.link_fields.length + 2;
return accumulator + linkFieldsLength;
}, 0);

return totalLength * 40;
});

// 如果左表选了EventLog,右表不能再选,直接隐藏不显示
const rightTableTypeList = computed(() => {
if (links.value.some(link => link.left_table.table_type === 'EventLog')) {
Expand Down

0 comments on commit 29ddb2c

Please sign in to comment.