This file contains 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
const marky = require('marky') | |
const render = Vue.prototype._render | |
const update = Vue.prototype._update | |
const camelize = str => str && Vue.util.camelize(str) | |
function getName (vm) { | |
if (!vm.$parent) return 'root' | |
return ( | |
camelize(vm.$options.name) || | |
camelize(vm.$options._componentTag) || |
This file contains 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
<script src="https://npmcdn.com/vue@next/dist/vue.js"></script> | |
<script src="https://npmcdn.com/vuex@next"></script> | |
<div id="app"> | |
{{ count }} | |
<button @click="increment"> + </button> | |
<button @click="decrement"> - </button> | |
</div> | |
<script> |
This file contains 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
<script src="https://npmcdn.com/vue@next/dist/vue.js"></script> | |
<script src="https://npmcdn.com/vue-router@next"></script> | |
<style> | |
.router-link-active { | |
color: red; | |
} | |
</style> | |
<div id="app"> | |
<side-bar></side-bar> |
This file contains 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
<script src="https://npmcdn.com/vue@next/dist/vue.js"></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/animatecss/3.5.2/animate.min.css"> | |
<style> | |
.done { | |
text-decoration: line-through; | |
} | |
.todo { | |
transition: all 0.5s ease; | |
height: 30px; |
Opinionated stack for building large-scale, production grade applications
- View layer: Vue.js
- Intuitive, smooth learning curve
- Performant reactive system that is optimized by default
- Built-in animation/transition system
This file contains 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
import Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import App from './app.vue' | |
import ViewA from './view-a.vue' | |
import ViewB from './view-b.vue' | |
Vue.use(VueRouter) | |
const router = new VueRouter() |
This file contains 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
<!-- MyComponent.vue --> | |
<!-- css --> | |
<style> | |
.message { | |
color: red; | |
} | |
</style> | |
<!-- template --> |
This file contains 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
// App.js | |
// using .jsx extension because gist syntax | |
// highlighting chokes on `export default` | |
import ComponentA from './ComponentA' | |
export default { | |
// use another component, in this scope only. | |
// ComponentA maps to the tag <component-a> | |
components: { ComponentA }, | |
template: ` |
This file contains 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
export default { | |
render () { | |
return <App><Text></Text></App> | |
} | |
} | |
// fesfesf | |
// fesfsef |