Skip to content

Commit b6cec78

Browse files
committed
搁置
1 parent 8ef24ae commit b6cec78

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/lib/ZHeader/ZHeader.svelte

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@
4444
*/
4545
let numOfSnippets = Object.keys(others).length;
4646
47-
let windowWidth = $state(0);
48-
49-
let userAgent = $derived(windowWidth > 768 ? 'PC' : 'Mobile');
50-
51-
let p = $derived(windowWidth > 768 ? 1 : 15);
52-
5347
/**
5448
* To save configs
5549
* */
@@ -141,7 +135,6 @@
141135
}, 501);
142136
});
143137
});
144-
$inspect(userAgent);
145138
$effect(() => {
146139
snippets[1].width;
147140
setTimeout(() => {
@@ -150,14 +143,12 @@
150143
});
151144
</script>
152145

153-
<svelte:window bind:innerWidth={windowWidth} />
154-
155146
<div id="rootHead">
156147
{#each snippets as snippet}
157148
<!-- svelte-ignore a11y_no_static_element_interactions -->
158149
<div
159150
class="headItem"
160-
style="{userAgent === 'PC' ? 'left' : 'top'}: {snippet.start.current * 100 * p}%;"
151+
style="left: {snippet.start.current * 100}%;"
161152
style:pointer-events={snippet.pointerEvents}
162153
class:actived={snippet.actived}
163154
bind:this={snippet.ele}

0 commit comments

Comments
 (0)