Vue动态增加变量属性

接口返回的模型中没有包含所需的字段,而第一次使用时需要注册一番

 this.$set(this.obj, 'c', '000'); //起作用 

使用时增加个判断

    if(tempObj.IsShowFact == undefined){
          this.$set(tempObj, 'IsShowFact', true); //起作用
    }
    tempObj.IsShowFact = isShow;

参考链接:https://blog.csdn.net/u013558749/article/details/80882033