schmoothScroll aus der App.vue entfernen
This commit is contained in:
24
src/App.vue
24
src/App.vue
@@ -1,32 +1,8 @@
|
||||
<script setup lang="js">
|
||||
import { onMounted, nextTick } from "vue"
|
||||
import gsap from "gsap"
|
||||
import ScrollTrigger from "gsap/ScrollTrigger"
|
||||
import ScrollSmoother from "gsap/ScrollSmoother"
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger, ScrollSmoother)
|
||||
|
||||
onMounted(async () => {
|
||||
await nextTick()
|
||||
|
||||
ScrollSmoother.create({
|
||||
wrapper: "#smooth-wrapper",
|
||||
content: "#smooth-content",
|
||||
smooth: 0.2,
|
||||
effects: true
|
||||
})
|
||||
|
||||
ScrollTrigger.refresh()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="smooth-wrapper">
|
||||
<div id="smooth-content">
|
||||
<router-view />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user