vue 还原Data里面的数据

 

this.$data包含现有的data数据,
this.$options.data()中是原有的data数据

 还原所有的data数据

Object.assign(this.$data, this.$options.data())

  

 还原代码部分打他数据

Object.assign(this.$data.searchForm, this.$options.data().searchForm)

  

posted @ 2019-10-12 12:30  练洗之命  阅读(2618)  评论(0编辑  收藏  举报