Commit 766215fd authored by zhangwenshuai's avatar zhangwenshuai

修改百分比格式化

parent e004cf44
......@@ -95,8 +95,10 @@ export const SetFormatter = {
PERCENTAGE: (val, config) => {
val = `${val}`.replace('%', '');
if (!isNumber(val)) return emptyModel;
const { precision } = config || {}; // 设置单位
val = accDiv(val, 100);
return SetFormatter.NUMBER(val, config);
val = Number(val).toFixed(precision + 2);
return [{ value: val, text: val }];
},
DATE: (val, config) => {
if (!val) return emptyModel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment