Browse Source

🌐 Update Chinese translation for `docs/zh/docs/tutorial/query-params.md` (#11242)

pull/11268/head
JackLee 1 year ago
committed by GitHub
parent
commit
4f20ca6a7c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 15
      docs/zh/docs/tutorial/query-params.md

15
docs/zh/docs/tutorial/query-params.md

@ -63,9 +63,18 @@ http://127.0.0.1:8000/items/?skip=20
通过同样的方式,你可以将它们的默认值设置为 `None` 来声明可选查询参数:
```Python hl_lines="7"
{!../../../docs_src/query_params/tutorial002.py!}
```
=== "Python 3.10+"
```Python hl_lines="7"
{!> ../../../docs_src/query_params/tutorial002_py310.py!}
```
=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial002.py!}
```
在这个例子中,函数参数 `q` 将是可选的,并且默认值为 `None`

Loading…
Cancel
Save