Skip to content

Commit 80b9c81

Browse files
committed
Make unassign example easier
1 parent d46990e commit 80b9c81

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

frontend/components/example/AudioList.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@
5959
solo
6060
style="width: 200px"
6161
@change="onAssignOrUnassign(item, $event)"
62-
/>
62+
>
63+
<template #selection="{ attrs, item, parent, selected }">
64+
<v-chip v-bind="attrs" :input-value="selected" small class="mt-1 mb-1">
65+
<span class="pr-1">{{ item.username }}</span>
66+
<v-icon small @click="parent.selectItem(item)"> $delete </v-icon>
67+
</v-chip>
68+
</template>
69+
</v-combobox>
6370
</template>
6471
<template #[`item.action`]="{ item }">
6572
<v-btn small color="primary text-capitalize" @click="toLabeling(item)">

frontend/components/example/DocumentList.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@
5757
solo
5858
style="width: 200px"
5959
@change="onAssignOrUnassign(item, $event)"
60-
/>
60+
>
61+
<template #selection="{ attrs, item, parent, selected }">
62+
<v-chip v-bind="attrs" :input-value="selected" small class="mt-1 mb-1">
63+
<span class="pr-1">{{ item.username }}</span>
64+
<v-icon small @click="parent.selectItem(item)"> $delete </v-icon>
65+
</v-chip>
66+
</template>
67+
</v-combobox>
6168
</template>
6269
<template #[`item.action`]="{ item }">
6370
<v-btn class="me-1" small color="primary text-capitalize" @click="$emit('edit', item)"

frontend/components/example/ImageList.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,14 @@
6363
solo
6464
style="width: 200px"
6565
@change="onAssignOrUnassign(item, $event)"
66-
/>
66+
>
67+
<template #selection="{ attrs, item, parent, selected }">
68+
<v-chip v-bind="attrs" :input-value="selected" small class="mt-1 mb-1">
69+
<span class="pr-1">{{ item.username }}</span>
70+
<v-icon small @click="parent.selectItem(item)"> $delete </v-icon>
71+
</v-chip>
72+
</template>
73+
</v-combobox>
6774
</template>
6875
<template #[`item.action`]="{ item }">
6976
<v-btn small color="primary text-capitalize" @click="toLabeling(item)">

0 commit comments

Comments
 (0)