diff --git a/package.json b/package.json
index b04a7c9..fa83583 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,10 @@
{
"language": "vue",
"path": "./snippets/vue.code-snippets"
+ },
+ {
+ "language": "html",
+ "path": "./snippets/vue-template.code-snippets"
}
]
}
diff --git a/snippets/vue-template.code-snippets b/snippets/vue-template.code-snippets
new file mode 100644
index 0000000..b2a0ba9
--- /dev/null
+++ b/snippets/vue-template.code-snippets
@@ -0,0 +1,92 @@
+{
+ "Vue v-for": {
+ "prefix": "vfor",
+ "body": [
+ "<${1:div} v-for=\"${2:item} in ${2:item}s\" :key=\"${2:item}.id\">",
+ "\t{{ ${2:item} }}",
+ "${1:div}>"
+ ],
+ "description": "v-for statement"
+ },
+ "Vue v-model Directive": {
+ "prefix": "vmodel",
+ "body": [""],
+ "description": "v-model directive"
+ },
+ "Vue v-on Shortcut Directive": {
+ "prefix": "von",
+ "body": ["@click=\"${1:handler}(${2})\""],
+ "description": "v-on click handler"
+ },
+ "Vue Component with Props Binding": {
+ "prefix": "vel-props",
+ "body": ["<${1:component} :${1:propName}=\"${0}\">${1:component}>"],
+ "description": "component element with props"
+ },
+ "Vue Named Slot": {
+ "prefix": "vslot-named",
+ "body": ["${1:defaultcontent}"],
+ "description": "named slot"
+ },
+ "Vue Image Source Binding": {
+ "prefix": "vimg",
+ "body": [
+ "
"
+ ],
+ "description": "image source binding"
+ },
+ "Vue Style Binding": {
+ "prefix": "vstyle",
+ "body": [":style=\"{ fontSize: ${2:data} + 'px' }\""],
+ "description": "vue inline style binding"
+ },
+ "Vue Style Binding Object": {
+ "prefix": "vstyle-obj",
+ "body": [
+ ":style=\"[${2:styleObjectA}, ${3:styleObjectB]}\""
+ ],
+ "description": "vue inline style binding, objects"
+ },
+ "Vue Class Binding": {
+ "prefix": "vclass",
+ "body": [":class=\"{ '${2:classList}': ${1:condition} }\""],
+ "description": "vue class binding"
+ },
+ "Vue Class Binding Ternary": {
+ "prefix": "vclass-ter",
+ "body": [
+ ":class=\"[${1:condition} ? '${2:classListOnTrue}' : '${3:classListOnFalse}']\""
+ ],
+ "description": "vue ternary class binding"
+ },
+ "Vue Transition": {
+ "prefix": "vtrans",
+ "body": [
+ "",
+ "\t${0}",
+ ""
+ ],
+ "description": "vue transition component"
+ },
+ "Vue Transition Group": {
+ "prefix": "vtrans-group",
+ "body": [
+ "",
+ "\t${0}",
+ ""
+ ],
+ "description": "vue transition group component"
+ },
+ "Vue Routing Link": {
+ "prefix": "vrlink",
+ "body": ["${2:linkTitle}"],
+ "description": "vue router link"
+ },
+ "Vue Routing Link with param": {
+ "prefix": "vrlink-param",
+ "body": [
+ "${3:linkTitle}"
+ ],
+ "description": "vue router link with param"
+ },
+}