原码:

var myheader = {
  //attention point:v-for 不能入在p中,即v-for外层一定要有一个元素包裹着
    template:"<p><span v-for='myitme in doList'>{{myitme.order}}</span><br></p>",
    props:["doList"]

}

var vm = new Vue({
  el: "#app",
  data: {
    count: 5,msg:"my message",tttson:"son",ttmyheader:myheader,
    doList:[
      {isF:false,order:1},
      {isF:true,order:2},
      {isF:true,order:3},
      {isF:false,order:4}

    ]
  },
  components:{
    "myheaders":myheader
  },
  methods: {

Point one:请看注释的site.

or it will reported:

v-for在组件中使用的注意点



相关文章:

  • 2022-12-23
  • 2021-05-29
  • 2021-08-22
  • 2021-12-10
  • 2021-06-28
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-21
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案