跳到主要内容

logicNot

分类
导出大小
83 B
@vueuse/math
上次更改
上个月
别名
相关

ref 的 条件。

用法

ts
import { 
whenever
} from '@vueuse/core'
import {
logicNot
} from '@vueuse/math'
const
a
=
ref
(true)
whenever
(
logicNot
(
a
), () => {
console
.
log
('a is now falsy!')
})

类型声明

ts
/**
 * `NOT` conditions for refs.
 *
 * @see https://vueuse.org.cn/logicNot
 *
 * @__NO_SIDE_EFFECTS__
 */
export declare function 
logicNot
(
v
:
MaybeRefOrGetter
<any>):
ComputedRef
<boolean>
/** @deprecated use `logicNot` instead */ export declare const
not
: typeof
logicNot

来源

源码文档

贡献者

Anthony Fu
Anthony Fu
Vida Xie
SerKo
RYGRIT
Curt Grimes

更新日志

e5f74 - feat!: 弃用别名导出,转而使用原始函数名称 (#5009)
v13.6.0
d32f8 - refactor: 为所有纯函数添加 @__NO_SIDE_EFFECTS__ 注释 (#4907)
2d179 - 修复 (types): 使用 Vue 原生 MaybeRefMaybeRefOrGetter 而不是自定义类型 (#4913)
v12.3.0
59f75 - feat(toValue): 废弃 @vueuse/shared 中的 toValue,转而使用 Vue 的原生函数
0a9ed - feat!: 放弃对 Vue 2 的支持,优化打包并清理 (#4349)

根据 MIT 许可证发布。