How to write multiple conditions of js triple expression?

use ternary representations to make a judgment

v-if="item.casestatus == (2||1||-1)?true:false"

but does this expression only judge the first value in parentheses, or can"t the operation be written in this way?

Mar.04,2021

requirements can be understood as "how to determine whether an element is included in an array?"
because (2 | | 1 | |-1) will always be equal to 2, so if you want item.casestatus = = (2 | | 1 | |-1) is true , item.casestatus must be equal to 2.
correct writing method 1:
[2 code 1 code 1] .item.casestatus (item.casestatus)
correct writing method 2:
[2 djime 1mo 1] .indexOf (indexOf) >-1

other writing methods need to be added.


you can't write like this, you can do this:

v-if="[2,1,-1].includes(item.casestatus)"
Menu