mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix
This commit is contained in:
parent
9a0a448778
commit
2d64a839ac
@ -2,4 +2,8 @@
|
||||
|
||||
[https://yuque.antfin-inc.com/ali-lowcode/docs/ip4awq](插件开发文档)。
|
||||
|
||||
本地开发需要在 v14.4.0 的 node 环境下进行。
|
||||
[lowcode 组件库文档](https://fusion.alibaba-inc.com/22117/design/style/icon?themeid=4579)。
|
||||
|
||||
[搭建协议](https://yuque.antfin-inc.com/mo/spec/spec-low-code-building-schema)。
|
||||
|
||||
本地开发需要在 v14.4.0 的 node 环境下能完成 setup
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-datasource-pane",
|
||||
"version": "0.1.0-beta.3",
|
||||
"version": "0.1.0-beta.6",
|
||||
"description": "低代码引擎数据源面板",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alib/build-scripts": "^0.1.3",
|
||||
"@ali/lowcode-editor-setters": "^1.0.7-0",
|
||||
"@ali/lowcode-editor-setters": "^1.0.8-0",
|
||||
"@alifd/next": "^1.20.28",
|
||||
"@formily/next": "^1.3.2",
|
||||
"@formily/next-components": "^1.3.2",
|
||||
@ -43,7 +43,7 @@
|
||||
"styled-components": "^5.2.0",
|
||||
"traverse": "^0.6.6"
|
||||
},
|
||||
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-plugin-datasource-pane@0.1.0-beta.1/build/index.html",
|
||||
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-plugin-datasource-pane@0.1.0-beta.6/build/index.html",
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npm.alibaba-inc.com"
|
||||
}
|
||||
|
||||
@ -120,10 +120,10 @@ export default class DataSourcePanePlugin extends PureComponent<DataSourcePanePr
|
||||
|
||||
// @TODO 姿势是否最优?
|
||||
if (editor.get('designer')) {
|
||||
const docSchema = editor.get('designer').project.currentDocument.schema;
|
||||
const docSchema = editor.get('designer').project.getSchema();
|
||||
_set(docSchema, 'componentsTree[0].dataSource', schema);
|
||||
editor.get('designer').project.currentDocument.import(docSchema);
|
||||
console.log('editor schema', editor.get('designer').schema);
|
||||
editor.get('designer').project.load(docSchema, true);
|
||||
// console.log('check datasorce save result', editor.get('designer').project.getSchema());
|
||||
}
|
||||
};
|
||||
|
||||
@ -133,13 +133,13 @@ export default class DataSourcePanePlugin extends PureComponent<DataSourcePanePr
|
||||
|
||||
if (!active) return null;
|
||||
|
||||
const defaultSchema = editor.get('designer').project?.currentDocument?.schema?.dataSource ?? {};
|
||||
const projectSchema = editor.get('designer').project.getSchema() ?? {};
|
||||
|
||||
return (
|
||||
<DataSourcePane
|
||||
importPlugins={BUILTIN_IMPORT_PLUGINS.concat(importPlugins)}
|
||||
dataSourceTypes={BUILTIN_DATASOURCE_TYPES.concat(dataSourceTypes)}
|
||||
defaultSchema={defaultSchema}
|
||||
defaultSchema={_get(projectSchema, 'componentsTree[0].dataSource')}
|
||||
onSchemaChange={this.handleSchemaChange}
|
||||
/>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user