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 id="app"> | |
<center> <h1> Simple TodoList App </h1> </center> | |
<v-form class="form"> | |
<v-text-field | |
label="Nama Tugas" | |
v-model="nama" | |
required | |
></v-text-field> |
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: { |
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
<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
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
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
// 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
// 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: App.vue | |
<template> | |
<div id="app"> | |
<Value/> | |
<ChangeValue/> | |
</div> | |
</template> | |
<script> | |
import Value from './components/Value.vue' |