用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>\n",
" </div>",
"</template>\n",
"<script type=\"text/ecmascript-6\">",
"export default {",
" data() {",
" return {\n",
" }",
" },",
" components: {\n",
" }",
"}",
"</script>\n",
"<style scoped lang=\"less\">\n",
"</style>",
"$2"
],
"description": "Log output to console"
}
}
 
即:

猜你喜欢

转载自www.cnblogs.com/miaSlady/p/10514737.html