Commit 835dd971 by 前端

处理NAN

1 parent 4f3f8878
......@@ -108,6 +108,9 @@ export default {
},
methods: {
toFixNum(val) {
if(!val){
return '0.0%'
}
return (val * 100).toFixed(1) + '%'
},
getMerchantData() {
......
......@@ -52,6 +52,9 @@ export default {
},
methods: {
toFixRatio(val) {
if(!val){
return '0.00%'
}
return (val * 100).toFixed(2) + '%'
},
toFixNum(val) {
......
......@@ -46,7 +46,10 @@ export default {
},
methods: {
toFixNum(val) {
return (val * 100).toFixed(1) + '%'
if(!val){
return '0.0%'
}
return (Number(val) * 100).toFixed(1) + '%'
},
getEnterpriseOverview() {
this.api.operational.getEnterpriseOverview().then(res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!