This commit is contained in:
2025-10-20 05:45:19 +08:00
parent d3174a73f3
commit 15af405d02
37 changed files with 3570 additions and 5 deletions

View File

@@ -0,0 +1,70 @@
import { useState } from "react";
import { Base } from "./table/index";
const tabs = [
{
key: 'table',
title: '表格'
},
{
key: 'graph',
title: '关系图'
},
{
key: 'world',
title: '世界'
}
];
export const BaseApp = () => {
const [activeTab, setActiveTab] = useState('table');
const renderContent = () => {
switch (activeTab) {
case 'table':
return <Base />;
case 'graph':
return (
<div className="flex items-center justify-center h-96 text-gray-500">
</div>
);
case 'world':
return (
<div className="flex items-center justify-center h-96 text-gray-500">
</div>
);
default:
return null;
}
};
return (
<div className="w-full h-full">
{/* Tab 导航栏 */}
<div className="border-b border-gray-200">
<nav className="flex space-x-8">
{tabs.map((tab) => (
<button
key={tab.key}
onClick={() => setActiveTab(tab.key)}
className={`py-2 px-1 border-b-2 font-medium text-sm ${
activeTab === tab.key
? 'border-blue-500 text-blue-600'
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'
}`}
>
{tab.title}
</button>
))}
</nav>
</div>
{/* Tab 内容区域 */}
<div className="flex-1">
{renderContent()}
</div>
</div>
);
}