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

50 lines
1.3 KiB

import './title.less';
import {WidgetType, IconButton, LeftRightVerticalAdapt} from '@ui/index';
import TitleItem from './item/title_item';
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',
},
render() {
const hideCloseButton = isDesigner();
return {
type: LeftRightVerticalAdapt,
items: {
left: [
{
type: TitleItem,
cls: 'title-item-selected',
text: BI.i18nText('Dec-Dcm_Connection_Management'),
value: TAB_LINK_SET,
},
{
type: TitleItem,
text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'),
value: TAB_LINK_POOL,
},
],
right: [
{
type: IconButton,
cls: 'close-ha-font',
invisible: !hideCloseButton,
width: 30,
height: 30,
rgap: 10,
handler() {
closeWindow();
},
},
],
},
};
},
};
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
export default className;