|
|
@ -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 TitleItem from './title_item/title_item.component'; |
|
|
|
|
|
|
|
import {isDesigner, closeWindow} from '@shared/crud/crud.request'; |
|
|
|
const tabs = ['数据连接管理', '连接池状态']; |
|
|
|
const tabs = ['数据连接管理', '连接池状态']; |
|
|
|
const className = 'fr.title'; |
|
|
|
const className = 'fr.title'; |
|
|
|
const Widget: WidgetType = { |
|
|
|
const Widget: WidgetType = { |
|
|
@ -7,14 +8,32 @@ const Widget: WidgetType = { |
|
|
|
return { |
|
|
|
return { |
|
|
|
type: Left, |
|
|
|
type: Left, |
|
|
|
cls: 'title', |
|
|
|
cls: 'title', |
|
|
|
items: BI.map(tabs, (index: number, text: string) => { |
|
|
|
items: [ |
|
|
|
|
|
|
|
...BI.map(tabs, (index: number, text: string) => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
type: TitleItem, |
|
|
|
type: TitleItem, |
|
|
|
text, |
|
|
|
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)); |
|
|
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
|
|
|
|
|
|
|
|
|
|
|