Skip to content

Commit b3c45ef

Browse files
committed
feat: 修改项目名 发布npm仓库和私有库
1 parent 593f2f8 commit b3c45ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+148
-110
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ node_modules
77
.dumi/tmp-production
88
.DS_Store
99
server
10+
.npmrc

.npmrc

-2
This file was deleted.

README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## 介绍
22

33
本仓库是一个文档与组件集于一体的仓库,里面包含了一些常用的 react 组件,便于快速开发。
4-
可以将本项目克隆下来后,自己发布到自己的私有库上。也可以直接访问到本项目的私有库,使用 `npm config set --global @lands:registry=https://npm.lantao.work`,或者在项目中 `.npmrc` 文件写入 `@lands:registry=https://npm.lantao.work/`,组件仓库长期开放,项目公开维护。
4+
@lands-pro/antd-react-components 分别发布在了 npm 公有库和私有库,可自行决定安装的地址
55

66
## 相关文档
77

8-
[组件文档](https://procomponents.lantao.work/)
8+
[组件文档](component.lantao.work)
99

10-
[组件私有库](https://npm.lantao.work)
10+
[GitHub](npm.lantao.work)
1111

1212
## Development
1313

@@ -31,6 +31,17 @@ $ pnpm run docs:build
3131
$ pnpm run doctor
3232
```
3333

34+
## 效果演示
35+
36+
![alt text](img/Snipaste_2024-03-27_11-55-13.png)
37+
![alt text](img/Snipaste_2024-03-27_11-59-28.png)
38+
![alt text](img/Snipaste_2024-03-27_11-58-24.png)
39+
![alt text](img/Snipaste_2024-03-27_11-57-46.png)
40+
![alt text](img/Snipaste_2024-03-27_11-57-10.png)
41+
![alt text](img/Snipaste_2024-03-27_11-56-49.png)
42+
![alt text](img/Snipaste_2024-03-27_11-56-35.png)
43+
![alt text](img/Snipaste_2024-03-27_11-55-31.png)
44+
3445
## LICENSE
3546

3647
MIT

docs/changelog/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ nav:
77

88
# 变更日志
99

10+
## 1.0.0
11+
12+
### 💥 功能新增
13+
14+
- 更新了部分样式
15+
- 修复了部分文档说明
16+
- 修改项目名 发布 npm 仓库和私有库
17+
1018
## 0.2.0
1119

1220
### 💥 功能新增

docs/guide/index.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,13 @@ group: 使用指南
2121
}
2222
```
2323

24-
- 使用 `npm config set --global @lands:registry=https://npm.lantao.work`,或者在项目中 `.npmrc` 文件写入 `@lands:registry=https://npm.lantao.work/`
25-
- 使用 `pnpm i @lands/antd-react-components` 安装包,如果之前已经安装需要将原来的包删除后再安装。
24+
## 该包发布在了私有库和 npm 公有库
25+
26+
### 使用 npm 库
27+
28+
无需配置
29+
30+
### 使用私有库包
31+
32+
- 使用 `npm config set --global @lands:registry=http://npm.lantao.work`,或者在项目中 `.npmrc` 文件写入 `@lands:registry=http://npm.lantao.work/`
33+
- 使用 `pnpm i @lands-pro/antd-react-components` 安装包,如果之前已经安装需要将原来的包删除后再安装。

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: lands
44

55
hero:
66
title: 前端React组件库
7-
description: '@lands/antd-react-components一个基于antd高度封装的react的组件库'
7+
description: '@lands-pro/antd-react-components一个基于antd5和Pro Components高度封装的react的组件库'
88
actions:
99
- text: 开始使用
1010
link: /guide

docs/utils/event.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: 全局监听
1010
## 创建一个监听者模式
1111

1212
```ts
13-
import { getNewEmitter3 } from '@lands/antd-react-components/dist/event';
13+
import { getNewEmitter3 } from '@lands-pro/antd-react-components/dist/event';
1414
// 定义全局监听者的类型key
1515
type GLOBAL_EVENT_Type = {
1616
'@lands_tabs_showGlobalTabBar': boolean;

docs/utils/index.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ order: 1
2222
import React, { useState } from 'react';
2323
import ReactJson from 'react-json-view';
2424

25-
import { listToMap } from '@lands/antd-react-components/dist/utils';
25+
import { listToMap } from '@lands-pro/antd-react-components/dist/utils';
2626
const data = [
2727
{ id: 'id1', a: 1, b: 2, c: 3, d: 4, children: [] },
2828
{ id: 'id2', a: 1, b: 2, c: 3, d: 4, children: [] },
@@ -53,7 +53,7 @@ export default () => {
5353
import React, { useState } from 'react';
5454
import ReactJson from 'react-json-view';
5555

56-
import { listToMap } from '@lands/antd-react-components/dist/utils';
56+
import { listToMap } from '@lands-pro/antd-react-components/dist/utils';
5757

5858
type returnMapType = {
5959
a: number;
@@ -121,7 +121,7 @@ export default () => {
121121
import React, { useState } from 'react';
122122
import ReactJson from 'react-json-view';
123123

124-
import { treeToMap } from '@lands/antd-react-components/dist/utils';
124+
import { treeToMap } from '@lands-pro/antd-react-components/dist/utils';
125125

126126
const data = [
127127
{
@@ -156,7 +156,7 @@ export default () => {
156156
import React, { useState } from 'react';
157157
import ReactJson from 'react-json-view';
158158

159-
import { treeToMap } from '@lands/antd-react-components/dist/utils';
159+
import { treeToMap } from '@lands-pro/antd-react-components/dist/utils';
160160

161161
const data = [
162162
{
@@ -215,7 +215,7 @@ list 对象数组转树 兼容多棵树 多个顶点情况,该方法会影响
215215
import React, { useState } from 'react';
216216
import ReactJson from 'react-json-view';
217217

218-
import { listToTree } from '@lands/antd-react-components/dist/utils';
218+
import { listToTree } from '@lands-pro/antd-react-components/dist/utils';
219219

220220
const data = [
221221
{ id: 1, a: 1, b: 2, c: 3, d: 4, parentId: '-1' },
@@ -254,7 +254,7 @@ export default () => {
254254
import React, { useState } from 'react';
255255
import ReactJson from 'react-json-view';
256256

257-
import { listToTree } from '@lands/antd-react-components/dist/utils';
257+
import { listToTree } from '@lands-pro/antd-react-components/dist/utils';
258258

259259
const data = [
260260
{ userId: 'userid1', name: 'lantao', pid: '-1' },
@@ -338,7 +338,7 @@ export default () => {
338338
#### 基本使用
339339

340340
```ts
341-
import { utils } from '@lands/antd-react-components';
341+
import { utils } from '@lands-pro/antd-react-components';
342342
const { deepCopy } = utils;
343343
let obj = { a: 1, b: 2, d: { E: {} } };
344344
obj.d.E = obj;
@@ -361,7 +361,7 @@ IToValueEnum 将数组转换成 map,便于用在下拉选择框等组件上
361361
#### 基本使用
362362

363363
```ts
364-
import { utils } from '@lands/antd-react-components';
364+
import { utils } from '@lands-pro/antd-react-components';
365365
const { IToValueEnum } = utils;
366366
let dict = [{ id: 1, name: 'lantao',tel:'15723185734' },{ id: 2, name: 'lantao2',tel:'15723185731' }];
367367
console.log(IToValueEnum({dict,fieldName:{textString:'name',valueString:'id'}}); // 输出:Map({1:{ id: 1, name: 'lantao',tel:'15723185734' },2:{ id: 2, name: 'lantao2',tel:'15723185731' }})
@@ -390,7 +390,7 @@ copyAndAdd 会对原数据影响
390390
#### 基本使用
391391
392392
```ts
393-
import { utils } from '@lands/antd-react-components';
393+
import { utils } from '@lands-pro/antd-react-components';
394394
const { copyAndAdd } = utils;
395395
let obj = { id: 1, name: 'lantao',tel:'15723185734' };
396396
console.log(copyAndAdd(obj,{ oldField: ['id','name']; field: string['value','label'] })); // 输出:{ id: 1, name: 'lantao',value: 1, label: 'lantao',tel:'15723185734' }
@@ -410,7 +410,7 @@ copyAndAdd2 会对原数据影响,仅仅返回 field 描述了的数据
410410
#### 基本使用
411411
412412
```ts
413-
import { utils } from '@lands/antd-react-components';
413+
import { utils } from '@lands-pro/antd-react-components';
414414
const { copyAndAdd2 } = utils;
415415
let obj = { id: 1, name: 'lantao',tel:'15723185734' };
416416
console.log(copyAndAdd2(obj,{ oldField: ['id','id','name']; field: string['value','key','label'] })); // 输出:{ value: 1, key: 1, label: 'lantao' }
@@ -432,7 +432,7 @@ console.log(copyAndAdd2(obj,{ oldField: ['id','id','name']; field: string['value
432432
#### 基本使用
433433
434434
```jsx
435-
import { formatDate } from '@lands/antd-react-components/dist/utils';
435+
import { formatDate } from '@lands-pro/antd-react-components/dist/utils';
436436
import dayjs from 'dayjs';
437437
const now = dayjs();
438438

@@ -505,7 +505,7 @@ export type dateTypeProps =
505505
#### 基本使用
506506
507507
```jsx
508-
import { returnTag } from '@lands/antd-react-components/dist/utils';
508+
import { returnTag } from '@lands-pro/antd-react-components/dist/utils';
509509
const value = '1';
510510
const obj = { 1: '', 2: '' };
511511
const label = obj[value];
@@ -519,7 +519,7 @@ export default () => {
519519
#### 进阶使用
520520
521521
```jsx
522-
import { returnTag } from '@lands/antd-react-components/dist/utils';
522+
import { returnTag } from '@lands-pro/antd-react-components/dist/utils';
523523
const value = '2';
524524
const obj = { 1: '', 2: '' };
525525
const label = obj[value];
@@ -591,7 +591,7 @@ switch (String(value)) {
591591
#### 基本使用
592592
593593
```jsx
594-
import { adjustColor } from '@lands/antd-react-components/dist/utils';
594+
import { adjustColor } from '@lands-pro/antd-react-components/dist/utils';
595595

596596
export default () => {
597597
return (
@@ -622,7 +622,7 @@ export default () => {
622622
#### 基本使用
623623

624624
```ts
625-
import { curry } from '@lands/antd-react-components/dist/utils';
625+
import { curry } from '@lands-pro/antd-react-components/dist/utils';
626626
const sum = (a: number, b: number, c: number) => a + b + c;
627627
const currySum = curry(sum, 1, 2);
628628
currySum(3); //6
@@ -650,7 +650,7 @@ curry(sum, 1)(2)(3); //6
650650
#### 基本使用
651651
652652
```jsx
653-
import { sha256Hash } from '@lands/antd-react-components/dist/utils';
653+
import { sha256Hash } from '@lands-pro/antd-react-components/dist/utils';
654654
import { useState, useEffect } from 'react';
655655
export default () => {
656656
const [pwd, setPwd] = useState();
@@ -686,7 +686,7 @@ export default () => {
686686
```jsx
687687
import React, { useState } from 'react';
688688
import ReactJson from 'react-json-view';
689-
import { getIcon } from '@lands/antd-react-components/dist/utils';
689+
import { getIcon } from '@lands-pro/antd-react-components/dist/utils';
690690

691691
export default () => {
692692
return <>{getIcon('icon-bank')}</>;
@@ -698,7 +698,7 @@ export default () => {
698698
```jsx
699699
import React, { useState } from 'react';
700700
import ReactJson from 'react-json-view';
701-
import { getIcon } from '@lands/antd-react-components/dist/utils';
701+
import { getIcon } from '@lands-pro/antd-react-components/dist/utils';
702702
const icon = getIcon(
703703
'icon-bank',
704704
40,
@@ -732,7 +732,7 @@ iconfontUrl 的默认值可能会根据版本变化而变化,目前是在/icon
732732
733733
```jsx
734734
import React, { useState } from 'react';
735-
import { getUUID } from '@lands/antd-react-components/dist/utils';
735+
import { getUUID } from '@lands-pro/antd-react-components/dist/utils';
736736
export default () => {
737737
const [uuid, setUUid] = useState(getUUID());
738738
return <>{uuid}</>;
@@ -753,14 +753,14 @@ export default () => {
753753
#### 基本使用
754754
755755
```jsx
756-
import { dynamicNavTheme } from '@lands/antd-react-components/dist/utils';
756+
import { dynamicNavTheme } from '@lands-pro/antd-react-components/dist/utils';
757757
export default () => {
758758
return <>{dynamicNavTheme()}</>;
759759
};
760760
```
761761
762762
```jsx
763-
import { dynamicNavTheme } from '@lands/antd-react-components/dist/utils';
763+
import { dynamicNavTheme } from '@lands-pro/antd-react-components/dist/utils';
764764
export default () => {
765765
return <>{dynamicNavTheme([12, 0, 0], [13, 0, 0])}</>;
766766
};
@@ -779,15 +779,15 @@ export default () => {
779779
系统的默认登录地址在`'/user/login'`,如果系统没有将登录组件放在此地址下,则需要自己在项目中单独导出变量供全局使用。建议登录地址放在 user/login 目录下,如果不放在该目录下,也需要创建变量全局管理。
780780
781781
```ts
782-
import { globalPath } from '@lands/antd-react-components/dist/utils';
782+
import { globalPath } from '@lands-pro/antd-react-components/dist/utils';
783783
console.log(globalPath.loginPath); // '/user/login'
784784
console.log(globalPath.loginPathRedirect); // '/user/login?redirect=xxxxx' 当前页面重定向当登录页的地址
785785
```
786786
787787
### 获取当前环境是否处于开发模式
788788
789789
```ts
790-
import { isDev } from '@lands/antd-react-components/dist/utils';
790+
import { isDev } from '@lands-pro/antd-react-components/dist/utils';
791791

792792
console.log(isDev); // true||false
793793
```
@@ -802,7 +802,7 @@ console.log(isDev); // true||false
802802
#### 基本使用
803803
804804
```ts
805-
import { lookFile } from '@lands/antd-react-components/dist/utils';
805+
import { lookFile } from '@lands-pro/antd-react-components/dist/utils';
806806
lookFile('https://xxx.com/1.pdf');
807807
```
808808
@@ -820,7 +820,7 @@ lookFile('https://xxx.com/1.pdf');
820820
#### 基本使用
821821
822822
```ts
823-
import { downloadFile } from '@lands/antd-react-components/dist/utils';
823+
import { downloadFile } from '@lands-pro/antd-react-components/dist/utils';
824824
downloadFile('https://xxx.com/1.pdf', '1.pdf');
825825
```
826826
@@ -839,7 +839,7 @@ downloadFile('https://xxx.com/1.pdf', '1.pdf');
839839
#### 基本使用
840840
841841
```ts
842-
import { isCodeSuccess } from '@lands/antd-react-components/dist/utils';
842+
import { isCodeSuccess } from '@lands-pro/antd-react-components/dist/utils';
843843
const res = await system.getUserInfo();
844844
isCodeSuccess(res.bizCode);
845845
```

docs/utils/validator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
VUserName,
1818
VPwd,
1919
VEmail,
20-
} from '@lands/antd-react-components/dist/validator';
20+
} from '@lands-pro/antd-react-components/dist/validator';
2121

2222
const columns: ProTableEditColumns<SYSAPI.SysUser>[] = [
2323
{
@@ -60,7 +60,7 @@ const columns: ProTableEditColumns<SYSAPI.SysUser>[] = [
6060
## 添加一个校验器
6161

6262
```ts
63-
import { craeteValidator } from '@lands/antd-react-components/dist/validator';
63+
import { craeteValidator } from '@lands-pro/antd-react-components/dist/validator';
6464

6565
const testValidator = craeteValidator(/^1[3-9]\d{9}$/, '手机号格式不正确');
6666
const columns: ProTableEditColumns<SYSAPI.SysUser>[] = [

img/Snipaste_2024-03-27_11-55-13.png

228 KB
Loading

img/Snipaste_2024-03-27_11-55-31.png

106 KB
Loading

img/Snipaste_2024-03-27_11-56-35.png

144 KB
Loading

img/Snipaste_2024-03-27_11-56-49.png

108 KB
Loading

img/Snipaste_2024-03-27_11-57-10.png

98.9 KB
Loading

img/Snipaste_2024-03-27_11-57-46.png

237 KB
Loading

img/Snipaste_2024-03-27_11-58-24.png

88.8 KB
Loading

img/Snipaste_2024-03-27_11-59-28.png

135 KB
Loading

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@lands/antd-react-components",
3-
"version": "1.0.4",
4-
"description": "lands-后台开发常用的react组件",
2+
"name": "@lands-pro/antd-react-components",
3+
"version": "1.0.0",
4+
"description": "Lands Pro-后台开发常用的react组件",
55
"license": "MIT",
66
"author": {
77
"name": "兰涛",

src/BooleanCheckbox/demos/test1.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BooleanCheckbox } from '@lands/antd-react-components';
1+
import { BooleanCheckbox } from '@lands-pro/antd-react-components';
22
import React from 'react';
33
export default () => {
44
return (

src/BooleanCheckbox/demos/test2.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BooleanCheckbox } from '@lands/antd-react-components';
1+
import { BooleanCheckbox } from '@lands-pro/antd-react-components';
22
import { Button, Form, message } from 'antd';
33
import React, { useState } from 'react';
44
export default () => {

src/ColorPrimaryPicker/demos/test1.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ColorPrimaryPicker } from '@lands/antd-react-components';
1+
import { ColorPrimaryPicker } from '@lands-pro/antd-react-components';
22
import React, { useState } from 'react';
33
export default () => {
44
const [rgb, setRgb] = useState('');

src/DelRecord/demos/test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
2-
import { DelRecord } from '@lands/antd-react-components';
2+
import { DelRecord } from '@lands-pro/antd-react-components';
33
import React, { useRef } from 'react';
44
// 模拟网络请求
55
const deleteApprovalTemplate = async (params: any, option: any) => {

src/DynamicTheme/demos/test1.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DynamicTheme } from '@lands/antd-react-components';
1+
import { DynamicTheme } from '@lands-pro/antd-react-components';
22
import { message } from 'antd';
33
import dayjs from 'dayjs';
44
import React from 'react';

src/DynamicTheme/demos/test2.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DynamicTheme } from '@lands/antd-react-components';
1+
import { DynamicTheme } from '@lands-pro/antd-react-components';
22
import { message } from 'antd';
33
import React from 'react';
44

0 commit comments

Comments
 (0)