Giter Club home page Giter Club logo

press-ui's Introduction

logo

易用、灵活、基于 uni-app 的跨端组件库


查看文档 | 查看示例

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. 贡献指南

请查看这里

press-ui's People

Contributors

novlan1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

torns light-mike

press-ui's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.