Table of Contents generated with DocToc
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
<template> | |
<div> | |
<h1 class="title"> {{ title }} </h1> | |
<input type="text" class="name" v-model="name"> | |
<button class="submit" @click="submit"> Sumbit </button> | |
<p class="success" v-if="sumbited"> Thank You {{ name }} </p> | |
<h2 v-if="isFulana"> Ente Fulana Euy! </h2> |
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
// File: App.vue | |
<template> | |
<div id="app"> | |
<Value/> | |
<ChangeValue/> | |
</div> | |
</template> | |
<script> | |
import Value from './components/Value.vue' |
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
// File: ChangeValue.vue | |
<template> | |
<div> | |
{{ datvalue }} | |
</div> | |
</template> | |
<script> | |
import { EventBus } from '@/eventBus.js' |
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
// file: Value.vue | |
<template> | |
<div> | |
<button @click="addValue"> Add Value </button> | |
</div> | |
</template> | |
<script> | |
import { EventBus } from '@/eventBus.js' |
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 Router from 'vue-router' | |
import Counter from '@/components/Counter' | |
Vue.use(Router) | |
export default new Router({ | |
routes: [ | |
{ | |
path: '/', |
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 App from './App' | |
import router from './router' | |
import store from './store/index' | |
Vue.config.productionTip = false | |
/* eslint-disable no-new */ | |
new Vue({ | |
el: '#app', |
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
<template> | |
<div id="app"> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'App' | |
} |
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
<template> | |
<div id="app"> | |
<div class="counter"> {{ counter }} </div> | |
<button @click="increment" class="increment"> Tambah </button> | |
<button @click="decrement" class="decrement"> Kurangi </button> | |
</div> | |
</template> | |
<script> | |
export default { |
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 Vuex from 'vuex' | |
Vue.use(Vuex) | |
export default new Vuex.Store({ | |
state: { | |
count: 0 | |
}, | |
getters: { |