Config param time & datetime: Fix seconds support (#2863)
Signed-off-by: Florian Hotze <dev@florianhotze.com>pull/2865/head
parent
9e1a25df68
commit
3d0ac0b001
|
@ -25,7 +25,7 @@ export default {
|
|||
props: ['configDescription', 'value'],
|
||||
computed: {
|
||||
step () {
|
||||
if (this.configDescription.step !== undefined) return this.configDescription.step
|
||||
if (this.configDescription.stepsize !== undefined) return this.configDescription.stepsize
|
||||
return 60
|
||||
}
|
||||
},
|
||||
|
|
|
@ -64,7 +64,7 @@ export default {
|
|||
{
|
||||
values: (() => {
|
||||
let arr = []
|
||||
for (let i = 0; i <= 59; i = i + this.configDescription.step % 60) { arr.push(i < 10 ? `0${i}` : i) }
|
||||
for (let i = 0; i <= 59; i = i + this.configDescription.stepsize % 60) { arr.push(i < 10 ? `0${i}` : i) }
|
||||
return arr
|
||||
})()
|
||||
})
|
||||
|
@ -108,7 +108,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
hasSeconds () {
|
||||
return this.configDescription.step !== undefined && this.configDescription.step % 60 !== 0
|
||||
return this.configDescription.stepsize !== undefined && this.configDescription.stepsize % 60 !== 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue