使用VS code 生成vue-cli代码片段模板
左下角设置->配置优惠代码片段–》搜索vue–》找到vue.json–》粘贴这段代码
{ "Print to console": { "prefix": "vue", "body": [ "<!-- $0 -->", "<template>", " <div class=\"\">", "", " </div>", "</template>", "", "<script>", "export default {", " name: '',", " components: {},", " data () {", " return {}", " },", " watch: {},", " computed: {},", " mounted() {},", " methods: {},", "}", "", "</script>", "<style scoped>", "", "</style>", ], "description": "Log output to console" } }
新建.vue文件,输入vue回车就会生成刚刚json模板