I am hoping this is a question that is not answered already, I have looked through the answers and none of them seem to get to the root of my issue, or, I do not have a solid enough grasp on Vue.JS to understand how they can be applied to my situation.
I am using Vue.JS to create a table and filling it with data from a web source. The table can populate just fine, and it works well.
However, I am trying to figure out how I can make each of the rows that are populated with the information a certain color dependent on the value of the data. For example, if the value of the data is between, say, 0 and 12, I want the row to highlight green. If it is between 12 and 30, highlight red, etc.
I have looked extensively into v-bind, and I am pretty confident this is the way to do it. I am familiar with how v-bind basically works, and I can do fairly simple things with it no problem. I just cannot wrap my head around how to combine v-bind with this data and make it function. I hope this is detailed enough.
If more info is needed, please ask.
Thank you!
Here is the table in my html. This is just the outline of my vue instance. These are the classes of what the rows could, depending on the data, be colored.