跳到内容

useFloor

分类
导出大小
146 B
@vueuse/math
最近更改
5 天前

响应式的 Math.floor

用法

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

const value = ref(45.95)
const result = useFloor(value) // 45

类型声明

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

源码

源码文档

贡献者

Anthony Fu
Anthony Fu
IlyaL
webfansplz

更新日志

v12.8.0 on 3/5/2025
7432f - feat(types): 弃用 MaybeRef 和 MaybeRefOrGetter,使用 Vue 原生 (#4636)
v12.3.0 on 1/2/2025
59f75 - feat(toValue): 弃用来自 @vueuse/shared 的 toValue,使用 Vue 原生
v12.0.0-beta.1 on 11/21/2024
0a9ed - feat!: 移除 Vue 2 支持,优化包并清理 (#4349)
v10.0.0-beta.4 on 4/13/2023
4d757 - feat(types)!: 重命名 MaybeComputedRef 为 MaybeRefOrGetter
0a72b - feat(toValue): 重命名 resolveUnref 为 toValue

在 MIT 许可证下发布。