@@ -22,7 +22,7 @@ order: 1
22
22
import React , { useState } from ' react' ;
23
23
import ReactJson from ' react-json-view' ;
24
24
25
- import { listToMap } from ' @lands/antd-react-components/dist/utils' ;
25
+ import { listToMap } from ' @lands-pro /antd-react-components/dist/utils' ;
26
26
const data = [
27
27
{ id: ' id1' , a: 1 , b: 2 , c: 3 , d: 4 , children: [] },
28
28
{ id: ' id2' , a: 1 , b: 2 , c: 3 , d: 4 , children: [] },
@@ -53,7 +53,7 @@ export default () => {
53
53
import React , { useState } from ' react' ;
54
54
import ReactJson from ' react-json-view' ;
55
55
56
- import { listToMap } from ' @lands/antd-react-components/dist/utils' ;
56
+ import { listToMap } from ' @lands-pro /antd-react-components/dist/utils' ;
57
57
58
58
type returnMapType = {
59
59
a: number;
@@ -121,7 +121,7 @@ export default () => {
121
121
import React , { useState } from ' react' ;
122
122
import ReactJson from ' react-json-view' ;
123
123
124
- import { treeToMap } from ' @lands/antd-react-components/dist/utils' ;
124
+ import { treeToMap } from ' @lands-pro /antd-react-components/dist/utils' ;
125
125
126
126
const data = [
127
127
{
@@ -156,7 +156,7 @@ export default () => {
156
156
import React , { useState } from ' react' ;
157
157
import ReactJson from ' react-json-view' ;
158
158
159
- import { treeToMap } from ' @lands/antd-react-components/dist/utils' ;
159
+ import { treeToMap } from ' @lands-pro /antd-react-components/dist/utils' ;
160
160
161
161
const data = [
162
162
{
@@ -215,7 +215,7 @@ list 对象数组转树 兼容多棵树 多个顶点情况,该方法会影响
215
215
import React , { useState } from ' react' ;
216
216
import ReactJson from ' react-json-view' ;
217
217
218
- import { listToTree } from ' @lands/antd-react-components/dist/utils' ;
218
+ import { listToTree } from ' @lands-pro /antd-react-components/dist/utils' ;
219
219
220
220
const data = [
221
221
{ id: 1 , a: 1 , b: 2 , c: 3 , d: 4 , parentId: ' -1' },
@@ -254,7 +254,7 @@ export default () => {
254
254
import React , { useState } from ' react' ;
255
255
import ReactJson from ' react-json-view' ;
256
256
257
- import { listToTree } from ' @lands/antd-react-components/dist/utils' ;
257
+ import { listToTree } from ' @lands-pro /antd-react-components/dist/utils' ;
258
258
259
259
const data = [
260
260
{ userId: ' userid1' , name: ' lantao' , pid: ' -1' },
@@ -338,7 +338,7 @@ export default () => {
338
338
#### 基本使用
339
339
340
340
``` ts
341
- import { utils } from ' @lands/antd-react-components' ;
341
+ import { utils } from ' @lands-pro /antd-react-components' ;
342
342
const { deepCopy } = utils ;
343
343
let obj = { a: 1 , b: 2 , d: { E: {} } };
344
344
obj .d .E = obj ;
@@ -361,7 +361,7 @@ IToValueEnum 将数组转换成 map,便于用在下拉选择框等组件上
361
361
#### 基本使用
362
362
363
363
``` ts
364
- import { utils } from ' @lands/antd-react-components' ;
364
+ import { utils } from ' @lands-pro /antd-react-components' ;
365
365
const { IToValueEnum } = utils ;
366
366
let dict = [{ id: 1 , name: ' lantao' ,tel:' 15723185734' },{ id: 2 , name: ' lantao2' ,tel:' 15723185731' }];
367
367
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 会对原数据影响
390
390
#### 基本使用
391
391
392
392
` ` ` ts
393
- import { utils } from ' @lands/antd-react-components' ;
393
+ import { utils } from ' @lands-pro /antd-react-components' ;
394
394
const { copyAndAdd } = utils ;
395
395
let obj = { id: 1 , name: ' lantao' ,tel:' 15723185734' };
396
396
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 描述了的数据
410
410
#### 基本使用
411
411
412
412
` ` ` ts
413
- import { utils } from ' @lands/antd-react-components' ;
413
+ import { utils } from ' @lands-pro /antd-react-components' ;
414
414
const { copyAndAdd2 } = utils ;
415
415
let obj = { id: 1 , name: ' lantao' ,tel:' 15723185734' };
416
416
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
432
432
#### 基本使用
433
433
434
434
` ` ` jsx
435
- import { formatDate } from ' @lands/antd-react-components/dist/utils' ;
435
+ import { formatDate } from ' @lands-pro /antd-react-components/dist/utils' ;
436
436
import dayjs from ' dayjs' ;
437
437
const now = dayjs ();
438
438
@@ -505,7 +505,7 @@ export type dateTypeProps =
505
505
#### 基本使用
506
506
507
507
` ` ` jsx
508
- import { returnTag } from ' @lands/antd-react-components/dist/utils' ;
508
+ import { returnTag } from ' @lands-pro /antd-react-components/dist/utils' ;
509
509
const value = ' 1' ;
510
510
const obj = { 1 : ' 男' , 2 : ' 女' };
511
511
const label = obj [value ];
@@ -519,7 +519,7 @@ export default () => {
519
519
#### 进阶使用
520
520
521
521
` ` ` jsx
522
- import { returnTag } from ' @lands/antd-react-components/dist/utils' ;
522
+ import { returnTag } from ' @lands-pro /antd-react-components/dist/utils' ;
523
523
const value = ' 2' ;
524
524
const obj = { 1 : ' 男' , 2 : ' 女' };
525
525
const label = obj [value ];
@@ -591,7 +591,7 @@ switch (String(value)) {
591
591
#### 基本使用
592
592
593
593
` ` ` jsx
594
- import { adjustColor } from ' @lands/antd-react-components/dist/utils' ;
594
+ import { adjustColor } from ' @lands-pro /antd-react-components/dist/utils' ;
595
595
596
596
export default () => {
597
597
return (
@@ -622,7 +622,7 @@ export default () => {
622
622
#### 基本使用
623
623
624
624
```ts
625
- import { curry } from ' @lands/antd-react-components/dist/utils' ;
625
+ import { curry } from ' @lands-pro /antd-react-components/dist/utils' ;
626
626
const sum = (a : number , b : number , c : number ) => a + b + c ;
627
627
const currySum = curry (sum , 1 , 2 );
628
628
currySum (3 ); // 6
@@ -650,7 +650,7 @@ curry(sum, 1)(2)(3); //6
650
650
#### 基本使用
651
651
652
652
` ` ` jsx
653
- import { sha256Hash } from ' @lands/antd-react-components/dist/utils' ;
653
+ import { sha256Hash } from ' @lands-pro /antd-react-components/dist/utils' ;
654
654
import { useState , useEffect } from ' react' ;
655
655
export default () => {
656
656
const [pwd, setPwd] = useState ();
@@ -686,7 +686,7 @@ export default () => {
686
686
` ` ` jsx
687
687
import React , { useState } from ' react' ;
688
688
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' ;
690
690
691
691
export default () => {
692
692
return <>{getIcon(' icon-bank' )}< / > ;
@@ -698,7 +698,7 @@ export default () => {
698
698
` ` ` jsx
699
699
import React , { useState } from ' react' ;
700
700
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' ;
702
702
const icon = getIcon (
703
703
' icon-bank' ,
704
704
40 ,
@@ -732,7 +732,7 @@ iconfontUrl 的默认值可能会根据版本变化而变化,目前是在/icon
732
732
733
733
` ` ` jsx
734
734
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' ;
736
736
export default () => {
737
737
const [uuid, setUUid] = useState (getUUID ());
738
738
return <>{uuid }< / > ;
@@ -753,14 +753,14 @@ export default () => {
753
753
#### 基本使用
754
754
755
755
` ` ` jsx
756
- import { dynamicNavTheme } from ' @lands/antd-react-components/dist/utils' ;
756
+ import { dynamicNavTheme } from ' @lands-pro /antd-react-components/dist/utils' ;
757
757
export default () => {
758
758
return <>{dynamicNavTheme()}< / > ;
759
759
};
760
760
` ` `
761
761
762
762
` ` ` jsx
763
- import { dynamicNavTheme } from ' @lands/antd-react-components/dist/utils' ;
763
+ import { dynamicNavTheme } from ' @lands-pro /antd-react-components/dist/utils' ;
764
764
export default () => {
765
765
return <>{dynamicNavTheme([12 , 0 , 0 ], [13 , 0 , 0 ])}< / > ;
766
766
};
@@ -779,15 +779,15 @@ export default () => {
779
779
系统的默认登录地址在 ` ' /user/login' ` ,如果系统没有将登录组件放在此地址下,则需要自己在项目中单独导出变量供全局使用。建议登录地址放在 user/login 目录下,如果不放在该目录下,也需要创建变量全局管理。
780
780
781
781
` ` ` ts
782
- import { globalPath } from ' @lands/antd-react-components/dist/utils' ;
782
+ import { globalPath } from ' @lands-pro /antd-react-components/dist/utils' ;
783
783
console .log (globalPath .loginPath ); // '/user/login'
784
784
console .log (globalPath .loginPathRedirect ); // '/user/login?redirect=xxxxx' 当前页面重定向当登录页的地址
785
785
` ` `
786
786
787
787
### 获取当前环境是否处于开发模式
788
788
789
789
` ` ` ts
790
- import { isDev } from ' @lands/antd-react-components/dist/utils' ;
790
+ import { isDev } from ' @lands-pro /antd-react-components/dist/utils' ;
791
791
792
792
console .log (isDev ); // true||false
793
793
` ` `
@@ -802,7 +802,7 @@ console.log(isDev); // true||false
802
802
#### 基本使用
803
803
804
804
` ` ` ts
805
- import { lookFile } from ' @lands/antd-react-components/dist/utils' ;
805
+ import { lookFile } from ' @lands-pro /antd-react-components/dist/utils' ;
806
806
lookFile (' https://xxx.com/1.pdf' );
807
807
` ` `
808
808
@@ -820,7 +820,7 @@ lookFile('https://xxx.com/1.pdf');
820
820
#### 基本使用
821
821
822
822
` ` ` ts
823
- import { downloadFile } from ' @lands/antd-react-components/dist/utils' ;
823
+ import { downloadFile } from ' @lands-pro /antd-react-components/dist/utils' ;
824
824
downloadFile (' https://xxx.com/1.pdf' , ' 1.pdf' );
825
825
` ` `
826
826
@@ -839,7 +839,7 @@ downloadFile('https://xxx.com/1.pdf', '1.pdf');
839
839
#### 基本使用
840
840
841
841
` ` ` ts
842
- import { isCodeSuccess } from ' @lands/antd-react-components/dist/utils' ;
842
+ import { isCodeSuccess } from ' @lands-pro /antd-react-components/dist/utils' ;
843
843
const res = await system .getUserInfo ();
844
844
isCodeSuccess (res .bizCode );
845
845
` ` `
0 commit comments