代码
首选项-用户代码段-添加全局用户代码段,什么文件后缀就输入什么名称:如vue;
{
"Print to console": {
"prefix": "vuer",
"body": [
"<template>",
" <div>\n",
" </div>",
"</template>\n",
"<script>\n",
"export default {",
" data() {",
" return {\n",
" };",
" },",
" created() {\n",
" },",
" mounted() {\n",
" },",
" methods: {\n",
" }",
"};",
"</script>\n",
"<style scoped lang=\"${1:scss}\">\n",
"</style>\n",
],
"description": "Create vue template"
}
}
本文介绍如何在首选项中添加全局用户代码段,通过输入特定前缀快速生成Vue组件模板,包括template、script和style部分,提高开发效率。
861

被折叠的 条评论
为什么被折叠?



