npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@doraemon-ui/miniprogram.index-list

v0.0.2-alpha.47

Published

miniprogram index-list component for doraemon-ui

Readme

IndexList 索引列表

@doraemon-ui/miniprogram.index-list

索引列表常用于通讯录、城市选择等需要按首字母快速定位的长列表场景。组件包同时提供 dora-index-listdora-index-list-item 两个组件,分别负责索引容器和分组内容。

安装

我们推荐使用 npmyarn 的方式进行开发,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。

npm install --save @doraemon-ui/miniprogram.index-list
# or
yarn add @doraemon-ui/miniprogram.index-list

如果你的网络环境不佳,推荐使用 cnpm

使用指南

在 page.json 中引入组件

json

示例代码

在开发者工具中预览效果

WXML

wxml

JAVASCRIPT

js

WXSS

wxss

API

export type IndexListIndicatorPosition = 'left' | 'center' | 'right'

IndexList props

| 参数 | 类型 | 描述 | 默认值 | | --- | --- | --- | --- | | prefixCls | string | 自定义类名前缀 | dora-index-list | | height | string \| number | 组件高度 | 300 | | showIndicator | boolean | 是否显示提示指示器 | true | | indicatorPosition | IndexListIndicatorPosition | 提示指示器位置 | center | | parentOffsetTop | number | 父容器顶部偏移 | 0 | | bind:change | (event: CustomEvent<{ index: number; name: string; brief: string }>) => void | 当前激活索引切换时触发 | - |

IndexList slot

| 名称 | 描述 | | --- | --- | | - | dora-index-list-item 列表 |

IndexList externalClasses

| 名称 | 描述 | | --- | --- | | dora-class | 根节点样式类 |

IndexListItem props

| 参数 | 类型 | 描述 | 默认值 | | --- | --- | --- | --- | | prefixCls | string | 自定义类名前缀 | dora-index-list-item | | name | string | 分组名称 | - |

IndexListItem slot

| 名称 | 描述 | | --- | --- | | - | 分组下的自定义内容 |

IndexListItem externalClasses

| 名称 | 描述 | | --- | --- | | dora-class | 根节点样式类 |

CSS Variables

| 属性 | 描述 | 默认值 | 全局变量 | | --- | --- | --- | --- | | --dora-index-list-nav-size | 索引导航单项尺寸 | 20px | - | | --dora-index-list-nav-font-size | 索引导航字体大小 | 12px | - | | --dora-index-list-nav-padding-vertical | 索引导航垂直内边距 | 4px | - | | --dora-index-list-nav-padding-horizontal | 索引导航水平内边距 | 6px | - | | --dora-index-list-nav-activated-text-color | 当前索引文字颜色 | rgba(255, 255, 255, 1) | - | | --dora-index-list-nav-activated-background-color | 当前索引背景色 | #3880ff | - | | --dora-index-list-nav-activated-border-radius | 当前索引圆角 | 50% | - | | --dora-index-list-indicator-size | 提示指示器尺寸 | 48px | - | | --dora-index-list-indicator-background-color | 提示指示器背景色 | rgba(0, 0, 0, 0.7) | - | | --dora-index-list-indicator-color | 提示指示器文字颜色 | rgba(255, 255, 255, 1) | - | | --dora-index-list-indicator-font-size | 提示指示器字体大小 | 20px | - | | --dora-index-list-indicator-border-radius | 提示指示器圆角 | var(--dora-border-radius, 8px) | - | | --dora-index-list-item-background-color | 分组标题背景色 | var(--dora-color-step-15, #d9d9d9) | - | | --dora-index-list-item-size | 分组标题高度 | 28px | - | | --dora-index-list-item-padding-vertical | 分组标题垂直内边距 | 0 | - | | --dora-index-list-item-padding-horizontal | 分组标题水平内边距 | 16px | - |