Vue.js adds a single attribute based on the condition.

I have a component in

Vue.js:

<Carousel autoplay v-model="CarouselValue" class="physical-carousel">

I want to decide whether autoplay is added or not based on a condition.

for example, in data, I have an attribute of loading.

what if loading is false, and then autoplay is added as an attribute in this < Carousel > component?

Feb.28,2021

props, of normally defined boolean type can be bound to a Boolean value, only a Boolean value. All other values are true, including empty strings, and all are true. The rest of these native boolean type properties, such as input's disabled, also follow this rule.

:autoplay="val"
val = true/false
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-1b37d85-2c0cf.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-1b37d85-2c0cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?