1.0.3 • Published 3 years ago

react-head-component v1.0.3

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

react-head-component

基于Antd Design的一款头部组件

Install

npm install react-head-component --dev
yarn add react-head-component --dev

Usage

import React, { Component } from 'react'
import HeadComponent from 'react-head-component'

export default class Index extends Component {
  constructor(props){
    super(props)
  }

  render(){
    return (
      <HeadComponent
        application={[]}
		notice={[]}
		applicationList={[]}
        onMenuClick={(key: string)=>{}} 
        onMoreNotice={(key: string)= {}}
        onMoreApplication={()=>{}}
		avatar="用户头像"
		account="用户名称"
      />
    )
  }
}

Properties

PropDefaultTypeDescription
application[]array应用列表集合
applicationList[]array所有的应用列表集合
notice[]array消息集合
avatar''string用户头像
account''string用户姓名

Instance Methods

MethodParamsDescription
onMoreNoticekey查看更多消息回调方法
onMoreApplication-查看更多应用回调方法
onMenuClickkey用户菜单点击回调方法