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.
 
 
 

51 lines
1.4 KiB

import { shortcut, Widget } from "@/core";
import { NumberInterval } from "@/widget";
@shortcut()
export class NumericalInterval extends Widget {
static xtype = "demo.number_interval";
props = { baseCls: "demo-exceltable" };
mounted() {
const numerical = this.numerical;
const label = this.label;
numerical.on(NumberInterval.EVENT_CONFIRM, () => {
const temp = numerical.getValue();
const res = `大于${temp.closemin ? "等于 " : " "}${temp.min} 小于${temp.closemax ? "等于 " : " "}${
temp.max
}`;
label.setValue(res);
});
}
render() {
const self = this;
return {
type: "bi.horizontal_auto",
items: [
{
type: "bi.number_interval",
ref(_ref) {
self.numerical = _ref;
},
width: 500,
value: {
max: 300,
closeMax: true,
closeMin: false,
},
},
{
type: "bi.label",
ref(_ref) {
self.label = _ref;
},
text: "显示结果",
}
],
vgap: 20,
};
}
}