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
| Prop |
Default |
Type |
Description |
| application |
[] |
array |
应用列表集合 |
| applicationList |
[] |
array |
所有的应用列表集合 |
| notice |
[] |
array |
消息集合 |
| avatar |
'' |
string |
用户头像 |
| account |
'' |
string |
用户姓名 |
Instance Methods
| Method |
Params |
Description |
| onMoreNotice |
key |
查看更多消息回调方法 |
| onMoreApplication |
- |
查看更多应用回调方法 |
| onMenuClick |
key |
用户菜单点击回调方法 |