Browse Source

Merge pull request #39 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:alan to feature/10.0

* commit '3c8d1904ea3ef07e2764cf17c063fd23a12bde4d':
  feat: KERNEL-1222 加入url反解析功能
qufenxi
alan 5 years ago
parent
commit
e8642f2c6e
  1. 9
      src/modules/pages/maintain/forms/components/form.jdbc.ts

9
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -349,6 +349,15 @@ export class FormJdbc extends BI.Widget {
ref: (_ref: any) => { ref: (_ref: any) => {
this.form.url = _ref; this.form.url = _ref;
}, },
listeners: [{
eventName: 'EVENT_CHANGE',
action: () => {
const urlInfo = resolveUrlInfo(this.form.url.getValue());
this.form.host.setValue(urlInfo.host);
this.form.database.setValue(urlInfo.databaseName);
this.form.port.setValue(urlInfo.port);
},
}],
}], }],
}, },
{ {

Loading…
Cancel
Save