使用computed接收state的值
computed: {
getCount() {
return this.$store.state.count;
}
}
使用watch監聽computed
watch: {
getCount(val) {
this.count= val;
}
}
computed: {
getCount() {
return this.$store.state.count;
}
}
watch: {
getCount(val) {
this.count= val;
}
}
作者: Paian http://mobilesite.github.io 前端的國際化是一個比較常見的需求。但網上關於這一方面的直接可用的方案卻不多。最近剛做了一版基於Vue.js的