使用vscode如何设置vue模板
1.选择File中的Preferences中的User Snippets2.搜索vue,选择vue.json3.将下面内容复制到vue.json的大括号中,保存"Print to console": {"prefix": "vue","body": ["<template>",...
·
1.选择File中的Preferences中的User Snippets
2.搜索vue,选择vue.json
3.将下面内容复制到vue.json的大括号中,保存
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div></div>",
"</template>",
"",
"<script>",
"export default {",
" data () {",
" return {",
"",
" };",
" },",
"",
" components: {},",
"",
" computed: {},",
"",
" methods: {}",
"}",
"</script>",
"<style lang='css' scoped>",
"",
"</style>"
],
"description": "Log output to console"
}
4.测试:新建一个vue文件,输入vue按Tab键生成vue模板(模板的内容可以根据自己的需要在上面的粘贴的代码中做调整)如下:
更多推荐
已为社区贡献5条内容
所有评论(0)