Commit bcf09be74478736aee367b6f79a2e8d0c3b0459d
1 parent
71b68751
fix handlePick and remove console.log
removed if/else related to b52e02e4367002c01d04793c2e8059965aa26b80
Showing
2 changed files
with
2 additions
and
9 deletions
Show diff stats
src/components/date-picker/panel/Date/date-range.vue
src/components/date-picker/panel/Date/date.vue
... | ... | @@ -168,18 +168,12 @@ |
168 | 168 | this.pickerTable = this.getTableType(this.currentView); |
169 | 169 | }, |
170 | 170 | handlePick (value) { |
171 | - const {selectionMode, panelDate, pickerType} = this; | |
171 | + const {selectionMode, panelDate} = this; | |
172 | 172 | if (selectionMode === 'year') value = new Date(value.getFullYear(), 0, 1); |
173 | 173 | else if (selectionMode === 'month') value = new Date(panelDate.getFullYear(), value.getMonth(), 1); |
174 | 174 | else value = new Date(value); |
175 | 175 | |
176 | - if (pickerType === selectionMode){ | |
177 | - this.$emit('on-pick', value); | |
178 | - } else { | |
179 | - this.selectionMode | |
180 | - } | |
181 | - | |
182 | - | |
176 | + this.$emit('on-pick', value); | |
183 | 177 | }, |
184 | 178 | }, |
185 | 179 | }; | ... | ... |