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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mas.io/mas-countdown

v1.0.3

Published

mas-countdown 的组件描述

Downloads

7

Readme

安装

tnpm install --save @alipay/mas-countdown

组件介绍

倒计时组件,支持天,时,分,秒,毫秒倒计时

参数说明

属性|说明|类型|是否必传|默认值 --|:--:|:--:|:--:|:--: showDay|是否显示天|Boolean|否|true showHour|是否显示时|Boolean|否|true showMinute|是否显示分|Boolean|否|true showMilliSecond|是否显示毫秒|Boolean|否|false showColon|是否显示时分秒之间的分割“:”符号, 当false时显示汉字时分秒毫秒|Boolean|否|true secondOnly|是否只显示秒的倒计时过程,不做小时、分钟、天等的换算| Boolean|否|false containerClass|作用于组件最外层的自定义css类名|String|否|'' splitorItemClass|作用于分隔符的自定义css类名|String|否|'' numberItemClass|作用于数字的自定义css类名|String|否|'' day|倒计时天数|Number|否|0 hour|倒计时小时数|Number|否|0 minute|倒计时分钟数|Number|否|0 second|倒计时秒数|Number|否|0 milliSecond|倒计时毫秒数|Number|否|0 interval|倒计时间隔数(毫秒),当需要显示毫秒时默认值为100,不需要显示毫秒时默认值为1000|Number|否|100/1000 onTimeup|倒计时结束回调函数|Function|否|空函数 daysGreaterThan|还剩下XX天显示:「还剩下XX天」文案|Number|否|4 showDayText|开启后大于 daysGreaterThan 天,会显示:「还剩下XX天」文案|Boolean|否|false minDigits | 倒计时中每个元素显示的最小长度 | Number | 否 | 2,即:xx:xx:xx extraData | 传入倒计时组件的额外属性,在onTimeup时透出,适用于列表场景 | Any | 否 | {id: ***}

注意

由于appx2.0的原因变量名称做了修改,将onlySecond改为secondOnly

在小程序中使用

{
  "usingComponents": {
    "mas-countdown": "@alipay/mas-countdown/es/index"
  }
}

调用方式

  <mas-countdown
    minDigits="{{2}}"
    second="{{120}}"
    showDay="{{false}}"
    showHour="{{true}}"
    showMinute="{{true}}"
    showColon="{{false}}"
    onTimeup="onTimeup"
  />

预览

  1. 还剩下多少天 demo预览

    页面路径: pages/show-day-text/index

    showDayText设为true, daysGreaterThan要比总的时间少

Badges

TNPM version TNPM downloads [![install size][install-size-image]][install-size-url]