Skip to content

useRound ​

Category
Export Size
145 B
Package
@vueuse/math
Last Changed
5 minutes ago

响应式 Math.round.

用法 ​

ts
import { useRound } from '@vueuse/math'

const value = ref(20.49)
const result = useRound(value) // 20

Type Declarations ​

typescript
/**
 * Reactive `Math.round`.
 *
 * @see https://vueuse.org/useRound
 */
export declare function useRound(
  value: MaybeRefOrGetter<number>,
): ComputedRef<number>

Source ​

Source • Docs

Contributors ​

jojo

Changelog ​

No recent changes

Released under the MIT License.