|
@ -47,7 +47,7 @@ |
|
|
<template v-slot:input> |
|
|
<template v-slot:input> |
|
|
<v-select |
|
|
<v-select |
|
|
:value="item.suffix_key" |
|
|
:value="item.suffix_key" |
|
|
:items="shortkeys" |
|
|
|
|
|
|
|
|
:items="availableShortkeys(item.suffix_key)" |
|
|
:label="$t('annotation.key')" |
|
|
:label="$t('annotation.key')" |
|
|
@change="handleUpdateLabel({ id: item.id, suffix_key: $event })" |
|
|
@change="handleUpdateLabel({ id: item.id, suffix_key: $event })" |
|
|
/> |
|
|
/> |
|
@ -133,6 +133,12 @@ export default { |
|
|
this.updateLabel(data) |
|
|
this.updateLabel(data) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
availableShortkeys(suffixKey) { |
|
|
|
|
|
const usedKeys = this.items.map(item => item.suffix_key) |
|
|
|
|
|
const unusedKeys = this.shortkeys.filter(item => item === suffixKey || !usedKeys.includes(item)) |
|
|
|
|
|
return unusedKeys |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
textColor(backgroundColor) { |
|
|
textColor(backgroundColor) { |
|
|
return idealColor(backgroundColor) |
|
|
return idealColor(backgroundColor) |
|
|
} |
|
|
} |
|
|