vue watch

watch: {
              person: {
                  handler(n,o){
                      this.person.fullname = n.firstname + ‘ ‘ + this.person.lastname;
                  },
                  // immediate: true,  //刷新加载 立马触发一次handler
                  // deep: true  // 可以深度检测到 person 对象的属性值的变化
              }
          }
原文地址:https://www.cnblogs.com/mary-123/p/12274572.html