Home>Article>Development Tools> How to set vue template code in vscode

How to set vue template code in vscode

王林
王林 Original
2020-02-11 15:21:55 5298browse

How to set vue template code in vscode

(1) Install the Vetur and VueHelper plug-ins. After the installation is complete, you need to restart VScode

How to set vue template code in vscode

Find the following in the extension plug-in search box Vetur and VueHelper plug-ins, pay attention to the icons.

How to set vue template code in vscode

(2) Add template code snippet for vue

How to set vue template code in vscode

Select vue item

How to set vue template code in vscode

Add your template code snippet to the opened vue.json

{ "vue": { "prefix": "vue", "body": [ "", "", "", ], "description": "generate a vue file"} }

(3) In the vue file, when you type the vue prefix, it will automatically think of the one you created earlier. Description of the code snippet, press the Tab key or select it, the template code snippet will be automatically added to your vue file.

How to set vue template code in vscode

Related recommendations:vscode tutorial

The above is the detailed content of How to set vue template code in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn