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.
82 lines
1.7 KiB
82 lines
1.7 KiB
6 years ago
|
import {WidgetType, Left, Label, Icon} from '@ui';
|
||
|
import LeftItemModel from './left.item.model';
|
||
|
const className = 'fr.component.linkSet.left.item';
|
||
|
const Widget: WidgetType = {
|
||
|
props: {
|
||
|
title:'',
|
||
|
id:'',
|
||
|
creator: '',
|
||
|
},
|
||
|
_store() {
|
||
|
return BI.Models.getModel(LeftItemModel);
|
||
|
},
|
||
|
render() {
|
||
|
const {title, extraCls} = this.options;
|
||
|
|
||
|
return {
|
||
|
type: Left,
|
||
|
cls: 'left-item',
|
||
|
extraCls,
|
||
|
items: [
|
||
|
{
|
||
|
type: Icon,
|
||
|
cls: 'link-font',
|
||
|
height: 24,
|
||
|
width: 26,
|
||
|
text: '连接',
|
||
|
title,
|
||
|
},
|
||
|
{
|
||
|
type: Label,
|
||
|
textAlign: 'left',
|
||
|
text: title,
|
||
|
title,
|
||
|
},
|
||
|
{
|
||
|
type: Left,
|
||
|
cls: 'icons',
|
||
|
items: [
|
||
|
{
|
||
|
type: Icon,
|
||
|
cls: 'link-text-font',
|
||
|
height: 24,
|
||
|
width: 26,
|
||
|
title: '测试连接',
|
||
|
},
|
||
|
{
|
||
|
type: Icon,
|
||
|
cls: 'copy-font',
|
||
|
height: 24,
|
||
|
width: 26,
|
||
|
title: '复制',
|
||
|
},
|
||
|
{
|
||
|
type: Icon,
|
||
|
cls: 'info-font',
|
||
|
height: 24,
|
||
|
width: 26,
|
||
|
title: '提示',
|
||
|
},
|
||
|
{
|
||
|
type: Icon,
|
||
|
cls: 'delete-font',
|
||
|
height: 24,
|
||
|
width: 26,
|
||
|
title: '删除',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
|
||
|
],
|
||
|
};
|
||
|
},
|
||
|
mounted() {
|
||
|
const {title} = this.options;
|
||
|
this.element.on('click', () => {
|
||
|
this.store.setLinkSelected(title);
|
||
|
});
|
||
|
},
|
||
|
};
|
||
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
|
||
|
export default className;
|