mirror of
https://github.com/directus/directus.git
synced 2026-02-02 10:25:05 -05:00
@@ -62,6 +62,7 @@
|
||||
:inputValue="value || []"
|
||||
:label="item.text"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
@change="$emit('input', $event.length > 0 ? $event : null)"
|
||||
/>
|
||||
</v-list-item-content>
|
||||
@@ -121,6 +122,7 @@
|
||||
import { defineComponent, PropType, computed, toRefs, Ref } from '@vue/composition-api';
|
||||
import i18n from '@/lang';
|
||||
import { useCustomSelection, useCustomSelectionMultiple } from '@/composables/use-custom-selection';
|
||||
import { get } from 'lodash';
|
||||
|
||||
type ItemsRaw = (string | any)[];
|
||||
type InputValue = string[] | string;
|
||||
@@ -143,6 +145,10 @@ export default defineComponent({
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
itemDisabled: {
|
||||
type: String,
|
||||
default: 'disabled',
|
||||
},
|
||||
value: {
|
||||
type: [Array, String, Number, Boolean] as PropType<InputValue>,
|
||||
default: null,
|
||||
@@ -218,10 +224,10 @@ export default defineComponent({
|
||||
if (item.divider === true) return { divider: true };
|
||||
|
||||
return {
|
||||
text: item[props.itemText],
|
||||
value: item[props.itemValue],
|
||||
icon: item[props.itemIcon],
|
||||
disabled: item.disabled,
|
||||
text: get(item, props.itemText),
|
||||
value: get(item, props.itemValue),
|
||||
icon: get(item, props.itemIcon),
|
||||
disabled: get(item, props.itemDisabled),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
:items="availableCollections"
|
||||
item-value="collection"
|
||||
item-text="name"
|
||||
item-disabled="meta.singleton"
|
||||
multiple
|
||||
v-model="relations[1].one_allowed_collections"
|
||||
:multiple-preview-threshold="0"
|
||||
|
||||
Reference in New Issue
Block a user