更新 @kevisual/api 版本至 0.0.14,并在 QueryProxy 类中添加 getViewQuery 方法以获取视图查询

This commit is contained in:
2025-12-31 17:55:33 +08:00
parent 9532cfbe2e
commit 67169fc0c6
2 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@kevisual/api", "name": "@kevisual/api",
"version": "0.0.13", "version": "0.0.14",
"description": "", "description": "",
"main": "mod.ts", "main": "mod.ts",
"scripts": { "scripts": {

View File

@@ -326,6 +326,13 @@ export class QueryProxy {
} }
return routes; return routes;
} }
async getViewQuery(viewId: string) {
const view = this.views.find(v => v.id === viewId);
if (view) {
return view.query;
}
return undefined;
}
/** /**
* 运行路由 * 运行路由
* @param msg * @param msg