|
|
@ -6,22 +6,30 @@ import MdiDragIcon from '~icons/mdi/drag-vertical' |
|
|
|
import MdiArrowDownDropCircle from '~icons/mdi/arrow-down-drop-circle' |
|
|
|
import MdiArrowDownDropCircle from '~icons/mdi/arrow-down-drop-circle' |
|
|
|
import MdiClose from '~icons/mdi/close' |
|
|
|
import MdiClose from '~icons/mdi/close' |
|
|
|
import MdiPlusIcon from '~icons/mdi/plus' |
|
|
|
import MdiPlusIcon from '~icons/mdi/plus' |
|
|
|
|
|
|
|
import { IsKanbanInj } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
value: Record<string, any> |
|
|
|
value: Record<string, any> |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Props>() |
|
|
|
const props = defineProps<Props>() |
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:value']) |
|
|
|
const emit = defineEmits(['update:value']) |
|
|
|
|
|
|
|
|
|
|
|
const vModel = useVModel(props, 'value', emit) |
|
|
|
const vModel = useVModel(props, 'value', emit) |
|
|
|
|
|
|
|
|
|
|
|
const { setAdditionalValidations, validateInfos } = useColumnCreateStoreOrThrow() |
|
|
|
const { setAdditionalValidations, validateInfos } = useColumnCreateStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
let options = $ref<any[]>([]) |
|
|
|
let options = $ref<any[]>([]) |
|
|
|
|
|
|
|
|
|
|
|
const colorMenus = $ref<any>({}) |
|
|
|
const colorMenus = $ref<any>({}) |
|
|
|
|
|
|
|
|
|
|
|
const colors = $ref(enumColor.light) |
|
|
|
const colors = $ref(enumColor.light) |
|
|
|
|
|
|
|
|
|
|
|
const inputs = ref() |
|
|
|
const inputs = ref() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isKanban = inject(IsKanbanInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const validators = { |
|
|
|
const validators = { |
|
|
|
'colOptions.options': [ |
|
|
|
'colOptions.options': [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -96,7 +104,7 @@ watch(inputs, () => { |
|
|
|
<Draggable :list="options" item-key="id" handle=".nc-child-draggable-icon"> |
|
|
|
<Draggable :list="options" item-key="id" handle=".nc-child-draggable-icon"> |
|
|
|
<template #item="{ element, index }"> |
|
|
|
<template #item="{ element, index }"> |
|
|
|
<div class="flex py-1 items-center nc-select-option"> |
|
|
|
<div class="flex py-1 items-center nc-select-option"> |
|
|
|
<MdiDragIcon small class="nc-child-draggable-icon handle" /> |
|
|
|
<MdiDragIcon v-if="!isKanban" small class="nc-child-draggable-icon handle" /> |
|
|
|
<a-dropdown |
|
|
|
<a-dropdown |
|
|
|
v-model:visible="colorMenus[index]" |
|
|
|
v-model:visible="colorMenus[index]" |
|
|
|
:trigger="['click']" |
|
|
|
:trigger="['click']" |
|
|
|