0

In a Vue.js project I am using learning to use Modals from BootstrapVue. In my code I have a file Items.vue with something like this:

<div v-b-modal="'modal-' + query.id">     // this is line 15
    ...
</div>

<b-modal :id="'modal-' + query.id">
    <p class="my-4">
        hello
    </p>
</b-modal>

It works well. However, Intellij IDEA with the Vue.js plugin keeps beeping with the Warning:

Warning:(15, 5) Attribute v-b-modal is not allowed here

The thread Vue Attribute is not allowed here suggests that this happens with non-.vue files, but it is not the case here.

Replacing v-b-modal="..." with :v-b-modal="..." (that is, with : before the attribute to make the binding more explicit) removes the warning, but then the code does not work.

I am working with Intellij IDEA 2018.1.8.

fedorqui
  • 275,237
  • 103
  • 548
  • 598

1 Answers1

1

IDEA version you are using is very old, Vue.js support has been significantly improved since v. 2018.1. In particular, WEB-38028 was fixed in 2019.2. Please consider upgrading IDEA to the most recent version, BootstrapVue directives are correctly recognized there

enter image description here

lena
  • 90,154
  • 11
  • 145
  • 150