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

xp-mnui

v1.0.7

Published

基于wepy的微信小程序UI组件库,wepy组件解决方案

Downloads

2

Readme

xp-mnui

基于wepy的微信小程序UI组件库,wepy组件解决方案

xp-mnui

安装

npm i -g xp-mnui

使用

xp-mnui安装完毕后,会生成mnui命令

mnui

查看mnui命令行支持功能

mnui ls

查看mnui现有的组件列表

mnui add 组件名

安装对应的组件,支持xp-mnui组件和第三方组件,以顶部提示为例:mnui add toptips

wepy组件使用(以toptips为例)

  • 引入组件
<template>
  <toptips></toptips>
</template>

<script>
import wepy from 'wepy'
import toptips from 'xp-mnui-toptips'

export default class Index extends wepy.page {
  components = {
    toptips,
  }
}
</script>
  • 调用组件
this.$invoke('toptips', 'show', { // 参数
  text: '调用成功',
})
.then((res) => {
  console.log('done')
})
.catch((err) => {
  console.log('error')
})
  • 参数
    • text (显示的文字)
    • duration (持续时间,默认1500毫秒)

第三方组件(欢迎PR)

  • PR步骤
    1. 将你的组件发布到npm
    2. 编辑 components.json ,添加一条记录:key为你的npm包名字,value为你的npm包的描述
  • 注意:xp-mnui的组件必须是在wepy的小程序框架下的,所以必须满足以下条件:
    1. package.json 中的 main 字段必须是 .wpy 结尾。
    2. <template></template> <script></script> <style></style> 标签中不要import相对路径的文件;避免使用 lang 属性,举个例子:<style lang="scss"> 在使用less编译器的小程序的项目会报错。