mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Chore: replace var with let and const (#9774)
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
},
|
||||
computed: {
|
||||
barStyle() {
|
||||
var style = {};
|
||||
const style = {};
|
||||
style.width = this.percentage + '%';
|
||||
return style;
|
||||
},
|
||||
@@ -82,16 +82,16 @@
|
||||
return (this.strokeWidth / this.width * 100).toFixed(1);
|
||||
},
|
||||
trackPath() {
|
||||
var radius = parseInt(50 - parseFloat(this.relativeStrokeWidth) / 2, 10);
|
||||
const radius = parseInt(50 - parseFloat(this.relativeStrokeWidth) / 2, 10);
|
||||
|
||||
return `M 50 50 m 0 -${radius} a ${radius} ${radius} 0 1 1 0 ${radius * 2} a ${radius} ${radius} 0 1 1 0 -${radius * 2}`;
|
||||
},
|
||||
perimeter() {
|
||||
var radius = 50 - parseFloat(this.relativeStrokeWidth) / 2;
|
||||
const radius = 50 - parseFloat(this.relativeStrokeWidth) / 2;
|
||||
return 2 * Math.PI * radius;
|
||||
},
|
||||
circlePathStyle() {
|
||||
var perimeter = this.perimeter;
|
||||
const perimeter = this.perimeter;
|
||||
return {
|
||||
strokeDasharray: `${perimeter}px,${perimeter}px`,
|
||||
strokeDashoffset: (1 - this.percentage / 100) * perimeter + 'px',
|
||||
@@ -99,7 +99,7 @@
|
||||
};
|
||||
},
|
||||
stroke() {
|
||||
var ret;
|
||||
let ret;
|
||||
switch (this.status) {
|
||||
case 'success':
|
||||
ret = '#13ce66';
|
||||
|
||||
Reference in New Issue
Block a user