Skip to content

Instantly share code, notes, and snippets.

@kostasxyz
Created November 27, 2020 14:36
Show Gist options
  • Select an option

  • Save kostasxyz/a45cc461f34d6548bb1995bd89ab8e80 to your computer and use it in GitHub Desktop.

Select an option

Save kostasxyz/a45cc461f34d6548bb1995bd89ab8e80 to your computer and use it in GitHub Desktop.
Vue Single File Component tpl
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. 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:
"Vue sfc": {
"scope": "javascript,typescript, vue",
"prefix": "kx:vsfc",
"body": [
"<template>",
" <div class=\"app-component\">",
" ",
" </div>",
"</template>",
"", "<script>",
"import module from '@/module';",
"",
"export default {",
" //--------------------------------------------------------",
" // components",
" components: {},",
"",
" //--------------------------------------------------------",
" // Props",
" props: {},",
"",
" //--------------------------------------------------------",
" // Data",
" data() {",
" return {",
" ",
" }",
" },",
"",
" //--------------------------------------------------------",
" // Created",
" created() {},",
"",
" //--------------------------------------------------------",
" // Mounted",
" mounted() {},",
"",
" //--------------------------------------------------------",
" // Before Destroy",
" beforeDestroy() {},",
"",
" //--------------------------------------------------------",
" // Computed",
" computed: {},",
"",
" //--------------------------------------------------------",
" // Methods",
" methods: {},",
"};",
"</script>",
"",
"<style scoped></style>"
],
"description": "Vue sfc"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment