![](/img/trans.png)
[英]How to have multiple instances of vue-multiselect with a click of a button
[英]How to not have tags in vue-multiselect?
我正在使用 vue-multiselect 並復制了示例vue-multiselect multiple select
<div>
<label class="typo__label">Simple select / dropdown</label>
<multiselect v-model="value" :options="options" :multiple="true" :close-on-select="false" :clear-on-select="false" :preserve-search="true" placeholder="Pick some" label="name" track-by="name" :preselect-first="true">
<template slot="selection" slot-scope="{ values, search, isOpen }"><span class="multiselect__single" v-if="values.length && !isOpen">{{ values.length }} options selected</span></template>
</multiselect>
<pre class="language-json"><code>{{ value }}</code></pre>
</div>
在示例中可以看到標簽不存在,這在所有示例中都會發生,默認情況下,標記在任何示例中都不存在。
但是當使用示例代碼時,標記確實顯示,
:taggable="false"
,<template #tag></template>
Desired 行為不像示例中那樣顯示標記。
您應該使用<template slot="tag">{{ '' }}</template>
來隱藏標簽。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.