今天在做项目的时候要对表格内的部分的最大最小值高亮

解决方案

1. 引用 ng-class

2. 引用原型求最大最小值

实例

AngularJs HTML 代码

 1 <table class="ui table celled">
 2     <thead>
 3         <tr>
 4             <th>标题1</th>
 5             <th>标题2</th>
 6             <th>标题3</th>
 7             <th>标题4</th>
 8         </tr>
 9     </thead>
10     <tbody>
11         <tr ng-repeat="(index, item) in items">
12             <td>{{item.list1}}</td>
13             <td>{{item.list2}}</td>
14             <td ng-class="{max:index==1||index==2||index==3}">{{item.list3}}</td>
15             <td ng-class="{max:index==1||index==2||index==3}">{{item.list4}}</td>
16         </tr>
17     </tbody>
18 </table>
View Code

相关文章:

  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-12-08
  • 2022-12-23
猜你喜欢
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案