我用一个变量接收vuex上的数据,然后改变变量中的值,然后打印的时候发现vuex中的数据也一起被修改了,这是怎么回事?
let currentDataList = this.$store.state.currentDataList;
// console.log(this.$store.state.currentDataList);
// console.log(currentDataList);
let { is_public:resourcesLibType, type:clientType, sex } = currentDataList;
this.resourcesLibType = resourcesLibType;
this.clientType = clientType;
currentDataList.sex = sex == 1 ? "男":"女";
this.dataForm = currentDataList;
// this.dataForm.sex = sex == 1 ? "男":"女";
console.log(currentDataList);
console.log(this.$store.state.currentDataList);
打断点调试的图