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.
27 lines
648 B
27 lines
648 B
6 years ago
|
import {WidgetType, Vertical} from '@ui';
|
||
|
import leftModel from './left.model';
|
||
|
import {LinkType} from '@ui/type';
|
||
|
import {getLinks} from './left.service';
|
||
|
const className = 'fr.component.linkset.left';
|
||
|
let leftContent: any = null;
|
||
|
const Widget: WidgetType = {
|
||
|
_store() {
|
||
|
return BI.Models.getModel(leftModel);
|
||
|
},
|
||
|
watch:{
|
||
|
linkList(linkList: LinkType[]) {
|
||
|
leftContent.populate(BI.createItems(getLinks(linkList)));
|
||
|
},
|
||
|
},
|
||
|
render() {
|
||
|
return {
|
||
|
type: Vertical,
|
||
|
ref(_ref: any) {
|
||
|
leftContent = _ref;
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
};
|
||
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
|
||
|
export default className;
|