|
1 | 1 | # Vuejs-snippets
|
2 |
| -Collection of Vue.js snippets for version 2.0+ |
| 2 | +Collection of Vue.js snippets for version 2.0+. |
| 3 | +Also supports Vuex, vue-router still missing. |
| 4 | + |
| 5 | +Feel free to contribute to this package by submitting a PR! |
3 | 6 |
|
4 | 7 | ## Usage
|
5 | 8 |
|
@@ -28,20 +31,27 @@ v-model <!--Vuejs binding for model binding-->
|
28 | 31 |
|
29 | 32 | ### Javascript
|
30 | 33 | ```javascript
|
31 |
| -beforeCreate //Vuejs instance lifecycle hook for beforeCreate |
32 |
| -created //Vuejs instance lifecycle hook for created |
33 |
| -beforeMount //Vuejs instance lifecycle hook for beforeMount |
34 |
| -mounted //Vuejs instance lifecycle hook for mounted |
35 |
| -beforeUpdate //Vuejs instance lifecycle hook for beforeUpdate |
36 |
| -updated //Vuejs instance lifecycle hook for updated |
37 |
| -beforeUpdate //Vuejs instance lifecycle hook for beforeUpdate |
38 |
| -updated //Vuejs instance lifecycle hook for updated |
39 |
| -beforeDestroy //Vuejs instance lifecycle hook for beforeDestroy |
40 |
| -destroyed //Vuejs instance lifecycle hook for destroyed |
41 |
| -vwatch //Vuejs way to watch instance properties |
42 |
| -methods //Vuejs methods event handlers |
43 |
| -components //Use it when you want to add child components to parent component. |
44 |
| -props //Vuejs way to pass data to child components |
45 |
| -vcomputed //Vuejs computed property |
| 34 | +beforeCreate // Vuejs instance lifecycle hook for beforeCreate |
| 35 | +created // Vuejs instance lifecycle hook for created |
| 36 | +beforeMount // Vuejs instance lifecycle hook for beforeMount |
| 37 | +mounted // Vuejs instance lifecycle hook for mounted |
| 38 | +beforeUpdate // Vuejs instance lifecycle hook for beforeUpdate |
| 39 | +updated // Vuejs instance lifecycle hook for updated |
| 40 | +beforeUpdate // Vuejs instance lifecycle hook for beforeUpdate |
| 41 | +updated // Vuejs instance lifecycle hook for updated |
| 42 | +beforeDestroy // Vuejs instance lifecycle hook for beforeDestroy |
| 43 | +destroyed // Vuejs instance lifecycle hook for destroyed |
| 44 | +vwatch // Vuejs way to watch instance properties |
| 45 | +methods // Vuejs methods event handlers |
| 46 | +components // Use it when you want to add child components to parent component. |
| 47 | +props // Vuejs way to pass data to child components |
| 48 | +vcomputed // Vuejs computed property |
46 | 49 | ```
|
47 | 50 |
|
| 51 | +### Vuex |
| 52 | +```javascript |
| 53 | +vstore // Vuex template for a complete store with state,getters,actions and mutations |
| 54 | +vmut // Vuex mutation snippet |
| 55 | +vact // Vuex action snippet |
| 56 | +vget // Vuex getter snippet |
| 57 | +``` |
0 commit comments