VS Code插件Vue2 代码补全工具
2023-09-14 08:59:53 时间
一、简介
此扩展将Vue 2代码片段和语法突出显示添加到Visual Studio代码中。
这个插件基于最新的Vue官方语法高亮文件添加了语法高亮,并且依据Vue 2的API添加了代码片段。
支持语言
- VUE(.vue)
- HTML格式(.html)
- 使用Javascript(.js文件)
- 打字稿(.TS)
- 帕格(.pug)
官网地址:https://marketplace.visualstudio.com/items?itemName=sdras.vue-vscode-snippets
二、安装
- ext install vue-snippets
三、使用
注:安装之后不需要配置,但需要重启,安装之后就可以使用
js提示
html中的提示和代码补全:
vif指令
vfor指令:
常用缩写列表:
Vue
Snippet | Purpose |
---|---|
vbase |
Single file component base |
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 |
Script
Snippet | Purpose |
---|---|
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 |
vinc |
incrementer |
vdec |
decrementer |
Vuex
Snippet | Purpose |
---|---|
vstore |
Base for Vuex store.js |
vgetter |
Vuex Getter |
vmutation |
Vuex Mutation |
vaction |
Vuex Action |
vstore-import |
Import vuex store into main.js |
Extra (plaintext)
Snippet | Purpose |
---|---|
gitignore |
.gitignore file presets |
相关文章
- vs的安装包_vs2019制作安装包
- BBR vs BBRplus vs BBR2 一般网络速度对比
- VS Code 必备插件推荐「建议收藏」
- 数据质量管理工具预研——Griffin VS Deequ VS Great expectations VS Qualitis
- vs2008连接tfs2013_VS连接SQL网页登录
- 机器学习: Label vs. One Hot Encoder
- [工具推荐] VS code网页开发插件Live Preview [实时预览html]
- [Python人工智能] 二十.基于Keras+RNN的文本分类vs基于传统机器学习的文本分类
- 另一种“推翻” VS Code 的尝试:JetBrains Fleet 现开放公测
- 【Android 逆向】Android 进程注入工具开发 ( Visual Studio 开发 Android NDK 应用 | VS 自带的 Android 平台应用创建与配置 )
- idea和vs哪个好用
- VS开发在Linux上的体验(vs开发linux)
- 指针常量VS常量指针详解编程语言
- 如何使用VS连接MySQL(vs怎么连接mysql)
- 为什么人工智能企业VS安防巨头,已成过去时?丨2019中国人工智能安防峰会
- VS一键连接MySQL,数据库管理如此便捷(vs连接mysql)
- VS连接MSSQL:解决数据库连接问题(vs连接 mssql)
- VS与SQL Server的强强联合:提供更全面的数据应用能力(vs跟sqlserver)
- 数据库VS 环境搭建 MSSQL 数据库(vs 创建mssql)
- VS整合SQLServer,实现数据库管理无忧(vs和sqlserver)
- VS MSSQL:强势对抗,谁为佳?(vs mssql)
- 比较VS Code使用Redis管理数据(vs使用redis)
- 比较VS Redis教程,学习新技能(vs redis教程)
- 研究 VS C 如何从 Redis 中读取数据(vs c 读取redis)
- VS中如何优雅地操作Redis(vs操作redis)