Dailer
6 years ago
5 changed files with 40 additions and 44 deletions
@ -1,59 +1,55 @@
|
||||
!(function () { |
||||
|
||||
BI.module("my.management", { |
||||
version: 1.0, |
||||
components: [], |
||||
constants: ["dec.constant.menu.items", "dec.constant.nav.items"], |
||||
services: [], |
||||
models: [] |
||||
}) |
||||
|
||||
|
||||
// 示例,向menus中加入百度搜索按钮.
|
||||
// 示例,向menus中加入帆软官网.
|
||||
BI.config("dec.constant.menu.items", function (items) { |
||||
items.push({ |
||||
value: "baidu", |
||||
text: BI.i18nText("百度一下"), |
||||
value: "fanruan", |
||||
text: BI.i18nText("帆软"), |
||||
cardType: { |
||||
src: "http://baidu.com" |
||||
src: "http://www.fanruan.com/" |
||||
}, |
||||
cls: "analysis-menu-font" |
||||
cls: "fr-logo-font" |
||||
}); |
||||
return items; |
||||
}); |
||||
|
||||
// 示例,向管理系统节点加入百度搜索节点
|
||||
BI.config("dec.constant.nav.items", function (items) { |
||||
// 示例,向管理系统节点加入帆软帮助文档
|
||||
BI.config("dec.constant.management.navigation", function (items) { |
||||
items.push({ |
||||
value: "baidu", // 地址栏显示的hash值
|
||||
id: "decision-management-baidu", // id
|
||||
text: BI.i18nText("百度一下"), // 文字
|
||||
cardType: "dec.management.baidu", // 组件的shortcut,适用于用fineui开发的页面.
|
||||
cls: "management-directory-font" // 图标类名
|
||||
value: "frhelp", // 地址栏显示的hash值
|
||||
id: "decision-management-fanruan-help", // id
|
||||
text: BI.i18nText("帮助文档"), // 文字
|
||||
cardType: "dec.management.fanruan_help", // 组件的shortcut,适用于用fineui开发的页面.
|
||||
cls: "fr-logo-font" // 图标类名
|
||||
}); |
||||
return items; |
||||
}); |
||||
|
||||
|
||||
// 组件实现
|
||||
var Baidu = BI.inherit(BI.Widget, { |
||||
var Fanruan = BI.inherit(BI.Widget, { |
||||
|
||||
props: { |
||||
baseCls: "dec-management-baidu" |
||||
baseCls: "dec-management-fanruan" |
||||
}, |
||||
|
||||
render: function () { |
||||
return { |
||||
el: { |
||||
type: "bi.iframe", |
||||
src: "http://www.baidu.com" |
||||
}, |
||||
top: 0, |
||||
left: 0, |
||||
right: 0, |
||||
bottom: 0 |
||||
type: "bi.absolute", |
||||
items: [ |
||||
{ |
||||
el: { |
||||
type: "bi.iframe", |
||||
src: "http://help.finereport.com/" |
||||
}, |
||||
top: 0, |
||||
left: 0, |
||||
right: 0, |
||||
bottom: 0 |
||||
} |
||||
] |
||||
}; |
||||
} |
||||
}); |
||||
BI.shortcut("dec.management.baidu", Baidu); |
||||
BI.shortcut("dec.management.fanruan_help", Fanruan); |
||||
}()); |
Loading…
Reference in new issue