🐛 数据库数字填0无效

This commit is contained in:
Vanessa 2023-10-12 12:11:29 +08:00
parent 1b595d014a
commit a4bcae87ee

View File

@ -435,9 +435,9 @@ const updateCellValue = (protyle: IProtyle, type: TAVCol, cellElements: HTMLElem
};
if (type === "number") {
oldValue.content = parseFloat(oldValue.content as string);
oldValue.isNotEmpty = !!oldValue.content;
oldValue.isNotEmpty = typeof oldValue.content === "number" && !isNaN(oldValue.content);
inputValue.content = parseFloat(inputValue.content as string);
inputValue.isNotEmpty = !!inputValue.content;
inputValue.isNotEmpty = typeof inputValue.content === "number" && !isNaN(inputValue.content);
}
if (objEquals(inputValue, oldValue)) {
return;