@@ -17,53 +17,55 @@ import options from './options'
17
17
export default {
18
18
props: {
19
19
modelValue: {
20
- required: true
20
+ required: true ,
21
21
},
22
22
nullValue: {
23
23
type: [Number , String ],
24
- default : () => options .nullValue
24
+ default : () => options .nullValue ,
25
25
},
26
26
masked: {
27
27
type: Boolean ,
28
- default: false
28
+ default: false ,
29
29
},
30
30
reverseFill: {
31
31
type: Boolean ,
32
- default: options .reverseFill
32
+ default: options .reverseFill ,
33
33
},
34
34
precision: {
35
35
type: Number ,
36
- default : () => options .precision
36
+ default : () => options .precision ,
37
37
},
38
38
minimumFractionDigits: {
39
39
type: [Number , Boolean ],
40
- default : () => options .minimumFractionDigits
40
+ default : () => options .minimumFractionDigits ,
41
41
},
42
+ max: [Number , Boolean , String ],
43
+ min: [Number , Boolean , String ],
42
44
decimal: {
43
45
type: String ,
44
- default : () => options .decimal
46
+ default : () => options .decimal ,
45
47
},
46
48
separator: {
47
49
type: String ,
48
- default : () => options .separator
50
+ default : () => options .separator ,
49
51
},
50
52
prefix: {
51
53
type: String ,
52
- default : () => options .prefix
54
+ default : () => options .prefix ,
53
55
},
54
56
suffix: {
55
57
type: String ,
56
- default : () => options .suffix
57
- }
58
+ default : () => options .suffix ,
59
+ },
58
60
},
59
61
directives: {
60
- number: directive
62
+ number: directive,
61
63
},
62
- emits: [' update:modelValue' ,' input:modelValue' ],
64
+ emits: [' update:modelValue' , ' input:modelValue' ],
63
65
data () {
64
66
return {
65
67
maskedValue: this .modelValue ,
66
- unmaskedValue: null
68
+ unmaskedValue: null ,
67
69
}
68
70
},
69
71
methods: {
@@ -74,22 +76,22 @@ export default {
74
76
},
75
77
change () {
76
78
this .$emit (' update:modelValue' , this .emittedValue )
77
- }
79
+ },
78
80
},
79
81
computed: {
80
82
emittedValue () {
81
83
return this .masked ? this .maskedValue : this .unmaskedValue
82
84
},
83
85
config () {
84
86
return this .$props
85
- }
87
+ },
86
88
},
87
89
watch: {
88
- modelValue (val ) {
90
+ modelValue (val ) {
89
91
if (this .unmaskedValue !== val) {
90
92
this .maskedValue = val
91
93
}
92
- }
94
+ },
93
95
},
94
96
}
95
97
</script >
0 commit comments