mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
解决经验值为0时无法显示进度条的问题。
This commit is contained in:
@@ -277,6 +277,7 @@ export function experienceValue(total) {
|
||||
data.start = 'LV1';
|
||||
data.end = 'LV2';
|
||||
data.endValue = 600;
|
||||
if(total == 0){total = 1;}
|
||||
data.percentage = parseFloat((total / 600) * 100);
|
||||
} else if(total > 300 || total == 300 || total < 600){
|
||||
data.start = 'LV2';
|
||||
@@ -324,6 +325,8 @@ export function experienceValue(total) {
|
||||
data.endValue = 30000;
|
||||
data.percentage = parseFloat((total / 30000) * 100);
|
||||
}
|
||||
console.log("&&&&&&&&&&&&&&&&&&&&&&&");
|
||||
console.log(data);
|
||||
return data;
|
||||
}
|
||||
export function translate(field) {
|
||||
|
||||
Reference in New Issue
Block a user