Skip to content

移动端竖排字母索引组件(类似微信地址栏右侧索引)

License

Notifications You must be signed in to change notification settings

deswan/vue-alphabet-index

Repository files navigation

vue-alphabet-index

移动端竖排字母索引组件(类似微信地址栏右侧索引)

Demo

demo

Install

$ npm install vue-alphabet-index
import AlphabetIndex from 'vue-alphabet-index'
Vue.Component('vue-alphabet-index', AlphabetIndex)

Usage

<alphabet-index :init="true" :items="['A','B','C']" @change="handleChange"></alphabet-index>

parameters

Option type Description
init Boolean 是否初始化。当init设为true, 组件开始获取DOM位置数据,默认为false
items Array 字母数组,如items: ['A', 'B', 'C'],默认为[]
throttleTime Number 节流间隔(ms),默认为80
itemClass String 列表项样式
listClass String 列表样式

events

Option parameters Description
change {index: 数组索引, value: 选中的字母} 选中某个字母时触发

About

移动端竖排字母索引组件(类似微信地址栏右侧索引)

Resources

License

Stars

Watchers

Forks

Packages

No packages published