VScode创建vue的模板

2020-03-03  本文已影响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即可(不要选择提示中的)

上一篇 下一篇

猜你喜欢

热点阅读