VsCode Vue 自定义代码片段

1、vue

{
    // 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"
    // }
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<!--",
            "  名称:组件名称(主要功能)",
            "  作者:YeMing",
            "  时间:$CURRENT_YEAR年$CURRENT_MONTH月$CURRENT_DATE日 $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
            "-->",
            "<template>",
            "  <div class=\"$1\"></div>",
            "</template>",
            "",
            "<script>",
            "export default {",
            "  name: 'Demo',",
            "  props: {},",
            "  // 组件状态值",
            "  data () {",
            "    return {};",
            "  },",
            "  created () { },",
            "  mounted () { },",
            "  methods: {},",
            "  beforeDestroy () { },",
            "  components: {},",
            "  computed: {},",
            "  watch: {}",
            "};",
            "</script>",
            "",
            "<style lang=\"scss\" scoped>",
            "  .$1 {",
            "    width: 100%;",
            "    height: 100%;",
            "  }",
            "</style>",
            ""
        ],
        "description": "Log output to console"
    }
}
日常
JSRUN前端笔记, 是针对前端工程师开放的一个笔记分享平台,是前端工程师记录重点、分享经验的一个笔记本。JSRUN前端采用的 MarkDown 语法 (极客专用语法), 这里属于IT工程师。