|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import {Left, WidgetType} from '@ui/index'; |
|
|
|
|
import {Left, WidgetType, IconButton} from '@ui/index'; |
|
|
|
|
import TitleItem from './title_item/title_item.component'; |
|
|
|
|
import {isDesigner, closeWindow} from '@shared/crud/crud.request'; |
|
|
|
|
const tabs = ['数据连接管理', '连接池状态']; |
|
|
|
|
const className = 'fr.title'; |
|
|
|
|
const Widget: WidgetType = { |
|
|
|
@ -7,14 +8,32 @@ const Widget: WidgetType = {
|
|
|
|
|
return { |
|
|
|
|
type: Left, |
|
|
|
|
cls: 'title', |
|
|
|
|
items: BI.map(tabs, (index: number, text: string) => { |
|
|
|
|
return { |
|
|
|
|
type: TitleItem, |
|
|
|
|
text, |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
items: [ |
|
|
|
|
...BI.map(tabs, (index: number, text: string) => { |
|
|
|
|
return { |
|
|
|
|
type: TitleItem, |
|
|
|
|
text, |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
{ |
|
|
|
|
type:IconButton, |
|
|
|
|
cls:'close-button', |
|
|
|
|
handler() { |
|
|
|
|
closeWindow(); |
|
|
|
|
}, |
|
|
|
|
invisible: true, |
|
|
|
|
ref: _ref => { |
|
|
|
|
this.CloseButton = _ref; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
if (isDesigner()) { |
|
|
|
|
this.CloseButton.setVisible(true); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
|
|
|
|
|
|
|
|
|