-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
+page.svelte
47 lines (42 loc) · 1.05 KB
/
+page.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<script>
import N from '$lib/index.js';
let ref;
let visible = false;
let content = '1';
let beforeShow = () => {
console.log('1111');
};
let beforeHide = () => {
console.log('2222');
};
</script>
<div class="aaa">
<div class="bbb" />
<!-- <button-->
<!-- bind:this={ref}-->
<!-- on:click={() => (visible = !visible)}-->
<!-- on:mouseover={(e) => (ref = e.currentTarget)}-->
<!-- >-->
<!-- 11111-->
<!-- </button>-->
<!-- <!– svelte-ignore a11y-mouse-events-have-key-events –>-->
<!-- <button-->
<!-- bind:this={ref}-->
<!-- on:click={() => (visible = !visible)}-->
<!-- on:mouseover={(e) => (ref = e.currentTarget)}-->
<!-- >-->
<!-- 22222-->
<!-- </button>-->
<!-- <N content="1111" virtualRef={ref} virtualTriggering {visible} />-->
<N {content} on:beforeHide={beforeHide} on:beforeShow={beforeShow}>
<button on:click={() => (content += '1')}>111</button>
</N>
</div>
<style>
.aaa {
height: 5000px;
}
.bbb {
height: 1300px;
}
</style>