1.点击文件,再点击首选项,然后选择用户片段;
2.在弹出来的输入框中,选择第一行vue.json或者第二行新建全局代码片段文件都可,都是为了打开vue.json文件;
3.显示这种情况
4.把下面代码复制到vue.json文件里,然后保存。
{ "Print to console": { "prefix": "vue", "body": [ "<template>", " <div>\n", " </div>", "</template>", "<script>", "export default {", " props: {},", " data () {", " return {", " }", " },", " components: {},", " watch: {},", " computed: {},", " created () {},", " mounted () {},", " methods: {},", "}", "</script>", "<style lang=\"scss\" scoped>\n", "</style>", "$2" ], "description": "Log output to console" } }
标签:文件,vue,console,生成,json,Vue2,模板 From: https://www.cnblogs.com/heibaiqi/p/16965815.html