提交 65915423 编写于 作者: huangwensu's avatar huangwensu

学习人数保留一位小数点

上级 91c79100
......@@ -34,9 +34,9 @@ export default {
computed: {
newStudyNum: function() {
if(this.studyNum > 1000 && this.studyNum < 10000) {
return (this.studyNum / 1000 + 'K');
return ((Math.round((this.studyNum / 1000) * 10) / 10) + 'K');
}else if(this.studyNum > 10000) {
return (this.studyNum / 10000 + 'W');
return ((Math.round((this.studyNum / 10000) * 10) / 10) + 'W');
}else {
return this.studyNum;
}
......@@ -44,7 +44,7 @@ export default {
},
created() {},
mounted() {
},
methods: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册