1. 程式人生 > >小程式提示報Now you can provide attr "wx:key" for a "wx:for" to improve performance.

小程式提示報Now you can provide attr "wx:key" for a "wx:for" to improve performance.

如果小程式裡面你發現自己哪裡都沒寫錯,卻提示以下內容,

Now you can provide attr "wx:key" for a "wx:for" to improve performance.


解決方法:

在 wx:for='{{}}'wo:for-item='' 中間加一個wx:key="key"

<block wx:for='{{movies}}' wx:key="key"  wo:for-item='movie'>