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

miniprogram-keyboard-num

v0.1.3

Published

小程序自定义组件(自定义数字键盘)

Downloads

11

Readme

keyboard-num

小程序自定义组件

使用此组件需要依赖小程序基础库 2.2.3 以上版本,同时依赖开发者工具的 npm 构建。具体详情可查阅官方 npm 文档

使用效果

keyboard-num

使用方法

  1. 安装 keyboard-num:
npm install --save miniprogram-keyboard-num
  1. 在需要使用 keyboard-num 的页面 page.json 中添加 keyboard-num 自定义组件配置
{
  "usingComponents": {
    "keyboard-num": "miniprogram-keyboard-num",
    "keyboard-num-light": "miniprogram-keyboard-num/light"
  }
}
  1. 点击 工具 -> 构建npm

  2. WXML 文件中引用 keyboard-num

<keyboard-num></keyboard-num>
<keyboard-num-light></keyboard-num-light>

引用后自动从铺设在给定高度的地方,建议是100%的高度。

keyboard-num的属性介绍如下:

| 属性名 | 类型 | 默认值 | 是否必须 | 说明 | |------------|-------------|------------|----------------|---------------| | value | String | - | - | 当前输入值:组件外部可以通过此可以改变组件内部的值 | | type | String | default | - | 当前输入类型:指定当前组件的输入类型默认只能是数字字符串,为money时为金额形式 | | max | Number | -1 | - | 最大值 | | maxLength | Number | -1 | - | 最大长度 | | useFormate | Boolean | true | - | 是否使用格式化显示 | | title | String | 请输入 | - | 输入框标题 | | tips | String | - | - | 输入框提示文字 | | submit | String | 确定 | - | 确认按钮提示文字 |

keyboard-num的事件介绍如下:

change事件

{
  detail: {
    value: {
      current: '', // 当前未格式化输入值
      currentNum: '', // 金额转化为分,默认模式的时候为0
    }
  }
}

confirm事件

{
  detail: {
    value: {
      current: '', // 当前未格式化输入值
      currentNum: '', // 金额转化为分,默认模式的时候为0
    }
  }
}