1.3.0 • Published 2 years ago

mthc-pc-common v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2-0

2 years ago

2.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago