openatc-components 0.1.199 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.1.199",
3
+ "version": "0.2.1",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -177,10 +177,16 @@ export default {
177
177
  let res = '0%'
178
178
  if (this.contrloCycle > 0) {
179
179
  let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
180
+ if (curPercent >= 1) {
181
+ curPercent = 1
182
+ }
180
183
  res = curPercent * 100 + '%'
181
184
  }
182
185
  if (this.cycles > 0) {
183
186
  let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
187
+ if (curPercent >= 1) {
188
+ curPercent = 1
189
+ }
184
190
  res = curPercent * 100 + '%'
185
191
  }
186
192
  return res