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
-
18
1
<script >
19
2
/*
20
3
Copyright (c) 2020 - present, DITDOT Ltd. - MIT Licence
21
4
https://github.com/ditdot-dev/vue-flow-form
22
5
https://www.ditdot.hr/en
23
6
*/
24
7
25
- import BaseType from ' ./BaseType .vue'
8
+ import TextType from ' ./TextType .vue'
26
9
import LanguageModel from ' ../../models/LanguageModel'
27
10
import { QuestionType } from ' ../../models/QuestionModel'
28
- import TheMask from ' vue-the-mask/src/component'
29
11
30
12
export default {
31
- extends: BaseType,
32
- components: {
33
- TheMask
34
- },
13
+ extends: TextType,
35
14
name: QuestionType .Phone ,
36
15
data () {
37
16
return {
Original file line number Diff line number Diff line change 1
1
<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 >
15
34
</template >
16
35
17
36
<script >
24
43
import BaseType from ' ./BaseType.vue'
25
44
import { QuestionType } from ' ../../models/QuestionModel'
26
45
import LanguageModel from ' ../../models/LanguageModel'
46
+ import TheMask from ' vue-the-mask/src/component'
27
47
28
48
export default {
29
49
extends: BaseType,
30
50
name: QuestionType .Text ,
51
+ components: {
52
+ TheMask
53
+ },
31
54
data () {
32
55
return {
33
56
inputType: ' text' ,
You can’t perform that action at this time.
0 commit comments