mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-26 12:18:21 +00:00
event-dialog load schema
This commit is contained in:
parent
199ed2b9cd
commit
9d6db96b05
@ -5,21 +5,21 @@ import './index.scss';
|
|||||||
|
|
||||||
export default class EventBindDialog extends Component<PluginProps> {
|
export default class EventBindDialog extends Component<PluginProps> {
|
||||||
private eventList: any[] = [
|
private eventList: any[] = [
|
||||||
{
|
// {
|
||||||
name: 'getData',
|
// name: 'getData',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'deleteData',
|
// name: 'deleteData',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'initData',
|
// name: 'initData',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'editData',
|
// name: 'editData',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'submitData',
|
// name: 'submitData',
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
state: any = {
|
state: any = {
|
||||||
@ -41,10 +41,23 @@ export default class EventBindDialog extends Component<PluginProps> {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { editor, config } = this.props;
|
const { editor, config } = this.props;
|
||||||
editor.on(`${config.pluginKey}.openDialog`, (bindEventName: String) => {
|
editor.on(`${config.pluginKey}.openDialog`, (bindEventName: String) => {
|
||||||
this.openDialog(bindEventName);
|
this.openDialog(bindEventName);
|
||||||
|
|
||||||
|
let schema = editor.get('designer').project.getSchema();
|
||||||
|
let pageNode = schema.componentsTree[0];
|
||||||
|
if (pageNode.methods){
|
||||||
|
for (let key in pageNode.methods){
|
||||||
|
this.eventList.push({
|
||||||
|
name:key
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user