vue 深度監聽

首先要知道vue的watch(偵聽器),偵聽某屬性,當屬性發生變化時執行對應的操作函數. watch:{ attributeName:function(){ //偵聽到屬性變化後的具體操作 } } 先看一個demo: <template> <div class="hello"> <input type="text" v-model="test.name"
相關文章
相關標籤/搜索