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

press-ui

v1.3.30

Published

简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目

Downloads

288

Readme


查看文档 | 查看示例

1. 介绍

Press UI是一套易用的、灵活的,基于uni-app的跨端组件库。

  • 🚀 70+ 基础组件,覆盖移动端主流场景
  • 🚀 支持基于uni-app的H5、微信小程序、QQ小程序、APP、支付宝小程序、抖音小程序等
  • 💪 支持普通H5项目
  • 💪 支持 Vue2 和 Vue3
  • 💪 零外部依赖,不依赖三方 npm 包
  • 📖 提供丰富的中英文文档和组件示例
  • 🍭 支持主题定制,内置 600+ 个主题变量
  • 🌍 支持国际化,内置 16+ 种语言包

2. 解决痛点

Press UI作为基础组件库,解决了以下痛点:

  1. 支持包含vant的H5项目平滑迁移至uni-app项目,仅需改下引用地址和组件名称
  2. 丰富的组件类型,以及易用的API,让uni-app开发变得简单
  3. 支持国际化、主题定制等,组件灵活性更强
  4. 支持普通Vue项目,达到一套代码n+1端复用

同时,将项目中业务组件沉淀到Press UI中,有以下好处:

  1. 减少业务和组件的耦合降低各自复杂度,并减少bug
  2. 增强组件可维护性,提升开发效率
    • 通过整理代码,合并属性,分离业务逻辑等,让组件变纯粹,增强可维护性,进而提升效率
  3. 封装核心逻辑,控制变化
    • 不用担心外部合作人员改乱代码,以及解决冲突时的覆盖问题
  4. UI问题定位简单
    • 三端代码同时发布,以及多种类型的示例,覆盖面全,容易发现UI问题,以及三端表现不一致问题
  5. 可提升性能
    • 通过示例中的自定义变量,可定位性能瓶颈,并解决性能问题
  6. 提高可复用性,可应用到其他项目
  7. 技术沉淀,技术积累,不断打磨组件细节

3. 应用场景

Press UI可应用于uni-app项目,或者普通的H5项目,同时支持 Vue2 和 Vue3。

目前已应用在王者赛宝、HoK Club、赛宝Pro、和平赛事、高能赛事、商户赛等项目中。

4. 如何使用

  1. 安装npm
npm i press-ui
  1. 在页面中正常引入并使用

比如 button 组件:

<template>
  <PressButton />
</template>
<script>
import PressButton from 'press-ui/press-button/press-button.vue'

export default {
  components: {
    PressButton, 
  },
}
</script>
  1. 配置

需要在vue.config.js中配置下 transpileDependencies

module.exports = {
  transpileDependencies: ['press-ui'],
}

5. 立即体验

下图是示例二维码,第一行分别为基于 uni-appVue2.x 版本的 H5、微信小程序、QQ小程序、支付宝小程序。

第二行分别为非 uni-app 环境的 Vue2.x 项目、基于 uni-appVue3.x 版本的H5、微信小程序,及 Vue2.x 版本的安卓项目。

6. 贡献指南

请查看这里