ZZCLI Vue VSCode Snippets
Description
在vue中快速创建你的代码块,主要提供了大量TS的写法,让你更快更方便入手
Installation
Vue Page
Snippet |
Purpose |
vtemplate-with-ts |
创建一个ts模板 |
Template
Snippet |
Purpose |
vfor |
v-for directive |
vmodel |
Semantic v-model directive |
vmodel-num |
Semantic v-model number directive |
von |
v-on click handler with arguments |
vel-props |
Component element with props |
vsrc |
Image src binding |
vstyle |
Inline style binding |
vstyle-obj |
Inline style binding with objects |
vclass |
Class binding |
vclass-obj |
Class binding with objects |
vclass-obj-mult |
Multiple conditional class bindings |
vanim |
Transition component with JS hooks |
vnuxtl |
Nuxt Routing Link |
vroutename |
router-link Named Routing |
vroutenameparam |
router-link Named with Parameters |
vroutepath |
router-link Path Routing Link |
Script
Snippet |
Purpose |
classextendsvue |
继承vue的class |
class |
ts-class |
get |
Vue 计算属性 |
@Watch |
Vue 监听属性 |
@Prop |
Vue Props |
importcallapp |
能够自动引入callapp,跟一些代码示例 |
importlib |
导入lib文件 |
importzzui |
能够自动引入zz-ui |
beforecreate |
beforeCreate lifecycle method |
created |
created lifecycle method |
beforemount |
beforeMount lifecycle method |
mounted |
vmounted lifecycle method |
beforeupdate |
beforeUpdate lifecycle method |
updated |
updated lifecycle method |
beforedestroy |
beforeDestroy lifecycle method |
destroyed |
destroyed lifecycle method |
vmapstate |
import mapState from Vuex into vue component component |
vmapgetters |
import mapGetters from Vuex into vue component component |
vmapmutations |
import mapMutations from Vuex into vue component component |
vmapactions |
import mapActions from Vuex into vue component component |
Vuex
Snippet |
Purpose |
vstore |
Base for Vuex store.js |
vgetter |
Vuex Getter |
vmutation |
Vuex Mutation |
vaction |
Vuex Action |
vmodule |
Vuex Module |
vstore-import |
Import vuex store into main.js |
vstore2 |
Updated Base for Vuex store |
import Vuex
Snippet |
Purpose |
@State |
@State('foo') stateFoo |
@Getter |
@Getter('foo') getterFoo |
@Action |
@Action('foo') actionFoo |
@Mutation |
@Mutation('foo') mutationFoo |
Vue Router
Snippet |
Purpose |
vrouter |
Base for Vue Router |
vscrollbehavior |
Vue Router scrollBehavior |
vbeforeeach |
Vue Router global guards beforeEach |
vbeforeresolve |
Vue Router global guards beforeResolve |
vaftereach |
Vue Router global guards afterEach |
vbeforeenter |
Vue Router per-route guard beforeEnter |
vbeforerouteenter |
Vue Router component guards beforeRouteEnter |
vbeforerouteupdate |
Vue Router component guards beforeRouteUpdate |
vbeforerouteleave |
Vue Router component guards beforeRouteLeave |
| |