jeudi 20 février 2020

Conditionally apply css class based on key value pair in a array, VueJS

I have an array as shown in below picture. How do I add conditional CSS class to

  • based on the key sender_id of the array in VueJS ?

    conditions: 1)if sender_id != sender_id : add arrived class 2)if sender_id == sender_id : add delivered class.

    The goal is to add CSS styling as per the arrived or delivered message in a chat application.

    enter image description here

  • Aucun commentaire:

    Enregistrer un commentaire