
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
zeus-frame-layout
Advanced tools
npm i --save zeus-frame-layout
{
"options": {
"esModule": [
"zeus-frame-layout"
]
}
}
import FrameLayout from 'zeus-frame-layout'
export class App extends React.Component {
render(){
return (
<FrameLayout
apiDomain='http://xxx.xx.xx.xx'
logo="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
appName="测试平台">
<YourComponent/>
</FrameLayout>
)
}
}
| 参数 | 是否必填 | 说明 | 类型 | 默认值 |
|---|---|---|---|---|
| apiDomain | 必填 | 接口请求地址 | string | - |
| logo | 非必填 | logo路径 | string | - |
| appName | 必填 | 平台名称 | string | - |
| mode | 非必填 | 三种可选的菜单模式:sider+header;sider;header | string | "sider+header" |
| needFooter | 非必填 | 是否需要页脚 | boolean | true |
| needFullScreen | 非必填 | 是否需要全屏按钮 | boolean | true |
| menus | 非必填 | 自定义菜单数据 | array | - |
| apps | 非必填 | 自定义平台数据 | object | - |
| userName | 非必填 | 自定义用户名数据 | string | - |
| contactors | 非必填 | 自定义联系人数据 | array | - |
| onLogout | 非必填 | 自定义登出逻辑 | function | 见下方 |
| myHistory | 非必填 | 自定义 history 对象 | object | - |
| openAuth | 必填 | 是否开启权限 | boolean | false |
| authUrl | 非必填 | 权限请求的url | string | - |
| sysId | 非必填 | 系统所对应的sysId | number | - |
| cleanLocalItems | 非必填 | 需要清理的localStorage选项 | array(字符串数组) | ["jwtToken", "currentRoute", "currentUrl", "menu", "apps", "cname", "name", "apis", "resources", "JWT_TOKEN", "MENU_INFO", "home", "email"] |
// onLogout 的示例
function (domain) {
const clearItems = ['jwtToken', 'currentRoute', 'currentUrl', 'menu', 'apps', 'cname', 'apis', 'resources', 'name', 'JWT_TOKEN', 'MENU_INFO']
clearItems.forEach(item => {
window.localStorage.removeItem(item)
})
window.location.assign(domain + '/account/user/logout');
}
2020.09.21
- 🌟 初始化菜单布局组件
2020.09.22
- 修改readme
2020.09.23
- zeus-frame-layout接入菜单权限 并修改readme
2020.09.27
- 补充readme
2020.09.27
- 逻辑调整 补充readme
2020.10.08
- 逻辑调整 增强代码可读性
2020.11.03
- 逻辑调整 移除无匹配链路跳转至 notfound 机制
2021.03.25
- 修复侧边菜单栏长度自适应功能
2021.05.xx
- sso认证版本,优化部分权限判断逻辑
2021.07.29
- 迁移IAM认证机制,开放自定义localStorage清理选项
2021.08.20
- 登出逻辑fix
FAQs
## 安装
The npm package zeus-frame-layout receives a total of 9 weekly downloads. As such, zeus-frame-layout popularity was classified as not popular.
We found that zeus-frame-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.