trueUnSelectData.value.indexOf(checkedNodes.id) === -1 这段代码是什么意思
时间: 2024-04-05 17:30:35 浏览: 5
这段代码是在判断一个值是否在一个数组中出现。具体来说,它在判断 `checkedNodes.id` 是否在 `trueUnSelectData.value` 数组中出现,如果没有出现则返回 `-1`,否则返回出现的位置。这里使用了 `indexOf` 方法来判断,如果返回的值为 `-1`,则表示 `checkedNodes.id` 不存在于 `trueUnSelectData.value` 数组中。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![dll](https://img-home.csdnimg.cn/images/20210720083646.png)
![md](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![m](https://img-home.csdnimg.cn/images/20210720083646.png)
![sh](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)