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

mthc-pc-common

v1.3.0

Published

新大象拍车组件和工具函数

Readme

mthc-pc-common

[mthc-pc-common],是一个基于umi, react+ts的包。里面的内容为新大象拍车项目用到的公共组件和公共函数。旨在解决每个项目都存在大量相同组件和代码问题


如何使用

[现在我们没有私有npm 源]

使用发布在 npm 上的方式

npm install mthc-pc-common import { requestConfig, Toekn, User, Auth } from 'mthc-pc-common';

使用coding上代码

在你的项目的 package.json 文件中,找到 dependenciesdevDependencies 字段,并将依赖项指定为 Coding 的 Git URL,例如:

"dependencies": { "your-package-name": "git+https://coding.net/u/username/p/repository.git" }

推荐第一种


包里提供方法

       🎉 [User] 和用户有关数据。信息,menu
       🎉[Auth]鉴权
       🎉 [requestConfig] 基于umi的request 针对token,错误处理,数据返回和报错提示的统一处理
       🎉 [Toekn] token、time 在localStorage的操作方法

组件

       🎉 [AvatarName] [AvatarDropdown] header 右侧用户头像按钮
       🎉 [SearchForm] Table Search 组件
       🎉 [LoginContainer] 登录页面
       🎉 [NormalForm] 车检报告
       🎉 [ReportFrom] 车检报告

Hooks

       🎉 [usePagination] 分页

Style

       🍀 [index.scss] 默认样式重置 面包屑 menu栏样式
       🍀 [common.module.scss] 页面一些公共样式
       🍀 [_publicFlex] 针对Flex的一些样式定义
       🍀 [_themes] 针对不同背景下设置的样式变量
       🍀 [_mixin] 使用变量的方法

页面使用

例子

import { AvatarDropdown, AvatarName, requestConfig, Toekn, User } from 'mthc-pc-common';
import 'mthc-pc-common/style/index.scss';