fineui是帆软报表和BI产品线所使用的前端框架。
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.

35 lines
942 B

7 years ago
/*
Created by dailer on 2017 / 7 / 21.
*/
Demo.FileManager = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var editor = BI.createWidget({
type: "bi.number_editor",
validationChecker: function (v) {
7 years ago
return BI.parseFloat(v) <= 100 && BI.parseFloat(v) >= 0;
7 years ago
},
height: 24,
width: 150,
errorText: "hahah"
});
editor.on(BI.NumberEditor.EVENT_CHANGE, function () {
if (BI.parseFloat(this.getValue()) < 1) {
editor.setDownEnable(false);
} else {
editor.setDownEnable(true);
}
});
return {
type: "bi.vertical",
items: [{
el: editor,
height: 24
}]
7 years ago
};
7 years ago
}
});
BI.shortcut("demo.number_editor", Demo.FileManager);