Conformance: fix Time Durationjs max Val and totalVal.
This commit is contained in:
@@ -80,9 +80,9 @@ export default {
|
|||||||
tUnits: {
|
tUnits: {
|
||||||
get() {
|
get() {
|
||||||
return {
|
return {
|
||||||
s: { dsp: 's', inc: 1, val: this.seconds, max: 60, rate: 1, min: 0 },
|
s: { dsp: 's', inc: 1, val: this.seconds, max: 59, rate: 1, min: 0 },
|
||||||
m: { dsp: 'm', inc: 1, val: this.minutes, max: 60, rate: 60, min: 0 },
|
m: { dsp: 'm', inc: 1, val: this.minutes, max: 59, rate: 60, min: 0 },
|
||||||
h: { dsp: 'h', inc: 1, val: this.hours, max: 24, rate: 3600, min: 0 },
|
h: { dsp: 'h', inc: 1, val: this.hours, max: 23, rate: 3600, min: 0 },
|
||||||
d: { dsp: 'd', inc: 1, val: this.days, max: this.maxDays, rate: 86400, min: this.minDays }
|
d: { dsp: 'd', inc: 1, val: this.days, max: this.maxDays, rate: 86400, min: this.minDays }
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -118,6 +118,7 @@ export default {
|
|||||||
handler: function(newValue, oldValue) {
|
handler: function(newValue, oldValue) {
|
||||||
this.maxTotal = newValue;
|
this.maxTotal = newValue;
|
||||||
newValue !== oldValue ? this.createData() : null;
|
newValue !== oldValue ? this.createData() : null;
|
||||||
|
// newValue !== oldValue ? this.secondToDate(this.maxTotal, 'min') : null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -263,6 +264,7 @@ export default {
|
|||||||
|
|
||||||
if(totalSeconds >= this.maxTotal){ // 大於最大值時要等於最大值
|
if(totalSeconds >= this.maxTotal){ // 大於最大值時要等於最大值
|
||||||
totalSeconds = this.maxTotal;
|
totalSeconds = this.maxTotal;
|
||||||
|
this.secondToDate(this.maxTotal, 'max');
|
||||||
} else if (totalSeconds <= this.minTotal) { // 小於最小值時要等於最小值
|
} else if (totalSeconds <= this.minTotal) { // 小於最小值時要等於最小值
|
||||||
totalSeconds = this.minTotal;
|
totalSeconds = this.minTotal;
|
||||||
this.secondToDate(this.minTotal, 'min');
|
this.secondToDate(this.minTotal, 'min');
|
||||||
|
|||||||
Reference in New Issue
Block a user