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.
52 lines
1.3 KiB
52 lines
1.3 KiB
import {WidgetType, SearchEditor, Left, Vtape, VerticalAdapt} from '@ui/index'; |
|
import {DATA_BASE_TYPE_OTHER} from '@private/constants'; |
|
import MoreLinkItem from './item/more_link_item'; |
|
import ModelName from './more_link.model'; |
|
const className = 'dec.dcm.component.linkSet.morelink'; |
|
const Widget: WidgetType = { |
|
_store() { |
|
return BI.Models.getModel(ModelName); |
|
}, |
|
render() { |
|
return { |
|
type: Vtape, |
|
items: [ |
|
{ |
|
el: { |
|
type: VerticalAdapt, |
|
items: [{ |
|
type: SearchEditor, |
|
width: 300, |
|
watermark: BI.i18nText('Dec-Dcm_Search'), |
|
}], |
|
}, |
|
height: 30, |
|
}, |
|
{ |
|
type: Left, |
|
scrolly: true, |
|
tgap: 2, |
|
rgap: 2, |
|
bgap: 2, |
|
lgap: 2, |
|
items: this._createItems(), |
|
}, |
|
], |
|
}; |
|
}, |
|
_createItems() { |
|
return BI.map(DATA_BASE_TYPE_OTHER, (index: number, item) => { |
|
return { |
|
type: MoreLinkItem, |
|
text: item.text, |
|
name: item.databaseType, |
|
handler: () => { |
|
this.store.setOtherSelected(item.text); |
|
this.fireEvent('EVENT_SELECT', item.text); |
|
}, |
|
}; |
|
}); |
|
}, |
|
}; |
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
|
export default className;
|
|
|