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.
|
|
|
import { Element } from './element';
|
|
|
|
|
|
|
|
BI.Element = Element;
|
|
|
|
BI.Element.renderEngine = {
|
|
|
|
createElement: (widget) => {
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
if (BI.isWidget(widget)) {
|
|
|
|
var o = widget.options;
|
|
|
|
if (o.element instanceof Element) {
|
|
|
|
return o.element;
|
|
|
|
}
|
|
|
|
if (typeof o.element === 'string' && o.element !== 'body') {
|
|
|
|
o.root = false;
|
|
|
|
return new Element(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (o.root === true) {
|
|
|
|
return new Element();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
if (BI.isString(widget)) {
|
|
|
|
return new Element(widget);
|
|
|
|
}
|
|
|
|
return new Element(widget);
|
|
|
|
},
|
|
|
|
|
|
|
|
createFragment() {
|
|
|
|
return new Element();
|
|
|
|
}
|
|
|
|
}
|