diff --git a/src/modules/pages/maintain/forms/components/form.plugin.ts b/src/modules/pages/maintain/forms/components/form.plugin.ts index ae9646e..d36ba2c 100644 --- a/src/modules/pages/maintain/forms/components/form.plugin.ts +++ b/src/modules/pages/maintain/forms/components/form.plugin.ts @@ -11,24 +11,28 @@ export class FormPlugin extends BI.Widget { plugin: any; render() { - const { connectionType } = this.options.formData; - + const { connectionType, connectionId, connectionName, connectionData } = this.options.formData; + return { type: getPluginWidgetEdit(connectionType), ref: (_ref: any) => { this.plugin = _ref; }, - value: this.options.formData.connectionData, + value: connectionData, // 兼容 + connectionData, + connectionId, + connectionType, + connectionName, }; } public getSubmitValue(): Connection { - const { connectionType, connectionId, connectionName } = this.options.formData; - + const { connectionType, connectionId } = this.options.formData; + return { connectionId, connectionType, - connectionName, + connectionName: this.plugin.getName ? this.plugin.getName() : '', connectionData: this.plugin.getValue(), }; }