Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit bb76395

Browse files
author
kaifei Hu
authored
Merge pull request #1366 from irisnet/develop
R4R: Fix unbonding percent error for pie component
2 parents b3e17f5 + ee097e3 commit bb76395

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

frontend/src/components/address/delegator/AddressInformationComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
if(res.label === "UnBonding"){
137137
res.value = item['unBonding'] || "--";
138138
res.numberValue = item['unBonding'] ? item['unBonding'].replace(/[^\d.]/g,"") : 0;
139-
res.percent = this.formatDecimalNumberToFixedNumber(res.numberValue,item.totalAmount.replace(/[^\d.]/g,""))
139+
res.percent = this.formatDecimalNumberToFixedNumber(item.totalAmount.replace(/[^\d.]/g,""),res.numberValue)
140140
}else {
141141
res.value = item[Tools.firstWordLowerCase(res.label)] || "--";
142142
res.numberValue = item[Tools.firstWordLowerCase(res.label)] ?

frontend/src/components/address/delegator/AddressInformationPie.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
}
2727
},
2828
watch:{
29-
echartData(){
30-
this.initCharts();
29+
echartData:{
30+
handler(newValue,oldValue){
31+
this.initCharts()
32+
},
33+
deep: true
3134
}
3235
},
3336
props:{
@@ -36,9 +39,9 @@
3639
}
3740
},
3841
mounted () {
39-
setTimeout(() => {
40-
this.initCharts();
41-
},400)
42+
// setTimeout(() => {
43+
// this.initCharts();
44+
// },400)
4245
},
4346
methods:{
4447
initCharts(){

0 commit comments

Comments
 (0)