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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leo-zhou/mango-ui

v1.0.0

Published

Mango UI components library

Readme

Mango UI Components

Mango UI 是一个基于 Vue 3 的移动端组件库,专为 H5 应用设计。

TypeScript 支持

Mango UI 完整支持 TypeScript,提供完整的类型定义文件,可以在 TypeScript 项目中获得完整的类型检查和自动补全功能。

组件属性提示

在 TypeScript 项目中使用 Mango UI 组件时,您可以获得完整的属性提示和类型检查功能。这得益于我们为每个组件都提供了详细的类型定义。

例如,当您使用 MgButton 组件时,编辑器会自动提示可用的属性:

import { MgButton } from '@mango-ui/components'

export default {
  components: {
    MgButton
  },
  setup() {
    // 在模板中使用时,会获得属性提示
    // <MgButton type="primary" size="large">按钮</MgButton>
  }
}

对于按需引入的组件,同样可以获得完整的属性提示:

import { MgCard } from '@mango-ui/components'

export default {
  components: {
    MgCard
  },
  setup() {
    // 在模板中使用时,会获得属性提示
    // <MgCard shadow="hover">卡片内容</MgCard>
  }
}

通过使用 TypeScript 和 Mango UI,您可以获得更好的开发体验,减少错误并提高开发效率。

安装

npm install @mango-ui/components

使用

全量引入

import { createApp } from 'vue'
import MangoUI from '@mango-ui/components'
import '@mango-ui/components/style.css'

const app = createApp(App)
app.use(MangoUI)
app.mount('#app')

按需引入

方法一:使用解构赋值(推荐)

import { MgButton, MgCard } from '@mango-ui/components'
import '@mango-ui/components/style.css'

export default {
  components: {
    MgButton,
    MgCard
  }
}

方法二:直接引入组件文件

import MgButton from '@mango-ui/components/dist/button/src/button.vue'
import '@mango-ui/components/style.css'

export default {
  components: {
    MgButton
  }
}

注意:直接引入组件文件的方式可以更好地利用 Tree Shaking,减少打包体积。

组件列表

Tree Shaking

Mango UI 支持 Tree Shaking,这意味着在按需引入时,未使用的组件代码将不会被打包到最终的构建文件中,从而减少包体积。

为了更好地利用 Tree Shaking,建议使用 ES 模块语法进行按需引入:

import { MgButton } from '@mango-ui/components'

避免使用以下方式,因为它会导入整个库:

import * as MangoUI from '@mango-ui/components'

组件详情

Button

按钮组件用于触发一个操作。

Props

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | type | 按钮类型 | string | primary/success/warning/danger/info | primary | | size | 按钮尺寸 | string | large/medium/small | medium | | disabled | 是否禁用 | boolean | - | false |

Card

卡片组件用于展示信息。

Props

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | shadow | 卡片阴影显示时机 | string | always/hover/never | always |

Icon

图标组件用于显示图标。

Props

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | name | 图标名称 | string | - | - | | size | 图标大小 | string/number | - | 16px | | color | 图标颜色 | string | - | currentColor |

Toast

轻提示组件用于显示简短的信息提示。

Props

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | message | 提示文本 | string | - | - | | type | 提示类型 | string | success/fail/loading/text | text | | position | 提示位置 | string | top/middle/bottom | middle | | duration | 展示时长(ms) | number | - | 2000 |

方法

| 方法名 | 说明 | 参数 | | --- | --- | --- | | show | 展示提示 | options | | hide | 隐藏提示 | - |