コンテンツへスキップ

logicAnd

カテゴリ
エクスポートサイズ
123 B
パッケージ
@vueuse/math
最終更新日
先週
エイリアス
and
関連

refsのAND条件。

使い方

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.dokyumento.jp/logicAnd
 */
export declare function logicAnd(
  ...args: MaybeRefOrGetter<any>[]
): ComputedRef<boolean>
export { logicAnd as and }

ソース

ソースドキュメント

貢献者

Anthony Fu
Curt Grimes
Anthony Fu

変更履歴

v12.0.0-beta.1 2024/11/21
0a9ed - feat!: Vue 2 のサポートを削除、バンドルの最適化、クリーンアップ (#4349)
v10.0.0-beta.4 2023/04/13
4d757 - feat(types)!: MaybeComputedRefMaybeRefOrGetter に名前変更
0a72b - feat(toValue): resolveUnreftoValue に名前変更

MITライセンスの下でリリースされています。