https://www.jb51.net/article/139306.htm
V-a you can be bound to the bind objects, so as to dynamically switch the class
<td :class="{'label-success':value.type == 0,'label-danger':value.type == 1}" class="radius">{{value.new1}}</td>
The statement according to the value of class switching value.type name bindings, the latter class is the general form of a two styles.
May be added depending on the conditions in vue of methods, the change data object, so that the same data format becomes different. Such as
for(var x=0; x<this.test.length; x++){
if(this.test[x].type == 0){
this.$set(this.test[x], "new1", "a");
}else if(this.test[x].type == 1){
this.$set(this.test[x], "new1", "b");
}else{
this.$set(this.test[x], "new1", "c");
};
}
This method changes the test array new1 based on the value type of test array values
ps: If you do not new1 this will create a new key, that is, add a new one.