Locking Elements in Vue
You can reactively block form elements using the disabled attribute. Let's try it. Let's make a corresponding property:
data() {
return {
isDisabled: true,
}
}
Let's bind this property to the button:
<template>
<button v-bind:disabled="isDisabled">btn</button>
</template>
Given an input. Make a button that, when pressed, will alternately block and unblock our input.
Modify the previous task so that the state of the input is controlled by a checkbox: if the checkbox is checked, the input is disabled, and if it is not checked, the input is disabled.