vscode设置vue代码片段
一、如何设置?
打开用户片段
选择或创建
vue.json
代码片段粘贴下面代码片段即可
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div class='$0'>",
" hellow",
" </div>",
"</template>",
"",
"<script>",
"export default {",
" name: '',",
" data () {",
" return {",
"",
" }",
" },",
" props: {",
"",
" },",
" components: {",
"",
" },",
" computed: {",
"",
" },",
" watch: {",
"",
" },",
" created () {",
"",
" },",
" mounted () {",
"",
" },",
" methods: {",
"",
" }",
"}",
"</script>",
"",
"<style scoped>",
"</style>",
""
],
"description": "Create vue template"
}
}
二、如何使用?
新建*.vue
文件,输入vue
,按tab
即可
还没有评论,来说两句吧...