vue本地緩存localStorage將多次添加的表單數據存爲數組格式

vue本地緩存localStorage將多次添加的表單數據存爲數組格式 要把表單數據存成數組形式,在另一個頁面通過v-for渲染展示,因爲擁有同一個key值,在每次更新表單數據時都會發生數據覆蓋現象。 var templist = JSON.parse(localStorage.getItem("msgBody") || "[]"); templist.push(this.msgBod
相關文章
相關標籤/搜索