|
|
|
@ -36,17 +36,19 @@ ConstantName名称为`dec.constant.database.conf.connect.form.${name}.show`,
|
|
|
|
|
|
|
|
|
|
### 示例 |
|
|
|
|
``` |
|
|
|
|
const ConstantRedisType = 'dec.constant.database.conf.connect.types'; |
|
|
|
|
const ConstantRedisShow = 'dec.constant.database.conf.connect.form.Redis.show'; |
|
|
|
|
const ConstantRedisEdit = 'dec.constant.database.conf.connect.form.Redis.edit'; |
|
|
|
|
|
|
|
|
|
BI.DOM.ready(() => { |
|
|
|
|
BI.config(ConstantRedisType, datas => [...datas, { |
|
|
|
|
text: 'Redis', |
|
|
|
|
databaseType: 'Redis', |
|
|
|
|
}]); |
|
|
|
|
const DataBaseConfigProvider = 'dec.connection.provider.datebase'; |
|
|
|
|
|
|
|
|
|
const RedisShowName = 'dec.dcm.connection.plugin.redis.show'; |
|
|
|
|
const RedisEditName = 'dec.dcm.connection.plugin.redis.edit'; |
|
|
|
|
BI.config(DataBaseConfigProvider, function (provider) { |
|
|
|
|
provider.registerDatabaseType({ |
|
|
|
|
text: "Redis", |
|
|
|
|
databaseType: "Redis", |
|
|
|
|
edit: "dec.dcm.connection.plugin.demo.edit", |
|
|
|
|
show: "dec.dcm.connection.plugin.demo.show", |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const RedisShow = BI.inherit(BI.Widget, { |
|
|
|
|
props: { |
|
|
|
|
formData: { |
|
|
|
@ -115,12 +117,8 @@ BI.DOM.ready(() => {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.shortcut(RedisShowName, RedisShow); |
|
|
|
|
BI.constant(ConstantRedisShow, RedisShowName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const RedisEditName = 'dec.dcm.connection.plugin.redis.edit'; |
|
|
|
|
const RedisEdit = BI.inherit(BI.Widget, { |
|
|
|
|
props: { |
|
|
|
|
formData: { |
|
|
|
@ -212,9 +210,6 @@ BI.DOM.ready(() => {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.shortcut(RedisEditName, RedisEdit); |
|
|
|
|
BI.constant(ConstantRedisEdit, RedisEditName); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
``` |