fix number
This commit is contained in:
parent
38fb21a80f
commit
a4291f1361
@ -1207,7 +1207,11 @@ const _sfc_main = defineComponent({
|
|||||||
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
||||||
Object.keys(item).forEach((name) => {
|
Object.keys(item).forEach((name) => {
|
||||||
if (tableColumn.key === name) {
|
if (tableColumn.key === name) {
|
||||||
|
if (tableColumn.valueType == "str") {
|
||||||
info[name] = item[name];
|
info[name] = item[name];
|
||||||
|
} else {
|
||||||
|
info[name] = isNaN(Number(item[name])) ? item[name] : Number(item[name]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (tableColumn.type == "number") {
|
if (tableColumn.type == "number") {
|
||||||
|
@ -40034,7 +40034,11 @@ const _sfc_main$D = defineComponent({
|
|||||||
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
||||||
Object.keys(item).forEach((name) => {
|
Object.keys(item).forEach((name) => {
|
||||||
if (tableColumn.key === name) {
|
if (tableColumn.key === name) {
|
||||||
|
if (tableColumn.valueType == "str") {
|
||||||
info[name] = item[name];
|
info[name] = item[name];
|
||||||
|
} else {
|
||||||
|
info[name] = isNaN(Number(item[name])) ? item[name] : Number(item[name]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (tableColumn.type == "number") {
|
if (tableColumn.type == "number") {
|
||||||
|
@ -453,7 +453,11 @@ const exportData = () => {
|
|||||||
// if (rowspan != 0 && colspan != 0) {
|
// if (rowspan != 0 && colspan != 0) {
|
||||||
// tableStr += `<td colspan=${colspan} rowspan=${rowspan}${tableColumn.valueType == 'str' ? ' x:str' : ''}>${item[name] || ''}</td>`;
|
// tableStr += `<td colspan=${colspan} rowspan=${rowspan}${tableColumn.valueType == 'str' ? ' x:str' : ''}>${item[name] || ''}</td>`;
|
||||||
// }
|
// }
|
||||||
|
if(tableColumn.valueType == "str"){
|
||||||
info[name] = item[name]
|
info[name] = item[name]
|
||||||
|
}else{
|
||||||
|
info[name] = isNaN(Number(item[name])) ? item[name] : Number(item[name])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
60
umd/index.js
60
umd/index.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user