allow to drag new fields into page

This commit is contained in:
Alex Turchyn
2023-05-23 00:03:26 +03:00
parent 97c462ead2
commit 91b955a39f
5 changed files with 82 additions and 9 deletions
+11 -3
View File
@@ -1,6 +1,11 @@
<template>
<div>
{{ field.type }}
<button @click="$emit('remove', field)">
Remove
</button>
<div>
{{ field.type }}
</div>
<div v-if="field.type !== 'signature'">
<label>Name</label>
<input
@@ -24,7 +29,10 @@
Remove
</button>
</div>
<button @click="field.options.push('')">
<button
v-if="field.options"
@click="field.options.push('')"
>
Add option
</button>
</div>
@@ -66,7 +74,7 @@ export default {
required: true
}
},
emits: ['set-draw'],
emits: ['set-draw', 'remove'],
computed: {
areas () {
return this.field.areas || []