随笔 vue 绑定类名 是否禁用样式 :class="{'focu_li':item.now,'des_li':item.disabled}" //可以这样绑定 //css .focu_li { border: 1px solid #00b48b; font-weight: bold; } .des_li { background-color: lightgray; cursor: not-allowed; pointer-events: none; opacity: 0.6; }