// 1.用計算屬性來獲取$store中的值
computed: {
getApplyId() {
return this.$store.state.applyId;
}
},
// 2.通過watch來檢查定義計算屬性獲取到的值的變化
watch:{
getApplyId(newValue , oldValue){
if(this.$store.state.applyId){
//業務處理
}
}
},