本页还没有译文
本页 4 段还没译成Español,下面显示的是英文原文。@const
还没翻译译自英文(svelte.dev)本页 4 段都还没译
Note
{@const x = y} is legacy syntax — use {const x = $derived(y)} instead
The {@const ...} tag defines a local constant.
{#each boxes as box}
{@const area = box.width * box.height}
{box.width} * {box.height} = {area}
{/each}{@const} is only allowed as an immediate child of a block — {#if ...}, {#each ...}, {#snippet ...} and so on — a <Component /> or a <svelte:boundary>.
AI 翻译查看英文原文