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, }; } }