useCounter
useCounter
ユーティリティ関数を備えた基本的なカウンター。
基本的な使い方
import { useCounter } from '@vueuse/core'
const { count, inc, dec, set, reset } = useCounter()
オプションを使用した使い方
import { useCounter } from '@vueuse/core'
const { count, inc, dec, set, reset } = useCounter(1, { min: 0, max: 16 })
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#