动态样式
当 curState.is_online
为 false
时,会添加 gray
类;否则,只保留 body
类
:class="{body: true, gray: !curState.is_online}"
使用变量来调样式
:style="{ width: '100%', backgroundColor: item.color }"
当 curState.is_online
为 false
时,会添加 gray
类;否则,只保留 body
类
:class="{body: true, gray: !curState.is_online}"
使用变量来调样式
:style="{ width: '100%', backgroundColor: item.color }"
1 条评论
瞎说,这个是vue的写法~OωO