第7-8-9章课程源码参考
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

74 lines
2.5 KiB

;(function () {
function resolvePath(path, isPublic) {
if (!path || path[0] !== '/') {
path = '/' + path;
}
return isPublic === true
? '/plugin/public/com.fr.plugin.7.mix.project' + path
: '/plugin/private/com.fr.plugin.7.mix.project' + path;
}
var IPTokenEditorPane = BI.inherit(BI.Widget, {
props: {
baseCls: "iptoken-table",
cType: "token",//可能有token 或者 ip两种
},
getValue: function () {
return {
userName:this.inputUserName.getValue(),
params2:this.inputIPOrToken.getValue()
}
},
render: function () {
var that = this;
var inputIPORTokenText="请输入ip"
if (this.options.cType === "token") {
inputIPORTokenText="请输入Token"
}
return {
type: "bi.vtape",
vgap: 10,
height: 200,
items: [
{
height: 20,
type: "bi.horizontal_adapt",
columnSize: [140, "fill"],
items: [{
type: "bi.label",
text: "输入用户名:",
}, {
type: "bi.text_editor",
watermark: "这个不允许为空",
allowBlank: false,
ref:function (e){
that.inputUserName=e;
},
errorText: "非空!",
}]
},
{
height: 20,
type: "bi.horizontal_adapt",
columnSize: [140, "fill"],
items: [{
type: "bi.label",
text: inputIPORTokenText,
}, {
type: "bi.text_editor",
watermark: "这个不允许为空",
allowBlank: false,
ref:function (e){
that.inputIPOrToken=e;
},
errorText: "非空!",
}]
}
]
}
}
});
BI.shortcut("bi.add.userTokenOrIp", IPTokenEditorPane);
})();