- Tab切换包裹startTransition,图表重渲染不阻塞交互 - viewport加maximum-scale=1.0 user-scalable=no禁止缩放 - 版本号1.0.0 → 1.1.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d7575aeea2
commit
799d00b3da
+4
-2
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
||||
import React, { useState, useEffect, useCallback, useMemo, useRef, useTransition } from 'react';
|
||||
import {
|
||||
Truck,
|
||||
Warehouse,
|
||||
@@ -114,7 +114,9 @@ const TABS = [
|
||||
];
|
||||
|
||||
export default function App() {
|
||||
const [activeTab, setActiveTab] = useState<'overview' | 'department' | 'region' | 'customer'>('overview');
|
||||
const [activeTab, setActiveTabRaw] = useState<'overview' | 'department' | 'region' | 'customer'>('overview');
|
||||
const [, startTransition] = useTransition();
|
||||
const setActiveTab = useCallback((tab: typeof activeTab) => { startTransition(() => setActiveTabRaw(tab)); }, []);
|
||||
const [theme, setTheme] = useState<'soft' | 'minimal' | 'vibrant'>('soft');
|
||||
const [expandedModels, setExpandedModels] = useState<Set<string>>(new Set());
|
||||
const [expandedAssetTypes, setExpandedAssetTypes] = useState<Set<string>>(new Set());
|
||||
|
||||
Reference in New Issue
Block a user