Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/CorentinAndre/Vuejs-snippets

Collection of Vuejs 2.0+ snippets
https://github.com/CorentinAndre/Vuejs-snippets

atom atom-package snippets vue vuejs-snippets vuejs2 vuex

Last synced: about 1 month ago
JSON representation

Collection of Vuejs 2.0+ snippets

Lists

README

        

[![Installs!](https://img.shields.io/apm/dm/vuejs2-snippets.svg?style=flat-square)](https://atom.io/packages/vuejs2-snippets)
[![Version!](https://img.shields.io/apm/v/vuejs2-snippets.svg?style=flat-square)](https://atom.io/packages/vuejs2-snippets)
[![License](https://img.shields.io/apm/l/vuejs2-snippets.svg?style=flat-square)](https://github.com/CorentinAndre/Vuejs-snippets/blob/master/LICENSE)

# Vuejs-snippets

Collection of Vue.js snippets for version 2.0+.
Also supports Vuex, vue-router still missing.

Feel free to contribute to this package by submitting a PR!

## Usage

Just press `TAB` or `ENTER` to unfold a snippet

### Single file template

```html
template
```

### HTML snippets

```html
router-view
router-link
component
sccomponent
i18n
```

### HTML tags

```html
v-for
v-if
v-else-if
v-else
v-show
v-model
vClassObj
vClassArr
```

### Javascript

```javascript
beforeCreate; // Vuejs instance lifecycle hook for beforeCreate
created; // Vuejs instance lifecycle hook for created
beforeMount; // Vuejs instance lifecycle hook for beforeMount
mounted; // Vuejs instance lifecycle hook for mounted
beforeUpdate; // Vuejs instance lifecycle hook for beforeUpdate
updated; // Vuejs instance lifecycle hook for updated
beforeUpdate; // Vuejs instance lifecycle hook for beforeUpdate
updated; // Vuejs instance lifecycle hook for updated
beforeDestroy; // Vuejs instance lifecycle hook for beforeDestroy
destroyed; // Vuejs instance lifecycle hook for destroyed
beforeRouteEnter; // Vue-router instance lifecycle hook for beforeRouteEnter
beforeRouteUpdate; // Vue-router instance lifecycle hook for beforeRouteUpdate
beforeRouteLeave; // Vue-router instance lifecycle hook for beforeRouteLeave
vwatch; // Vuejs way to watch instance properties
methods; // Vuejs methods event handlers
components; // Use it when you want to add child components to parent component.
props; // Vuejs way to pass data to child components
vprops; // Vuejs way to pass data to child components with validation
vcomputed; // Vuejs computed property
```

### Vuex

```javascript
vstore; // Vuex template for a complete store with state,getters,actions and mutations
vmut; // Vuex mutation snippet
vact; // Vuex action snippet
vget; // Vuex getter snippet
vtype; // Vuex constant type snipppet
```