if (localStorage.getItem("xx")) { //写在添加里
this.xx = JSON.parse(localStorage.getItem("xx"));
}
watch: {
xx: {
handler(newval) {
localStorage.setItem("xx", JSON.stringify(newval));
},
deep: true,
},
01-31
631