fix: Issues #218, Time value Change done.
This commit is contained in:
@@ -63,6 +63,13 @@ export default {
|
||||
default: false,
|
||||
required: true,
|
||||
},
|
||||
value: {
|
||||
type: Number,
|
||||
required: false,
|
||||
validator(value) {
|
||||
return value >= 0;
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -200,6 +207,7 @@ export default {
|
||||
actionUpDown(input, goUp, selectIt = false) {
|
||||
const tUnit = input.dataset.tunit;
|
||||
let newVal = parseInt(input.value, 10);
|
||||
|
||||
newVal = isNaN(newVal) ? 0 : newVal;
|
||||
|
||||
// if (newVal <= 0 || newVal > this.tUnits[tUnit].max) {
|
||||
@@ -311,22 +319,28 @@ export default {
|
||||
*/
|
||||
async createData() {
|
||||
let size = this.size;
|
||||
|
||||
if (this.maxTotal !== await null && this.minTotal !== await null) {
|
||||
switch (size) {
|
||||
case 'max':
|
||||
this.secondToDate(this.minTotal, 'min');
|
||||
this.secondToDate(this.maxTotal, 'max');
|
||||
this.totalSeconds = this.maxTotal;
|
||||
this.totalSeconds = this.maxTotal;
|
||||
if(this.value !== null) {
|
||||
this.totalSeconds = this.value;
|
||||
this.secondToDate(this.value);
|
||||
}
|
||||
break;
|
||||
case 'min':
|
||||
this.secondToDate(this.maxTotal, 'max');
|
||||
this.secondToDate(this.minTotal, 'min');
|
||||
this.totalSeconds = this.minTotal;
|
||||
break;
|
||||
default:
|
||||
this.totalSeconds = this.minTotal;
|
||||
if(this.value !== null) {
|
||||
this.totalSeconds = this.value;
|
||||
this.secondToDate(this.value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
// this.$emit('total-seconds', this.totalSeconds);
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -357,7 +371,6 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user