How do I reverse the order of an array using v-for and orderBy filter in Vue JS?

后端 未结 6 1613
生来不讨喜
生来不讨喜 2021-02-02 05:58

I am using Vue JS to do viewmodel bindings. In my data object I have an array of items that are sorted in ascending order (oldest to newest) and I\'d like to keep i

6条回答
  •  说谎
    说谎 (楼主)
    2021-02-02 06:48

    Instead of reversing the order of the elements for creation, I only change the order of the display.

    And my CSS

    
    

    No need to clone the array and reverse it.

提交回复
热议问题