更新时间:2023-09-30 08:24:16
我对这个问题的首选解决方案是选项 C — 使用 child.segment
来控制使用哪种布局:
{#if child.segment === '登录'}<svelte:component this={child.component} {...child.props}/>{:别的}<div class="fancy-layout"><svelte:component this={child.component} {...child.props}/>