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.6 KiB
59 lines
1.6 KiB
!(function () { |
|
|
|
BI.module("my.management", { |
|
version: 1.0, |
|
components: [], |
|
constants: ["dec.constant.menu.items", "dec.constant.nav.items"], |
|
services: [], |
|
models: [] |
|
}) |
|
|
|
|
|
// 示例,向menus中加入百度搜索按钮. |
|
BI.config("dec.constant.menu.items", function (items) { |
|
items.push({ |
|
value: "baidu", |
|
text: BI.i18nText("百度一下"), |
|
cardType: { |
|
src: "http://baidu.com" |
|
}, |
|
cls: "analysis-menu-font" |
|
}); |
|
return items; |
|
}); |
|
|
|
// 示例,向管理系统节点加入百度搜索节点 |
|
BI.config("dec.constant.nav.items", 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" // 图标类名 |
|
}); |
|
return items; |
|
}); |
|
|
|
|
|
// 组件实现 |
|
var Baidu = BI.inherit(BI.Widget, { |
|
|
|
props: { |
|
baseCls: "dec-management-baidu" |
|
}, |
|
|
|
render: function () { |
|
return { |
|
el: { |
|
type: "bi.iframe", |
|
src: "http://www.baidu.com" |
|
}, |
|
top: 0, |
|
left: 0, |
|
right: 0, |
|
bottom: 0 |
|
}; |
|
} |
|
}); |
|
BI.shortcut("dec.management.baidu", Baidu); |
|
}()); |