Home  >  Q&A  >  body text

javascript - About vue receiving sequential dynamic rendering sent from the background

I encountered a problem when I was working on a project, that is, two values ​​were passed from the background, which was the order of the two p's. I needed to dynamically render HTML based on these two values, and if the order in the background changed, my page would also change. Follow the changes. (ps: The data in p is also dynamic.)
I hope the experts can tell me how to do it. I would be very grateful.

怪我咯怪我咯2734 days ago499

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-19 10:48:23

    Put the two values ​​into the array and use v-for rendering to ensure the order. Array is an ordered data structure.
    Then every time you pull data, just update this array.
    Remember that Vue operates on data rather than on the DOM.

    reply
    0
  • Cancelreply