在文件首选项中选择用户片段,点击新建全局片段,添加代码如下
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>\n",
" </div>",
"</template>\n",
"<script>",
"export default {",
" name:'',",
" components: {\n",
" },",
" props: {\n",
" },",
" data() {",
" return {\n",
" };",
" },",
" computed: {\n",
" },",
" watch: {\n",
" },",
" created() {\n",
" },",
" mounted() {\n",
" },",
" methods: {\n",
" },",
" };",
"</script>\n",
"<style scoped>\n",
"</style>\n",
],
"description": "Create vue template"
}
}
prefix就是使用的快捷方式,在需要用到的地方输入vue,按下tab就能快捷添加代码
转载请注明原文地址:https://blackberry.8miu.com/read-30646.html