|
|
@ -124,36 +124,35 @@ watch( |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
immediate: true |
|
|
|
immediate: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** updates attachments array for autosave */ |
|
|
|
/** updates attachments array for autosave */ |
|
|
|
function updateModelValue(data: string | Record<string, any>[]) { |
|
|
|
function updateModelValue(data: string | Record<string, any>[]) { |
|
|
|
emits('update:modelValue', data) |
|
|
|
emits('update:modelValue', data) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Close modal on escape press, disable dropzone as well */ |
|
|
|
/** Close modal on escape press, disable dropzone as well */ |
|
|
|
onKeyDown('Escape', () => { |
|
|
|
onKeyDown('Escape', () => { |
|
|
|
modalVisible.value = false |
|
|
|
modalVisible.value = false |
|
|
|
isOverDropZone.value = false |
|
|
|
isOverDropZone.value = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
/** sync storedFiles state with row state */ |
|
|
|
/** sync storedFiles state with row state */ |
|
|
|
watch( |
|
|
|
watch( |
|
|
|
() => storedFiles.value.length || 0, |
|
|
|
() => storedFiles.value.length || 0, |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
rowState.value[column.value!.title!] = storedFiles.value |
|
|
|
rowState.value[column.value!.title!] = storedFiles.value |
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e) => { |
|
|
|
useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e) => { |
|
|
|
if (e.key === 'Enter' && !isReadonly.value) { |
|
|
|
if (e.key === 'Enter' && !isReadonly.value) { |
|
|
|
e.stopPropagation() |
|
|
|
e.stopPropagation() |
|
|
|
modalVisible.value = true |
|
|
|
modalVisible.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|