VS Code插件Vue2 代码补全工具

此扩展为Visual Studio Code 添加了Vue2的代码片段和语法高亮支持,基于Vue官方语法文件开发,适用于.vue、.html、.js、.TS 和 .pug 文件。安装后无需额外配置,重启即可使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、简介

 

此扩展将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

 

二、安装

 

[javascript] view plain copy
  1. ext install vue-snippets  

 

三、使用

注:安装之后不需要配置,但需要重启,安装之后就可以使用

js提示

SnippetDemo


html中的提示和代码补全:

vif指令



vfor指令:

常用缩写列表:

Vue

SnippetPurpose
vbaseSingle file component base

Template

SnippetPurpose
vforv-for directive
vmodelSemantic v-model directive
vmodel-numSemantic v-model number directive
vonv-on click handler with arguments
vel-propsComponent element with props
vsrcImage src binding
vstyleInline style binding
vstyle-objInline style binding with objects
vclassClass binding
vclass-objClass binding with objects
vclass-obj-multMultiple conditional class bindings
vanimTransition component with JS hooks

Script

SnippetPurpose
vdataComponent data as a function
vmethodVue method
vcomputedVue computed property
vwatcherVue watcher with new and old value args
vpropsProps with type and default
vimportImport one component into another
vimport-cImport one component into another within the export statement
vimport-exportImport one component into another and use it within the export statement
vfilterVue filter
vmixinCreate a Vue Mixin
vmixin-useBring a mixin into a component to use
vc-directVue create a custom directive
vimport-libImport a library
vimport-gsapImport GreenSock with Timeline and Eases
vanimhook-jsUsing the Transition component JS hooks in methods
vincincrementer
vdecdecrementer

Vuex

SnippetPurpose
vstoreBase for Vuex store.js
vgetterVuex Getter
vmutationVuex Mutation
vactionVuex Action
vstore-importImport vuex store into main.js

Extra (plaintext)

SnippetPurpose
gitignore.gitignore file presets
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值