I believe that many students only input a few lines of code when watching the code development, and then the compiler automatically generates a string of codes, so do you know how to do it?
Not much gossip, today Xiaoqian will come to talk about how-lazy and easy (set a custom template in VsCode)
First of all: we need to find the entry of this template setting, in File -> Preferences -> User Code Snippet
After selecting, the following input box will appear. If you want to set the template of the .vue file, you can create a vue.json global code snippet file, enter vue.json and press Enter.
Ok, then you can delete those unnecessary comments, just enter the following content in this json file
Ok, explain
The prefix here is what you type in the editor, just like the exclamation mark in English when creating an html file
body is the content that appears after you press enter
Note that the body here is an array, and the content of each row is each item in the array, and it needs to be enclosed in quotation marks. ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
Did you follow along?
Next, after saving, you can go back to our .vue file and try it
Of course, if you think this is not enough, we can still continue to input in the json file
Then you can enter "js" and the code in the body below will appear.
Give it a try~~~
This article is from Qianfeng Education , please indicate the source for reprinting.