|
|
@ -1,8 +1,7 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import tinycolor from 'tinycolor2' |
|
|
|
import tinycolor from 'tinycolor2' |
|
|
|
import type { Select as AntSelect } from 'ant-design-vue' |
|
|
|
import type { Select as AntSelect } from 'ant-design-vue' |
|
|
|
import { SelectOptionType } from 'nocodb-sdk' |
|
|
|
import type { SelectOptionType, SelectOptionsType } from 'nocodb-sdk' |
|
|
|
import type { SelectOptionsType } from 'nocodb-sdk' |
|
|
|
|
|
|
|
import { |
|
|
|
import { |
|
|
|
ActiveCellInj, |
|
|
|
ActiveCellInj, |
|
|
|
ColumnInj, |
|
|
|
ColumnInj, |
|
|
@ -56,14 +55,15 @@ const options = computed<SelectOptionType[]>(() => { |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const vModel = computed<string[]>({ |
|
|
|
const vModel = computed({ |
|
|
|
get: () => selectedIds.value.flatMap((el) => { |
|
|
|
get: () => |
|
|
|
const title = options.value.find((op) => op.id === el)?.title |
|
|
|
selectedIds.value.reduce((acc, id) => { |
|
|
|
|
|
|
|
const title = options.value.find((op) => op.id === id)?.title |
|
|
|
|
|
|
|
|
|
|
|
if (title) return [title] |
|
|
|
if (title) acc.push(title) |
|
|
|
|
|
|
|
|
|
|
|
return [] as string[] |
|
|
|
return acc |
|
|
|
}) || [] as string[], |
|
|
|
}, [] as string[]), |
|
|
|
set: (val) => emit('update:modelValue', val.length === 0 ? null : val.join(',')), |
|
|
|
set: (val) => emit('update:modelValue', val.length === 0 ? null : val.join(',')), |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|