mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 01:45:53 +00:00
25 lines
328 B
Markdown
25 lines
328 B
Markdown
|
---
|
||
|
title: Actions - 操作方法
|
||
|
group:
|
||
|
order: 2
|
||
|
title: 概念
|
||
|
---
|
||
|
|
||
|
# Actions - 操作方法
|
||
|
|
||
|
与 resourcer.registerAction 用法一致
|
||
|
|
||
|
```ts
|
||
|
export async function get(ctx, next) {
|
||
|
await next();
|
||
|
}
|
||
|
|
||
|
export const list = {
|
||
|
filter,
|
||
|
fields, // 初始化的参数
|
||
|
async handler(ctx, next) {
|
||
|
await next();
|
||
|
}
|
||
|
}
|
||
|
```
|