feat: StockListItem.js - 分时/K线点击切换效果修复

This commit is contained in:
zdl
2025-11-23 10:02:13 +08:00
parent b1d042d0e3
commit 745b9caeee
2 changed files with 7 additions and 2 deletions

View File

@@ -14,11 +14,12 @@ const StockChartModal = ({
stock,
eventTime,
isChakraUI = true, // 是否使用Chakra UI默认true如果false则使用Antd
size = "6xl"
size = "6xl",
initialChartType = 'timeline' // 初始图表类型timeline/daily
}) => {
const chartRef = useRef(null);
const chartInstanceRef = useRef(null);
const [chartType, setChartType] = useState('timeline');
const [chartType, setChartType] = useState(initialChartType);
const [loading, setLoading] = useState(false);
const [chartData, setChartData] = useState(null);
const [preloadedData, setPreloadedData] = useState({});