1、初始创建html-vue
"vue-component": { "prefix": "vue-component", "body": [ "<template>", " <div> ", " </div>", "</template> ", "<script>", " export default {", " props: { ", " },", " components: { ", " },", " data(){", " return { $0", " }", " },", " methods: { ", " }", " }", "</script> ", "<style lang="scss"> ", "</style>" ], "description": "vue componemt" } }
创建vue项目后输入vue-component,输入过程中就有提示,选择就好了
<template> <div> </div> </template> <script> export default { props: { }, components: { }, data(){ return { } }, methods: { } } </script> <style lang="scss"> </style>
3、在vue项目上创建div加点击事件
"div@": { "prefix": "div@", "body": [ "<div @click="$0"></div>" ], "descripation": "div的@简写" }
<div @click=""></div>