简写形式:(函数)
watch:{
todos(newValue,oldValue){
当todos改变时要执行的函数
}
}
完整形式:(对象)
watch:{
todos:{
deep:true,
handler(newValue,oldValue){
要执行的函数
}
}
}
简写形式:(函数)
watch:{
todos(newValue,oldValue){
当todos改变时要执行的函数
}
}
完整形式:(对象)
watch:{
todos:{
deep:true,
handler(newValue,oldValue){
要执行的函数
}
}
}