adjust signature step
This commit is contained in:
@@ -83,15 +83,23 @@
|
|||||||
<IconReload :width="16" />
|
<IconReload :width="16" />
|
||||||
{{ t('redraw') }}
|
{{ t('redraw') }}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<span
|
||||||
v-else
|
v-if="withQrButton && !modelValue && !computedPreviousValue && field.preferences?.format !== 'typed'"
|
||||||
href="#"
|
class=" tooltip"
|
||||||
class="btn btn-outline btn-sm font-medium"
|
:data-tip="t('drawn_signature_on_a_touchscreen_device')"
|
||||||
@click.prevent="[clear(), hideQr()]"
|
|
||||||
>
|
>
|
||||||
<IconReload :width="16" />
|
<a
|
||||||
{{ t('clear') }}
|
href="#"
|
||||||
</a>
|
class="btn btn-sm btn-neutral font-medium hidden md:flex"
|
||||||
|
:class="{ 'btn-outline': !isShowQr, 'text-white': isShowQr }"
|
||||||
|
@click.prevent="isShowQr ? hideQr() : [isTextSignature = false, showQr()]"
|
||||||
|
>
|
||||||
|
<IconQrcode
|
||||||
|
:width="19"
|
||||||
|
:height="19"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
:title="t('minimize')"
|
:title="t('minimize')"
|
||||||
@@ -125,17 +133,16 @@
|
|||||||
>
|
>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div
|
<div
|
||||||
v-if="withQrButton"
|
v-if="!modelValue && !computedPreviousValue && !isShowQr && !isTextSignature && isSignatureStarted"
|
||||||
class="absolute top-1.5 right-1.5 tooltip hidden md:inline"
|
class="absolute top-0.5 right-0.5"
|
||||||
:data-tip="t('drawn_signature_on_a_touchscreen_device')"
|
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
v-if="!isShowQr && !isSignatureStarted && !isTextSignature && !modelValue"
|
|
||||||
href="#"
|
href="#"
|
||||||
class="btn btn-sm btn-circle btn-ghost"
|
class="btn btn-ghost font-medium btn-xs md:btn-sm"
|
||||||
@click.prevent="showQr"
|
@click.prevent="[clear(), hideQr()]"
|
||||||
>
|
>
|
||||||
<IconQrcode />
|
<IconReload :width="16" />
|
||||||
|
{{ t('clear') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<canvas
|
<canvas
|
||||||
@@ -144,6 +151,10 @@
|
|||||||
style="padding: 1px; 0"
|
style="padding: 1px; 0"
|
||||||
class="bg-white border border-base-300 rounded-2xl w-full"
|
class="bg-white border border-base-300 rounded-2xl w-full"
|
||||||
/>
|
/>
|
||||||
|
<div
|
||||||
|
v-if="isShowQr"
|
||||||
|
class="top-0 bottom-0 right-0 left-0 absolute bg-white rounded-2xl m-0.5"
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
v-show="isShowQr"
|
v-show="isShowQr"
|
||||||
class="top-0 bottom-0 right-0 left-0 absolute bg-base-content/10 rounded-2xl"
|
class="top-0 bottom-0 right-0 left-0 absolute bg-base-content/10 rounded-2xl"
|
||||||
@@ -333,7 +344,7 @@ export default {
|
|||||||
if (this.$refs.canvas) {
|
if (this.$refs.canvas) {
|
||||||
this.pad = new SignaturePad(this.$refs.canvas)
|
this.pad = new SignaturePad(this.$refs.canvas)
|
||||||
|
|
||||||
this.pad.addEventListener('beginStroke', () => {
|
this.pad.addEventListener('endStroke', () => {
|
||||||
this.isSignatureStarted = true
|
this.isSignatureStarted = true
|
||||||
|
|
||||||
this.$emit('start')
|
this.$emit('start')
|
||||||
@@ -421,6 +432,7 @@ export default {
|
|||||||
|
|
||||||
if (this.$refs.textInput) {
|
if (this.$refs.textInput) {
|
||||||
this.$refs.textInput.value = ''
|
this.$refs.textInput.value = ''
|
||||||
|
this.$refs.textInput.focus()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateWrittenSignature (e) {
|
updateWrittenSignature (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user