跳到主要內容

logicNot

類別
匯出大小
141 B
套件
@vueuse/math
上次更改
3 個月前
別名
not
相關

ref 的 NOT 條件。

用法

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

const a = ref(true)

whenever(logicNot(a), () => {
  console.log('a is now falsy!')
})

類型宣告

typescript
/**
 * `NOT` conditions for refs.
 *
 * @see https://vueuse.dev.org.tw/logicNot
 */
export declare function logicNot(v: MaybeRefOrGetter<any>): ComputedRef<boolean>
export { logicNot as not }

原始碼

SourceDocs

貢獻者

Anthony Fu
Anthony Fu
Curt Grimes

更新日誌

v12.3.0 on 2025/1/2
59f75 - feat(toValue): 棄用 toValue,改用 Vue 原生方法,不再使用 @vueuse/shared
v12.0.0-beta.1 on 2024/11/21
0a9ed - feat!: 移除 Vue 2 支援,最佳化 bundles 並清理 (#4349)
v10.0.0-beta.4 on 2023/4/13
4d757 - feat(types)!: 將 MaybeComputedRef 重新命名為 MaybeRefOrGetter
0a72b - feat(toValue): 將 resolveUnref 重新命名為 toValue

依 MIT 授權條款發布。