帆软决策平台数据连接界面库
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.
 
 
 
 

61 lines
1.6 KiB

import './title.less';
import {WidgetType, IconButton, LeftRightVerticalAdapt, LinearSegment} from '@ui/index';
import Model from './title.model';
import {isDesigner, closeWindow} from '@shared/crud/crud.request';
import {TAB_LINK_SET, TAB_LINK_POOL} from '@private/constants';
const className = 'dec.dcm.title';
const Widget: WidgetType = {
props: {
baseCls: 'dec-webui-dcm-title bi-card bi-border-bottom',
},
_store() {
return BI.Models.getModel(Model);
},
render() {
const showCloseButton = isDesigner();
const that = this;
return {
type: LeftRightVerticalAdapt,
items: {
left: [
{
type: LinearSegment,
cls: 'bi-card',
height: 40,
width: 200,
items: [{
text: BI.i18nText('Dec-Dcm_Connection_Management'),
value: TAB_LINK_SET,
selected: true,
}, {
text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'),
value: TAB_LINK_POOL,
}],
listeners: [{
eventName: 'EVENT_CHANGE',
action () {
that.store.setTab(this.getValue()[0]);
},
}],
},
],
right: [
showCloseButton ? {
type: IconButton,
cls: 'close-ha-font',
width: 30,
height: 30,
rgap: 10,
handler() {
closeWindow();
},
} : null,
],
},
};
},
};
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
export default className;