1.0.5 • Published 4 years ago

@beisen-phoenix/anchor v1.0.5

Weekly downloads
7
License
ISC
Repository
gitlab
Last release
4 years ago

锚点

@beisen-phoenix/anchor

概述

用于模块较多的页面,可帮助用户更快速的定位至想要查看的模块。

导出说明

默认导出为非受控组件,鼠标移入移出时自动展开收起。同时导出受控组件--PureAnchor

API

非受控组件的属性(默认)

参数说明类型默认值是否必传
width展开后的宽度string"118px"
maxHeight最大高度string"330px"
data每个Link组件的属性Array\<IData>-
selectedId当前选中Link的idstring | number-
onSelect选中Link的回调(selectedId: stringnumber, e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void-

受控组件的属性

参数说明类型默认值是否必传
width展开后的宽度string"118px"
maxHeight最大高度string"330px"
data每个Link组件的属性Array\<IData>-
selectedId当前选中Link的idstring | number-
onSelect选中Link的回调(selectedId: stringnumber, e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void-
expanded是否是展开状态,默认收起,hover时展开booleanfalse
onMouseEnter鼠标移入事件的回调(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void-
onMouseLeave鼠标移出事件的回调(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void-

IData

参数说明类型默认值是否必传
id标识string | number-
title文字内容string-
href锚点链接string-
target指定在何处显示链接的资源string-
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago