Easy-DnD - New drag and drop components for Vue!

I I have more than 10 dropzones, how do I know which dropzone is activated. Using 10 functions for 10 dropzones is a bad solution.

This demo uses “10 functions for 10 dropzones” Example 3 - CodeSandbox

      <drop class="bs" @drop="onBDrop" accepts-type="string" :accepts-data="(d) => d === 'b'">
        <span v-if="bDropped">drop</span>
      </drop>

Instead I assume you could add an identifier parameter to a single onDrop method like this

      <drop class="bs" @drop="onDrop('B', $event)" accepts-type="string" :accepts-data="(d) => d === 'b'">
        <span v-if="bDropped">drop</span>
      </drop>

… and then have your onDrop(dropZoneId, event) sort out which dropzone to handle how.

Oh thank you. I wll try this solution.