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

anima-basescroller

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anima-basescroller

滚动选择组件。

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

basescroller


spm version

滚动选择组件。


Install

$ spm install basescroller --save

Usage

var BaseScroller = require('basescroller');
var nameScroller = new BaseScroller(options);

// use BaseScroller

API

实例化选项 options

  • id string 组件元素 ID [optional]
  • container DOM Object 组件插入的容器 [optional]
  • data array<string|number|object> 组件数据集 [optional]
  • object 包含 name 和 value,表示显示值和实际取值
  • selectedCallback function 选中后的回调函数,回调参数有两个: [optional]
  • current 当前选中的值
  • prev 之前的值

实例方法

  • selectByIndex(index) 通过索引选择一项
  • @param index {number} 非负索引值 [required]
  • select(value) 通过值选中一项
  • @param value {string|number} [required]
  • selectThenCallback(value) 选中后注册的回调函数,参数同 select
  • getValue() 获取当前的选中值
  • setSelectedCallback(selectedCallback) 设置选中后的回调函数,传入回调函数的参数同实例化选项中的 selectedCallback
  • render(data) 重新渲染组件,参数 data 同实例化选项中的 data
  • appendTo(container) 将组件插入到一个 DOM 元素中

FAQs

Package last updated on 28 Dec 2015

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