const classNamePreview = 'fr.plugin.redis.preview'; const RedisConstantName = 'dec.constant.database.conf.connect.form.redis.value'; const form = BI.Constants.getConstant(RedisConstantName); const Widget = BI.inherit(BI.Widget, { render() { return { type: 'bi.vertical', cls:'bi-plugin-redis', bgap:10, items: [ { type: 'bi.left', height: 30, items: [ { type: 'bi.label', text: '数据库地址:', height: 24, width: 115, textAlign: 'left', }, { type: 'bi.label', text:form.url, height: 24, }], }, { type: 'bi.left', height: 30, items: [ { type: 'bi.label', text: '端口:', height: 24, width: 115, textAlign: 'left', }, { type: 'bi.label', text:form.port, height: 24, }], }, { type: 'bi.left', height: 30, items: [ { type: 'bi.label', text: '密码:', height: 24, width: 115, textAlign: 'left', }, { type: 'bi.label', text:'********', height: 24, }], }, ], }; }, }); BI.shortcut(classNamePreview, Widget); BI.constant('dec.constant.database.conf.connect.form.redis.preview', classNamePreview);