描述如何使用数据源配置

This commit is contained in:
2025-07-30 23:53:52 +08:00
parent 1e5982af87
commit cc1245d25a

View File

@@ -39,10 +39,14 @@ export interface ScreenDesignTimeConfig {
[name: string]: any;
};
data: any; // 组件数据
// 数据源配置
// 如何使用提供编辑器给用户编写查询内容允许使用mustache模板语法
// 来引用全局变量,且支持路径访问。
// 例如:现有全局变量 user ,内容是 { id: '1', name: 'zhangsan' }
// 则可以使用 {{ user.id }} 来引用 user.id ,即 '1'
dataSource: {
variableNames: Array<string>; // 关联的全局变量名称
type: "static" | "variable" | "api" | "graphql";
// 数据源配置
config: {
value?: any;
api?: {