How to specify the number of cycle display in Mini Program?

insert fixed content in the list loop according to the result returned by the background

<view></view>

for example, if you return 5, you have to let it loop out five times. I tried the wx:for form (and specially assembled json) but failed to output it successfully. The novice asked for advice on how to specify the number of times to output

.
Jul.19,2021

solve

  • example .wxml code is as follows
<view wx:for="{{5}}">5</view>

principle

  • this list rendering that belongs to the view layer
  • give him a fixed value to specify how many times to cycle
  • be sure to add curly braces so that Mini Program will treat him as a numeric type

reference

https://developers.weixin.qq.

suggestions

  • Let's see what kind of problem this belongs to first
  • then go to the official website
  • find the corresponding module to read the document, the efficiency should be the highest

is it not possible to directly loop back 5 or other values?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e41904-4c04d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e41904-4c04d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?