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

dingtalk-design-miniapp

v1.9.7

Published

DingTalk Design Miniapp 提供统一钉钉风格小程序组件

Downloads

59

Readme

dingtalk-design-miniapp

介绍

DingUI小程序组件(dingtalk-design-miniapp)是一套遵循钉钉设计规范的组件库, 涵盖基础组件和业务组件,由钉钉官方为钉钉小程序量身设计,让用户的体验和感知统一。

钉钉扫码体验地址:

安装

npm i dingtalk-design-miniapp

使用

API和Document

dingtalk-design-miniapp组件库提供了本地化demo&doc工具给开发者

使用dingtalk-design-miniapp

dingtalk-design-miniapp的使用方式与自定义组件的使用方式相同,这里以button为例,简要描述如何使用dingtalk-design-miniapp组件库:

1.引入dingtalk-design-miniapp组件

安装dingtalk-design-miniapp组件库后,在我们将要使用组件的页面json文件中引入dingtalk-design-miniapp组件,例如:

在 页面 page.json中写入代码:

  {
    "component": true,
    "usingComponents": {
      "button": "dingtalk-design-miniapp/es/button/index"
    }
  }

2.使用dingtalk-design-miniapp组件

此时,在页面axml中可以通过<button>元素使用dingtalk-design-miniapp组件啦,

通过查看文档了解到button的属性后配置如下:

  <button type="primary" onCatchTap="onTap" className="button-default">主要操作</button>

3.dingtalk-design-miniapp组件的事件开发

上文中我们使用了onCatchTap事件,此事件指向了onTap方法,故需要我们在页面js文件中,开发该方法,即可

Page({
  onTap(e){
    console.log(e)
  }
})

1.不可以改变组件内部环境

在页面中使用,切忌不可尝试改变组件内部data或者方法等

效果

效果图

CHANGELOG

  • 1.3.9

    • spin 支持分页加载样式
    • 产生专门的 px npm包,此包所有单位为rpx
  • 1.3.5

    • 新增 drawer 组件
    • 优化字体适配,单位从rpx换成px
  • 1.0.0-beta.16

    • list-item 支持绑定 data- 属性,onTap 会返回