shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js
https://vue-multiselect.js.org/
MIT License
6.73k stars 992 forks source link

question Slots vue3 version 3 #1776

Open amchconsult opened 6 months ago

amchconsult commented 6 months ago

Hi, Question per example. To assign in slot a different color per item selected. Slot does not seems to be working. Same with tags. Do you have any other example.

<div><label class="typo__label">Single select / dropdown</label>
    <multiselect v-model="value" deselect-label="Can't remove this value" track-by="name" label="name"
                 placeholder="Select one" :options="options" :searchable="false" :allow-empty="false">
      <template slot="singleLabel" slot-scope="{ option }"><strong>{{ option.name }}</strong> is written in<strong>
        {{ option.language }}</strong></template>
    </multiselect>
    <pre class="language-json"><code>{{ value }}</code></pre>
  </div>

thank you

PingoLee commented 1 month ago

Me too