vscode中如何快速搭建vue模板

  介绍

这篇文章将为大家详细讲解有关vscode中如何快速搭建vue模板,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

文件→首选项→用户代码片段
搜索vue

vue2。x添加下方代码

{      ,“Print 用console":, {      ,“prefix":,“vue"      ,“body":,      ,“& lt; !——, $ 0, - - -在“,      ,“& lt; template>“      ,“,& lt; p> & lt;/p>“      ,“& lt;/template>“      ,““,      ,“& lt; script>“      ,“export  default  {“,      ,“,data  (), {,,      ,,,,,return  {“,      ,,,,,},“      ,,,},,,      ,““,      ,“,组件:,“{},      ,““,      ,“,计算:,“{},      ,““,      ,“,安装:,“{},      ,““,      ,,,方法:{}“,      ,“}”,      ,““,      ,“& lt;/script>“      ,“& lt; style  lang=& # 39; scss # 39;, scoped>“      ,“& lt;/style>“      ,),      ,“description":“Log  output 用console"      ,}      以前,}

vue3。x添加下方代码

{   “Print 过多;console":, {      ,“prefix":,“vue3"      ,“body":,      ,“& lt; !——, $ 0, - - -在“,      ,“& lt; template>“      ,“,& lt; p> & lt;/p>“      ,“& lt;/template>“      ,““,      ,“& lt; script>“      ,“import {,计算,无功,,裁判,,,,onMounted, onUpdate, onUnmounted},得到& # 39;vue # 39;;“      ,“export  default  {“,      ,“setup () {“,      ,,,//类mounted"      ,“onMounted(()=祝辞{“,      ,““,      ,“})“,      ,“//相当于updated",      ,“onUpdate(()=祝辞{“,      ,““,      ,“})“,      ,“//相当于destroyen",      ,“onUnmounted(()=祝辞{“,      ,““,      ,“})“,      ,“return  {}“,      ,“}”,      ,“}”,      ,““,      ,“& lt;/script>“      ,“& lt; style  lang=& # 39; scss # 39;, scoped>“      ,“& lt;/style>“      ,),      ,“description":“Log  output 用console"      ,}   以前,}

新建。vue文件后

 vscode中如何快速搭建vue模板

关于“vscode中如何快速搭建vue模板”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看的到。

vscode中如何快速搭建vue模板