新老网站做301跳转,wordpress搭建500错误,营销型网站建设合同模板,免费wordpress申请VueUse 是什么?
VueUse 是基于 Vue 3 Composition API 的高质量 Hooks 库。例如获取滚动的距离
VueUse 官网:VueUse | VueUse VueUse 什么使用?
1、通过npm安装 VueUse
npm i @vueuse/core
2、搜索需要使用的函数,例如搜索 useScroll 滚动 3、使用useScroll 滚动函数 …VueUse 是什么?
VueUse 是基于 Vue 3 Composition API 的高质量 Hooks 库。例如获取滚动的距离
VueUse 官网:VueUse | VueUse VueUse 什么使用?
1、通过npm安装 VueUse
npm i @vueuse/core
2、搜索需要使用的函数,例如搜索 useScroll 滚动 3、使用useScroll滚动函数 script setup
import { ref } from 'vue';
import { useScroll } from "@vueuse/core"// 因为是基于window 滚动,所以传入的是window对象
const { x, y, isScrolling, arrivedState, directions } = useScroll(window)/scripttemplate