Merge pull request #131 from QingWei-Li/next

TimePicker: fix picker-options
pull/2/head
杨奕 2016-09-01 00:54:05 -05:00 committed by GitHub
commit 6d71acb078
1 changed files with 3 additions and 2 deletions

View File

@ -417,7 +417,6 @@ export default {
ranges = Array.isArray(ranges) ? ranges : [ranges]; ranges = Array.isArray(ranges) ? ranges : [ranges];
this.picker.selectableRange = ranges.map(range => parser(range, format)); this.picker.selectableRange = ranges.map(range => parser(range, format));
delete this.pickerOptions.selectableRange;
} }
if (this.type === 'time-select' && options) { if (this.type === 'time-select' && options) {
@ -427,7 +426,9 @@ export default {
} }
for (const option in options) { for (const option in options) {
if (options.hasOwnProperty(option)) { if (options.hasOwnProperty(option) &&
// time-picker
option !== 'selectableRange') {
this.picker[option] = options[option]; this.picker[option] = options[option];
} }
} }