File tree Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Original file line number Diff line number Diff line change 212
212
this .selfTriggered = false ;
213
213
return ;
214
214
}
215
- this.currentValue = this.getValue(values);
216
- this.handleValueChange();
215
+ if (values.length !== 0) {
216
+ this .currentValue = this .getValue (values );
217
+ this .handleValueChange ();
218
+ }
217
219
},
218
220
219
221
fillValues(type, start, end) {
Original file line number Diff line number Diff line change 94
94
95
95
created () {
96
96
this .$on (' slotValueChange' , this .slotValueChange );
97
- var slots = this .slots || [];
98
- var values = [];
99
- var valueIndexCount = 0 ;
100
- slots .forEach (slot => {
101
- if (! slot .divider ) {
102
- slot .valueIndex = valueIndexCount++ ;
103
- values[slot .valueIndex ] = (slot .values || [])[slot .defaultIndex || 0 ];
104
- }
105
- });
106
- this .values = values;
107
97
this .slotValueChange ();
108
98
},
109
99
132
122
getSlotValue (index ) {
133
123
var slot = this .getSlot (index);
134
124
if (slot) {
135
- return slot .value ;
125
+ return slot .currentValue ;
136
126
}
137
127
return null ;
138
128
},
175
165
get () {
176
166
var slots = this .slots || [];
177
167
var values = [];
178
- slots .forEach (function (slot ) {
179
- if (! slot .divider ) values .push (slot .value );
180
- });
181
-
182
- return values;
183
- },
184
- set (values ) {
185
- var slots = this .slots || [];
186
168
var valueIndexCount = 0 ;
187
- slots .forEach (function (slot ) {
188
- if (! slot .divider ) slot .value = values[valueIndexCount++ ];
169
+ slots .forEach (slot => {
170
+ if (! slot .divider ) {
171
+ slot .valueIndex = valueIndexCount++ ;
172
+ values[slot .valueIndex ] = (slot .values || [])[slot .defaultIndex || 0 ];
173
+ }
189
174
});
175
+ return values;
190
176
}
191
177
},
192
178
slotCount () {
You can’t perform that action at this time.
0 commit comments