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.

63 lines
1.6 KiB

import { shortcut, Widget, extend, emptyFn, createWidget } from "@/core";
import { TreeView, Asynctree } from "@/case";
@shortcut()
export class MultiSelectTreePopup extends Widget {
static xtype = "bi.multi_select_tree_popup";
static EVENT_AFTER_INIT = "EVENT_AFTER_INIT";
static EVENT_CHANGE = "EVENT_CHANGE";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
baseCls: "bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",
itemsCreator: emptyFn,
8 years ago
});
}
_init() {
super._init(...arguments);
const self = this,
o = this.options;
this.popup = createWidget({
type: Asynctree.xtype,
showLine: o.showLine,
8 years ago
element: this,
itemsCreator: o.itemsCreator,
8 years ago
});
this.popup.on(TreeView.EVENT_AFTERINIT, () => {
self.fireEvent(MultiSelectTreePopup.EVENT_AFTER_INIT);
8 years ago
});
this.popup.on(TreeView.EVENT_CHANGE, () => {
self.fireEvent(MultiSelectTreePopup.EVENT_CHANGE);
8 years ago
});
}
8 years ago
hasChecked() {
8 years ago
return this.popup.hasChecked();
}
8 years ago
getValue() {
8 years ago
return this.popup.getValue();
}
8 years ago
setValue(v) {
8 years ago
v || (v = {});
8 years ago
this.popup.setValue(v);
}
8 years ago
setSelectedValue(v) {
8 years ago
v || (v = {});
this.popup.setSelectedValue(v);
}
8 years ago
updateValue(v) {
this.popup.updateValue(v);
this.popup.refresh();
}
populate(config) {
8 years ago
this.popup.stroke(config);
}
}