一、快速创建一个vue单文件组件

"Create a new Component": {
        "prefix": "vue",
        "body": [
            "<template>",
            "  <div>$1</div>",
            "</template>",
            "",
            "<script>",
            "export default {",
            "  name: '',",
            "  data () {",
            "    return {}",
            "  },",
            "  created () {},",
            "  // mounted () {},",
            "  computed: {},",
            "  watch: {},",
            "  methods: {}",
            "}",
            "</script>",
            "",
            "<style lang=\"less\" scoped>",
            "",
            "</style>"
            "",
        ],
        "description": "快速创建vue单文件组件"
    }

二、成功提示

"success msg": {
        "prefix": "success",
        "body": [
            "this.\\$message.success($1)",
        ],
        "description": "成功提示"
    }

三、打印

"Print to console": {
        "scope": "javascript,typescript",
        "prefix": "log",
        "body": [
            "console.log($1);",
            "$2"
        ],
        "description": "Log output to console"
    }

四、代码注释

"JS description": {
        "scope": "javascript,typescript",
        "prefix": "jsfile",
        "body": [
            "/**",
            "* @module ${TM_FILENAME_BASE}",
            "* @author: zhouwenhao",
            "* @description:",
            "* @since: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}-${CURRENT_MINUTE}-${CURRENT_SECOND}",
            "*/",
            ""
        ],
        "description": "注释"
    }

五、info提示

"info msg": {
        "prefix": "info",
        "body": [
            "this.\\$message.info($1)",
        ],
        "description": "提示信息"
    }

六、方法或函数

"Print function": {
        "scope": "javascript,typescript",
        "prefix": "func",
        "body": [
            "function $1(){$2}",
        ],
        "description": "Log output to console"
    }

七、错误提示

"error msg": {
        "prefix": "error",
        "body": [
            "this.\\$message.error('$1')",
        ],
        "description": "错误信息"
    }

 

posted on 2020-10-21 11:35  周文豪  阅读(273)  评论(0编辑  收藏  举报