mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 06:13:35 +09:00
2.9 KiB
2.9 KiB
optionMultipleObject, valueMultipleObject
| optionMultipleObject | valueMultipleObject | |||||||
|---|---|---|---|---|---|---|---|---|
|
|
Custom label
The <Multiselect /> component in multiple mode has a default label when you
start selecting options. You can change the way the message is formatted by
using the #multiplelabel custom slot to configure your message.
<script setup lang="ts">
import Multiselect from '@vueform/multiselect'
const valueMultipleObject = ref(['robin'])
const optionMultipleObject = ref({
batman: 'Batman',
robin: 'Robin',
joker: 'Joker',
})
</script>
<template>
<VField v-slot="{ id }" class="demo-field mb-6">
<VControl>
<Multiselect
v-model="valueMultipleObject"
:attrs="{ id }"
mode="multiple"
placeholder="Select your characters"
:options="optionMultipleObject"
>
<template #multiplelabel="{ values }">
<div class="multiselect-multiple-label">
{{ values.length }} characters selected
</div>
</template>
</Multiselect>
</VControl>
</VField>
</template>
{{ values.length }} characters selected
{{ values.length }} characters selected
{{ values.length }} characters selected