We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a76cb0 commit eb65ddfCopy full SHA for eb65ddf
docs/backend/reference/pk.md
@@ -63,10 +63,10 @@ ID 作为主键的默认声明方式=={.note}
63
64
当后端 api 返回长整数时,返回结果是没有问题的,但是通过前端组件渲染为 table 等数据之后,可能导致长整数渲染错误。
65
66
- 通过控制台可以发现,数据 id 与返回数据不一致,最佳解决方法是:后端将长整数序列化为字符串之后再返回,例如:
+ 通过浏览器控制台打印可以发现,前端渲染后的数据 id 与返回数据不一致,最佳解决方法是:后端将长整数序列化为字符串之后再返回,例如:
67
68
```python
69
- # 在所有定义返回数据的 schema 中添加字段序列化器
+ # 在 schemaBase 或返回数据 schema 中添加以下字段序列化器
70
@field_serializer("id")
71
def serialize_id(self, value) -> str:
72
return str(value)
0 commit comments