File tree Expand file tree Collapse file tree 2 files changed +38
-36
lines changed
src/components/QuestionTypes Expand file tree Collapse file tree 2 files changed +38
-36
lines changed Original file line number Diff line number Diff line change 1- <template >
2- <the-mask
3- ref =" input"
4- v-bind:mask =" question.mask"
5- v-bind:value =" value"
6- type =" tel"
7- v-bind:masked =" false"
8- v-bind:placeholder =" placeholder"
9- v-on:keydown.native =" onKeyDown"
10- v-on:keyup.native =" onChange"
11- v-on:focus.native =" setFocus"
12- v-on:blur.native =" unsetFocus"
13- v-on:keyup.native.enter.prevent =" onEnter"
14- v-on:keyup.native.tab.prevent =" onEnter"
15- />
16- </template >
17-
181<script >
192 /*
203 Copyright (c) 2020 - present, DITDOT Ltd. - MIT Licence
214 https://github.com/ditdot-dev/vue-flow-form
225 https://www.ditdot.hr/en
236 */
247
25- import BaseType from ' ./BaseType .vue'
8+ import TextType from ' ./TextType .vue'
269 import LanguageModel from ' ../../models/LanguageModel'
2710 import { QuestionType } from ' ../../models/QuestionModel'
28- import TheMask from ' vue-the-mask/src/component'
2911
3012 export default {
31- extends: BaseType,
32- components: {
33- TheMask
34- },
13+ extends: TextType,
3514 name: QuestionType .Phone ,
3615 data () {
3716 return {
Original file line number Diff line number Diff line change 11<template >
2- <input
3- ref =" input"
4- v-bind:type =" inputType"
5- v-bind:value =" value"
6- v-bind:required =" question.required"
7- v-on:keydown =" onKeyDown"
8- v-on:keyup =" onChange"
9- v-on:keyup.enter.prevent =" onEnter"
10- v-on:keyup.tab.prevent =" onEnter"
11- v-on:focus =" setFocus"
12- v-on:blur =" unsetFocus"
13- v-bind:placeholder =" placeholder"
14- />
2+ <span >
3+ <the-mask
4+ v-if =" question.mask"
5+ ref =" input"
6+ v-bind:mask =" question.mask"
7+ v-bind:masked =" false"
8+ v-bind:type =" inputType"
9+ v-bind:value =" value"
10+ v-bind:required =" question.required"
11+ v-on:keydown.native =" onKeyDown"
12+ v-on:keyup.native =" onChange"
13+ v-on:focus.native =" setFocus"
14+ v-on:blur.native =" unsetFocus"
15+ v-on:keyup.native.enter.prevent =" onEnter"
16+ v-on:keyup.native.tab.prevent =" onEnter"
17+ v-bind:placeholder =" placeholder"
18+ />
19+ <input
20+ v-else
21+ ref =" input"
22+ v-bind:type =" inputType"
23+ v-bind:value =" value"
24+ v-bind:required =" question.required"
25+ v-on:keydown =" onKeyDown"
26+ v-on:keyup =" onChange"
27+ v-on:keyup.enter.prevent =" onEnter"
28+ v-on:keyup.tab.prevent =" onEnter"
29+ v-on:focus =" setFocus"
30+ v-on:blur =" unsetFocus"
31+ v-bind:placeholder =" placeholder"
32+ />
33+ </span >
1534</template >
1635
1736<script >
2443 import BaseType from ' ./BaseType.vue'
2544 import { QuestionType } from ' ../../models/QuestionModel'
2645 import LanguageModel from ' ../../models/LanguageModel'
46+ import TheMask from ' vue-the-mask/src/component'
2747
2848 export default {
2949 extends: BaseType,
3050 name: QuestionType .Text ,
51+ components: {
52+ TheMask
53+ },
3154 data () {
3255 return {
3356 inputType: ' text' ,
You can’t perform that action at this time.
0 commit comments