修正部分编译错误。

This commit is contained in:
徐涛
2025-02-17 13:11:21 +08:00
parent ed2e323e3e
commit 55f0eab76d
2 changed files with 8 additions and 4 deletions

View File

@@ -5,14 +5,14 @@ import styles from './Tab.module.css';
type TabOption = {
title: string;
id: unknown;
id: string;
};
type TabProps = {
tabs: TabOption[];
activeTab?: unknown;
onActive?: (id: TabOption['id']) => void;
disabled?: { [d: keyof TabOption['id']]: boolean };
disabled?: Record<TabOption['id'], boolean>;
};
export function Tab({ tabs = [], activeTab, onActive, disabled }: TabProps) {