进入文件、首选项、用户片段

VScode如何新建vue文件的时候快速生成骨架

 

输入框输入vue,选择vue.json

VScode如何新建vue文件的时候快速生成骨架

 

 直接粘贴下行代码

{
	"Print to console": {
        "prefix": "vue",
        "body": [
		
            "<template>",
            "    <div>\n",
            "    </div>",
            "</template>",
            "<script>",
            "export default {",
            "   data() {",
            "      return {",
			"      }",
			"   },",
			"   activated() {",
			"   },",
			" watch: {",
			"},",
			"created(){",
			"},",
			"mounted(){",
			"},",
			"methods:{",
			"}",
			"",
			"",
			"}",
			"</script>",
			"<style>",
		
            "</style>",
            "$2"
        ],
        "description": "Log output to console"
    }
}

  

 新建空白vue文件输入vue然后点击tab键,收工:

VScode如何新建vue文件的时候快速生成骨架

 

相关文章:

  • 2021-09-10
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-12-19
  • 2021-08-20
  • 2021-11-13
猜你喜欢
  • 2022-12-23
  • 2021-08-14
  • 2021-10-03
  • 2021-05-15
  • 2021-10-07
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案