[Vuejs]-Is it possible to disable all the inputs from a page with VueJS and BootstrapVue?

0👍

If you inspect the Vue instance itself of the VM when running your code you can have something like this when you console.log(this),

It will give you output similar to this if you use the correct scope:

{
$attrs
$options
.......
$el
}

Inside $el there’s object properties for accessing firsElementChild, previousElementChild, previousElementSibling, etc. There’s a lot of HTML related properties, however, accessing HTML element this way can get messy pretty fast. I think that your best solution is the one you already mentioned or changing the CSS class dynamically.

If you use v-if to conditional render on a parent you can achieve pretty similar functionality too.

See: Conditional rendering

Leave a comment