<view :class='switchBox===true?'list_cen border':'list_cen'"></view>





.list_cen {
      padding-top: 31/100rem;
      width: 100%;
      position: relative;
      &.border::after {
        content: " ";
        position: absolute;
        left: 0;
        bottom: -0.4rem;
        height: 2px;
        width: 100%;
        background: rgba(232, 232, 232, 1);
      }
}

 

在list_cen盒子后面追加横线,只要动态控制border这个类名就可以了

Logo

前往低代码交流专区

更多推荐