<script lang="ts">
let count = $state(0)
</script>
<p>Count: {count}</p>
<button onclick={() => count++}>+</button>
<button onclick={() => count--}>−</button>Svelte 5 微应用
Count
0
<script lang="ts">
let count = $state(0)
</script>
<p>Count: {count}</p>
<button onclick={() => count++}>+</button>
<button onclick={() => count--}>−</button>