如数据对象:
ruleForm: {
name: '',
password:'',
},
使用localStorage
localStorage.setItem("person", JSON.stringify(this.ruleForm));
取值
localStorage.getItem("person")
如果不将对象转换为string类型,在取值的时候就只会取到类似[Object, Object]的东西。
标签:vue,Object,ruleForm,person,setItem,localStorage From: https://www.cnblogs.com/KhanLouis/p/17467502.html