Closed jakholuo closed 3 years ago
When i use _layout.svelte in second-level routes directory,, like:
-routes --_layout.svelte --about ---_layout.svelte ---index.svelte
// routes/about/_layout.svelte <slot />
// routes/about/index.svelte <script> function handleClick(event) { alert(1); } </script> <div> <button on:click={handleClick}>Submit</button> </div>
click the button , alert is not show!
but when i remove the file _layout.svelte , it is work.
_layout.svelte
I don't know how to solve this problem, hope to get help~thanks~
When i use _layout.svelte in second-level routes directory,, like:
-routes --_layout.svelte --about ---_layout.svelte ---index.svelte
click the button , alert is not show!
but when i remove the file
_layout.svelte
, it is work.I don't know how to solve this problem, hope to get help~thanks~