<div class="example1 example2"></div> <div :class="true?'example1':'example2'"></div> <div :class="{ 'example1': true }"></div> <div :class="['example1', {'example2':true}]"></div>
<div style="width:calc(100% - 10px); color:red"></div> <div :style="true?{ width: 'calc(100% - 10px)', color: 'red' }:''"></div> <div :style="{ width: true?'calc(100% - 10px)':'200px', color: 'red' }"></div> <div :style="{ width: `calc(100% - ${aaaa}px)`, color: bbbb }"></div>