Browse Source

Make unassign example easier

pull/2261/head
Hironsan 1 year ago
parent
commit
80b9c81ab7
3 changed files with 24 additions and 3 deletions
  1. 9
      frontend/components/example/AudioList.vue
  2. 9
      frontend/components/example/DocumentList.vue
  3. 9
      frontend/components/example/ImageList.vue

9
frontend/components/example/AudioList.vue

@ -59,7 +59,14 @@
solo
style="width: 200px"
@change="onAssignOrUnassign(item, $event)"
/>
>
<template #selection="{ attrs, item, parent, selected }">
<v-chip v-bind="attrs" :input-value="selected" small class="mt-1 mb-1">
<span class="pr-1">{{ item.username }}</span>
<v-icon small @click="parent.selectItem(item)"> $delete </v-icon>
</v-chip>
</template>
</v-combobox>
</template>
<template #[`item.action`]="{ item }">
<v-btn small color="primary text-capitalize" @click="toLabeling(item)">

9
frontend/components/example/DocumentList.vue

@ -57,7 +57,14 @@
solo
style="width: 200px"
@change="onAssignOrUnassign(item, $event)"
/>
>
<template #selection="{ attrs, item, parent, selected }">
<v-chip v-bind="attrs" :input-value="selected" small class="mt-1 mb-1">
<span class="pr-1">{{ item.username }}</span>
<v-icon small @click="parent.selectItem(item)"> $delete </v-icon>
</v-chip>
</template>
</v-combobox>
</template>
<template #[`item.action`]="{ item }">
<v-btn class="me-1" small color="primary text-capitalize" @click="$emit('edit', item)"

9
frontend/components/example/ImageList.vue

@ -63,7 +63,14 @@
solo
style="width: 200px"
@change="onAssignOrUnassign(item, $event)"
/>
>
<template #selection="{ attrs, item, parent, selected }">
<v-chip v-bind="attrs" :input-value="selected" small class="mt-1 mb-1">
<span class="pr-1">{{ item.username }}</span>
<v-icon small @click="parent.selectItem(item)"> $delete </v-icon>
</v-chip>
</template>
</v-combobox>
</template>
<template #[`item.action`]="{ item }">
<v-btn small color="primary text-capitalize" @click="toLabeling(item)">

Loading…
Cancel
Save