VS Code 用户代码片段

文件—首选项—用户代码片段

{
 // 文档注释
 "Documentation Comments": {
  "scope": "javascript,typescript,html,vue",
  "prefix": "lv-cia",
  "body": [
   "/**",
   " * ${1:描述}",
   " @author will",
   " @time ${2:time}",
   " */",
   "$0"
  ],
  "description": "文档注释"
 },

 // html viewport
 "Html viewport": {
  "scope": "html",
  "prefix": "metavp",
  "body": [
   "<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\">"
  ],
  "description": "html viewport"
 },

 // vue 单文件模板
 "Create a template": {
  "scope": "vue",
  "prefix": "vuec",
  "body": [
   "<template>",
   "  <div ${0}>",
   "",
   "  </div>",
   "</template>",
   "",
   "<script>",
   "export default {",
   "  name: '${1}',",
   "  components: {},${2:",
   "  directives: {\\},}${3:",
   "  filters: {\\},}${4:",
   "  mixins: [],}${5:",
   "  props: {\\},}${6:",
   "  data() {",
   "    return {\\}",
   "  \\},}${7:",
   "  computed: {\\},}${8:",
   "  watch: {\\},}${9:",
   "  mounted() {\\},}${10:",
   "  methods: {\\}}",
   "}",
   "</script>",
   "",
   "<style lang=\"less\" ${11:scoped}>",
   "",
   "</style>",
  ],
  "description": "vue 单文件模板"
 }
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 官网 中文版本 好的网站 Content-type: text/htmlBASH Section: User ...
    不排版阅读 4,483评论 0 5
  • 1、通过CocoaPods安装项目名称项目信息 AFNetworking网络请求组件 FMDB本地数据库组件 SD...
    阳明AI阅读 16,019评论 3 119
  • “因为思念而痛苦的,直接忘了就是最好的办法。”
    Rennylemon阅读 203评论 0 0
  • 文|叶伊嘉 今天在简书写下了第100篇文章,对我来说,从0到100是个很漫长的过程,也让我体会到了坚持的不易,又是...
    叶伊嘉阅读 105评论 0 3