美文网首页
VScode创建vue的模板

VScode创建vue的模板

作者: 偶头像超凶 | 来源:发表于2020-03-03 20:23 被阅读0次

1、打开代码片段

2、搜索vue.json

3、添加代码片段(先ctrl+a,在ctrl+v),然后在自己整理格式

{     "Print to console": {        "prefix": "vue",        "body": [            "<template>",            "    <div class=\"\">\n",            "    </div>",            "</template>\n",            "<script>",            "export default {",            "    props: {\n",            "    },",            "    data() {",            "        return {\n",            "        };",            "    },",            "    methods: {\n",            "    },",            "    created() {\n",            "    },",            "    computed: {\n",            "    },",            "    mounted() {\n",            "    },",            "    watch: {\n",            "    },",            "    components: {\n",            "    },",            "};",            "</script>\n",            "<style scoped lang=\"${1:scss}\">\n",            "</style>\n",        ],        "description": "Create vue template"    }    }

4、新建*.vue文件,输入vue,按tab即可(不要选择提示中的)

相关文章

网友评论

      本文标题:VScode创建vue的模板

      本文链接:https://www.haomeiwen.com/subject/lnhllhtx.html