绑定class在vue.js和jsx的区别
1.vue.js
data(){
return {
isactive:true;
errorClass:'error-text';
activeClass:'active-class'
}
}
computed:{
cactive(){
return {
active:this.isactive
ccc:true
}
}
}
1.1对象绑定
后面的是判断条件,取的是定义的字符串
//
计算属性
//取得是定义的字符串
//
1.2数组绑定
取得是data里面的数据
// 取得是定义的字符串 // 2.jsx中
//
相关