Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

common-header

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-header

``` npm install ``` ### 开发环境 ``` npm start ``` ### 打包命令 ``` npm run build ```

  • 2.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

公共头开发打包说明

install dependencies

npm install

开发环境

npm start

打包命令

npm run build

API

参数说明类型默认值
productName必选参数,项目名称,用来匹配logo图片 kemdmString
productHeaderId必选参数,eap接口获取项目头部数据对应idString
productLogo可选参数,header左侧logo图片,ke和mdm有默认图片,可以不做配置。String
eap_url可选参数,eap接口根地址String/eap/
file_url可选参数,文件服务接口根地址String/eap/
ke_web_url可选参数,ke web服务接口根地址String/ke-web/

可以在后台菜单配置最顶层添加图片

react组件方式调用示例

import Header from 'common-header';

const productName = 'ke';
const productHeaderId = '6';

const initConfig = typeof globalInitConfig === "object" ? globalInitConfig : {};

ReactDOM.render(
  <Header productName={productName} productHeaderId={productHeaderId} {...initConfig} />,
  document.getElementById('sysware-common-header')
);

非react组件方式调用示例

引用dist目录下对应文件

<script>
    var headerConfig = {
        productName: 'mdm',
        productHeaderId: '2-30',
        productLogo: './logo-conf.png'
    }
</script>
<link href="common-header.css" rel="stylesheet">

<div id="sysware-common-header"></div>
<script type="text/javascript" src="common-header.js"></script>

FAQs

Package last updated on 11 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc