admin管理员组文章数量:1327971
I am using vue-multiselect and I copied the example 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>
In the example it can be seen that the tags are not present, this happens in all examples, by default the tagging its not present in any example.
But when using the code of the example the tagging does show,
- i tried using
:taggable="false"
, - i tried using
<template #tag></template>
- I also inspected, and it's not CSS hiding it the tags are still showing. Here its the minimal code to reproduce the issue.
The Desired behaviour its to not show the tagging just like in the examples.
I am using vue-multiselect and I copied the example 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>
In the example it can be seen that the tags are not present, this happens in all examples, by default the tagging its not present in any example.
But when using the code of the example the tagging does show,
- i tried using
:taggable="false"
, - i tried using
<template #tag></template>
- I also inspected, and it's not CSS hiding it the tags are still showing. Here its the minimal code to reproduce the issue.
The Desired behaviour its to not show the tagging just like in the examples.
Share Improve this question edited Jul 16, 2020 at 18:22 David Lee asked Jul 16, 2020 at 5:15 David LeeDavid Lee 8717 silver badges21 bronze badges 2- Could you show us a little more code, preferably a minimal, reproducible example? stackoverflow./help/minimal-reproducible-example – samu Commented Jul 16, 2020 at 5:26
- @samu i did, codesandbox.io/s/vue-multiselect-no-tags-nuhsh?file=/src/… – David Lee Commented Jul 16, 2020 at 5:30
1 Answer
Reset to default 8You should use <template slot="tag">{{ '' }}</template>
to hide the tags.
本文标签: javascriptHow to not have tags in vuemultiselectStack Overflow
版权声明:本文标题:javascript - How to not have tags in vue-multiselect? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742253004a2441110.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论