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

s4sui-weapp

v4.0.0

Published

高颜值、好用、易扩展的小程序 UI 库,Powered by 齐车大圣

Downloads

2

Readme

概述

S4SUI-WeApp是齐车大圣移动 Web UI 规范 S4SUI 的小程序现实版本,结合了微信的视觉规范,为用户提供更加统一的使用感受。

现已包含 badge、btn、card、cell、dialog、icon、label、noticebar、panel、popup、switch、tab、toast、toptips 等组件或元素。具体可以扫描下方小程序二维码,体验组件库示例 Demo

S4SUI-WeApp 演示

更多背景介绍,请移步 我们写的介绍文章

下载

git clone https://git.mys4s.cn/mys4s/s4sui-weapp.git

预览

  1. 在 s4sui-weapp 根目录下运行
# 安装项目依赖
npm install
# 执行组件编译
npm run dev
  1. 打开微信web开发者工具,'本地小程序项目 - 添加项目',把 s4sui-weapp/example 目录添加进去就可以预览示例demo了。

使用

  1. 使用 S4SUI-WeApp 前请确保已经学习过微信官方的 小程序简易教程小程序框架介绍
  2. 然后用 [Bower] 将 S4SUI-WeApp 添加到你的项目中使用。
  3. 你也可以 fork 出一份你自己的 S4SUI-WeApp,这样可以获得更稳定的代码和更方便的进行个性定制。

我们推荐在你的app.wxss直接引入s4sui-weapp/dist/index.wxss

详细使用文档,请参考 快速上手

组件分类介绍

根据功能的不同,可以将组件大致的分为2类:

1. 正常引用

如按钮组件,只需要在页面中引入按钮自定义组件即可

{
    "usingComponents": {
        "s-button": "/path/to/s4sui-weapp/dist/btn/index"
    }
}
<!-- example/btn/index.html -->

<s-button>按钮</s-button>

2. API类组件

如 Toast 组件,需要先在页面上引入自定义组件。之后在逻辑运行时,直接调用方法即可展示

{
    "usingComponents": {
        "s-toast": "/path/to/s4sui-weapp/dist/toast/index"
    }
}
<s-toast id="s-toast-test"></s-toast>

将对应的 Toast 的函数引入页面,就可以直接调用来展示 Toast 了

// example/toast/index.js

const Toast = require('/path/to/s4sui-weapp/dist/toast/toast');

Page({
  showToast() {
    Toast({
        selector: '#s-toast-test',
        message: 'toast内容'
    });
  }
});

更多示例可以在项目的example目录中查看

开源协议

本项目基于 MIT协议,请自由地享受和参与开源。

贡献

如果你有好的意见或建议,欢迎给我们提 issuePR,为优化 S4SUI-Weapp 贡献力量