mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 09:41:57 +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> {
|
||||
private eventList: any[] = [
|
||||
{
|
||||
name: 'getData',
|
||||
},
|
||||
{
|
||||
name: 'deleteData',
|
||||
},
|
||||
{
|
||||
name: 'initData',
|
||||
},
|
||||
{
|
||||
name: 'editData',
|
||||
},
|
||||
{
|
||||
name: 'submitData',
|
||||
},
|
||||
// {
|
||||
// name: 'getData',
|
||||
// },
|
||||
// {
|
||||
// name: 'deleteData',
|
||||
// },
|
||||
// {
|
||||
// name: 'initData',
|
||||
// },
|
||||
// {
|
||||
// name: 'editData',
|
||||
// },
|
||||
// {
|
||||
// name: 'submitData',
|
||||
// },
|
||||
];
|
||||
|
||||
state: any = {
|
||||
@ -41,10 +41,23 @@ export default class EventBindDialog extends Component<PluginProps> {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
componentDidMount() {
|
||||
const { editor, config } = this.props;
|
||||
editor.on(`${config.pluginKey}.openDialog`, (bindEventName: String) => {
|
||||
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