Skip to content

logicAnd

参考文献的 AND 条件。

¥AND condition for refs.

用法

¥Usage

ts
import { whenever } from '@vueuse/core'
import { logicAnd } from '@vueuse/math'

const a = ref(true)
const b = ref(false)

whenever(logicAnd(a, b), () => {
  console.log('both a and b are now truthy!')
})

类型声明

typescript
/**
 * `AND` conditions for refs.
 *
 * @see https://vueuse.org/logicAnd
 */
export declare function logicAnd(
  ...args: MaybeRefOrGetter<any>[]
): ComputedRef<boolean>
export { logicAnd as and }

源代码

源代码文档

变更日志

No recent changes

VueUse 中文网 - 粤ICP备13048890号