[英]How to not have tags in vue-multiselect?
I am using vue-multiselect and I copied the example vue-multiselect multiple select我正在使用 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>
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,但是当使用示例代码时,标记确实显示,
:taggable="false"
,:taggable="false"
,<template #tag></template>
<template #tag></template>
The Desired behaviour its to not show the tagging just like in the examples. Desired 行为不像示例中那样显示标记。
You should use <template slot="tag">{{ '' }}</template>
to hide the tags.您应该使用
<template slot="tag">{{ '' }}</template>
来隐藏标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.