From aad60cbe9d9d5c85da1e405d9d3a2085d9e0e1e8 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Thu, 8 Apr 2021 11:39:16 +0800 Subject: [PATCH] =?UTF-8?q?DEC-18013=20fix:=20=E3=80=90=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E3=80=91=E6=9C=80=E6=96=B0redis=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=96=B0=E5=BB=BAredis?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=EF=BC=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=98=AFwidget7127=E8=BF=99=E7=A7=8D?= =?UTF-8?q?=E5=B8=A6=E9=9A=8F=E6=9C=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 71c9d39d9dcd46d72a53681f9e4f6f7dfb2f92e3) --- README.md | 16 +++++++++------- .../maintain/forms/components/form.plugin.ts | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1756d0c..cca899a 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,16 @@ yarn dev BI.config(ConstantPluginTyps, (datas: string[]) => [...datas, { text: 'Redis', databaseType: 'Redis', + edit: '', + show: '', }]); ``` ### 数据连接填写页面 -ConstantName名称为`dec.constant.database.conf.connect.form.${name}.edit`,值为组件shortcut的名称 +edit属性值为填写组件shortcut的名称 ### 数据连接展示页面 -ConstantName名称为`dec.constant.database.conf.connect.form.${name}.show`,值为组件shortcut的名称 +show属性值为组件shortcut的名称 ### 示例 ``` @@ -121,7 +123,7 @@ BI.shortcut(RedisShowName, RedisShow); const RedisEdit = BI.inherit(BI.Widget, { props: { - formData: { + value: { url: '', port: '6379', password: '', @@ -152,7 +154,7 @@ const RedisEdit = BI.inherit(BI.Widget, { ref: _ref => { this.url = _ref; }, - text: o.formData.url, + text: o.value.url, }, ], }, @@ -173,7 +175,7 @@ const RedisEdit = BI.inherit(BI.Widget, { ref: _ref => { this.port = _ref; }, - text: o.formData.port, + text: o.value.port, }, ], }, @@ -195,14 +197,14 @@ const RedisEdit = BI.inherit(BI.Widget, { ref: _ref => { this.password = _ref; }, - text: o.formData.password, + text: o.value.password, }, ], }, ], }; }, - getSubmitValue() { + getValue() { return { url: this.url.getValue(), port: this.port.getValue(), diff --git a/src/modules/pages/maintain/forms/components/form.plugin.ts b/src/modules/pages/maintain/forms/components/form.plugin.ts index d36ba2c..c9bce03 100644 --- a/src/modules/pages/maintain/forms/components/form.plugin.ts +++ b/src/modules/pages/maintain/forms/components/form.plugin.ts @@ -32,7 +32,7 @@ export class FormPlugin extends BI.Widget { return { connectionId, connectionType, - connectionName: this.plugin.getName ? this.plugin.getName() : '', + connectionName: this.plugin.getConnectionName ? this.plugin.getConnectionName() : '', connectionData: this.plugin.getValue(), }; }