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)"
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e41be7-438d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e41be7-438d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?