vscode vuejs initialization plugin vueinit

Download Link

Demo

Usage Instructions

Vue

Snippet Purpose
vueinit Single file component with script setup, template, and style
vuesfinit Single file component with script setup function, template, and style
vuescript vue script tag
vuetemplate vue template tag
vuestyle vue style tag

TypeScript Vue

Snippet Purpose
vuetsinit TypeScript Vue SFC with script setup
vuetsdefineprops TypeScript define props with interface
vuetsdefineemits TypeScript define emits with type interface
vuetsref TypeScript ref with type annotation
vuetsreactive TypeScript reactive state with interface
vuetscomputed TypeScript computed property with type annotation

Script

Snippet Purpose
vuedefineprops define properties
vuecomputed computed property
vuewatch watcher
vueprovide vue provide
vueinject vue inject
vueonmounted mounted lifecycle method
vueonunmounted unmounted lifecycle method
vueonbeforemount beforeMount lifecycle method
vueonbeforeunmount beforeUnmount lifecycle method
vueonbeforeupdate beforeUpdate lifecycle method
vueonupdated updated lifecycle method
vueonactivated keep-alive activated lifecycle method
vueondeactivated keep-alive deactivated lifecycle method
vueonrendertracked called when a reactive dependency has been tracked
vueonrendertriggered called when a reactive dependency triggers the component’s render effect to re-run

Template

Snippet Purpose
vtext v-text
vhtml inserting HTML
vshow setting element to display (conditionally)
vif removing or adding element to DOM
velse v-else
velseif used alongside v-if
vfor v-for directive
von v-on click handler with arguments
vbind binding onto attributes
vmodel Semantic v-model directive
vslot denotes named slot
vpre skip compilation for this element and its children
vonce evaluate only once
vmemo memoize data
vcloak used to hide un-compiled template until it is ready
vkey key
vref reference to a DOM element