fix(web): height calculate

This commit is contained in:
zhaoying
2026-03-27 12:02:50 +08:00
parent 9ae1d2f0d9
commit 6f7fee18c9
64 changed files with 545 additions and 569 deletions

View File

@@ -1,6 +1,5 @@
import React, { useState, useRef, useEffect, type ReactNode } from 'react';
import {
List,
Flex,
Space,
Tooltip,
@@ -68,13 +67,14 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s
}
return (
<div>
<>
<BodyWrapper loading={loading} empty={data.length === 0}>
<List
grid={{ gutter: 16, column: 3 }}
dataSource={data}
renderItem={(item) => (
<List.Item key={item.id} className='rb:h-full!'>
<Row
gutter={[12, 12]}
className="rb:max-h-[calc(100%-48px)] rb:overflow-y-auto"
>
{data.map((item) => (
<Col span={8} key={item.id}>
<RbCard
title={
<Flex justify="space-between" gap={16}>
@@ -130,21 +130,20 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s
</Col>
</>
: item.config_data.tool_class === 'JsonTool'
? <Col span={24}>
? <Col span={24}>
<div className="rb:text-[#5B6167] rb:mb-1">{t('tool.jsonEg')}</div>
{InnerConfigData[item.config_data.tool_class].eg}
</Col>
: <Col span={24}>
<div className="rb:text-[#5B6167] rb:mb-1">{t('configStatus')}</div>
{t(`tool.${item.status}_desc`)}
</Col>
: <Col span={24}>
<div className="rb:text-[#5B6167] rb:mb-1">{t('configStatus')}</div>
{t(`tool.${item.status}_desc`)}
</Col>
}
</Row>
</RbCard>
</List.Item>
)}
className="rb:h-[calc(100vh-178px)] rb:overflow-y-auto rb:overflow-x-hidden"
/>
</Col>
))}
</Row>
</BodyWrapper>
<TimeToolModal
@@ -157,7 +156,7 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s
ref={innerToolModalRef}
refreshTable={getData}
/>
</div>
</>
);
};