refactor(icons): 迁移其他 views 目录图标到 lucide-react

- views/Center, views/Community, views/DataBrowser 等
- views/EventDetail, views/LimitAnalyse, views/StockOverview
- views/TradingSimulation, views/Pages, views/Authentication
- views/Profile, views/Settings
- 处理 Tag/TagIcon 命名冲突
- 涉及 52 个组件文件

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-25 12:25:28 +08:00
parent d4e671428d
commit c820cfa804
52 changed files with 426 additions and 468 deletions

View File

@@ -37,7 +37,7 @@ import {
useColorModeValue,
} from '@chakra-ui/react';
import { getFormattedTextProps } from '../../../utils/textUtils';
import { ExternalLinkIcon } from '@chakra-ui/icons';
import { ExternalLink } from 'lucide-react';
import RiskDisclaimer from '../../../components/RiskDisclaimer';
import ReactECharts from 'echarts-for-react';
import 'echarts-wordcloud';
@@ -760,7 +760,7 @@ export const StockDetailModal = ({ isOpen, onClose, selectedStock }) => {
<Button variant="ghost" mr={3} onClick={onClose}>
关闭
</Button>
<Button colorScheme="blue" leftIcon={<ExternalLinkIcon />}>
<Button colorScheme="blue" leftIcon={<ExternalLink size={16} />}>
查看K线图
</Button>
</ModalFooter>

View File

@@ -16,7 +16,7 @@ import {
Alert,
AlertIcon,
} from '@chakra-ui/react';
import { ChevronLeftIcon, ChevronRightIcon, CalendarIcon } from '@chakra-ui/icons';
import { ChevronLeft, ChevronRight, Calendar } from 'lucide-react';
const EnhancedCalendar = ({
selectedDate,
@@ -110,20 +110,20 @@ const EnhancedCalendar = ({
<VStack spacing={3}>
<HStack justify="space-between" w="full">
<IconButton
icon={<ChevronLeftIcon />}
icon={<ChevronLeft size={compact ? 16 : 20} />}
size={compact ? 'sm' : 'md'}
variant="ghost"
onClick={() => setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() - 1))}
aria-label="上个月"
/>
<HStack spacing={2}>
<CalendarIcon boxSize={5} />
<Calendar size={20} />
<Heading size={headerSize}>
{currentMonth.getFullYear()} {monthNames[currentMonth.getMonth()]}
</Heading>
</HStack>
<IconButton
icon={<ChevronRightIcon />}
icon={<ChevronRight size={compact ? 16 : 20} />}
size={compact ? 'sm' : 'md'}
variant="ghost"
onClick={() => setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() + 1))}

View File

@@ -26,7 +26,7 @@ import {
Flex,
Icon,
} from '@chakra-ui/react';
import { StarIcon, TriangleUpIcon } from '@chakra-ui/icons';
import { Star, TrendingUp } from 'lucide-react';
import { logger } from '../../../utils/logger';
import ztStaticService from '../../../services/ztStaticService';
@@ -124,7 +124,7 @@ const HighPositionStocks = ({ dateStr }) => {
<CardHeader bg="red.500" color="white" borderTopRadius="xl">
<Flex justify="space-between" align="center">
<HStack spacing={3}>
<TriangleUpIcon boxSize={6} />
<TrendingUp size={24} />
<Heading size="md">高位股统计</Heading>
</HStack>
<HStack spacing={2}>
@@ -203,7 +203,7 @@ const HighPositionStocks = ({ dateStr }) => {
<HStack>
<Text>{stock.stock_name}</Text>
{stock.continuous_limit_up >= 5 && (
<StarIcon color="red.500" boxSize={3} />
<Star size={12} color="#E53E3E" fill="#E53E3E" />
)}
</HStack>
</Td>
@@ -241,7 +241,7 @@ const HighPositionStocks = ({ dateStr }) => {
{/* 风险提示 */}
<Box mt={4} p={3} bg="yellow.50" borderRadius="md" border="1px solid" borderColor="yellow.200">
<HStack spacing={2}>
<Icon as={TriangleUpIcon} color="yellow.500" />
<Box as={TrendingUp} size={20} color="#D69E2E" />
<Text fontSize="sm" color="yellow.700">
<strong>风险提示</strong>
连续涨停天数越多风险相对越高

View File

@@ -34,7 +34,7 @@ import {
AlertIcon,
} from '@chakra-ui/react';
import { formatTooltipText, getFormattedTextProps } from '../../../utils/textUtils';
import { SearchIcon, DownloadIcon } from '@chakra-ui/icons';
import { Search, Download } from 'lucide-react';
// 简化版搜索组件 - 仅支持股票代码/名称精确匹配
export const AdvancedSearch = ({ onSearch, loading }) => {
@@ -73,7 +73,7 @@ export const AdvancedSearch = ({ onSearch, loading }) => {
<HStack w="full" spacing={3}>
<InputGroup size="lg" flex={1}>
<InputLeftElement>
<SearchIcon color="gray.400" />
<Search size={20} color="#A0AEC0" />
</InputLeftElement>
<Input
placeholder="输入股票代码或名称搜索(如 600000 或 浦发银行)"
@@ -89,7 +89,7 @@ export const AdvancedSearch = ({ onSearch, loading }) => {
onClick={handleSearch}
isLoading={loading}
px={8}
leftIcon={<SearchIcon />}
leftIcon={<Search size={20} />}
>
搜索
</Button>
@@ -152,7 +152,7 @@ export const SearchResultsModal = ({ isOpen, onClose, searchResults, onStockClic
</Badge>
<Button
size="sm"
leftIcon={<DownloadIcon />}
leftIcon={<Download size={16} />}
onClick={exportResults}
variant="outline"
colorScheme="whiteAlpha"

View File

@@ -23,7 +23,7 @@ import {
useColorModeValue,
Link,
} from '@chakra-ui/react';
import { StarIcon, TimeIcon, ExternalLinkIcon } from '@chakra-ui/icons';
import { Star, Clock, ExternalLink } from 'lucide-react';
const SectorDetails = ({ sortedSectors, totalStocks }) => {
// 使用 useRef 来维持展开状态,避免重新渲染时重置
@@ -141,7 +141,7 @@ const SectorDetails = ({ sortedSectors, totalStocks }) => {
>
<Text fontWeight="bold" fontSize="md">{index + 1}</Text>
</Circle>
{sector === '公告' && <StarIcon />}
{sector === '公告' && <Star size={16} />}
<VStack align="start" spacing={0}>
<Text fontWeight="bold" fontSize="lg">{sector}</Text>
<Text fontSize="sm" opacity={0.9}>
@@ -190,7 +190,7 @@ const SectorDetails = ({ sortedSectors, totalStocks }) => {
onClick={(e) => e.stopPropagation()}
>
{stock.sname}
<ExternalLinkIcon mx="2px" boxSize={3} />
<Box as={ExternalLink} display="inline" size={12} style={{ marginLeft: '2px', marginRight: '2px', verticalAlign: 'middle' }} />
</Link>
<Badge colorScheme="purple" fontSize="xs">{stock.scode}</Badge>
{stock.continuous_days && (
@@ -207,7 +207,7 @@ const SectorDetails = ({ sortedSectors, totalStocks }) => {
{/* 中间:时间和涨幅信息 */}
<HStack spacing={4} fontSize="xs" color="gray.500" flex={1} justify="center">
<HStack spacing={1}>
<TimeIcon boxSize={3} />
<Clock size={12} />
<Text>涨停: {formatStockTime(stock)}</Text>
</HStack>
{stock.first_time && (

View File

@@ -18,10 +18,7 @@ import {
Alert,
AlertIcon,
} from '@chakra-ui/react';
import {
RepeatIcon,
ChevronUpIcon,
} from '@chakra-ui/icons';
import { RefreshCw, ChevronUp } from 'lucide-react';
// 导入拆分的组件
// 注意:在实际使用中,这些组件应该被拆分到独立的文件中
@@ -414,7 +411,7 @@ export default function LimitAnalyse() {
<VStack spacing={3}>
<Tooltip label="刷新数据" placement="left">
<IconButton
icon={<RepeatIcon />}
icon={<RefreshCw size={20} />}
colorScheme="blue"
size="lg"
borderRadius="full"
@@ -425,7 +422,7 @@ export default function LimitAnalyse() {
</Tooltip>
<Tooltip label="回到顶部" placement="left">
<IconButton
icon={<ChevronUpIcon />}
icon={<ChevronUp size={20} />}
colorScheme="gray"
size="lg"
borderRadius="full"