Language: English | δΈζ
Vue Supercharger is an extension designed to enhance Vue development by improving efficiency and the overall development experience. It automatically detects the Vue version in your workspace and provides corresponding features and snippets for Vue 2 or Vue 3 projects. The extension intelligently adapts to your project's needs, offering the most suitable functionality for your development workflow.
- π‘ Vue Snippets: dramatically increase your coding speed and efficiency.
Vue 3 Snippets
const foo = ref()
const foo = ref({})
const foo = ref([])
onBeforeMount(() => {})
onMounted(() => {})
onBeforeUpdate(() => {})
onUpdated(() => {})
onBeforeUnmount(() => {})
onUnmounted(() => {})
onActivated(() => {})
onDeactivated(() => {})
computed(() => {})
watch(foo, (newVal, oldVal) => {})
watchEffect(() => {})
defineExpose({})
defineOptions({})
defineProps({})
defineEmits([''])
setup(props){
}
provide('key', value)
<template>
<div></div>
</template>
<script setup lang="ts"></script>
<style scoped lang="less"></style>
Vue 2 Snippets
this.
methods: {
},
props: {
},
computed: {
},
components: {
},
watch: {
},
filters: {
},
directives: {
},
beforeCreate(){},
created(){},
beforeMount(){},
mounted(){},
beforeUpdate(){},
updated(){},
beforeDestroy(){},
destroyed(){},
activated(){},
deactivated(){},
<template>
<div></div>
</template>
<script>
export default {
name: '',
data() {
return {}
},
methods: {},
}
</script>
<style scoped lang="less"></style>
- In
vue javascript typescript
files, you can directly use the shortcut triggers to insert code snippets. - The extension automatically selects the appropriate snippets based on the Vue version used in your project.
Vue Supercharger automatically switches between Vue versions based on your project, but you can customize the settings to match your preferences.
- Open Settings in VSCode.
- Search for Vue Supercharger to modify the configuration options.
-
How do I switch Vue version support?
Vue Supercharger automatically detects the Vue version in your workspace, so manual switching is usually not required. If the detection is incorrect, you can click on the Vue version in the status bar to switch.