From ff0c4d65e1697ca3a689b6906d42c686b8253172 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Thu, 30 Oct 2025 15:32:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20StockDetailPanel=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - StockDetailPanel.js 引用了不存在的相对路径 - ./hooks/... 和 ./components 找不到文件 - 导致编译失败: Module not found 根因: - hooks 和 components 实际在 ./StockDetailPanel/ 子目录下 - 但导入路径缺少 StockDetailPanel/ 前缀 修复: - ✅ ./hooks/useEventStocks → ./StockDetailPanel/hooks/useEventStocks - ✅ ./hooks/useWatchlist → ./StockDetailPanel/hooks/useWatchlist - ✅ ./hooks/useStockMonitoring → ./StockDetailPanel/hooks/useStockMonitoring - ✅ ./components → ./StockDetailPanel/components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude/settings.local.json | 21 ------------------- .../Community/components/StockDetailPanel.js | 8 +++---- 2 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index 8e92b5b9..00000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "permissions": { - "allow": [ - "Read(//Users/qiye/**)", - "Bash(npm run lint:check)", - "Bash(npm run build)", - "Bash(chmod +x /Users/qiye/Desktop/jzqy/vf_react/scripts/*.sh)", - "Bash(node scripts/parseIndustryCSV.js)", - "Bash(cat:*)", - "Bash(npm cache clean --force)", - "Bash(npm install)", - "Bash(npm run start:mock)", - "Bash(npm install fsevents@latest --save-optional --force)", - "Bash(python -m py_compile:*)", - "Bash(ps -p 20502,53360 -o pid,command)", - "Bash(mkdir -p /Users/qiye/Desktop/jzqy/vf_react/docs/graduation)" - ], - "deny": [], - "ask": [] - } -} diff --git a/src/views/Community/components/StockDetailPanel.js b/src/views/Community/components/StockDetailPanel.js index ade3fd51..97a2fe72 100644 --- a/src/views/Community/components/StockDetailPanel.js +++ b/src/views/Community/components/StockDetailPanel.js @@ -12,12 +12,12 @@ import { getApiBase } from '../../../utils/apiConfig'; // Custom Hooks import { useSubscription } from '../../../hooks/useSubscription'; -import { useEventStocks } from './hooks/useEventStocks'; -import { useWatchlist } from './hooks/useWatchlist'; -import { useStockMonitoring } from './hooks/useStockMonitoring'; +import { useEventStocks } from './StockDetailPanel/hooks/useEventStocks'; +import { useWatchlist } from './StockDetailPanel/hooks/useWatchlist'; +import { useStockMonitoring } from './StockDetailPanel/hooks/useStockMonitoring'; // Components -import { RelatedStocksTab, LockedContent } from './components'; +import { RelatedStocksTab, LockedContent } from './StockDetailPanel/components'; import RelatedConcepts from '../../EventDetail/components/RelatedConcepts'; import HistoricalEvents from '../../EventDetail/components/HistoricalEvents'; import TransmissionChainAnalysis from '../../EventDetail/components/TransmissionChainAnalysis';