add qfw
This commit is contained in:
@@ -47,7 +47,16 @@ const emit = defineEmits([
|
||||
"update:selectedKeys",
|
||||
"update:selectedKey",
|
||||
]);
|
||||
|
||||
function toThousands(num: number | string) {
|
||||
if(typeof num == "string"){
|
||||
num = parseFloat(num || '0')
|
||||
}
|
||||
let xs = num.toString().split(".")[1]
|
||||
let zs = num.toString().split(".")[0]
|
||||
let jg = (zs || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') + (xs ? "." + xs : "");
|
||||
console.log(jg)
|
||||
return jg;
|
||||
}
|
||||
const props = withDefaults(defineProps<TableRowProps>(), {
|
||||
checkbox: false,
|
||||
childrenColumnName: "children",
|
||||
@@ -606,7 +615,8 @@ const radioProps = props.getRadioProps(props.data, props.index);
|
||||
:content="data[column.key]"
|
||||
:isAutoShow="true"
|
||||
>
|
||||
{{ data[column.key] }}
|
||||
|
||||
{{ column.qfw ? toThousands(data[column.key]) : data[column.key] }}
|
||||
</lay-tooltip>
|
||||
<template v-else>
|
||||
<template v-if="column.edit">
|
||||
|
||||
Reference in New Issue
Block a user