1 개요[ | ]
- Vuex mapState
html
Copy
<div id="app">
<span>{{ count }}</span>
</div>
<script src="//unpkg.com/vue/dist/vue.min.js"></script>
<script src="//unpkg.com/vuex/dist/vuex.min.js"></script>
<script>
const store = new Vuex.Store({
state: {
count: 1
}
})
new Vue({
el: '#app',
store,
computed: Vuex.mapState([
'count'
])
})
</script>
▶ | ReferenceError: Vuex is not defined |
2 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.