//小程序

Page({
  data: {
    items: []
  },
  onLoad: function(options) {
    this.setData({
      items: [1,2,3]    
    })
  }
})

 

//Vue

new Vue({
  data: {
    items: []
  },
  mounted () {
    this.items = [1, 2, 3]
  }
})

  

<!--小程序-->

<text wx:for="{{items}}">{{item}}</text>

 

<!--Vue-->

<text v-for="item in items">{{item}}</text>

  

相关文章:

  • 2022-12-23
  • 2021-07-07
  • 2021-05-14
  • 2022-01-08
  • 2021-04-09
  • 2021-04-08
  • 2021-11-09
  • 2021-09-05
猜你喜欢
  • 2021-03-31
  • 2021-11-05
  • 2021-09-25
  • 2021-06-28
  • 2022-01-13
  • 2021-10-08
  • 2022-12-23
相关资源
相似解决方案