styling individual rows in a Vuetify data table

后端 未结 4 2277
没有蜡笔的小新
没有蜡笔的小新 2021-02-14 04:36

Can I apply different styling for a specific row in a data table?

This is my code:



        
4条回答
  •  情歌与酒
    2021-02-14 05:19

    I was also trying to style rows in a vuetify data-table but the above answers didn't have everything I needed to make it work. Using Vuetify v2

    I wanted to add a class to a row when a certain condition was met.

    
      
    
    

    ...
    // js portion of the component (computed prop)
    
    myItems() {
        return [
          {
            current: 101,
            total: 100
          },
          {
            current: 45,
            total: 100
          }
        ]
      }
    

提交回复
热议问题