refactor: 移除暗色模式相关代码,使用固定浅色主题

- DeepAnalysisTab: 移除 useColorModeValue,使用固定颜色值
- NewsEventsTab: 移除 useColorModeValue,简化 hover 颜色
- FinancialPanorama: 移除 useColorMode/useColorModeValue
- MarketDataView: 移除 dark 主题配置,简化颜色逻辑
- StockQuoteCard: 移除 useColorModeValue,使用固定颜色

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-09 18:46:30 +08:00
parent 2dd7dd755a
commit 40f6eaced6
5 changed files with 73 additions and 107 deletions

View File

@@ -20,7 +20,6 @@ import {
Tab,
TabPanel,
Button,
useColorModeValue,
Tag,
TagLabel,
Icon,
@@ -194,7 +193,7 @@ const ScoreBar = ({ label, score, icon }) => {
// 业务结构树形图组件
const BusinessTreeItem = ({ business, depth = 0 }) => {
const bgColor = useColorModeValue("gray.50", "gray.700");
const bgColor = "gray.50";
return (
<Box
@@ -286,11 +285,8 @@ const ValueChainNodeCard = ({ node, isCompany = false, level = 0 }) => {
};
const colorScheme = getColorScheme();
const bgColor = useColorModeValue(`${colorScheme}.50`, `${colorScheme}.900`);
const borderColor = useColorModeValue(
`${colorScheme}.200`,
`${colorScheme}.600`
);
const bgColor = `${colorScheme}.50`;
const borderColor = `${colorScheme}.200`;
const getNodeTypeIcon = (type) => {
const icons = {
@@ -700,8 +696,8 @@ const KeyFactorCard = ({ factor }) => {
mixed: "yellow",
}[factor.impact_direction] || "gray";
const bgColor = useColorModeValue("white", "gray.800");
const borderColor = useColorModeValue("gray.200", "gray.600");
const bgColor = "white";
const borderColor = "gray.200";
return (
<Card bg={bgColor} borderColor={borderColor} size="sm">
@@ -769,9 +765,9 @@ const TimelineComponent = ({ events }) => {
const [selectedEvent, setSelectedEvent] = useState(null);
const { isOpen, onOpen, onClose } = useDisclosure();
// 颜色模式值需要在组件顶层调用
const positiveBgColor = useColorModeValue("red.50", "red.900");
const negativeBgColor = useColorModeValue("green.50", "green.900");
// 背景颜色
const positiveBgColor = "red.50";
const negativeBgColor = "green.50";
const handleEventClick = (event) => {
setSelectedEvent(event);
@@ -1137,10 +1133,10 @@ const DeepAnalysisTab = ({
expandedSegments,
onToggleSegment,
}) => {
const blueBg = useColorModeValue("blue.50", "blue.900");
const greenBg = useColorModeValue("green.50", "green.900");
const purpleBg = useColorModeValue("purple.50", "purple.900");
const orangeBg = useColorModeValue("orange.50", "orange.900");
const blueBg = "blue.50";
const greenBg = "green.50";
const purpleBg = "purple.50";
const orangeBg = "orange.50";
if (loading) {
return (

View File

@@ -18,7 +18,6 @@ import {
Tag,
Center,
Spinner,
useColorModeValue,
} from "@chakra-ui/react";
import { SearchIcon } from "@chakra-ui/icons";
import {
@@ -67,9 +66,6 @@ const NewsEventsTab = ({
onPageChange,
cardBg,
}) => {
// 颜色模式值需要在组件顶层调用
const hoverBg = useColorModeValue("gray.50", "gray.700");
// 事件类型图标映射
const getEventTypeIcon = (eventType) => {
const iconMap = {
@@ -233,7 +229,7 @@ const NewsEventsTab = ({
key={event.id || idx}
variant="outline"
_hover={{
bg: hoverBg,
bg: "gray.50",
shadow: "md",
borderColor: "blue.300",
}}