useMax
useMax
リアクティブな Math.max。
使用法
import { useMax } from '@vueuse/math'
const array = ref([1, 2, 3, 4])
const max = useMax(array) // Ref<4>
import { useMax } from '@vueuse/math'
const a = ref(1)
const b = ref(3)
const max = useMax(a, b, 2) // Ref<3>
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#