When the blogger used Vue-CLI to create a Vue2.x project for the first time today, he found that there is no code prompt for Vue syntax in VSCode (Vue has been configured), so after searching the information on the Internet, he found that he needed to download a plug-in called " Vetur", the operation steps are shown in Figure 1:
If after the plug-in is downloaded and installed, there is still no code prompt when writing the .vue file. At this time, you need to change the language mode of VSCode. The operation is shown in Figure 2:
After the above two steps are completed, there will be a code template prompt, as shown in Figure 3:
2023.2.22 update
The Vetur plug-in is better adapted to the Vue2 project. The Vue3 project officially released a plug-in called Vue Language Features (Volar). As shown in Figure 4:
But after my test, the two plug-ins only support word syntax prompts most of the time, Vetur only supports template creation when it is used outside the created tag, and Volar does not seem to support template creation? ! . And two plug-ins are installed at the same time, you need to disable one of them to use it normally.