1. Idea supports .vue files
This step is actually to install the vue.js plugin. The specific path is: File ----> Settings ----> Plugins ----> Enter vue , click the button to the right of vue.js in the search results
install
, restart idea after the installation is successful, so that idea can recognize the .vue file.
2. Idea sets Vue syntax prompt
File
---->setting
---->Editor
---->Inspections,
Find on the right sideHTML->Unknown HTML tag attribute
,Options->Custom HTML tag attributes
add the following code in the right side:
@tap
@tap.stop
@tap.prevent
@tap.once
@click
@click.stop
@click.prevent
@click.once
@change
@change.lazy
@change.number
@change.trim
@on
@blur
@fous
@submit
scoped
v-model
v-model.number
v-model.trim
v-for
v-text
v-html
v-show
v-if
v-else-if
v-else
v-pre
v-bind
v-bind:class
v-bind:style
v-bind:id
v-bind:href
The specific operation is shown in the figure below:
File
---->setting
---->Editor
----> ----> Find it inFile Types
Recognized File Types , add it in it (2020.3.3 flagship version), as shown in the figure:HTML
File name patterns
*.vue
After adding *.vue, click OK. If the following pop-up box appears, it proves that it has been registered, and there is no need to add *.vue again. Click Cancel as shown below.
3. Effect display
After completing the above steps, the effect is as follows:
zouni