<a-table :rowClassName="rowClassName">

methods: {
    rowClassName(record,index) {
      let className = "light-row";
      if (index % 2 === 1) className = "dark-row";
      return className;
    },
}

<style>
.light-row {background-color: #fff;}
.dark-row {background-color: #fafafa;}
</style>

 

Logo

前往低代码交流专区

更多推荐