文件-》首选项-》用户代码片段-》输入vue,打开vue.json
添加模板json
"Print to console": {
"prefix": "vuec",
"body": [
"<template>",
" <div>",
" $0",
" </div>",
"</template>",
"",
"<script>",
"export default {",
" name: '',",
"",
" data () {",
" return {",
" }",
" },",
"",
" methods: {}",
"}",
"",
"</script>",
"<style lang='scss' scoped>",
"</style>",
""
],
"description": "Log output to console"
}
保存,然后新建.vue文件,输入vuec+tab即生成模板
快捷输入console.log插件:JavaScript Snippet Pack
安装完,输入cl即快捷生成console.log()
来源:oschina
链接:https://my.oschina.net/u/4369346/blog/4233680