移除样式设置组件的条件渲染,改为始终渲染但控制显示隐藏

This commit is contained in:
JIANG
2025-12-22 17:22:50 +08:00
parent 6c1e193f60
commit 39450bc6b1

View File

@@ -721,12 +721,12 @@ const Toolbar: React.FC<ToolbarProps> = ({
</div> </div>
{showPropertyPanel && <PropertyPanel {...getFeatureProperties()} />} {showPropertyPanel && <PropertyPanel {...getFeatureProperties()} />}
{showDrawPanel && map && <DrawPanel />} {showDrawPanel && map && <DrawPanel />}
{showStyleEditor && ( <div style={{ display: showStyleEditor ? "block" : "none" }}>
<StyleEditorPanel <StyleEditorPanel
layerStyleStates={layerStyleStates} layerStyleStates={layerStyleStates}
setLayerStyleStates={setLayerStyleStates} setLayerStyleStates={setLayerStyleStates}
/> />
)} </div>
{showHistoryPanel && {showHistoryPanel &&
(HistoryPanel ? ( (HistoryPanel ? (
<HistoryPanel <HistoryPanel