useDebouncedRefHistory
useDebouncedRefHistory
useRefHistory にデバウンスフィルターを適用したショートハンド。
使用方法
この関数は、値が変化し始めてから1000ms後にカウンターのスナップショットを取得します。
import { useDebouncedRefHistory } from '@vueuse/core'
import { shallowRef } from 'vue'
const counter = shallowRef(0)
const { history, undo, redo } = useDebouncedRefHistory(counter, { deep: true, debounce: 1000 })
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#