Skip to content

Commit eb65ddf

Browse files
committed
update docs
1 parent 7a76cb0 commit eb65ddf

File tree

1 file changed

+2
-2
lines changed
  • docs/backend/reference

1 file changed

+2
-2
lines changed

docs/backend/reference/pk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ ID 作为主键的默认声明方式=={.note}
6363

6464
当后端 api 返回长整数时,返回结果是没有问题的,但是通过前端组件渲染为 table 等数据之后,可能导致长整数渲染错误。
6565

66-
通过控制台可以发现,数据 id 与返回数据不一致,最佳解决方法是:后端将长整数序列化为字符串之后再返回,例如:
66+
通过浏览器控制台打印可以发现,前端渲染后的数据 id 与返回数据不一致,最佳解决方法是:后端将长整数序列化为字符串之后再返回,例如:
6767

6868
```python
69-
# 在所有定义返回数据的 schema 中添加字段序列化器
69+
# 在 schemaBase 或返回数据 schema 中添加以下字段序列化器
7070
@field_serializer("id")
7171
def serialize_id(self, value) -> str:
7272
return str(value)

0 commit comments

Comments
 (0)