提交 b50af34e 编写于 作者: tony001's avatar tony001

调整数值框 app-span

上级 a2c305e0
...@@ -192,11 +192,6 @@ export default class AppSpan extends Vue { ...@@ -192,11 +192,6 @@ export default class AppSpan extends Vue {
this.text = ''; this.text = '';
}else if(this.dataType){ }else if(this.dataType){
this.dataFormat(); this.dataFormat();
if(this.valueFormat){
this.dateFormat();
}else{
this.text = this.value;
}
}else{ }else{
this.text = this.value; this.text = this.value;
} }
...@@ -211,12 +206,14 @@ export default class AppSpan extends Vue { ...@@ -211,12 +206,14 @@ export default class AppSpan extends Vue {
*/ */
public dataFormat(){ public dataFormat(){
if(this.valueFormat){ if(this.valueFormat){
return ; this.dateFormat() ;
return;
} }
let number:any = Number(this.value); if(Object.is(this.dataType,"CURRENCY")){
if(Object.is(this.dataType,"CURRENCY")){ let number:any = Number(this.value);
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName; this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){ }else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
this.text = number.toFixed(this.precision); this.text = number.toFixed(this.precision);
}else { }else {
this.text = this.value; this.text = this.value;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册