pref(ideContainer): 优化renderContent函数中对于一打开标签的存在判断

production
钟良源 7 months ago
parent 7a4d82c5f8
commit bc8fdcd2a0

@ -14,6 +14,7 @@ import ProjectContainer from '@/pages/orchestration/project';
import ApplicationContainer from '@/pages/orchestration/application'; import ApplicationContainer from '@/pages/orchestration/application';
import EventContainer from '@/pages/orchestration/event'; import EventContainer from '@/pages/orchestration/event';
import GlobalVarContainer from '@/pages/orchestration/globalVar'; import GlobalVarContainer from '@/pages/orchestration/globalVar';
import AppCompComponent from '@/pages/orchestration/appCompComponent';
import ComponentList from '@/pages/componentDevelopment/componentList'; import ComponentList from '@/pages/componentDevelopment/componentList';
type UrlParamsOptions = { type UrlParamsOptions = {
@ -23,7 +24,6 @@ type UrlParamsOptions = {
const CompListComponent = () => <div style={{ height: '100%', width: '100%' }}></div>; const CompListComponent = () => <div style={{ height: '100%', width: '100%' }}></div>;
const AppInstanceComponent = () => <div style={{ height: '100%', width: '100%' }}></div>; const AppInstanceComponent = () => <div style={{ height: '100%', width: '100%' }}></div>;
const AppCompComponent = () => <div style={{ height: '100%', width: '100%' }}></div>;
const MyComponents = () => <div style={{ height: '100%', width: '100%' }}></div>; const MyComponents = () => <div style={{ height: '100%', width: '100%' }}></div>;
const MatchingComponents = () => <div style={{ height: '100%', width: '100%' }}></div>; const MatchingComponents = () => <div style={{ height: '100%', width: '100%' }}></div>;
const ComponentReview = () => <div style={{ height: '100%', width: '100%' }}></div>; const ComponentReview = () => <div style={{ height: '100%', width: '100%' }}></div>;
@ -82,7 +82,7 @@ function IDEContainer() {
<div style={{ height: '100%', position: 'relative' }}> <div style={{ height: '100%', position: 'relative' }}>
{ALL_PATHS.map((path, i) => { {ALL_PATHS.map((path, i) => {
// 检查该路径的组件是否已打开 // 检查该路径的组件是否已打开
const isOpened = openedTabs.has(selected.key); const isOpened = openedTabs.has(path);
// 检查是否是当前选中的路径 // 检查是否是当前选中的路径
const isSelected = selected.path === path; const isSelected = selected.path === path;

Loading…
Cancel
Save