If a Boolean value is passed into the Vue document props and there is no value in prop, it all means `true`? Did you deal with it internally?

when a Boolean value is passed in the Vue document props, and prop has no value, it all means true ? Did you deal with it internally?

does not pass a value. It should not be empty or undefined by default. How can it become true inside the component

?

related codes

<!--  prop  `true`-->
<blog-post is-published></blog-post>
May.16,2022

the same truth

<input type="text" disabled readonly>

because for Boolean semantics, adding the prop itself means true , on the other hand, if you want to set the prop to false , don't add the prop .

when you think this prop will change in operation, then respond with : prop= "var" .

Menu