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

ng-midu-components

v0.0.30

Published

--- title: 全局组件库 ---

Downloads

6

Readme

NgMiduComponents


title: 全局组件库

组件列表

组件名 | 说明 ----|------ dropdown | 下拉菜单组件 avatar | 头像组件 auth | 微博认证组件 emot | 情绪类型组件 video | 视频播放组件

dropdown 下拉菜单组件

dropdown是为了优化列表中带有下拉菜单的渲染速度而创建的,需要挂载一个元素作为按钮,可以用< button>、< a>、iconfont图标等,组件有一个option插槽,用于放置下拉内容。miMenuItem是下拉内容的鼠标略过点击指令,会给元素加上一个mi-dropdown-menu-itemclass类,我们可以给这个类自定义样式。 组件可以根据元素在屏幕中的位置自适应显示下拉框方向。

avatar 头像组件 和 auth 微博认证组件 emot 情绪类型组件 组合使用

avatar组件是为了能够挂载类似微博认证、情绪标签等元素而创建的,可以使用[userUrl]设置没有图片的情况下的默认图片,可以使用[size]设置头像的大小。有些数据没有头像图片,可以通过[type]插槽可以设置来源类型头像,同时需要加上[miAvatarType]这个指令为[type]插槽加上一个样式类[mi-avatar-type]。

video 视频播放组件

指令名 | 说明 ----|------ clickOutside | 点击元素以外的地方

clickOutside 点击元素以外区域的方法

可用于需要点击指定元素以外的区域来隐藏元素的需求。

管道名 | 说明 ----|------ miFilesize | 转换文件大小格式 miNumberFormat | 转换数字超过千位数显示对应的单位来缩写数字 miFilter | 可用于搜索提取内容

miFilesize 转换文件大小格式

可用于需要将表示文件大小的数字转换为更为易读的格式,比如:1024 转换为 1MB。

miNumberFormat 转换数字超过千位数显示对应的单位来缩写数字

可用于数字比较长的场景,超过千位数用,千、万、亿来表示

miFilter 可用于搜索提取内容