用vscode创建vue模版(vue+回车即为模版)

1.方法一:Ctrl+Shift+P打开命令输入 snippets; 在搜索框输入vue选择‘vue.json’。

2.方法二:文件 → 首选项 → 用户代码片段 → 在搜索框输入vue选择‘vue.json’。

修改vue.json为:

{
    "Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div> ",
" </div>",
"</template> ",
"<script type="text/ecmascript-6">",
"export default {",
" data() {",
" return { ",
" }",
" },",
" components: { ",
" }",
"}",
"</script> ",
"<style scoped lang="less"> ",
"</style>",
"$2"
],
"description": "Log output to console"
}
}
 
即:
原文地址:https://www.cnblogs.com/miaSlady/p/10514737.html