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 🙏

© 2025 – Pkg Stats / Ryan Hefner

uni-ui-plus

v0.0.69

Published

🦄 现代化的 uni-app 组件库,提供丰富的高质量组件

Downloads

114

Readme

🎯 介绍

uni-ui-plus 是一个专为 uni-app 生态打造的现代化组件库,致力于提供:

  • 🚀 开箱即用:零配置快速上手,简化开发流程
  • 🎨 精美设计:遵循现代设计语言,提供优雅的用户体验
  • 📱 全端兼容:完美支持 H5、小程序、App 等多端平台
  • 🛠️ TypeScript:完整的类型定义,提供更好的开发体验
  • 🎭 主题定制:灵活的主题系统,轻松实现个性化定制
  • 高性能:经过优化的组件实现,确保流畅的用户体验

🚀 快速上手

📦 安装

使用你喜欢的包管理器安装:

# pnpm (推荐)
pnpm add uni-ui-plus

# yarn
yarn add uni-ui-plus

# npm
npm install uni-ui-plus

⚙️ 配置

🔧 组件导入

提示:自动按需导入组件有 unplugineasycom 两种方式,请勿混用

🌟 推荐:unplugin 方式

安装插件:

# pnpm (推荐)
pnpm add -D @uni-helper/vite-plugin-uni-components
yarn add --dev @uni-helper/vite-plugin-uni-components
npm install -D @uni-helper/vite-plugin-uni-components

:::

  • 配置插件

    vite.config.ts

    import { defineConfig } from "vite";
    import UniApp from "@dcloudio/vite-plugin-uni";
    import UniComponents from "@uni-helper/vite-plugin-uni-components";
    import { UpResolver } from "uni-ui-plus";
    
    export default defineConfig({
      // ...
      plugins: [
        // ...
        // 确保放在 `UniApp()` 之前
        UniComponents({
          resolvers: [UpResolver()],
        }),
        UniApp(),
      ],
    });

    如果使用 pnpm 管理依赖,请在项目根目录下的 .npmrc 文件中添加如下内容

    shamefully-hoist=true # or public-hoist-pattern[]=@vue*
  • 类型提示

    tsconfig.json(需要IDE 支持

    {
      compilerOptions: {
        // ...
        types: ["uni-ui-plus/global.d.ts"],
      },
    }
easycom方式
  • 配置easycom

    pages.json(若原本已存在easycom字段,则添加easycom.custom字段中的内容)

    {
      easycom: {
        autoscan: true,
        custom: {
          "^up-(.*)?-(.*)": "uni-ui-plus/components/$1$2/$1$2.vue",
          "^up-(.*)": "uni-ui-plus/components/$1/$1.vue",
        },
      },
      // ...
    }

完成


配置完成,现在所有的组件都可以直接使用,它将自动完成按需导入

<template>
  <up-button type="primary">主要按钮</up-button>

  <!-- 或者(仅限unplugin方式) -->
  <UpButton type="primary">主要按钮</UpButton>
</template>

组件列表


Image

<template>
  <up-image
    src="http://nest-js.oss-accelerate.aliyuncs.com/nestTest/1/1746282136181.JPG"
    placeholder-src="http://nest-js.oss-accelerate.aliyuncs.com/nestTest/1/1746282136181.JPG?x-oss-process=image/resize,l_100"
    width="120"
    height="120"
    radius="8"
    :lazy-load="true"
  />
</template>

Skeleton

<template>
  <up-skeleton :loading="true" type="title" />
  <up-skeleton :loading="true" type="avatar" avatar-shape="circle" />
</template>

List

<script setup>
  import { getObjVal, list, sleep } from "@iceywu/utils";
  import { useRequest } from "vue-hooks-pure";

  const scrollListRef = ref();
  // 模拟api
  async function getTestApi(params) {
    await sleep(500);
    const { page = 0, size = 10, maxPage = 3 } = params;
    const baseSize = page * size;
    const data = list(0, size - 1, (index) => {
      const element = baseSize + index;
      return {
        id: element,
        cover: `https://picsum.photos/id/${element}/200/300`,
        title: `title ${element}`,
        desc: `desc ${element}`,
      };
    });
    return {
      code: 200,
      msg: "查询成功",
      result: {
        content: data,
        last: page + 1 === maxPage,
        total: 100,
      },
    };
  }

  const {
    onRefresh,
    onLoad: onLoadMore,
    result,
  } = useRequest(getTestApi, {
    target: "list",
    loadingDelay: 300,
    getVal: (res) => {
      const list = getObjVal(res, "result.content", []);
      return list;
    },
    listOptions: {
      defaultPageKey: "page",
      defaultSizeKey: "size",
      defaultDataKey: "list",
      defaultPage: -1,
      getTotal: (data) => {
        const total = getObjVal(data, "result.total", 0);
        return total;
      },
    },
    onRequestEnd: (res) => {
      if (scrollListRef.value) {
        scrollListRef.value.stopRefresh();
      }
    },
  });
  onMounted(() => {
    onRefresh();
  });
</script>

<template>
  <view class="h-50vh">
    <up-list
      ref="scrollListRef"
      v-model:list-obj="result"
      style="height: 100%;"
      :is-need-h-full="true"
      :scroll-y="true"
      @on-load="onLoadMore"
      @on-refresh="onRefresh"
    >
      <template #default="{ data: { list } }">
        <view v-for="(item, index) in list" :key="index" class="mb-4 flex">
          <image :src="item.cover" class="h-20 w-20" mode="widthFix" />
          <view>{{ item.title }}</view>
        </view>
      </template>
    </up-list>
  </view>
</template>