Skip to content

Instantly share code, notes, and snippets.

@tjunussov
Last active April 1, 2018 12:00
Show Gist options
  • Save tjunussov/26de6ca9a3e12f9648ecccf78fc5f600 to your computer and use it in GitHub Desktop.
Save tjunussov/26de6ca9a3e12f9648ecccf78fc5f600 to your computer and use it in GitHub Desktop.
Vue Framework Cheatsheet
# 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