shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js

Home Page:https://vue-multiselect.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question Slots vue3 version 3

amchconsult opened this issue · comments

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