Skip to content

Commit 439aea7

Browse files
authored
feat:Modify the output code of static data source (opentiny#1634)
1 parent 91adc98 commit 439aea7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/canvas/render/src/builtin/CanvasCollection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ return new Promise((resolve, reject) => {
183183
this.dataSourceMap.${sourceName}.load().then((res) => {
184184
// 如果按照数据源面板的建议格式编写dataHandler
185185
// 那么dataSourceMap的res格式应该是:{ code: string, msg: string, data: {items: any[], total: number} }
186-
resolve({ result: res?.data?.items || res?.data, page: { total: res?.data?.total || res?.total || res.data.length } });
186+
resolve({ result: res?.data?.items || res?.data?.data || res?.data, page: { total: res?.data?.total || res?.data?.data?.length || res?.data?.length } });
187187
});
188188
});
189189
}`

0 commit comments

Comments
 (0)