Skip to content

Instantly share code, notes, and snippets.

@mixelectronico
Created September 6, 2024 03:43
Show Gist options
  • Save mixelectronico/eaef89cfac9242615951f1ce217b7ad7 to your computer and use it in GitHub Desktop.
Save mixelectronico/eaef89cfac9242615951f1ce217b7ad7 to your computer and use it in GitHub Desktop.
VueJS Snippets
{
// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"New Component": {
"prefix": "vueComponent",
"body": [
"<template>",
"\t<h1>Nuevo Componente</h1>",
"</template>",
"",
"<script>",
"export default{",
"\tname: '${1:component-name}',",
"\t//props: {},",
"\tdata: function(){",
"\t\treturn{}",
"\t},",
"\t//computed: {},",
"\t//methods: {},",
"\t//watch: {},",
"\t//components: {},",
"\t//mixins: [],",
"\t//filters: {},",
"\t//-- LifeCycle Methods",
"\t//-- End LifeCycle Methods",
"}",
"</script>",
"",
"<style scoped>",
"\t",
"</style>",
],
"description": "Create a new Component"
},
"Composition Api Component": {
"prefix": "vueApiComponent",
"body": [
"<script setup",
"",
"</script>",
"",
"<template>",
"\t<h1>${1:Nuevo Componente}</h1>",
"</template>",
"",
"<style scoped>",
"\t",
"</style>",
],
"description": "Crea un componente API de Vue"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment