• vs code 添加vue3代码模板方法


    最终效果

    vs code 添加vue文件模板用于通过简写自动生成代码

    操作步骤如下

    1.找到vue模板代码编写入口

    在这里插入图片描述

    2.修改模板内容

    在这里插入图片描述

    2.1 vue.json内容

    {
      // Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and
      // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
      // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
      // same ids are connected.
      // Example:
      // "Print to console": {
      //  "prefix": "log",
      //  "body": [
      //    "console.log('$1');",
      //    "$2"
      //  ],
      //  "description": "Log output to console"
      // }
    
      "vue": {
        "prefix": "vue",
        // "body": [
        //  "",
        //  "",
        //  "",
        //  "",
        //  ""
        // ],
        "body": [
          "",
          "",
          "",
          "",
          ""
        ]
      }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100

    3.测试效果

    在这里插入图片描述
    至此完成所有操作,可以开始愉快的编写vue页面啦,节省了很多时间。

    说明

    1.模板代码自己加了不少内容,如果需要修改或剔除请自行操作;
    2.简单模板和复杂模板都提供了,大家可以按自己的喜好选择;

    有问题可以给我留言,也可以给我发邮件code_captain@163.com

  • 相关阅读:
    B083-SpringCloud-eureka ribbon feign hystrix
    ChatGPT的一小步,NLP范式转变的一大步
    Linux系统IO和标准IO的接口函数
    LeetCode每日一题——1235. 规划兼职工作
    【Try to Hack】vulnhub DC2
    在数据分析中,对缺失值解决方案的分析
    Qt跨平台(统信UOS)各种坑解决办法
    微信小程序 picker-view 组件构建一个上下拖动选择器
    MySQL运维篇(三)
    【RCNN系列】Faster RCNN
  • 原文地址:https://blog.csdn.net/mimica/article/details/133769788