vue 中监听vuex里state的值最简单方法

watch:{

'$store.state.test':function(){

//你需要执行的代码

}

}

你可能感兴趣的:(vue 中监听vuex里state的值最简单方法)