2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-23 08:30:36 +03:00

添加自定义time-picker-option

This commit is contained in:
mxie
2018-05-02 16:01:26 +08:00
parent 814b715e84
commit 59ee0a5ed7
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -134,6 +134,9 @@ export default {
if (!options) { if (!options) {
return [] return []
} }
if (typeof options === 'function') {
return options() || []
}
const start = parseTime(options.start) const start = parseTime(options.start)
const end = parseTime(options.end) const end = parseTime(options.end)
const step = parseTime(options.step) const step = parseTime(options.step)
+2 -2
View File
@@ -123,9 +123,9 @@ export default {
validator: val => val >= 0 && val <= 60 validator: val => val >= 0 && val <= 60
}, },
timePickerOptions: { timePickerOptions: {
type: Object, type: [Object, Function],
default () { default () {
return {} return null
} }
}, },
confirm: { confirm: {