mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-03-12 04:04:50 +00:00
@@ -1,2 +1,4 @@
|
||||
<h1>Another tall page</h1>
|
||||
|
||||
<div style="height: 9999px"></div>
|
||||
<p id="bar">element</p>
|
||||
@@ -1,3 +1,15 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let barLink = false;
|
||||
|
||||
onMount(() => {
|
||||
barLink = true
|
||||
});
|
||||
</script>
|
||||
|
||||
<h1>A tall page</h1>
|
||||
|
||||
<a href="tall-page#foo">scroll to foo</a>
|
||||
<div style="height: 9999px"></div>
|
||||
|
||||
@@ -7,18 +19,4 @@
|
||||
{#if barLink}
|
||||
<a href="another-tall-page#bar">link</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barLink: false
|
||||
};
|
||||
},
|
||||
|
||||
oncreate() {
|
||||
this.set({ barLink: true })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
Reference in New Issue
Block a user