1.方法一:Ctrl+Shift+P打开命令输入 snippets; 在搜索框输入vue选择‘vue.json’。

2.方法二:文件 → 首选项 → 用户代码片段 → 在搜索框输入vue选择‘vue.json’。

修改vue.json为:

{
    "Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>\n",
" </div>",
"</template>\n",
"<script type=\"text/ecmascript-6\">",
"export default {",
" data() {",
" return {\n",
" }",
" },",
" components: {\n",
" }",
"}",
"</script>\n",
"<style scoped lang=\"less\">\n",
"</style>",
"$2"
],
"description": "Log output to console"
}
}
 
即:
用vscode创建vue模版(vue+回车即为模版)

 

 

相关文章:

  • 2021-09-02
  • 2021-06-30
  • 2022-12-23
  • 2021-11-06
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-26
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-06-16
  • 2022-01-03
  • 2022-12-23
相关资源
相似解决方案