New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mthc-pc-common

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mthc-pc-common

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

latest
npmnpm
Version
1.3.0
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

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';

FAQs

Package last updated on 18 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts