@cloudbase/weda-ui 3.1.6 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/components/chart/bar.json +14 -7
- package/dist/configs/components/chart/line.json +14 -7
- package/dist/configs/components/chart/pie.json +12 -6
- package/dist/configs/components/form/departTreeSelect.json +124 -0
- package/dist/configs/components/form/userTreeSelect.json +128 -0
- package/dist/configs/components/formdetail.json +105 -0
- package/dist/configs/components/listView.json +9 -1
- package/dist/configs/components/lottery.json +1 -1
- package/dist/configs/components/tabs.json +10 -9
- package/dist/configs/components/wxOpenApi/share.json +5 -2
- package/dist/configs/index.d.ts +6 -0
- package/dist/configs/index.js +6 -0
- package/dist/docs/common/format.js +24 -5
- package/dist/web/actions/showModal/index.css +3 -0
- package/dist/web/actions/showModal/index.d.ts +1 -0
- package/dist/web/actions/showModal/index.js +1 -0
- package/dist/web/components/calendar/index.js +10 -2
- package/dist/web/components/carousel/index.js +4 -0
- package/dist/web/components/chart/common/core/eChartBase.js +8 -2
- package/dist/web/components/form/form/index.js +10 -7
- package/dist/web/components/form/location/common/mapChoose.js +2 -0
- package/dist/web/components/form/location/common/mapView.js +2 -0
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +3 -1
- package/dist/web/components/form/location/components/LocationH5/location.module.css +3 -0
- package/dist/web/components/form/select/h5.js +4 -0
- package/dist/web/components/form/select/index.js +2 -8
- package/dist/web/components/form/switch/index.js +3 -2
- package/dist/web/components/form/switch/switch.module.css +7 -0
- package/dist/web/components/form/uploader/uploader.h5.d.ts +1 -0
- package/dist/web/components/form/uploader/uploader.h5.js +41 -17
- package/dist/web/components/form/uploader/uploader.pc.js +31 -2
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +36 -14
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +34 -11
- package/dist/web/components/form/userOrgSelect/comTool.d.ts +7 -0
- package/dist/web/components/form/userOrgSelect/comTool.js +89 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +20 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +259 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +4 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +153 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.d.ts +2 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.js +17 -0
- package/dist/web/components/form/userOrgSelect/index.d.ts +2 -0
- package/dist/web/components/form/userOrgSelect/index.js +17 -0
- package/dist/web/components/form/userOrgSelect/userOrgSelect.less +643 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +24 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +276 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +9 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.js +229 -0
- package/dist/web/components/form/userOrgSelect/utils.d.ts +35 -0
- package/dist/web/components/form/userOrgSelect/utils.js +72 -0
- package/dist/web/components/formdetail/index.css +115 -0
- package/dist/web/components/formdetail/index.d.ts +28 -0
- package/dist/web/components/formdetail/index.js +170 -0
- package/dist/web/components/index.d.ts +3 -0
- package/dist/web/components/index.js +3 -0
- package/dist/web/components/listView/index.css +35 -5
- package/dist/web/components/listView/index.js +92 -68
- package/dist/web/components/listView/interface.d.ts +5 -0
- package/dist/web/components/lottery/index.js +2 -1
- package/dist/web/components/lottery/lotteryUtil.js +1 -0
- package/dist/web/components/navigationBar/index.css +21 -29
- package/dist/web/components/richText/index.css +1 -0
- package/dist/web/components/swiper/index.js +5 -1
- package/dist/web/components/wedaVideo/index.js +1 -0
- package/dist/web/utils/getUserService.d.ts +17 -0
- package/dist/web/utils/getUserService.js +148 -0
- package/dist/web/utils/platform.js +2 -0
- package/dist/web/weda-ui.css +9 -0
- package/package.json +14 -13
- package/dist/asset-manifest.json +0 -17
- package/dist/index.html +0 -88
- package/dist/static/js/bundle.js +0 -963
- package/dist/static/js/bundle.js.map +0 -1
- package/dist/static/js/main.chunk.js +0 -8841
- package/dist/static/js/main.chunk.js.map +0 -1
- package/dist/static/js/vendors~main.chunk.js +0 -247885
- package/dist/static/js/vendors~main.chunk.js.map +0 -1
- package/dist/static/media/ef6fa527e24e354765d806b826b41391.fa67580a.svg +0 -627
- package/dist/web/components/auth/index.d.ts +0 -10
- package/dist/web/components/auth/index.js +0 -37
- package/dist/web/utils/events.d.ts +0 -1
- package/dist/web/utils/events.js +0 -2
|
@@ -80,12 +80,13 @@ export default React.forwardRef(function Lottery({ className, id, style, prizeLi
|
|
|
80
80
|
});
|
|
81
81
|
setLotteryList(list);
|
|
82
82
|
setActivedId(-1);
|
|
83
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
83
84
|
setTimeout(() => {
|
|
84
85
|
events.finishLottery({
|
|
85
86
|
prize: idx,
|
|
86
87
|
result: list[idx - 1],
|
|
87
88
|
});
|
|
88
|
-
|
|
89
|
+
// 延迟700毫秒显示的视觉效果更好,否则看不清结果就弹出dialog盖住了
|
|
89
90
|
}, 700);
|
|
90
91
|
}
|
|
91
92
|
};
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
.wedatea2td-menu__title
|
|
51
51
|
.wedatea2td-menu__title-icon {
|
|
52
52
|
display: block;
|
|
53
|
-
width: 2.
|
|
54
|
-
height: 2.
|
|
53
|
+
width: 2.28571rem;
|
|
54
|
+
height: 2.28571rem;
|
|
55
55
|
margin-right: 0.85714rem;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -60,8 +60,7 @@
|
|
|
60
60
|
.weda-menu__menu-content
|
|
61
61
|
.wedatea2td-menu__title
|
|
62
62
|
.wedatea2td-h2 {
|
|
63
|
-
font-size: 1.
|
|
64
|
-
line-height: 1.28571em;
|
|
63
|
+
font-size: 1.14286rem;
|
|
65
64
|
color: #000000;
|
|
66
65
|
margin-top: 0;
|
|
67
66
|
font-weight: normal;
|
|
@@ -85,8 +84,8 @@
|
|
|
85
84
|
.wedatea2td-menu__body
|
|
86
85
|
.wedatea2td-menu__item
|
|
87
86
|
.wedatea2td-menu__list-icon {
|
|
88
|
-
width: 1.
|
|
89
|
-
height: 1.
|
|
87
|
+
width: 1.42857rem;
|
|
88
|
+
height: 1.42857rem;
|
|
90
89
|
margin-top: 0;
|
|
91
90
|
}
|
|
92
91
|
|
|
@@ -96,12 +95,10 @@
|
|
|
96
95
|
.wedatea2td-menu__item
|
|
97
96
|
.wedatea2td-menu__text {
|
|
98
97
|
font-weight: normal;
|
|
99
|
-
font-size:
|
|
100
|
-
line-height: 1.5714em;
|
|
98
|
+
font-size: 1rem;
|
|
101
99
|
color: rgba(0, 0, 0, 0.9);
|
|
102
100
|
padding: 0;
|
|
103
101
|
}
|
|
104
|
-
|
|
105
102
|
.weda-menu .weda-menu__menu-content .wedatea2td-icon-arrowdown,
|
|
106
103
|
.weda-menu
|
|
107
104
|
.weda-menu__menu-content
|
|
@@ -298,8 +295,7 @@
|
|
|
298
295
|
|
|
299
296
|
.weda-menu-horizontal .weda-menu__nav .weda-menu__nav-title .weda-menu__title {
|
|
300
297
|
font-weight: normal;
|
|
301
|
-
font-size: 1.
|
|
302
|
-
line-height: 1.28571rem;
|
|
298
|
+
font-size: 1.14286rem;
|
|
303
299
|
color: #000000;
|
|
304
300
|
margin-left: 0.85714rem;
|
|
305
301
|
}
|
|
@@ -410,8 +406,7 @@
|
|
|
410
406
|
|
|
411
407
|
.weda-menu-horizontal .wedatea2td-dropdown .wedatea2td-dropdown__value {
|
|
412
408
|
font-weight: 400;
|
|
413
|
-
font-size:
|
|
414
|
-
line-height: 1.5714em;
|
|
409
|
+
font-size: 1rem;
|
|
415
410
|
color: #000000;
|
|
416
411
|
white-space: nowrap;
|
|
417
412
|
}
|
|
@@ -437,8 +432,7 @@
|
|
|
437
432
|
.weda-menu__dropdown
|
|
438
433
|
.wedatea2td-dropdown__value {
|
|
439
434
|
font-weight: normal;
|
|
440
|
-
font-size:
|
|
441
|
-
line-height: 1.5714em;
|
|
435
|
+
font-size: 1rem;
|
|
442
436
|
color: #000000;
|
|
443
437
|
padding: 0;
|
|
444
438
|
white-space: nowrap;
|
|
@@ -450,7 +444,7 @@
|
|
|
450
444
|
.wedatea2td-dropdown__header {
|
|
451
445
|
padding-left: 0;
|
|
452
446
|
padding-right: 1.64286rem;
|
|
453
|
-
height:
|
|
447
|
+
height: 1.57143rem;
|
|
454
448
|
}
|
|
455
449
|
|
|
456
450
|
.weda-menu-horizontal
|
|
@@ -515,8 +509,7 @@
|
|
|
515
509
|
margin-bottom: 0.28571rem;
|
|
516
510
|
color: rgba(0, 0, 0, 0.9);
|
|
517
511
|
font-weight: 400;
|
|
518
|
-
font-size:
|
|
519
|
-
line-height: 1.5714em;
|
|
512
|
+
font-size: 1rem;
|
|
520
513
|
}
|
|
521
514
|
|
|
522
515
|
.weda-menu__dropdown-menu-list .weda-menu__dropdown-list-item:last-child {
|
|
@@ -543,7 +536,7 @@
|
|
|
543
536
|
align-items: center;
|
|
544
537
|
justify-content: space-between;
|
|
545
538
|
padding: 0 1.42857rem 0 1.14286rem;
|
|
546
|
-
height: 4.
|
|
539
|
+
height: 4.57143rem;
|
|
547
540
|
background-color: #fff;
|
|
548
541
|
position: relative;
|
|
549
542
|
box-shadow: 0 0.14286rem 0.14286rem rgba(0, 0, 0, 0.05);
|
|
@@ -557,8 +550,7 @@
|
|
|
557
550
|
|
|
558
551
|
.weda-menu-mobile .weda-menu__bar-main .weda-menu__main-logo {
|
|
559
552
|
font-weight: normal;
|
|
560
|
-
font-size: 1.
|
|
561
|
-
line-height: 1.28571em;
|
|
553
|
+
font-size: 1.28571rem;
|
|
562
554
|
color: #000000;
|
|
563
555
|
text-decoration: none;
|
|
564
556
|
display: flex;
|
|
@@ -566,8 +558,8 @@
|
|
|
566
558
|
}
|
|
567
559
|
|
|
568
560
|
.weda-menu-mobile .weda-menu__bar-main .weda-menu__main-icon {
|
|
569
|
-
width: 2.
|
|
570
|
-
height: 2.
|
|
561
|
+
width: 2.28571rem;
|
|
562
|
+
height: 2.28571rem;
|
|
571
563
|
margin-right: 0.85714rem;
|
|
572
564
|
}
|
|
573
565
|
|
|
@@ -579,8 +571,8 @@
|
|
|
579
571
|
|
|
580
572
|
.weda-menu-mobile .weda-menu__bar-extra .weda-menu__bar-btn,
|
|
581
573
|
.weda-menu-mobile .weda-menu__bar-extra .weda-menu__bar-btn--close {
|
|
582
|
-
width: 1.
|
|
583
|
-
height: 1.
|
|
574
|
+
width: 1.71429rem;
|
|
575
|
+
height: 1.71429rem;
|
|
584
576
|
}
|
|
585
577
|
|
|
586
578
|
.weda-menu__drawer {
|
|
@@ -676,14 +668,12 @@
|
|
|
676
668
|
.wedatea2td-menu__submenu
|
|
677
669
|
.wedatea2td-menu__list
|
|
678
670
|
.wedatea2td-menu__text {
|
|
679
|
-
font-size: 1.
|
|
680
|
-
line-height: 1.142857em;
|
|
671
|
+
font-size: 1.14286rem;
|
|
681
672
|
color: rgba(0, 0, 0, 0.9);
|
|
682
673
|
padding: 0;
|
|
683
674
|
max-width: 100%;
|
|
684
675
|
font-weight: normal;
|
|
685
676
|
}
|
|
686
|
-
|
|
687
677
|
.weda-menu__drawer
|
|
688
678
|
.weda-menu__drawer-menu
|
|
689
679
|
.wedatea2td-menu__submenu
|
|
@@ -719,7 +709,7 @@
|
|
|
719
709
|
.weda-menu__fonticon.lcap-icon,
|
|
720
710
|
.weda-menu__fonticon.t-icon {
|
|
721
711
|
margin: 0 0.28571rem 0 0;
|
|
722
|
-
font-size:
|
|
712
|
+
font-size: 1rem;
|
|
723
713
|
}
|
|
724
714
|
.weda-menu__fonticon.lcap-icon:hover {
|
|
725
715
|
background-color: unset;
|
|
@@ -729,11 +719,13 @@
|
|
|
729
719
|
display: flex;
|
|
730
720
|
justify-content: center;
|
|
731
721
|
align-items: center;
|
|
722
|
+
line-height: 1.2;
|
|
732
723
|
}
|
|
733
724
|
.weda-menu__drawer .wedatea2td-menu__text .menu-text {
|
|
734
725
|
display: flex;
|
|
735
726
|
justify-content: center;
|
|
736
727
|
align-items: center;
|
|
728
|
+
line-height: 1.2;
|
|
737
729
|
}
|
|
738
730
|
.weda-menu-mobile .weda-menu__wrapper .weda-menu__bar-main {
|
|
739
731
|
height: 4.57143rem;
|
|
@@ -12,9 +12,10 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
12
12
|
const [swipeStyle, setSwipeStyle] = useState(null);
|
|
13
13
|
const [height, setHeight] = useState(0);
|
|
14
14
|
const { change = () => { } } = events;
|
|
15
|
-
// 自动切换
|
|
16
15
|
useEffect(() => {
|
|
17
16
|
if (autoplay) {
|
|
17
|
+
// 自动切换
|
|
18
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
18
19
|
const timer = setInterval(() => {
|
|
19
20
|
setIndex(currentIndex + 1);
|
|
20
21
|
}, interval);
|
|
@@ -57,6 +58,8 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
57
58
|
setSwipeStyle({
|
|
58
59
|
transform: `translate3d(0, 0, 0)`,
|
|
59
60
|
});
|
|
61
|
+
// 不知道
|
|
62
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
60
63
|
setTimeout(() => {
|
|
61
64
|
setSwipeStyle({
|
|
62
65
|
transform: vertical
|
|
@@ -75,6 +78,7 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
75
78
|
? `translate3d(0, -${(to + 2) * 100}%, 0)`
|
|
76
79
|
: `translate3d(-${(to + 2) * 100}%, 0, 0)`,
|
|
77
80
|
});
|
|
81
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
78
82
|
setTimeout(() => {
|
|
79
83
|
setSwipeStyle({
|
|
80
84
|
transform: vertical
|
|
@@ -113,6 +113,7 @@ const WedaVideo = ({ className, style, id, videoDataSource, posterImage, autoPla
|
|
|
113
113
|
return;
|
|
114
114
|
if (currentTime > endTime) {
|
|
115
115
|
players.currentTime(startTime);
|
|
116
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
116
117
|
setTimeout(() => {
|
|
117
118
|
!loopPlay && players.pause();
|
|
118
119
|
}, 200);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 根据_id查询用户数据
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export function getUserById(data: any): Promise<any>;
|
|
6
|
+
/**
|
|
7
|
+
* 根据_id查询部门数据
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export function getDepartById(data: any): Promise<any>;
|
|
11
|
+
export function initRootOrgs(data: any): Promise<any>;
|
|
12
|
+
export function getDeparts(data: any): Promise<any>;
|
|
13
|
+
export function searchByCondition(data: any): Promise<any>;
|
|
14
|
+
export function userDepartRequest(action: any, params: {}, callback: any): Promise<any>;
|
|
15
|
+
export function defaultRequest(action: any, params: any, type?: any): Promise<any>;
|
|
16
|
+
export function getDataSourceByName(dbName: any): Promise<any>;
|
|
17
|
+
export function getUserInfo(): Promise<any>;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { callWedaApi, callDataSource } from './tcb';
|
|
2
|
+
export const userDepartRequest = (action, params = {}, callback) => {
|
|
3
|
+
if (callback) {
|
|
4
|
+
return Promise.resolve(callback(action, params));
|
|
5
|
+
}
|
|
6
|
+
return defaultRequest(action, params);
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 默认请求统一处理方法
|
|
10
|
+
* @param {*} action
|
|
11
|
+
* @param {*} params
|
|
12
|
+
* @param {*} type
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export const defaultRequest = async (action, params, type = 'callWedaApi') => {
|
|
16
|
+
try {
|
|
17
|
+
if (type === 'callWedaApi') {
|
|
18
|
+
const res = await callWedaApi({
|
|
19
|
+
action: action,
|
|
20
|
+
data: params,
|
|
21
|
+
});
|
|
22
|
+
return res;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.error(action + '错误', error);
|
|
27
|
+
throw errorHandle(error, action);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 获取用户表schema
|
|
32
|
+
*/
|
|
33
|
+
export const getDataSourceByName = async (dbName) => {
|
|
34
|
+
// dbName 为空时
|
|
35
|
+
if (!dbName)
|
|
36
|
+
return;
|
|
37
|
+
const datasource = await window.app.cloud.getDataSourceProfile(dbName);
|
|
38
|
+
return datasource;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* 根据_id查询用户数据
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export async function getUserById(data) {
|
|
45
|
+
try {
|
|
46
|
+
const datasource = await getDataSourceByName('sys_user');
|
|
47
|
+
const res = await callDataSource({
|
|
48
|
+
dataSourceName: 'sys_user',
|
|
49
|
+
methodName: 'wedaGetItem',
|
|
50
|
+
params: data,
|
|
51
|
+
});
|
|
52
|
+
return res[datasource === null || datasource === void 0 ? void 0 : datasource.schema['x-primary-column']];
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error('错误', error);
|
|
56
|
+
throw errorHandle(error, 'getUserById');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 根据_id查询部门数据
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export async function getDepartById(data) {
|
|
64
|
+
try {
|
|
65
|
+
const datasource = await getDataSourceByName('sys_department');
|
|
66
|
+
const res = await callDataSource({
|
|
67
|
+
dataSourceName: 'sys_department',
|
|
68
|
+
methodName: 'wedaGetItem',
|
|
69
|
+
params: data,
|
|
70
|
+
});
|
|
71
|
+
return res[datasource === null || datasource === void 0 ? void 0 : datasource.schema['x-primary-column']];
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error('错误', error);
|
|
75
|
+
throw errorHandle(error, 'getDepartById');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 获取当前登录人信息
|
|
80
|
+
* */
|
|
81
|
+
export const getUserInfo = () => {
|
|
82
|
+
var _a, _b;
|
|
83
|
+
const userInfo = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.getUserInfo();
|
|
84
|
+
return Promise.resolve(userInfo);
|
|
85
|
+
};
|
|
86
|
+
/*
|
|
87
|
+
* 初始化加载部门数据
|
|
88
|
+
* @author servernnyu
|
|
89
|
+
*/
|
|
90
|
+
export async function initRootOrgs(data) {
|
|
91
|
+
try {
|
|
92
|
+
const res = await callWedaApi({
|
|
93
|
+
action: 'InitRootOrgs',
|
|
94
|
+
data,
|
|
95
|
+
});
|
|
96
|
+
return res;
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error('错误', error);
|
|
100
|
+
throw errorHandle(error, 'InitRootOrgs');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/*
|
|
104
|
+
* 懒加载部门数据 LazyDescribeOrgs
|
|
105
|
+
* OrgId:组织架构Id,为根节点就不传了,我就会去查根节点
|
|
106
|
+
* DescribeCondition:查询条件,现在可以传{"Key":"NeedUser","Value": "true"}
|
|
107
|
+
*/
|
|
108
|
+
export async function getDeparts(data) {
|
|
109
|
+
try {
|
|
110
|
+
const res = await callWedaApi({
|
|
111
|
+
action: 'LazyDescribeOrgs',
|
|
112
|
+
data,
|
|
113
|
+
});
|
|
114
|
+
return res;
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
console.error('错误', error);
|
|
118
|
+
throw errorHandle(error, 'LazyDescribeOrgs');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/*
|
|
122
|
+
SearchByCondition接口
|
|
123
|
+
入参:
|
|
124
|
+
KeyWords:关键词
|
|
125
|
+
SearchCondition:搜索条件,当前要传俩,一个是是否关联用户同上,一个是SeachType,SearchByRole和SearchByOrg, NeedUser
|
|
126
|
+
*/
|
|
127
|
+
export async function searchByCondition(data) {
|
|
128
|
+
try {
|
|
129
|
+
const res = await callWedaApi({
|
|
130
|
+
action: 'SearchByCondition',
|
|
131
|
+
data,
|
|
132
|
+
});
|
|
133
|
+
return res;
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
console.error('错误', error);
|
|
137
|
+
throw errorHandle(error, 'SearchByCondition');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const errorHandle = (error, action) => {
|
|
141
|
+
var _a;
|
|
142
|
+
if (error === null || error === void 0 ? void 0 : error.result) {
|
|
143
|
+
return `${(_a = error === null || error === void 0 ? void 0 : error.result) === null || _a === void 0 ? void 0 : _a.message}(${action}${error === null || error === void 0 ? void 0 : error.requestId})`;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return `${action}(${error === null || error === void 0 ? void 0 : error.message})`;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
@@ -92,6 +92,8 @@ export const downloadFile = (url) => {
|
|
|
92
92
|
urlObj.searchParams.append('response-content-disposition', 'attawchment');
|
|
93
93
|
const urls = urlObj.toString();
|
|
94
94
|
window.open(urls);
|
|
95
|
+
// 定时清object https://github.com/eligrey/FileSaver.js/blob/9806041b0e800979dddabbaa1b5f6ce6952d7cd7/src/FileSaver.js#L106
|
|
96
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
95
97
|
setTimeout(() => {
|
|
96
98
|
window.URL.revokeObjectURL(urls);
|
|
97
99
|
}, 0);
|
package/dist/web/weda-ui.css
CHANGED
|
@@ -88,3 +88,12 @@ body .weda-ui {
|
|
|
88
88
|
.weda-ui .wedatea2td-form__controls {
|
|
89
89
|
font-size: 1em;
|
|
90
90
|
}
|
|
91
|
+
|
|
92
|
+
.weda-ui .weui-check[disabled] + .weui-icon-checked {
|
|
93
|
+
opacity: 0.4;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.weda-ui .weui-check__label.weui-cell_readonly,
|
|
97
|
+
.weda-ui .weui-check__label.weui-cell_disabled {
|
|
98
|
+
color: rgba(0, 0, 0, 0.4);
|
|
99
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/weda-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index",
|
|
6
6
|
"miniprogram": "mpdist",
|
|
@@ -22,18 +22,14 @@
|
|
|
22
22
|
"test": "npm run test:jest",
|
|
23
23
|
"test:jest": "jest test --env=jsdom",
|
|
24
24
|
"test:watch": "jest test --env=jsdom --watch",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"prestart:e2e-server": "node ./tools/e2e-prepare.mjs",
|
|
26
|
+
"start:e2e-server": "node ./lowcode-comps/e2e-server.js",
|
|
27
|
+
"test:e2e-component": "npx cypress run --component",
|
|
28
|
+
"test:e2e-cals": "start-server-and-test start:e2e-server 2333 'npx cypress run -b chrome --headless'",
|
|
29
|
+
"test:e2e": "npm run test:e2e-component && npm run test:e2e-cals",
|
|
30
|
+
"test:all": "node tools/test-ci.mjs",
|
|
27
31
|
"e2e": "npx cypress open --component",
|
|
28
32
|
"pretest:all": "rimraf .nyc_output || true",
|
|
29
|
-
"posttest:all": "npm run report:combined",
|
|
30
|
-
"mkdir:reports": "mkdir reports || true",
|
|
31
|
-
"precopy:reports": "npm run mkdir:reports",
|
|
32
|
-
"copy:reports": "cp cypress-coverage/coverage-final.json reports/from-cypress.json && cp jest-coverage/coverage-final.json reports/from-jest.json",
|
|
33
|
-
"precombine:reports": "npm run copy:reports && mkdir .nyc_output || true",
|
|
34
|
-
"combine:reports": "npx nyc merge reports && mv coverage.json .nyc_output/out.json",
|
|
35
|
-
"prereport:combined": "npm run combine:reports",
|
|
36
|
-
"report:combined": "npx nyc report --reporter lcov --reporter text --reporter html --report-dir coverage",
|
|
37
33
|
"storybook": "start-storybook -p 6006",
|
|
38
34
|
"build-storybook": "build-storybook",
|
|
39
35
|
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
|
|
@@ -64,7 +60,7 @@
|
|
|
64
60
|
"dayjs": "^1.10.7",
|
|
65
61
|
"destr": "^1.1.1",
|
|
66
62
|
"echarts": "^5.3.0",
|
|
67
|
-
"kedao": "^0.1.
|
|
63
|
+
"kedao": "^0.1.24",
|
|
68
64
|
"lodash.isequal": "^4.5.0",
|
|
69
65
|
"object.fromentries": "^2.0.5",
|
|
70
66
|
"prop-types": "^15.7.2",
|
|
@@ -75,7 +71,7 @@
|
|
|
75
71
|
"tea-component": "^2.7.3",
|
|
76
72
|
"uuid": "8.3.2",
|
|
77
73
|
"video.js": "^7.18.1",
|
|
78
|
-
"weui": "^2.
|
|
74
|
+
"weui": "^2.5.9",
|
|
79
75
|
"weui.js": "1.2.2"
|
|
80
76
|
},
|
|
81
77
|
"peerDependencies": {
|
|
@@ -91,6 +87,7 @@
|
|
|
91
87
|
"@craco/craco": "^7.0.0-alpha.7",
|
|
92
88
|
"@cypress/code-coverage": "^3.10.0",
|
|
93
89
|
"@cypress/react": "^6.0.0",
|
|
90
|
+
"@cypress/skip-test": "^2.6.1",
|
|
94
91
|
"@cypress/webpack-dev-server": "~2.0.0",
|
|
95
92
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
96
93
|
"@size-limit/preset-big-lib": "^7.0.8",
|
|
@@ -113,6 +110,8 @@
|
|
|
113
110
|
"babel-plugin-istanbul": "^6.1.1",
|
|
114
111
|
"cross-env": "^7.0.3",
|
|
115
112
|
"cypress": "~10.3.0",
|
|
113
|
+
"cypress-image-diff-js": "^1.20.0",
|
|
114
|
+
"cypress-wait-until": "^1.7.2",
|
|
116
115
|
"eslint": "^8.19.0",
|
|
117
116
|
"eslint-config-prettier": "^8.5.0",
|
|
118
117
|
"eslint-config-tencent": "^1.0.4",
|
|
@@ -141,9 +140,11 @@
|
|
|
141
140
|
"regenerator-runtime": "^0.13.9",
|
|
142
141
|
"rimraf": "^3.0.2",
|
|
143
142
|
"size-limit": "^7.0.8",
|
|
143
|
+
"start-server-and-test": "^1.14.0",
|
|
144
144
|
"swc-loader": "0.2.3",
|
|
145
145
|
"swc-plugin-coverage-instrument": "^0.0.7",
|
|
146
146
|
"ts-loader": "^9.3.1",
|
|
147
|
+
"ts-node": "^10.9.1",
|
|
147
148
|
"typescript": "^4.7.4",
|
|
148
149
|
"webpack": "^5.73.0",
|
|
149
150
|
"webpack-cli": "^4.10.0",
|
package/dist/asset-manifest.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": {
|
|
3
|
-
"main.js": "/static/js/main.chunk.js",
|
|
4
|
-
"main.js.map": "/static/js/main.chunk.js.map",
|
|
5
|
-
"runtime-main.js": "/static/js/bundle.js",
|
|
6
|
-
"runtime-main.js.map": "/static/js/bundle.js.map",
|
|
7
|
-
"vendors~main.js": "/static/js/vendors~main.chunk.js",
|
|
8
|
-
"vendors~main.js.map": "/static/js/vendors~main.chunk.js.map",
|
|
9
|
-
"index.html": "/index.html",
|
|
10
|
-
"static/media/ef6fa527e24e354765d806b826b41391.svg": "/static/media/ef6fa527e24e354765d806b826b41391.fa67580a.svg"
|
|
11
|
-
},
|
|
12
|
-
"entrypoints": [
|
|
13
|
-
"static/js/bundle.js",
|
|
14
|
-
"static/js/vendors~main.chunk.js",
|
|
15
|
-
"static/js/main.chunk.js"
|
|
16
|
-
]
|
|
17
|
-
}
|
package/dist/index.html
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
Html Webpack Plugin:
|
|
2
|
-
<pre>
|
|
3
|
-
Error: Child compilation failed:
|
|
4
|
-
Entry module not found: Error: Can't resolve '/Users/fengkx/lowcode/weda-ui/public/index.html' in '/Users/fengkx/lowcode/weda-ui':
|
|
5
|
-
Error: Can't resolve '/Users/fengkx/lowcode/weda-ui/public/index.html' in '/Users/fengkx/lowcode/weda-ui'
|
|
6
|
-
EntryModuleNotFoundError: Entry module not found: Error: Can't resolve '/Users/fengkx/lowcode/weda-ui/public/index.html' in '/Users/fengkx/lowcode/weda-ui '
|
|
7
|
-
|
|
8
|
-
- Compilation.js:1075
|
|
9
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compilation.js:1075:31
|
|
10
|
-
|
|
11
|
-
- NormalModuleFactory.js:401
|
|
12
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/NormalModuleFactory.js:401:22
|
|
13
|
-
|
|
14
|
-
- NormalModuleFactory.js:130
|
|
15
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/NormalModuleFactory.js:130:21
|
|
16
|
-
|
|
17
|
-
- NormalModuleFactory.js:224
|
|
18
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/NormalModuleFactory.js:224:22
|
|
19
|
-
|
|
20
|
-
- async.js:2830
|
|
21
|
-
[weda-ui]/[neo-async]/async.js:2830:7
|
|
22
|
-
|
|
23
|
-
- async.js:6877
|
|
24
|
-
[weda-ui]/[neo-async]/async.js:6877:13
|
|
25
|
-
|
|
26
|
-
- NormalModuleFactory.js:214
|
|
27
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/NormalModuleFactory.js:214:25
|
|
28
|
-
|
|
29
|
-
- Resolver.js:213
|
|
30
|
-
[weda-ui]/[enhanced-resolve]/lib/Resolver.js:213:14
|
|
31
|
-
|
|
32
|
-
- Resolver.js:285
|
|
33
|
-
[weda-ui]/[enhanced-resolve]/lib/Resolver.js:285:5
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- UnsafeCachePlugin.js:44
|
|
37
|
-
[weda-ui]/[enhanced-resolve]/lib/UnsafeCachePlugin.js:44:7
|
|
38
|
-
|
|
39
|
-
- Resolver.js:285
|
|
40
|
-
[weda-ui]/[enhanced-resolve]/lib/Resolver.js:285:5
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- Resolver.js:285
|
|
44
|
-
[weda-ui]/[enhanced-resolve]/lib/Resolver.js:285:5
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- DescriptionFilePlugin.js:67
|
|
48
|
-
[weda-ui]/[enhanced-resolve]/lib/DescriptionFilePlugin.js:67:43
|
|
49
|
-
|
|
50
|
-
- child-compiler.js:131
|
|
51
|
-
[weda-ui]/[react-scripts]/[html-webpack-plugin]/lib/child-compiler.js:131:18
|
|
52
|
-
|
|
53
|
-
- Compiler.js:343
|
|
54
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compiler.js:343:11
|
|
55
|
-
|
|
56
|
-
- Compiler.js:681
|
|
57
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compiler.js:681:15
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
|
|
61
|
-
[weda-ui]/[tapable]/lib/Hook.js:154:20
|
|
62
|
-
|
|
63
|
-
- Compiler.js:678
|
|
64
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compiler.js:678:31
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
|
|
68
|
-
[weda-ui]/[tapable]/lib/Hook.js:154:20
|
|
69
|
-
|
|
70
|
-
- Compilation.js:1423
|
|
71
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compilation.js:1423:35
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
|
|
75
|
-
[weda-ui]/[tapable]/lib/Hook.js:154:20
|
|
76
|
-
|
|
77
|
-
- Compilation.js:1414
|
|
78
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compilation.js:1414:32
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
|
|
82
|
-
[weda-ui]/[tapable]/lib/Hook.js:154:20
|
|
83
|
-
|
|
84
|
-
- Compilation.js:1409
|
|
85
|
-
[weda-ui]/[builder-webpack4]/[webpack]/lib/Compilation.js:1409:36
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
</pre><script src="/static/js/bundle.js"></script><script src="/static/js/vendors~main.chunk.js"></script><script src="/static/js/main.chunk.js"></script>
|