Fix signature input import

This commit is contained in:
Julien Nahum 2023-11-28 09:09:02 +01:00
parent 387a110820
commit 9b4ac38ae4
3 changed files with 18 additions and 34 deletions

31
package-lock.json generated
View File

@ -35,7 +35,7 @@
"vue-meta": "^3.0.0-alpha.2", "vue-meta": "^3.0.0-alpha.2",
"vue-notion": "^3.0.0-beta.1", "vue-notion": "^3.0.0-beta.1",
"vue-router": "^4.2.5", "vue-router": "^4.2.5",
"vue-signature-pad": "^2.0.5", "vue-signature-pad": "^3.0.2",
"vue2-editor": "^2.10.3", "vue2-editor": "^2.10.3",
"vue3-vt-notifications": "^1.0.0", "vue3-vt-notifications": "^1.0.0",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0",
@ -13667,35 +13667,18 @@
} }
}, },
"node_modules/vue-signature-pad": { "node_modules/vue-signature-pad": {
"version": "2.0.5", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/vue-signature-pad/-/vue-signature-pad-2.0.5.tgz", "resolved": "https://registry.npmjs.org/vue-signature-pad/-/vue-signature-pad-3.0.2.tgz",
"integrity": "sha512-FLvJRmhSP/DVkg0W/tGcPZ4D0ZQlFxHgN1mjph6jt/59yLeTSv0zGGU133lfq9CkYMQ5DqN6rWujjL7Gnx7UPA==", "integrity": "sha512-o25o+lROfCmzASS2+fU8ZV801kV+D4/02zkZ+ez3NKeiUmbxW7kwlUf5oKQkvA+l7Ou9xGsGLsirBLch3jyX8A==",
"dependencies": { "dependencies": {
"merge-images": "^1.1.0", "merge-images": "^1.1.0",
"signature_pad": "^3.0.0-beta.3", "signature_pad": "^3.0.0-beta.3"
"vue": "^2.6.14"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}
}, },
"node_modules/vue-signature-pad/node_modules/@vue/compiler-sfc": { "peerDependencies": {
"version": "2.7.15", "vue": "^3.2.0"
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz",
"integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==",
"dependencies": {
"@babel/parser": "^7.18.4",
"postcss": "^8.4.14",
"source-map": "^0.6.1"
}
},
"node_modules/vue-signature-pad/node_modules/vue": {
"version": "2.7.15",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.15.tgz",
"integrity": "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==",
"dependencies": {
"@vue/compiler-sfc": "2.7.15",
"csstype": "^3.1.0"
} }
}, },
"node_modules/vue-style-loader": { "node_modules/vue-style-loader": {

View File

@ -7,7 +7,8 @@
</template> </template>
<VueSignaturePad ref="signaturePad" <VueSignaturePad ref="signaturePad"
:class="[theme.default.input,{ '!ring-red-500 !ring-2': hasValidation && form.errors.has(name), '!cursor-not-allowed !bg-gray-200':disabled }]" height="150px" :class="[theme.default.input,{ '!ring-red-500 !ring-2': hasValidation && form.errors.has(name), '!cursor-not-allowed !bg-gray-200':disabled }]"
height="150px"
:name="name" :name="name"
:options="{ onEnd }" :options="{ onEnd }"
/> />
@ -30,14 +31,14 @@
<script> <script>
import { inputProps, useFormInput } from './useFormInput.js' import { inputProps, useFormInput } from './useFormInput.js'
import InputWrapper from './components/InputWrapper.vue' import InputWrapper from './components/InputWrapper.vue'
import VueSignaturePad from 'vue-signature-pad' import { VueSignaturePad } from 'vue-signature-pad'
export default { export default {
name: 'SignatureInput', name: 'SignatureInput',
components: {InputWrapper, VueSignaturePad}, components: { InputWrapper, VueSignaturePad },
props: { props: {
...inputProps, ...inputProps
}, },
setup (props, context) { setup (props, context) {

View File

@ -243,7 +243,7 @@
<!-- Pre-fill depends on type --> <!-- Pre-fill depends on type -->
<v-checkbox v-if="field.type=='checkbox'" v-model="field.prefill" class="mt-3" <v-checkbox v-if="field.type=='checkbox'" v-model="field.prefill" class="mt-3"
:name="field.id+'_prefill'" :name="field.id+'_prefill'"
@update:model-value="field.prefill =$event" @update:model-value="field.prefill = $event"
> >
Pre-filled value Pre-filled value
</v-checkbox> </v-checkbox>