search

Home  >  Q&A  >  body text

Set click events individually for list items in the WeChat applet for loop

WeChat applet, a page similar to a news list traversed by a for loop. The default news content is partially displayed. There is an 'expand' next to each list item. After clicking, only the content of the list item will be expanded. How to write this? Baidu has some tutorials that say to use wx:key, but it doesn’t work after trying it. I don’t know how to write it

Y殷涛TY殷涛T2700 days ago2200

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-06-23 18:26:40

    If you ask this question, I can’t help you answer it. You can’t ask me to help you rewrite the code from beginning to end

    reply
    1
  • Y殷涛T

    I tried many times that afternoon and finally made it. The syntax may not be very concise but the functions are achieved. Thank you.

    Y殷涛T · 2017-06-26 10:36:52
  • Cancelreply