0

Is there a way to create N+1 stages?

The following is how to create one stage.

<v-stage :config="configKonva">
      <v-layer>
        <v-circle
          v-for="(item2, i) in items2"
          :config="item2"
          :key="i"
          :ref="`circle_${i}`"
        ></v-circle>
      </v-layer>
    </v-stage>

scranley
  • 188
  • 1
  • 4
  • 20

1 Answers1

1

The same way as you use loops for <v-circle /> component, you can use it for stages:

<v-stage :config="stage.config" v-for="(stage) in stages">
      <v-layer>
        <v-circle
          v-for="(item) in stage.items"
          :config="item"
          :key="i"
        ></v-circle>
      </v-layer>
</v-stage>
lavrton
  • 18,973
  • 4
  • 30
  • 63