- 新建 DisclosureSchedulePanel 组件,独立展示财报披露日程 - 简化 AnnouncementsPanel,移除财报披露日程部分 - DynamicTracking 新增第三个 Tab:财报披露日程 - 更新 mock 数据字段名匹配组件需求 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
97 lines
1.8 KiB
TypeScript
97 lines
1.8 KiB
TypeScript
// src/views/Company/components/CompanyOverview/BasicInfoTab/config.ts
|
|
// Tab 配置 + 黑金主题配置
|
|
|
|
import { IconType } from "react-icons";
|
|
import {
|
|
FaShareAlt,
|
|
FaUserTie,
|
|
FaSitemap,
|
|
FaInfoCircle,
|
|
} from "react-icons/fa";
|
|
|
|
// 主题类型定义
|
|
export interface Theme {
|
|
bg: string;
|
|
cardBg: string;
|
|
tableBg: string;
|
|
tableHoverBg: string;
|
|
gold: string;
|
|
goldLight: string;
|
|
textPrimary: string;
|
|
textSecondary: string;
|
|
border: string;
|
|
tabSelected: {
|
|
bg: string;
|
|
color: string;
|
|
};
|
|
tabUnselected: {
|
|
color: string;
|
|
};
|
|
}
|
|
|
|
// 黑金主题配置
|
|
export const THEME: Theme = {
|
|
bg: "gray.900",
|
|
cardBg: "gray.800",
|
|
tableBg: "gray.700",
|
|
tableHoverBg: "gray.600",
|
|
gold: "#D4AF37",
|
|
goldLight: "#F0D78C",
|
|
textPrimary: "white",
|
|
textSecondary: "gray.400",
|
|
border: "rgba(212, 175, 55, 0.3)",
|
|
tabSelected: {
|
|
bg: "#D4AF37",
|
|
color: "gray.900",
|
|
},
|
|
tabUnselected: {
|
|
color: "#D4AF37",
|
|
},
|
|
};
|
|
|
|
// Tab 配置类型
|
|
export interface TabConfig {
|
|
key: string;
|
|
name: string;
|
|
icon: IconType;
|
|
enabled: boolean;
|
|
}
|
|
|
|
// Tab 配置
|
|
export const TAB_CONFIG: TabConfig[] = [
|
|
{
|
|
key: "shareholder",
|
|
name: "股权结构",
|
|
icon: FaShareAlt,
|
|
enabled: true,
|
|
},
|
|
{
|
|
key: "management",
|
|
name: "管理团队",
|
|
icon: FaUserTie,
|
|
enabled: true,
|
|
},
|
|
{
|
|
key: "branches",
|
|
name: "分支机构",
|
|
icon: FaSitemap,
|
|
enabled: true,
|
|
},
|
|
{
|
|
key: "business",
|
|
name: "工商信息",
|
|
icon: FaInfoCircle,
|
|
enabled: true,
|
|
},
|
|
];
|
|
|
|
// 获取启用的 Tab 列表
|
|
export const getEnabledTabs = (enabledKeys?: string[]): TabConfig[] => {
|
|
if (!enabledKeys || enabledKeys.length === 0) {
|
|
return TAB_CONFIG.filter((tab) => tab.enabled);
|
|
}
|
|
return TAB_CONFIG.filter(
|
|
(tab) => tab.enabled && enabledKeys.includes(tab.key)
|
|
);
|
|
};
|