Vue中$set使用

在data中定義了一個數組,好比:web data(){ return{ names: [{ no: "", str: "" }] } } 在後續業務中,給這個names數組對象中增長了元素,用傳統的賦值,是沒法賦上去的,後來用$set數組 this.$set(this.names, 0, this.name);
相關文章
相關標籤/搜索