mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-18 03:35:17 +00:00
b2eee1772e
* feat: add store module HMR * fix: replace export with window.$nuxt Thanks to @pi0 for the suggestion :) * refactor: apply only in dev mode on client side * test: make store module test more descriptive * fix: clear modules to apply HMR * fix: remove console.log * fix: e2e tests * refactor: use void
26 lines
534 B
Vue
26 lines
534 B
Vue
<template>
|
|
<div>
|
|
<h1>foo/bar/baz: {{ baz }}</h1>
|
|
<br>
|
|
<h2>index/counter: {{ $store.state.counter }}</h2>
|
|
<br>
|
|
<h3>foo/blarg/getVal: {{ getVal }}</h3>
|
|
<br>
|
|
<h4>foo/bab/getBabVal: {{ getBabVal }}</h4>
|
|
<br>
|
|
<button @click="$store.commit('increment')">+1</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
|
|
export default {
|
|
computed: {
|
|
...mapGetters('foo/bar', ['baz']),
|
|
...mapGetters('foo/blarg', ['getVal']),
|
|
...mapGetters('bab', ['getBabVal'])
|
|
}
|
|
}
|
|
</script>
|