1.0.5 • Published 3 years ago

public-header-react v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

public-header-react

博睿-公共头部组件 react 版

依赖

本组件依赖reactant-design,在实际项目中需引入上述 2 个 npm 包,才能正常使用本组件。

组件传参

参数解释类型默认是否必须
cloudpathcloud 项目网址stringhttp://devtest.ibr.cc:20365
helpPath帮助中心网址string
officialPath官网网址stringhttps://www.bonree.com
local国际化语言,目前只接受'en'或者'zh'stringzh
accountInfo用户信息,必须含有 用户等级 accountLevel,用户姓名 accountName 字段。账号等级 0-管理员 1-账号 2-用户{accountLevel,accountName}{}
productList博睿所有产品,数组对象必须含有 产品名称 title, 产品网址 website 字段{title,website}[]
toIndex点击头部组件 logo 时触发的操作function
changeLanguage改变语言function
handleLogout退出操作function

本地调试

本地调试使用npm link方式直接在项目中引入本地 build 之后的 public-header-react 组件。使用 npm link 可能会出现的问题

使用用例

安装 npm 包

npm install public-header-react or yarn add public-header-react

引入使用

import PublicHeader from "public-header-react";


<PublicHeader
  cloudPath="http://devtest.ibr.cc:20365"
  officialPath="https://www.bonree.com"
  locale={i18n.language}
  accountInfo={{ accountLevel: 1, accountName: "asdad" }}
  productList={[
    { title: "mp", website: "http://devtest.ibr.cc:20365" },
    { title: "Server", website: "http://devtest.ibr.cc:203656" },
    { title: "MobileSDK", website: "http://devtest.ibr.cc:203657" },
    { title: "Browser", website: "http://devtest.ibr.cc:203658" },
    { title: "DataView", website: "http://devtest.ibr.cc:203659" },
  ]}
  toIndex={backHome}
  changeLanguage={_changeLanguage}
  handleLogout={handleQuit}
/>;

版本

v 1.0.2

  1. 第一版

v 1.0.3

  1. 修改说明文档
1.0.5

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago