1、选择“文件 -> 首选项 -> 用户代码片段”,此时,会弹出一个搜索框,输入vue

选择vue后,编辑器会自动打开一个名字为vue.json的文件

vscode编辑器自动生成.vue文件

 

2、复制以下内容到这个文件中:    

{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<template>",
            "  <div></div>",
            "</template>",
            "",
            "<script>",
            "export default {",
            "  name: '',",
            "  data () {",
            "    return {",
            "      ",
            "    };",
            "  },",
            "  components: {},","  mounted () {},",
            "  methods: {}",
            "}",
            "</script>",
            "",
            "<style lang='stylus' scoped>",
            "</style>"
    ],
        "description": "Log output to console"
    }
}

 

相关文章:

  • 2022-12-23
  • 2021-11-11
  • 2021-11-11
  • 2022-12-23
  • 2021-10-20
  • 2021-05-22
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2021-07-14
  • 2021-08-27
  • 2021-08-07
  • 2021-09-05
  • 2021-08-19
  • 2021-10-06
相关资源
相似解决方案