<div :class="[ | |
activeTag, | |
activeCss, | |
{ 'red-btn': isPosition} | |
]"> |
computed: { | |
activeTag() { | |
return this.fullState == 3 ? 'yellow-btn' : 'gray-btn' | |
}, | |
activeCss() { | |
return this.audience ? 'yellow-btn' : 'gray-btn' | |
}, | |
isPosition() { | |
return this.state === 1 | |
} | |
} |
.gray-btn { | |
color: #666666; | |
background: #ececec; | |
} | |
.yellow-btn { | |
color: #ffffff; | |
background: #ffaa1e; | |
} | |
.red-btn { | |
color: #ffffff; | |
background: red; | |
} |