三元判断法 通过isGZ变量控制动态样式 <div :class="isGZ ? 'top-box1' : 'top-box2'"> <div class="top-content"> <div class="top-left"> <span>{{money}}</span> </div> <div class="top-right"> <span>{{time}}</span> </div> </div>