修复保存是,会将null转为字符串存入

This commit is contained in:
aixianling
2023-03-15 11:02:23 +08:00
parent 9b947b64dc
commit adc58b3e0d

View File

@@ -28,7 +28,7 @@ const insert = ({table, form}) => {
v = JSON.stringify(v)
v = v.replace(/(')/g, "\\$1")
}
}
} else v = ''
return `${e}='${v}'`
})
sql = `update ${table} set ${arr.join(",")} where id='${form.id}'`