Skip to content
On this page

logicAnd

ref的

用法

ts
import { logicAnd } from '@mpxjs/mpxuse-math'
import { whenever } from '@mpxjs/mpxuse-core'

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

whenever(logicAnd(a, b), () => {
  console.log('both a and b are now truthy!')
})
import { logicAnd } from '@mpxjs/mpxuse-math'
import { whenever } from '@mpxjs/mpxuse-core'

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://mpxuse.cn/logicAnd
 */
export declare function logicAnd(
  ...args: MaybeComputedRef<any>[]
): ComputedRef<boolean>
export { logicAnd as and }
/**
 * `AND` conditions for refs.
 *
 * @see https://mpxuse.cn/logicAnd
 */
export declare function logicAnd(
  ...args: MaybeComputedRef<any>[]
): ComputedRef<boolean>
export { logicAnd as and }

源码

源码文档

贡献者

pagnkelly

更新日志

No recent changes

根据MIT许可证发布。