mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-09 05:26:48 +00:00
📝 update api docs
This commit is contained in:
28
docs/api/dependencies.md
Normal file
28
docs/api/dependencies.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
contentSidebar: true
|
||||
sidebarDepth: 0
|
||||
---
|
||||
|
||||
# NoneBot.handler 模块
|
||||
|
||||
## 依赖注入处理模块
|
||||
|
||||
该模块实现了依赖注入的定义与处理。
|
||||
|
||||
|
||||
## `Depends(dependency=None, *, use_cache=True)`
|
||||
|
||||
|
||||
* **说明**
|
||||
|
||||
参数依赖注入装饰器
|
||||
|
||||
|
||||
|
||||
* **参数**
|
||||
|
||||
|
||||
* `dependency: Optional[Callable[..., Any]] = None`: 依赖函数。默认为参数的类型注释。
|
||||
|
||||
|
||||
* `use_cache: bool = True`: 是否使用缓存。默认为 `True`。
|
Reference in New Issue
Block a user