引入日期选择中文包,更新部分样式

This commit is contained in:
JIANG
2025-11-07 11:18:50 +08:00
parent 4f0714b5f6
commit 594d40fe52
9 changed files with 30 additions and 28 deletions

View File

@@ -130,8 +130,8 @@ const MapComponent: React.FC<MapComponentProps> = ({ children }) => {
const [showPipeText, setShowPipeText] = useState(false); // 控制管道文本显示
const [showJunctionTextLayer, setShowJunctionTextLayer] = useState(true); // 控制节点文本图层显示
const [showPipeTextLayer, setShowPipeTextLayer] = useState(true); // 控制管道文本图层显示
const [junctionText, setJunctionText] = useState("");
const [pipeText, setPipeText] = useState("");
const [junctionText, setJunctionText] = useState("pressure");
const [pipeText, setPipeText] = useState("flow");
const flowAnimation = useRef(false); // 添加动画控制标志
const [currentZoom, setCurrentZoom] = useState(12); // 当前缩放级别
@@ -657,14 +657,14 @@ const MapComponent: React.FC<MapComponentProps> = ({ children }) => {
junctionText,
pipeText,
]);
// 控制流动动画开关
useEffect(() => {
if (pipeText === "flow") {
if (pipeText === "flow" && currentPipeCalData.length > 0) {
flowAnimation.current = true;
} else {
flowAnimation.current = false;
}
}, [pipeText]);
}, [currentPipeCalData, pipeText]);
// 计算值更新时,更新 junctionData 和 pipeData
useEffect(() => {
const junctionProperties = junctionText;