add qfw
This commit is contained in:
parent
2839c0cf7a
commit
df4f650c44
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
lib/index.js
16
lib/index.js
File diff suppressed because one or more lines are too long
@ -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">
|
||||
|
File diff suppressed because one or more lines are too long
120
umd/index.js
120
umd/index.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user