因为在公司都是用scss 规范化的代码,这里写一个自己的vue模板方便以后自己或者他人使用
一、ctrl + shift + p 在vscode打开弹窗输入snippets然后点击再输入vue点击会进入vue.json文件
二、编辑如下代码
"Print to console": { "prefix": "vue", "body": [ "<template>", " <div class=\"\">$0</div>", "</template>", "", "<script>", "export default {", " components:{},", " data(){", " return {", " }", " },", " created(){},", " mounted(){},", " watch:{},", " computed:{},", " methods:{},", "}", "</script>", "<style lang=\"scss\" scoped>", "</style>" ], "description": "A vue file template" }
三、新建一个.vue文件,直接输入vue回车