Browse Source

update demo

release/10.0
zsmj1994 4 years ago
parent
commit
bb96a1920a
  1. 39
      README.md

39
README.md

@ -36,18 +36,20 @@ ConstantName名称为`dec.constant.database.conf.connect.form.${name}.show`,
### 示例 ### 示例
``` ```
const ConstantRedisType = 'dec.constant.database.conf.connect.types'; const DataBaseConfigProvider = 'dec.connection.provider.datebase';
const ConstantRedisShow = 'dec.constant.database.conf.connect.form.Redis.show';
const ConstantRedisEdit = 'dec.constant.database.conf.connect.form.Redis.edit'; const RedisShowName = 'dec.dcm.connection.plugin.redis.show';
const RedisEditName = 'dec.dcm.connection.plugin.redis.edit';
BI.DOM.ready(() => { BI.config(DataBaseConfigProvider, function (provider) {
BI.config(ConstantRedisType, datas => [...datas, { provider.registerDatabaseType({
text: 'Redis', text: "Redis",
databaseType: 'Redis', databaseType: "Redis",
}]); edit: "dec.dcm.connection.plugin.demo.edit",
show: "dec.dcm.connection.plugin.demo.show",
});
});
const RedisShowName = 'dec.dcm.connection.plugin.redis.show'; const RedisShow = BI.inherit(BI.Widget, {
const RedisShow = BI.inherit(BI.Widget, {
props: { props: {
formData: { formData: {
url: '', url: '',
@ -114,14 +116,10 @@ BI.DOM.ready(() => {
], ],
}; };
}, },
}); });
BI.shortcut(RedisShowName, RedisShow);
BI.shortcut(RedisShowName, RedisShow);
BI.constant(ConstantRedisShow, RedisShowName);
const RedisEditName = 'dec.dcm.connection.plugin.redis.edit'; const RedisEdit = BI.inherit(BI.Widget, {
const RedisEdit = BI.inherit(BI.Widget, {
props: { props: {
formData: { formData: {
url: '', url: '',
@ -211,10 +209,7 @@ BI.DOM.ready(() => {
password: this.password.getValue(), password: this.password.getValue(),
}; };
}, },
});
BI.shortcut(RedisEditName, RedisEdit);
BI.constant(ConstantRedisEdit, RedisEditName);
}); });
BI.shortcut(RedisEditName, RedisEdit);
``` ```
Loading…
Cancel
Save