Skip to content

useMax

类别
导出体积
184 B
依赖包
@vueuse/math
上次更改
1 hour ago

响应式 Math.max

用法

ts
import { 
useMax
} from '@vueuse/math'
const
array
=
ref
([1, 2, 3, 4])
const
max
=
useMax
(
array
) // Ref<4>
ts
import { 
useMax
} from '@vueuse/math'
const
a
=
ref
(1)
const
b
=
ref
(3)
const
max
=
useMax
(
a
,
b
, 2) // Ref<3>

类型声明

ts
export declare function 
useMax
(
array
:
MaybeRefOrGetter
<
MaybeRefOrGetter
<number>[]>,
):
ComputedRef
<number>
export declare function
useMax
(
...
args
:
MaybeRefOrGetter
<number>[]
):
ComputedRef
<number>

源码

源码文档

贡献者

一纸忘忧

更新日志

没有最近的更新日志