refactor: 明细表数值格式优化
This commit is contained in:
parent
84890390b9
commit
61aa773a3f
@ -63,9 +63,11 @@ export function baseTableInfo(s2, container, chart, action, tableData) {
|
||||
return value
|
||||
} else {
|
||||
if (f.formatterCfg) {
|
||||
return valueFormatter(value, f.formatterCfg)
|
||||
const v = valueFormatter(value, f.formatterCfg)
|
||||
return v === 'NaN' ? value : v
|
||||
} else {
|
||||
return valueFormatter(value, formatterItem)
|
||||
const v = valueFormatter(value, formatterItem)
|
||||
return v === 'NaN' ? value : v
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -88,9 +90,11 @@ export function baseTableInfo(s2, container, chart, action, tableData) {
|
||||
return value
|
||||
} else {
|
||||
if (f.formatterCfg) {
|
||||
return valueFormatter(value, f.formatterCfg)
|
||||
const v = valueFormatter(value, f.formatterCfg)
|
||||
return v === 'NaN' ? value : v
|
||||
} else {
|
||||
return valueFormatter(value, formatterItem)
|
||||
const v = valueFormatter(value, formatterItem)
|
||||
return v === 'NaN' ? value : v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item v-if="chart.render === 'antv' && chart.type.includes('table')" icon="el-icon-notebook-2" divided :command="beforeClickItem('formatter')">
|
||||
<el-dropdown-item v-if="chart.render === 'antv' && chart.type.includes('table') && item.groupType === 'q'" icon="el-icon-notebook-2" divided :command="beforeClickItem('formatter')">
|
||||
<span>{{ $t('chart.value_formatter') }}...</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-edit-outline" divided :command="beforeClickItem('rename')">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user