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.
59 lines
1.9 KiB
59 lines
1.9 KiB
Demo.Title = BI.inherit(BI.Widget, { |
|
props: { |
|
baseCls: "demo-title" |
|
}, |
|
render: function () { |
|
return { |
|
type: "bi.vertical", |
|
items: [{ |
|
type: "bi.label", |
|
cls: "layout-bg1", |
|
height: 50, |
|
title: "title提示", |
|
text: "移上去有title提示", |
|
textAlign: "center" |
|
}, { |
|
type: "bi.label", |
|
cls: "layout-bg6", |
|
height: 50, |
|
disabled: true, |
|
warningTitle: "title错误提示", |
|
text: "移上去有title错误提示", |
|
textAlign: "center" |
|
}, { |
|
type: "bi.label", |
|
cls: "layout-bg2", |
|
height: 50, |
|
disabled: true, |
|
tipType: "success", |
|
title: "自定义title提示效果", |
|
warningTitle: "自定义title提示效果", |
|
text: "自定义title提示效果", |
|
textAlign: "center" |
|
}, { |
|
type: "bi.label", |
|
cls: "layout-bg3", |
|
height: 50, |
|
title: () => "函数返回值作为title提示", |
|
text: "title提示支持函数", |
|
textAlign: "center" |
|
}, { |
|
type: "bi.label", |
|
cls: "layout-bg4", |
|
height: 50, |
|
title: function () { |
|
return { |
|
level: "success", |
|
text: "自定义title\n提示效果", |
|
textAlign: "center" |
|
}; |
|
}, |
|
text: "title提示支持对象,作为bi.tooltip的props", |
|
textAlign: "center" |
|
}], |
|
hgap: 300, |
|
vgap: 20 |
|
}; |
|
} |
|
}); |
|
BI.shortcut("demo.title", Demo.Title);
|
|
|