如果存在多个滚动列表之间切换时,页面不刷新导致的样式问题 请设置key 但会导致多标签tab页的缓存失效
{isUseTabsRouter && (
{tabRouters.map((router: TRouterInfo, idx: number) => (
router.path === route.path ? (
handleRefresh(router.path, idx)}>
刷新
{idx > 1 && (
handleCloseAhead(router.path, idx)}>
关闭左侧
)}
{idx < tabRouters.length - 1 && (
handleCloseBehind(router.path, idx)}>
关闭右侧
)}
handleCloseOther(router.path, idx)}>
关闭其它
) : null,
}}
>
{!router.isHome ? router.title : }
}
removable={!router.isHome}
/>
))}
)}
{showBreadcrumb && }
{showFooter && renderFooter()}
);
};
return {
setting,
mainLayoutCls,
renderSidebar,
renderHeader,
renderContent,
};
},
render() {
const { layout } = this.setting;
const header = this.renderHeader();
const sidebar = this.renderSidebar();
const content = this.renderContent();
return (
{layout === 'side' ? (
{sidebar}
{[header, content]}
) : (
{header}
{[sidebar, content]}
)}
);
},
});