|
|
@ -10,6 +10,7 @@ interface Props { |
|
|
|
editEnabled: boolean |
|
|
|
editEnabled: boolean |
|
|
|
rowIndex?: number |
|
|
|
rowIndex?: number |
|
|
|
active?: boolean |
|
|
|
active?: boolean |
|
|
|
|
|
|
|
virtual?: boolean |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Props>() |
|
|
|
const props = defineProps<Props>() |
|
|
@ -20,6 +21,8 @@ const column = toRef(props, 'column') |
|
|
|
|
|
|
|
|
|
|
|
const active = toRef(props, 'active', false) |
|
|
|
const active = toRef(props, 'active', false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const virtual = toRef(props, 'virtual', false) |
|
|
|
|
|
|
|
|
|
|
|
provide(ColumnInj, column) |
|
|
|
provide(ColumnInj, column) |
|
|
|
|
|
|
|
|
|
|
|
provide(EditModeInj, useVModel(props, 'editEnabled', emit)) |
|
|
|
provide(EditModeInj, useVModel(props, 'editEnabled', emit)) |
|
|
@ -54,10 +57,6 @@ const isManualSaved = $computed(() => { |
|
|
|
return [UITypes.Currency, UITypes.Duration].includes(column?.value?.uidt as UITypes) |
|
|
|
return [UITypes.Currency, UITypes.Duration].includes(column?.value?.uidt as UITypes) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const isPrimary = computed(() => { |
|
|
|
|
|
|
|
return column?.value?.pv |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const vModel = computed({ |
|
|
|
const vModel = computed({ |
|
|
|
get: () => props.modelValue, |
|
|
|
get: () => props.modelValue, |
|
|
|
set: (val) => { |
|
|
|
set: (val) => { |
|
|
@ -75,6 +74,7 @@ const vModel = computed({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
|
|
|
|
|
isPrimary, |
|
|
|
isURL, |
|
|
|
isURL, |
|
|
|
isEmail, |
|
|
|
isEmail, |
|
|
|
isJSON, |
|
|
|
isJSON, |
|
|
@ -112,7 +112,7 @@ const syncAndNavigate = (dir: NavigateDir) => { |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div |
|
|
|
<div |
|
|
|
class="nc-cell w-full h-full" |
|
|
|
class="nc-cell w-full h-full" |
|
|
|
:class="{ 'text-blue-600': isPrimary }" |
|
|
|
:class="{ 'text-blue-600': isPrimary && !virtual }" |
|
|
|
@keydown.stop.left |
|
|
|
@keydown.stop.left |
|
|
|
@keydown.stop.right |
|
|
|
@keydown.stop.right |
|
|
|
@keydown.stop.up |
|
|
|
@keydown.stop.up |
|
|
|