vscode 快捷键生成vue模板教程
我们在开发vue项目时,需要一个vue模版,去创建一个组件,可以使用快捷键
1.文件--》首选项--》用户片段
2.搜索vue 选择
3.模板内容填充
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>",
" $0",
" </div>",
"</template>",
"",
"<script>",
"",
" export default {",
" name:'',",
" props:[''],",
" data () {",
" return {",
"",
" };",
" },",
"",
" components: {},",
"",
" computed: {},",
"",
" created() {},",
"",
" mounted() {},",
"",
" methods: {},",
"",
" }",
"",
"</script>",
"<style lang='scss' scoped>",
"",
"</style>"
],
"description": "三线码工vue模板"
}
}
4.创建vue文件
5.写快捷键vue
6.生成代码
标签:vue,vscode,生成,--,快捷键,模板 From: https://blog.51cto.com/u_16204378/7177266