Why doesn't the ternary in vue work?

Why doesn"t my ternary work

May.12,2022

you are using it in the wrong way.

style what should be written is css code. If you put disabled in it, the css code will naturally fail if it is not legal.

if you want to use disabled , it should be:
< el-select VMI model = "value": disabled= "disabled" placeholder= "Please select

.

so you don't even need a ternary expression..


: style some styles
: css some class names


here is an object in style, and key represents the classname to be added, so you don't need the following ternary expression here, just record it with a variable isDisabled.
then use: styles= "{'disabled':isDisDisabled}"


css has no disabled


disabled is not a style


the v-bind:class attribute is recommended:

<div :class="classA ? 'aaaCLs' : 'bbbCls' ">Demo</div>
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-1e9ecfc-477c0.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-1e9ecfc-477c0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?