コンテンツへスキップ

logicOr

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

ref の OR 条件。

使用法

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

ソース

ソースドキュメント

貢献者

Anthony Fu
Anthony Fu
Curt Grimes

変更履歴

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ライセンスの下でリリースされています。