vscode vue自动生成代码段
Posted awchao
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vscode vue自动生成代码段相关的知识,希望对你有一定的参考价值。
设置-用户代码片段-搜索vue-点击vue-全选粘贴
{
"Print to console": {
"prefix": "vu", //写成自己满意的前缀(name)
"body": [
"<template>",
" <div></div>",
"</template>",
"",
"<script>",
"export default {",
" name: ‘‘,",
" components: {},",
" props: {},",
" data () {",
" return {}",
" },",
" computed: {},",
" watch: {},",
" created () { },",
" mounted () { },",
" methods: {}",
"}",
"</script>",
"",
"<style scoped lang=$0>",
"</style>",
""
],
"description": "Log output to console"
}
}
效果:
以上是关于vscode vue自动生成代码段的主要内容,如果未能解决你的问题,请参考以下文章
使用vscode,新建.vue文件,tab自动生成vue代码模板
使用vscode,新建.vue文件,tab(enter)自动生成vue代码模板