|
|
@ -58,8 +58,6 @@ const meta = inject(MetaInj, ref()) |
|
|
|
|
|
|
|
|
|
|
|
const viewList = inject(ViewListInj) |
|
|
|
const viewList = inject(ViewListInj) |
|
|
|
|
|
|
|
|
|
|
|
const fields = inject(FieldsInj, ref([])) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const form = reactive<Form>({ |
|
|
|
const form = reactive<Form>({ |
|
|
|
title: props.title || '', |
|
|
|
title: props.title || '', |
|
|
|
type: props.type, |
|
|
|
type: props.type, |
|
|
@ -99,11 +97,12 @@ const typeAlias = computed( |
|
|
|
}[props.type]), |
|
|
|
}[props.type]), |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(vModel, (value) => value && init()) |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
|
() => props.type, |
|
|
|
() => props.type, |
|
|
|
(newType) => { |
|
|
|
(newType) => { |
|
|
|
form.type = newType |
|
|
|
form.type = newType |
|
|
|
init() |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -115,9 +114,9 @@ function init() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// preset the grouping field column |
|
|
|
// preset the grouping field column |
|
|
|
if (form.type === ViewTypes.KANBAN) { |
|
|
|
if (props.type === ViewTypes.KANBAN) { |
|
|
|
singleSelectFieldOptions.value = fields.value |
|
|
|
singleSelectFieldOptions.value = meta |
|
|
|
.filter((el) => el.uidt === UITypes.SingleSelect) |
|
|
|
.value!.columns!.filter((el) => el.uidt === UITypes.SingleSelect) |
|
|
|
.map((field) => { |
|
|
|
.map((field) => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
value: field.id, |
|
|
|
value: field.id, |
|
|
|