vue中添加数据的方式有三种:

    let vm = new vue({
      data:{
        school:{
          name: 'zhang san',
          age: '12'
        }
      }
    });
    vm.$set(vm.school,'address','beijing')
    vm.school = vm.assign({},vm.school,{address:'bejing'})
    vm.school = {...vm.school, ...{address:'bejing'}}//ES7,chorme@v60+
Logo

前往低代码交流专区

更多推荐