vscode创建vue模板,添加自定义snippet(代码段),附详细配置
步骤①:在vscode界面按F1,进入命令行,输入sinppets步骤②:选vue进入自定义代码段(vue.json)不想对自定义代码段里面的属性进行了解的同学可以直接复制以下这段代码到vue.json{"Print to console": {"prefix": "vue","body": ["<template>","",
·
步骤①:在vscode界面按F1,进入命令行,输入sinppets
步骤②:选vue进入自定义代码段(vue.json)
不想对自定义代码段里面的属性进行了解的同学可以直接复制以下这段代码到vue.json
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
"",
"</template>",
"",
"<script type='text/ecmascript-6'>",
" export default {",
" data () {",
" return {",
" }",
" }",
" }",
"</script>",
"",
"<style lang='scss' scoped='' type='text/css'>",
"",
"</style>"
],
"description": "Log output to console"
}
}
对于自定义代码段相关属性,想了解的同学可以参考这篇文章:
http://blog.csdn.net/maokelong95/article/details/54379046
步骤③:在*.vue文件输入vue回车即可(自定义代码段出现)
更多推荐
已为社区贡献2条内容
所有评论(0)