- "vue-component": {
- "prefix": "vue-component",
- "body": [
- "<template>",
- "\t<div>\n",
- "\t</div>",
- "</template>\n",
- "<script>",
- "\texport default {",
- "\t\tprops: {\n",
- "\t\t},",
- "\t\tcomponents: {\n",
- "\t\t},",
- "\t\tdata(){",
- "\t\t\treturn {\n\t\t\t\t$0",
- "\t\t\t}",
- "\t\t},",
- "\t\tmethods: {\n",
- "\t\t}",
- "\t}",
- "</script>\n",
- "<style lang=\"sCSS\">\n",
- "</style>"
- ],
- "description": "vue componemt"
- }
- }
创建 vue 项目后输入 vue-component, 输入过程中就有提示, 选择就好了
- <template>
- <div>
- </div>
- </template>
- <script>
- export default {
- props: {
- },
- components: {
- },
- data(){
- return {
- }
- },
- methods: {
- }
- }
- </script>
- <style lang="scss">
- </style>
来源: http://www.bubuko.com/infodetail-3337789.html