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

@beisen/beisen-scroll-bar

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beisen/beisen-scroll-bar

beisen-scroll-bar

  • 1.0.37
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

beisen-scroll-bar

功能

BeisenScrollBar 

使用方法

import React, {Component, PropTypes} from 'react'
import {render} from 'react-dom'
import BeisenScrollBar from './src/index';
//引入必须的依赖之后,我们引入要嵌入的组件或者html,和样式文件。
import Containner from './src/outerComponent/containner';
import './src/style/componentClass.scss'

class Demo extends Component{

  handleScroll(scrollData){
      //这里我们可以获得坐标数据
      console.log(scrollData);
  }

  render () {

    //style可以设置滚动区域的整体样式。
    //当然支持手动加一个类,通过类名来控制样式(推荐)
    //contentClassName:为被包裹的内部页面套一个div,这里可以控制整个被嵌对象的样式。
    //handleScroll:回调函数,滚动时,实时获得滚动信息。
    //verticalScrollbarStyle:垂直滚动条的样式。
    //horizontalScrollbarStyle:水平滚动条的样式。

    let style = {'width':'300px','height':'300px'};
    let scrollbarStyles = {borderRadius: 5};
    return (
      <div>
          <BeisenScrollBar style={style} 
          className={'area'}
          contentClassName={'scrollContent'}
          handleScroll={this.handleScroll}
          verticalScrollbarStyle={scrollbarStyles}
          horizontalScrollbarStyle={scrollbarStyles}>
          
            <Containner />

          </BeisenScrollBar >
      </div>
    )
  }
}
render(<Demo />, document.getElementById('content'));

参考资料

  • 北森前端TalentUI开发文档

  • React官方文档

  • ES6语法

  • Jasmine行为驱动测试官方文档

Keywords

FAQs

Package last updated on 22 Oct 2019

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