Last active
April 1, 2018 12:00
-
-
Save tjunussov/26de6ca9a3e12f9648ecccf78fc5f600 to your computer and use it in GitHub Desktop.
Vue Framework Cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default webpack installation | |
npm i --save-dev stylus stylus-loader pug pug-loader --save bootstrap-vue vuex | |
# v-on on component only listens for custom evenets ( $emit("") ) | |
<mycomp @click.native="add()"/> | |
# or inside component emit | |
<mycomp @click="add()"> | |
<div @click="$emit('click')"> | |
# vue runtime actions | |
mounter(), created(), | |
# caveates https://vuejs.org/v2/guide/list.html#Caveats | |
# JSON or Array modification ( adding property ) is being not watched ( TwoWay data binding ) | |
var a = {"name":"Timur"}, a.surname = "Junussov" // NOT MONITORED | |
# Component Files .vue, it is not allowed to have external js of component with same name as vu file | |
Demo.vue, Demo.js will NOT WORK | |
Demo.vue, DemoController.js is OK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment