Skip to content

logicOr

OR 参考条件。

¥OR conditions for refs.

用法

¥Usage

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

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

whenever(logicOr(a, b), () => {
  console.log('either a or b is truthy!')
})

类型声明

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

源代码

源代码文档

变更日志

No recent changes

VueUse 中文网 - 粤ICP备13048890号