search

Home  >  Q&A  >  body text

javascript - <transition-group> children must be keyed: <ElTag> 饿了么报错?

黄舟黄舟2812 days ago2277

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-11 12:31:55

    已经提示的很明显了,<transition-group>里的组件要加上key属性

    <transition-group name="list" tag="p">
        <span v-for="item in items" v-bind:key="item" class="list-item">
          {{ item }}
        </span>
      </transition-group>

    reply
    0
  • Cancelreply