* vue: use our own store in place of vuex

* vue store: add getters, watcher and use internal vue instance

* vue store: better state getter and credits to Vuex

* vue store: $watch -> watch

* vuex store: pass store to getters and fix typos

* add comments to store, start writing tests

* fix unit tests and add missing ones

* cleanup components, add less folder, fetch tassks

* use Vuex helpers

* pin vuex version

* move semantic-ui theme to assets/less, keep website/build empty but in git

* import helpers from vuex
This commit is contained in:
Matteo Pagliazzi
2016-09-29 13:32:36 +02:00
committed by GitHub
parent 50e2731811
commit 257e932bc3
29 changed files with 394 additions and 123 deletions

View File

@@ -1,13 +1,24 @@
<template lang="pug">
p {{ msg }}
div
p {{ msg }}
p Welcome back {{profileName}}!
p You have {{tasksCount}} tasks!
</template>
<script>
import { mapState, mapGetters } from '../store';
export default {
data () {
return {
msg: 'You\'re on the Home page!',
};
},
computed: {
...mapState({
tasksCount: (state) => state.tasks.length,
}),
...mapGetters(['profileName']),
},
};
</script>