add cell field type

This commit is contained in:
Alex Turchyn
2023-06-27 00:57:29 +03:00
parent 419ede5b1d
commit 897df83633
14 changed files with 188 additions and 47 deletions
+5 -3
View File
@@ -85,7 +85,7 @@
:selected-submitter="selectedSubmitter"
:document="document"
:is-drag="!!dragFieldType"
:is-draw="!!drawField"
:draw-field="drawField"
@draw="onDraw"
@drop-field="onDropfield"
@remove-area="removeArea"
@@ -141,12 +141,10 @@ import Contenteditable from './contenteditable'
import DocumentPreview from './preview'
import { IconUsersPlus, IconDeviceFloppy, IconInnerShadowTop } from '@tabler/icons-vue'
import { v4 } from 'uuid'
import i18n from './i18n'
import { ref, computed } from 'vue'
export default {
name: 'TemplateBuilder',
i18n,
components: {
Upload,
Document,
@@ -352,6 +350,10 @@ export default {
fieldArea.h = baseArea.h
fieldArea.y = fieldArea.y - baseArea.h / 2
if (this.dragFieldType === 'cells') {
fieldArea.cell_w = baseArea.cell_w || (baseArea.w / 5)
}
field.areas = [fieldArea]
this.selectedAreaRef.value = fieldArea