唯品秀前端博客

每次写vue.js组件时候,总是去之前页面复制粘贴个模板,然后再删掉没用的,继续进行开发,感觉有点low,那有没有一个比较好用的插件,能让你输入几个字母高效准确就出现你想要的代码块呢?答案是肯定的,Vue VSCode snippets - 一款加速你开发的体验插件

Vue VSCode snippets的插件怎么安装就不多提了,在插件库直接搜点安装就行了,下面记录下语法

Script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
vbase   Single file component base
vdata   Component data as a function
vmethod Vue method
vcomputed   Vue computed property
vwatcher    Vue watcher with new and old value args
vprops  Props with type and default
vimport Import one component into another
vimport-c   Import one component into another within the export statement
vimport-export  Import one component into another and use it within the export statement
vfilter Vue filter
vmixin  Create a Vue Mixin
vmixin-use  Bring a mixin into a component to use
vc-direct   Vue create a custom directive
vimport-lib Import a library
vimport-gsap    Import GreenSock with Timeline and Eases
vanimhook-js    Using the Transition component JS hooks in methods

Template

1
2
3
4
5
6
7
8
9
10
11
12
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

Vuex

1
2
3
4
5
vstore  Base for Vuex store.js
vgetters    Vuex Getter
vmutation   Vuex Mutation
vaction Vuex Action
vstore-import   Import vuex store into main.js

Extra (plaintext)

1
2
3
gitignore   .gitignore file presets
vinc    incrementer
vdec    decrementer

预览

本站所有文章、图片、资源等如无特殊说明或标注,均为来自互联网或者站长原创,版权归原作者所有;仅作为个人学习、研究以及欣赏!如若本站内容侵犯了原著者的合法权益,可联系我们进行处理,邮箱:343049466@qq.com
赞(2) 打赏
标签:

上一篇:

下一篇:

相关推荐

0 条评论关于"推荐Visual Studio Code快速编写vue.js的神器插件"

表情

最新评论

    暂无留言哦~~
谢谢你请我吃鸡腿*^_^*

支付宝扫一扫打赏

微信扫一扫打赏