wx: if judge whether there is a value in the array

Not much to say, just go to the code

  <view wx:if="{
   
   {list.length == 0}}"></view>

This is displayed when the length of the array is 0; otherwise it is not equal to 0

  <view wx:if="{
   
   {list.length != 0}}"></view>

Guess you like

Origin blog.csdn.net/wsxDream/article/details/113547742