bee-anchor
Anchor ui component for react
Last updated 6 months ago by tinper-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bee-anchor 
SYNC missed versions from official npm registry.

bee-anchor

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

react bee-anchor component for tinper-bee

基于 gumshoejs 的锚点组件

依赖

  • react >= 15.3.0
  • react-dom >= 15.3.0
  • prop-types >= 15.6.0

使用方法

import Anchor from 'bee-anchor';
import 'bee-anchor/build/Anchor.css';

API

参数 说明 类型 默认值
selector 目标元素选择器 string -
offset 向上偏移量,例如有固定header,则 offset=()=>return header.getBoundingClientRect().height ()=>{} 0
navClass 当前被激活锚点新增的类名 string 'active'
contentClass 当前被激活区域新增的类名 string 'active'
nested 是否有嵌套导航 bool false
nestedClass 嵌套导航激活时父节点的类名 string 'active'
event 是否添加监听事件 bool true
activeHandle 被激活的回调,三个参数,以基本示例为例,列表li、锚点a、激活区域p func ()=>{})
deactiveHandle 激活后的回调 func ()=>{})

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-anchor
$ cd bee-anchor
$ npm install
$ npm run dev

Current Tags

  • 0.0.5-alpha.0                                ...           alpha (a year ago)
  • 0.0.6                                ...           latest (6 months ago)

7 Versions

  • 0.0.6                                ...           6 months ago
  • 0.0.5                                ...           a year ago
  • 0.0.5-alpha.0                                ...           a year ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Downloads
Today 33
This Week 112
This Month 592
Last Day 44
Last Week 204
Last Month 910
Dependencies (4)
Dev Dependencies (14)

Copyright 2014 - 2016 © taobao.org |