diff --git a/README.md b/README.md index b71ff08..4d9d436 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ These snippets are meant to provide a base scaffold for your single file compone | `vroutepath` | router-link Path Routing Link | | `vemit-child` | Emit event from child component | | `vemit-parent` | Emit event to parent component | +| `vi18n` | Vue i18n shortcut for $t | ### Script diff --git a/snippets/vue-template.json b/snippets/vue-template.json index 4635855..bf8fa5c 100644 --- a/snippets/vue-template.json +++ b/snippets/vue-template.json @@ -123,14 +123,9 @@ "body": ["${2:LinkTitle}"], "description": "Path routing link" }, - "Vue Emit from Child": { - "prefix": "vemit-child", - "body": ["@change=\"$emit('change', $event.target.value)\""], - "description": "Vue Emit from Child Component" - }, - "Vue Emit to Parent": { - "prefix": "vemit-parent", - "body": ["@change=\"${1:foo} = $event\""], - "description": "Vue Emit to Parent Component" + "Vue i18n shortcut": { + "prefix": "vi18n", + "body": ["{{ $$t('${1:key}') }}"], + "description": "Vue i18n shortcut for $t" } } \ No newline at end of file