Skip to content

Commit

Permalink
fix autofill数值为0 的单元格显示为null
Browse files Browse the repository at this point in the history
  • Loading branch information
栾华亮 committed Oct 10, 2020
1 parent 72f8e22 commit 25ad562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Cell extends Context {
this.message = message;
}
handleNumber(val) {
if (val && !isNaN(Number(val))) {
if (val === 0 || (val && !isNaN(Number(val)))) {
return Number(val)
} else {
return val || null // number类型的空字符串处理为null
Expand Down

0 comments on commit 25ad562

Please sign in to comment.