feat(web): table ui

This commit is contained in:
zhaoying
2026-03-25 17:13:54 +08:00
parent 0380c13a3b
commit 56fd5680cf
12 changed files with 91 additions and 53 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-03-24 15:41:20
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-24 16:06:44
* @Last Modified time: 2026-03-25 16:20:32
*/
import { type FC, useRef } from 'react';
import { useTranslation } from 'react-i18next';
@@ -26,7 +26,7 @@ const Statistics: FC = () => {
}
/** Table column configuration */
const columns: ColumnsType = [
const columns: ColumnsType<LogItem> = [
{
title: t('application.logTitle'),
dataIndex: 'title',
@@ -62,7 +62,7 @@ const Statistics: FC = () => {
];
return (
<div className="rb:bg-white rb:rounded-lg rb:pt-3 rb:px-3">
<Table
<Table<LogItem>
apiUrl={getAppLogsUrl(id || '')}
apiParams={{
is_draft: false,

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 16:26:32
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-25 15:09:09
* @Last Modified time: 2026-03-25 17:10:30
*/
/**
* Variable List Component
@@ -78,9 +78,10 @@ interface VariableListProps {
<>
{fields.length > 0 ? (
<div className="rb:mt-3">
<Table
<Table<Variable>
size="small"
rowKey="index"
bordered={true}
pagination={false}
columns={[
{
@@ -123,7 +124,7 @@ interface VariableListProps {
),
},
]}
initialData={value as unknown as Record<string, unknown>[]}
initialData={value}
emptySize={88}
/>
</div>