File tree 1 file changed +14
-24
lines changed
1 file changed +14
-24
lines changed Original file line number Diff line number Diff line change 53
53
isDecrementAllowed: true,
54
54
isIncrementAllowed: true,
55
55
increment() {
56
- if(this.minValue !== 0 && this.maxValue !== 0) {
57
- if(this.state < this.maxValue && this.state >= this.minValue){
58
- this.state++
59
- $wire.$refresh()
60
- if(this.state == this.maxValue){
61
- this.isIncrementAllowed = false
62
- } else {
63
- this.isIncrementAllowed = true
64
- this.isDecrementAllowed = true
65
- }
66
- }
67
- } else {
56
+ if(this.state < this.maxValue && this.state >= this.minValue){
68
57
this.state++
69
58
$wire.$refresh()
59
+ if(this.state == this.maxValue){
60
+ this.isIncrementAllowed = false
61
+ } else {
62
+ this.isIncrementAllowed = true
63
+ this.isDecrementAllowed = true
64
+ }
70
65
}
71
66
},
72
67
decrement() {
73
- if(this.minValue !== 0 && this.maxValue !== 0) {
74
- if(this.state > 0 && this.state <= this.maxValue && this.state > this.minValue) {
75
- this.state--
76
- $wire.$refresh()
77
- if(this.state == this.minValue){
78
- this.isDecrementAllowed = false
79
- } else {
80
- this.isIncrementAllowed = true
81
- this.isDecrementAllowed = true
82
- }
83
- }
84
- } else {
68
+ if(this.state > 0 && this.state <= this.maxValue && this.state > this.minValue) {
85
69
this.state--
86
70
$wire.$refresh()
71
+ if(this.state == this.minValue){
72
+ this.isDecrementAllowed = false
73
+ } else {
74
+ this.isIncrementAllowed = true
75
+ this.isDecrementAllowed = true
76
+ }
87
77
}
88
78
},
89
79
}"
You can’t perform that action at this time.
0 commit comments