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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@riil-frontend/component-time-line

v1.0.25

Published

这是一个时间胶囊组件

Readme


order: 1

时间轴组件

@riil-frontend/component-time-line

这是一个时间胶囊组件

问题记录链接

https://doc.weixin.qq.com/txdoc/excel?docid=e2_ALAASAbRAHM9z3BLSAQRlOVrGxcnq&scode=AJIArwfLAAYlj7QjB9ALAASAbRAHM&type=1

API

| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | ------ | ---- | ---- | ---- | ------ | ---- | | data | 时间胶囊一页的数据 | 否 | array | [] | | | onSelectTime | 点击已选择的色块 签名: (time:Number,Item:object,data:Object)=>{} 入参: time {Number} 当前选择的值 item {object} 当前选择的值val和状态state data {array} 当前页时间轴的数据[{val,state}] | 否 | Function | 无 | | | onPageChange | 点击进行色块分页 签名; (startTime:Number,endTime:Number,type:left|right)=>{} 入参: startTime {Number} 下一页的开始时间 endTime {Number} 下一页的结束时间 | 否 | Function | 无 | | | onCurrentTime | 点击当前按钮 签名: ()=>{} | 否 | Function | | | | pageSize | 每页色块数量 | 是 | Number | 60 | | | interval | 相邻色块的间隔 | 是 | Number | 60*1000 | 毫秒 | | disabledEndDate | 选择框失禁的结束时间 | 否 | Number | | | | disabledStartDate | 选择框失禁的开始时间 | 否| Number | | | | selectedTime | 当前选择的时间 | 否 | Number | | | | timeValue | 当前日期选择框选择的时间 | 否 | Number | | | | stepLength | 日期刻度步长 | 否 | Number | 5 | | | showLeftScale | 是否展示左侧的刻度 | | Boolean | true | | | showRightScale | 是否展示右侧的刻度 | | Boolean | true | | | onChangeTime | 日期选择框时间变化 签名: (value:Moment)=>{} 入参 : value {Moment} moment 对象 | | Function | | | | disableLeftPage | 是否失禁左分页按钮,设置此属性组件内部不控制分页按钮状态 | 否 | Boolean | - | | | disableRightPage | 是否失禁右分页按钮,设置此属性组件内部不控制分页按钮状态 | 否 | Boolean | - | | | dateFormat | 日期格式 | 否 | String | YYYY-MM-DD | | | timeFormat | 时间格式 | 否 | String | HH:mm | | | onTimeOk | 点击时间选择框确认按钮。 签名: (time:Moment)=>{} 入参: time {Moment} 点击确认时选择的时间 | 否 | String | | |