|
|
@@ -1845,10 +1845,12 @@ var projectObj = {
|
|
|
let max = 0;
|
|
|
let total = 0;
|
|
|
let counter = 0;
|
|
|
+ let notNumber = false; //如果有非数字,则不显示
|
|
|
for (let col = selectedArea.col; col < (selectedArea.colCount + selectedArea.col); col++) {
|
|
|
for (let row = selectedArea.row; row < (selectedArea.rowCount + selectedArea.row); row++) {
|
|
|
const value = sheet.getCell(row, col).text();
|
|
|
if (!regular.test(value)) {
|
|
|
+ if(value) notNumber = true;
|
|
|
continue;
|
|
|
}
|
|
|
counter++;
|
|
|
@@ -1861,7 +1863,7 @@ var projectObj = {
|
|
|
}
|
|
|
}
|
|
|
// 如果不为0则悬浮显示
|
|
|
- if (total > 0 && counter > 1) {
|
|
|
+ if (notNumber === false && total > 0 && counter > 1) {
|
|
|
const div = $('<div id="total-tips"><p>合计: <input type="text" id="total" readonly="readonly" style="border: none;"/></p><p><a href="javascript:void(0);">复制</a></p></div>');
|
|
|
div.css({
|
|
|
position: "absolute",
|