127127 type =" hidden"
128128 :name =" `values[${field.uuid}]`"
129129 >
130+ <input
131+ v-if =" isTouchAttachment"
132+ :value =" touchAttachmentUuid"
133+ type =" hidden"
134+ name =" touch_attachment_uuid"
135+ >
130136 <img
131137 v-if =" modelValue || computedPreviousValue"
132138 :src =" attachmentsIndex[modelValue || computedPreviousValue].url"
@@ -334,6 +340,10 @@ export default {
334340 type: Object ,
335341 required: true
336342 },
343+ values: {
344+ type: Object ,
345+ required: true
346+ },
337347 requireSigningReason: {
338348 type: Boolean ,
339349 required: false ,
@@ -388,6 +398,11 @@ export default {
388398 required: false ,
389399 default: ' '
390400 },
401+ touchAttachmentUuid: {
402+ type: String ,
403+ required: false ,
404+ default: ' '
405+ },
391406 reason: {
392407 type: String ,
393408 required: false ,
@@ -399,13 +414,14 @@ export default {
399414 default: ' '
400415 }
401416 },
402- emits: [' attached' , ' update:model-value' , ' start' , ' minimize' , ' update:reason' ],
417+ emits: [' attached' , ' update:model-value' , ' start' , ' minimize' , ' update:reason' , ' touch-attachment ' ],
403418 data () {
404419 return {
405420 isSignatureStarted: false ,
406421 isShowQr: false ,
407422 isOtherReason: false ,
408423 isUsePreviousValue: true ,
424+ isTouchAttachment: false ,
409425 isTextSignature: this .field .preferences ? .format === ' typed' || this .field .preferences ? .format === ' typed_or_upload' ,
410426 uploadImageInputKey: Math .random ().toString ()
411427 }
@@ -731,6 +747,13 @@ export default {
731747 },
732748 async submit () {
733749 if (this .modelValue || this .computedPreviousValue ) {
750+ if (this .touchAttachmentUuid && this .computedPreviousValue === this .touchAttachmentUuid && ! Object .values (this .values ).includes (this .touchAttachmentUuid )) {
751+ this .isTouchAttachment = true
752+ this .$emit (' touch-attachment' , this .touchAttachmentUuid )
753+ } else {
754+ this .isTouchAttachment = false
755+ }
756+
734757 if (this .computedPreviousValue ) {
735758 this .$emit (' update:model-value' , this .computedPreviousValue )
736759 }
0 commit comments