@cloudbase/weda-ui 3.20.5 → 3.21.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/swiper.d.ts +62 -0
- package/dist/configs/components/swiper.js +182 -0
- package/dist/configs/components/wd-table.d.ts +4 -0
- package/dist/configs/components/wd-table.js +21 -1
- package/dist/configs/index.d.ts +82 -318
- package/dist/configs/index.js +1 -1
- package/dist/style/weda-ui.min.css +1 -1
- package/dist/web/components/swiper/index.d.ts +3 -20
- package/dist/web/components/swiper/index.js +22 -20
- package/dist/web/components/wd-form/index.js +1 -3
- package/dist/web/components/wd-table/components/ModalTable/index.js +4 -14
- package/dist/web/components/wd-table/components/Table/index.d.ts +6 -2
- package/dist/web/components/wd-table/components/Table/index.js +12 -9
- package/dist/web/components/wd-table/wd-table.d.ts +1 -0
- package/dist/web/components/wd-table/wd-table.js +2 -2
- package/package.json +1 -1
- package/dist/configs/components/swiper.json +0 -234
package/dist/configs/index.d.ts
CHANGED
|
@@ -6464,166 +6464,46 @@ export declare const components: {
|
|
|
6464
6464
|
mpOrigin: string;
|
|
6465
6465
|
};
|
|
6466
6466
|
Swiper: {
|
|
6467
|
-
$schema:
|
|
6468
|
-
data: {
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
title: string;
|
|
6505
|
-
type: string;
|
|
6506
|
-
"x-index": number;
|
|
6507
|
-
"x-component": string;
|
|
6508
|
-
default: string;
|
|
6509
|
-
"x-category": string;
|
|
6510
|
-
description: string;
|
|
6511
|
-
};
|
|
6512
|
-
duration: {
|
|
6513
|
-
title: string;
|
|
6514
|
-
default: number;
|
|
6515
|
-
"x-index": number;
|
|
6516
|
-
type: string;
|
|
6517
|
-
"x-category": string;
|
|
6518
|
-
description: string;
|
|
6519
|
-
};
|
|
6520
|
-
current: {
|
|
6521
|
-
title: string;
|
|
6522
|
-
default: number;
|
|
6523
|
-
"x-index": number;
|
|
6524
|
-
type: string;
|
|
6525
|
-
"x-category": string;
|
|
6526
|
-
description: string;
|
|
6527
|
-
};
|
|
6528
|
-
circular: {
|
|
6529
|
-
title: string;
|
|
6530
|
-
default: boolean;
|
|
6531
|
-
type: string;
|
|
6532
|
-
"x-index": number;
|
|
6533
|
-
"x-category": string;
|
|
6534
|
-
description: string;
|
|
6535
|
-
};
|
|
6536
|
-
indicatorDots: {
|
|
6537
|
-
title: string;
|
|
6538
|
-
default: boolean;
|
|
6539
|
-
type: string;
|
|
6540
|
-
"x-index": number;
|
|
6541
|
-
"x-category": string;
|
|
6542
|
-
description: string;
|
|
6543
|
-
};
|
|
6544
|
-
layoutType: {
|
|
6545
|
-
title: string;
|
|
6546
|
-
default: string;
|
|
6547
|
-
type: string;
|
|
6548
|
-
"x-index": number;
|
|
6549
|
-
"x-category": string;
|
|
6550
|
-
description: string;
|
|
6551
|
-
enum: {
|
|
6552
|
-
value: string;
|
|
6553
|
-
label: string;
|
|
6554
|
-
}[];
|
|
6555
|
-
"x-linkages": {
|
|
6556
|
-
type: string;
|
|
6557
|
-
target: string;
|
|
6558
|
-
condition: string;
|
|
6559
|
-
}[];
|
|
6560
|
-
"x-platforms": string[];
|
|
6561
|
-
};
|
|
6562
|
-
transformType: {
|
|
6563
|
-
title: string;
|
|
6564
|
-
default: string;
|
|
6565
|
-
type: string;
|
|
6566
|
-
"x-index": number;
|
|
6567
|
-
"x-category": string;
|
|
6568
|
-
description: string;
|
|
6569
|
-
enum: {
|
|
6570
|
-
value: string;
|
|
6571
|
-
label: string;
|
|
6572
|
-
}[];
|
|
6573
|
-
"x-platforms": string[];
|
|
6574
|
-
};
|
|
6575
|
-
previousMargin: {
|
|
6576
|
-
title: string;
|
|
6577
|
-
type: string;
|
|
6578
|
-
default: string;
|
|
6579
|
-
"x-index": number;
|
|
6580
|
-
"x-category": string;
|
|
6581
|
-
description: string;
|
|
6582
|
-
"x-platforms": string[];
|
|
6583
|
-
};
|
|
6584
|
-
nextMargin: {
|
|
6585
|
-
title: string;
|
|
6586
|
-
type: string;
|
|
6587
|
-
default: string;
|
|
6588
|
-
"x-index": number;
|
|
6589
|
-
"x-category": string;
|
|
6590
|
-
description: string;
|
|
6591
|
-
"x-platforms": string[];
|
|
6592
|
-
};
|
|
6593
|
-
easingFunction: {
|
|
6594
|
-
title: string;
|
|
6595
|
-
type: string;
|
|
6596
|
-
default: string;
|
|
6597
|
-
"x-index": number;
|
|
6598
|
-
"x-category": string;
|
|
6599
|
-
description: string;
|
|
6600
|
-
"x-platforms": string[];
|
|
6601
|
-
enum: {
|
|
6602
|
-
value: string;
|
|
6603
|
-
label: string;
|
|
6604
|
-
}[];
|
|
6605
|
-
};
|
|
6606
|
-
};
|
|
6607
|
-
};
|
|
6608
|
-
events: {
|
|
6609
|
-
name: string;
|
|
6610
|
-
title: string;
|
|
6611
|
-
}[];
|
|
6612
|
-
meta: {
|
|
6613
|
-
title: string;
|
|
6614
|
-
description: string;
|
|
6615
|
-
category: string;
|
|
6616
|
-
categoryOrder: number;
|
|
6617
|
-
componentOrder: number;
|
|
6618
|
-
figureIcon: string;
|
|
6619
|
-
icon: string;
|
|
6620
|
-
propertyPanelTips: string;
|
|
6621
|
-
};
|
|
6622
|
-
configMeta: {
|
|
6623
|
-
docsUrl: string;
|
|
6467
|
+
readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
|
|
6468
|
+
readonly data: import("@sinclair/typebox").TObject<{
|
|
6469
|
+
interval: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
6470
|
+
vertical: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
6471
|
+
autoplay: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
6472
|
+
loop: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
6473
|
+
indicatorActiveColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6474
|
+
indicatorColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6475
|
+
duration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
6476
|
+
current: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
6477
|
+
circular: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
6478
|
+
indicatorDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
6479
|
+
layoutType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
6480
|
+
transformType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6481
|
+
previousMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6482
|
+
nextMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6483
|
+
easingFunction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6484
|
+
}>;
|
|
6485
|
+
readonly events: readonly [{
|
|
6486
|
+
readonly name: "change";
|
|
6487
|
+
readonly title: "切换";
|
|
6488
|
+
readonly description: "通过事件可以获取到当前选中的轮播项,在该事件的处理方法中可以通过 event.detail.current 来获取当前轮播项所在的index";
|
|
6489
|
+
readonly detail: import("@sinclair/typebox").TObject<{
|
|
6490
|
+
current: import("@sinclair/typebox").TString;
|
|
6491
|
+
}>;
|
|
6492
|
+
}];
|
|
6493
|
+
readonly meta: {
|
|
6494
|
+
readonly name: "swiper";
|
|
6495
|
+
readonly title: "轮播容器";
|
|
6496
|
+
readonly description: "用于快速在页面搭建轮播图展示效果,并支持轮播图的跳转、播放配置。";
|
|
6497
|
+
readonly category: "布局";
|
|
6498
|
+
readonly categoryOrder: 200;
|
|
6499
|
+
readonly componentOrder: 90;
|
|
6500
|
+
readonly figureIcon: "../figureIcons/Swiper.svg";
|
|
6501
|
+
readonly icon: "../icons/Swiper.svg";
|
|
6502
|
+
readonly propertyPanelTips: "轮播容器组件在小程序侧使用时,建议给组件设置一个高度,否则按照小程序swiper组件默认高度渲染";
|
|
6503
|
+
readonly docsUrl: "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/Swiper";
|
|
6624
6504
|
};
|
|
6625
|
-
isContainer:
|
|
6626
|
-
mpOrigin:
|
|
6505
|
+
readonly isContainer: true;
|
|
6506
|
+
readonly mpOrigin: "swiper";
|
|
6627
6507
|
};
|
|
6628
6508
|
Carousel: {
|
|
6629
6509
|
$schema: string;
|
|
@@ -11600,6 +11480,8 @@ export declare const components: {
|
|
|
11600
11480
|
emptyText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11601
11481
|
rowColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11602
11482
|
isSuspendHeader: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
11483
|
+
enableBottomTipSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
11484
|
+
row: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
|
|
11603
11485
|
enablePagination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
11604
11486
|
enableGlobalButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
11605
11487
|
enableRefreshBtn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -26033,166 +25915,46 @@ declare const _default: {
|
|
|
26033
25915
|
mpOrigin: string;
|
|
26034
25916
|
};
|
|
26035
25917
|
Swiper: {
|
|
26036
|
-
$schema:
|
|
26037
|
-
data: {
|
|
26038
|
-
|
|
26039
|
-
|
|
26040
|
-
|
|
26041
|
-
|
|
26042
|
-
|
|
26043
|
-
|
|
26044
|
-
|
|
26045
|
-
|
|
26046
|
-
|
|
26047
|
-
|
|
26048
|
-
|
|
26049
|
-
|
|
26050
|
-
|
|
26051
|
-
|
|
26052
|
-
|
|
26053
|
-
|
|
26054
|
-
|
|
26055
|
-
|
|
26056
|
-
|
|
26057
|
-
|
|
26058
|
-
|
|
26059
|
-
|
|
26060
|
-
|
|
26061
|
-
|
|
26062
|
-
|
|
26063
|
-
|
|
26064
|
-
|
|
26065
|
-
|
|
26066
|
-
|
|
26067
|
-
|
|
26068
|
-
|
|
26069
|
-
|
|
26070
|
-
|
|
26071
|
-
|
|
26072
|
-
|
|
26073
|
-
title: string;
|
|
26074
|
-
type: string;
|
|
26075
|
-
"x-index": number;
|
|
26076
|
-
"x-component": string;
|
|
26077
|
-
default: string;
|
|
26078
|
-
"x-category": string;
|
|
26079
|
-
description: string;
|
|
26080
|
-
};
|
|
26081
|
-
duration: {
|
|
26082
|
-
title: string;
|
|
26083
|
-
default: number;
|
|
26084
|
-
"x-index": number;
|
|
26085
|
-
type: string;
|
|
26086
|
-
"x-category": string;
|
|
26087
|
-
description: string;
|
|
26088
|
-
};
|
|
26089
|
-
current: {
|
|
26090
|
-
title: string;
|
|
26091
|
-
default: number;
|
|
26092
|
-
"x-index": number;
|
|
26093
|
-
type: string;
|
|
26094
|
-
"x-category": string;
|
|
26095
|
-
description: string;
|
|
26096
|
-
};
|
|
26097
|
-
circular: {
|
|
26098
|
-
title: string;
|
|
26099
|
-
default: boolean;
|
|
26100
|
-
type: string;
|
|
26101
|
-
"x-index": number;
|
|
26102
|
-
"x-category": string;
|
|
26103
|
-
description: string;
|
|
26104
|
-
};
|
|
26105
|
-
indicatorDots: {
|
|
26106
|
-
title: string;
|
|
26107
|
-
default: boolean;
|
|
26108
|
-
type: string;
|
|
26109
|
-
"x-index": number;
|
|
26110
|
-
"x-category": string;
|
|
26111
|
-
description: string;
|
|
26112
|
-
};
|
|
26113
|
-
layoutType: {
|
|
26114
|
-
title: string;
|
|
26115
|
-
default: string;
|
|
26116
|
-
type: string;
|
|
26117
|
-
"x-index": number;
|
|
26118
|
-
"x-category": string;
|
|
26119
|
-
description: string;
|
|
26120
|
-
enum: {
|
|
26121
|
-
value: string;
|
|
26122
|
-
label: string;
|
|
26123
|
-
}[];
|
|
26124
|
-
"x-linkages": {
|
|
26125
|
-
type: string;
|
|
26126
|
-
target: string;
|
|
26127
|
-
condition: string;
|
|
26128
|
-
}[];
|
|
26129
|
-
"x-platforms": string[];
|
|
26130
|
-
};
|
|
26131
|
-
transformType: {
|
|
26132
|
-
title: string;
|
|
26133
|
-
default: string;
|
|
26134
|
-
type: string;
|
|
26135
|
-
"x-index": number;
|
|
26136
|
-
"x-category": string;
|
|
26137
|
-
description: string;
|
|
26138
|
-
enum: {
|
|
26139
|
-
value: string;
|
|
26140
|
-
label: string;
|
|
26141
|
-
}[];
|
|
26142
|
-
"x-platforms": string[];
|
|
26143
|
-
};
|
|
26144
|
-
previousMargin: {
|
|
26145
|
-
title: string;
|
|
26146
|
-
type: string;
|
|
26147
|
-
default: string;
|
|
26148
|
-
"x-index": number;
|
|
26149
|
-
"x-category": string;
|
|
26150
|
-
description: string;
|
|
26151
|
-
"x-platforms": string[];
|
|
26152
|
-
};
|
|
26153
|
-
nextMargin: {
|
|
26154
|
-
title: string;
|
|
26155
|
-
type: string;
|
|
26156
|
-
default: string;
|
|
26157
|
-
"x-index": number;
|
|
26158
|
-
"x-category": string;
|
|
26159
|
-
description: string;
|
|
26160
|
-
"x-platforms": string[];
|
|
26161
|
-
};
|
|
26162
|
-
easingFunction: {
|
|
26163
|
-
title: string;
|
|
26164
|
-
type: string;
|
|
26165
|
-
default: string;
|
|
26166
|
-
"x-index": number;
|
|
26167
|
-
"x-category": string;
|
|
26168
|
-
description: string;
|
|
26169
|
-
"x-platforms": string[];
|
|
26170
|
-
enum: {
|
|
26171
|
-
value: string;
|
|
26172
|
-
label: string;
|
|
26173
|
-
}[];
|
|
26174
|
-
};
|
|
26175
|
-
};
|
|
26176
|
-
};
|
|
26177
|
-
events: {
|
|
26178
|
-
name: string;
|
|
26179
|
-
title: string;
|
|
26180
|
-
}[];
|
|
26181
|
-
meta: {
|
|
26182
|
-
title: string;
|
|
26183
|
-
description: string;
|
|
26184
|
-
category: string;
|
|
26185
|
-
categoryOrder: number;
|
|
26186
|
-
componentOrder: number;
|
|
26187
|
-
figureIcon: string;
|
|
26188
|
-
icon: string;
|
|
26189
|
-
propertyPanelTips: string;
|
|
26190
|
-
};
|
|
26191
|
-
configMeta: {
|
|
26192
|
-
docsUrl: string;
|
|
25918
|
+
readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
|
|
25919
|
+
readonly data: import("@sinclair/typebox").TObject<{
|
|
25920
|
+
interval: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
25921
|
+
vertical: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
25922
|
+
autoplay: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
25923
|
+
loop: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
25924
|
+
indicatorActiveColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25925
|
+
indicatorColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25926
|
+
duration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
25927
|
+
current: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
25928
|
+
circular: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
25929
|
+
indicatorDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
25930
|
+
layoutType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
25931
|
+
transformType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25932
|
+
previousMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25933
|
+
nextMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25934
|
+
easingFunction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25935
|
+
}>;
|
|
25936
|
+
readonly events: readonly [{
|
|
25937
|
+
readonly name: "change";
|
|
25938
|
+
readonly title: "切换";
|
|
25939
|
+
readonly description: "通过事件可以获取到当前选中的轮播项,在该事件的处理方法中可以通过 event.detail.current 来获取当前轮播项所在的index";
|
|
25940
|
+
readonly detail: import("@sinclair/typebox").TObject<{
|
|
25941
|
+
current: import("@sinclair/typebox").TString;
|
|
25942
|
+
}>;
|
|
25943
|
+
}];
|
|
25944
|
+
readonly meta: {
|
|
25945
|
+
readonly name: "swiper";
|
|
25946
|
+
readonly title: "轮播容器";
|
|
25947
|
+
readonly description: "用于快速在页面搭建轮播图展示效果,并支持轮播图的跳转、播放配置。";
|
|
25948
|
+
readonly category: "布局";
|
|
25949
|
+
readonly categoryOrder: 200;
|
|
25950
|
+
readonly componentOrder: 90;
|
|
25951
|
+
readonly figureIcon: "../figureIcons/Swiper.svg";
|
|
25952
|
+
readonly icon: "../icons/Swiper.svg";
|
|
25953
|
+
readonly propertyPanelTips: "轮播容器组件在小程序侧使用时,建议给组件设置一个高度,否则按照小程序swiper组件默认高度渲染";
|
|
25954
|
+
readonly docsUrl: "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/Swiper";
|
|
26193
25955
|
};
|
|
26194
|
-
isContainer:
|
|
26195
|
-
mpOrigin:
|
|
25956
|
+
readonly isContainer: true;
|
|
25957
|
+
readonly mpOrigin: "swiper";
|
|
26196
25958
|
};
|
|
26197
25959
|
Carousel: {
|
|
26198
25960
|
$schema: string;
|
|
@@ -31169,6 +30931,8 @@ declare const _default: {
|
|
|
31169
30931
|
emptyText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31170
30932
|
rowColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31171
30933
|
isSuspendHeader: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
30934
|
+
enableBottomTipSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
30935
|
+
row: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
|
|
31172
30936
|
enablePagination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
31173
30937
|
enableGlobalButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
31174
30938
|
enableRefreshBtn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
package/dist/configs/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import Slot from './components/slot.json';
|
|
|
15
15
|
import Uploader from './components/form/uploader.json';
|
|
16
16
|
import UploaderFile from './components/form/uploaderFile.json';
|
|
17
17
|
import ScrollView from './components/scrollVeiw.json';
|
|
18
|
-
import Swiper from './components/swiper
|
|
18
|
+
import Swiper from './components/swiper';
|
|
19
19
|
import Carousel from './components/carousel.json';
|
|
20
20
|
import Tips from './components/form/tips.json';
|
|
21
21
|
import Modal from './components/modal';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
@cloudbase/weda-ui v3.
|
|
2
|
+
@cloudbase/weda-ui v3.21.0
|
|
3
3
|
*/
|
|
4
4
|
@charset "UTF-8";@media (min-width:1024px){.weda-ui .weui-cells{font-size:1em}.weui .weui-cell_active:active{background-color:unset!important}}@font-face{font-family:lcap-icon;font-weight:400;font-style:normal;src:url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAkMAA0AAAAAFZgAAAi1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCXhEICpxYlmoLTgABNgIkA1gEIAWDMweDBRtzEVGUTVKf7GdCpjLGY/HIYGvbDpn6q7Qdj3xvUaZJUNFads3M7geYVSSiCgsZJYFkhEfn2DjU9//jpn8D1QTqVBQqSrtAVZAq1bwkpTOo0Hbz2tnYfkP3ZzAxpv6ZiSFf3OHh8/b+/oqzxIt4QmFX5ImmIe0SWAOEOJL2n9ZSO5PcCwErnTjzLxOYud0Az24IS8AOXSWgBtyL2lbFtkKxMAhSoPNdlrMFakJqTjuamX+3E3teqiTm6/UpPkH213oLGNahKuAtpQ0wbERrXcnzO1bBpK388B4D6I5fCT9kh69EbSy65RKsi/26+7qKtJv2oREq98FIbnbJO3TaMjBjPcwtqFDG9qp0XxcX/7ndSrUHxotP16TcVrHOGHgIM0PwK6JIMvN/BgpiRTDc/CFwhO+x7ZDYI/ONMoO4NDIX3PYHqpDAWg0a1byp4P4j3ft6fX2jqrvbO6bLU5gtI53w8U4ueG4vS7h0Ze7t9hJUld5xMnwpJp2X5O8KxChB4KG0IQ8pBk+JUXq17qFT7cTN1G17zf2SrGdNz1yMi7Agh0PzRINR0otFF515Z3Fzzml7wfmCrEvFl1zV9wiL6o6j8ELh5LgzjkKpbVTilkw1XLvyYxiCxZHZhpkOEZY3gDto5Ci7PcrBzbTTOYWZGNeqCfoBN0loREx3AceICXbDYFPHIUNaFz37kj0Ei2vbd+MI4fpcJncQ7UiqZzDbycj160Ox7c5YRB0pveJQ3YE71D9yKW5lF9orrq/YQX3XWXa1DDNuc8TQbUcr6ezQQEfN/bEOsmgp7+bEmaOZvxxKsTdORFitI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('woff2')}.wd-form--vertical-left .wedatea2td-form .weda-formcells__pc.horizontal,.wd-form--vertical-right .wedatea2td-form .weda-formcells__pc.horizontal,.wedatea2td-form--vertical .wd-form--horizontal-left .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form--horizontal-right .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form-item.wd-form-item--horizontal-left .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form-item.wd-form-item--horizontal-right .wd-form-item-wrap,.wedatea2td-form--vertical .wedatea2td-form .weda-formcells__pc.horizontal{flex-direction:column}.g-swiper-item>div>*{max-width:100%;max-height:100%;object-fit:cover;max-width:100%;object-fit:cover;max-width:100%;max-height:100%;object-fit:cover;width:100%;height:auto;max-width:100%;object-fit:cover}.form-detail-wrap .form-detail-content-wrap .form-detail-group-header-container{display:flex;align-items:center;justify-content:space-between}.weda-graphic-card .weda-graphic-card__col .weda-graphic-card__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weda-graphic-card .weda-graphic-card__col .weda-graphic-card__desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weda-menu .wedatea2td-menu--light .wedatea2td-menu__list li.is-selected>.wedatea2td-menu__item:hover,.wedatea2td-drawer .wedatea2td-menu--light .wedatea2td-menu__list li .wedatea2td-menu__item:hover{background-color:var(--weda-navigation-menu-hover-color)}.weda-menu-mobile .weda-menu__wrapper{display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 2px rgba(0,0,0,.05)}.weda-menu .wedatea2td-menu__text .menu-text,.weda-menu__drawer .wedatea2td-menu__text .menu-text{display:flex;justify-content:center;align-items:center}@media (max-width:1024px){.g-swiper .g-swiper__turn-next,.g-swiper .g-swiper__turn-pre{display:none}.modal-table-delete .wedatea2td-dialog__inner,.model-relation-selector-modal .wedatea2td-dialog__inner,.wedatea2td-dialog__inner{min-width:0;width:90%;margin:10px 0}.wedatea2td-form.model-form{width:100%}}.markdown-body .octicon{fill:currentColor}.markdown-body pre{word-wrap:normal}.wd-form-item.wd-pc-rich-text-root .ExEditor-basic,.wd-form-item.wd-pc-rich-text-root .exeditor-toolbar{background-color:inherit}.wd-add-relation-button-wrap{display:flex;align-items:center;color:var(--wd-color-brand,#0052d9);white-space:pre-wrap}.weda-import-csv-file-modal .file-json-map-wrap{display:flex;flex-direction:column;box-sizing:border-box}.weda-import-csv-file-modal .import-file-result-wrap .error-container{display:flex;flex-direction:column}.weda-import-csv-file-modal .import-file-result-wrap .error-content{flex:1}.wd-table-wrap-filter .wedatea2td-input:focus,.wd-table-wrap-filter .wedatea2td-input:hover,.wd-table-wrap-filter .wedatea2td-textarea-group:focus,.wd-table-wrap-filter .wedatea2td-textarea-group:hover,.wd-table-wrap-filter .wedatea2td-textarea:focus,.wd-table-wrap-filter .wedatea2td-textarea:hover,.wedatea2td-overlay .wedatea2td-checkbox:focus,.wedatea2td-overlay .wedatea2td-checkbox:hover,.wedatea2td-overlay input[type=checkbox]:focus,.wedatea2td-overlay input[type=checkbox]:hover{border-color:var(--wd-color-brand,#0052d9)}.weda-ui_mapChoose_search_input_clear{display:flex;justify-content:center}.form-select-map .wedatea2td-dialog__inner{box-shadow:none;min-width:100vw!important}.weda-ui-custom-calendar-op__end,.weda-ui-custom-calendar-op__start{display:flex;align-items:center}.weui-tag span{word-wrap:break-word;word-break:break-word}.weda-ui-user-select-container-list__start .depart-tree .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content,.weda-ui-user-select-container-list__start .depart-tree .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content .wedatea2td-tree__label,.weda-ui-user-select-container-list__start .wedatea2td-tree.wedatea2td-tree--checkbox-separate .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content .wedatea2td-tree__label .wedatea2td-tree__label-title{background-color:var(--wd-color-brand-light,#d4e3fc)}.weda-select-user-dept-breadcrumb{display:flex;align-items:center}.form-location-con_disabled{opacity:.4}body{font-size:var(--wd-font-base)}@font-face{font-family:wd-lcap-icon;font-we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lrj5RVNSWiflSLVWFRZWtXCaxGbg0zd/fHNFqX76CZaHY9tNPj34UIY9+Mn8s7wClLQ7bIfqQDaUzYN7x9WTMOV1ntYtmtaZz6SDmI1Yj1kgGBsQXUbdLGhpU1/ckK4uVaMRS43e0s5XdMDDAv+fsxfFK5eMn+flK1c8/L15MHlG+YTYTKW4025bWp7UUQH2n1j/y9Tt6J+5mykLynYv6i9HZvqC/QNV2kZ7HXO/X7/bDf9+T1/Rpe/YolYsWYXO1XS/CmOv6KUuBnUoITNTDEhJNqb1rYTOf1sRhF1D0EvKOkYiRSHnElw9UGd7bkVIq17pUYpqZfGAtizVSDozNPORXtY3YTig+HhCnpergJhqZl1ZlhDTKQz8O+lKEtWVWLTXTaNPBSmt1Z6faC6hmaq+/j+gGT66PrtpKxquCKzUqTFI36xjltiipsN34AAhYK30U0Si9PDd4Qrlx5gXZbykCAdhWAj3p+F8DA+WBim/aNhq9g86DAocD+KIj0VJtIEzs137fvNcn+Zf8+xChp637Q/Eo/0gLUBkjiCckExRp4iSCSMhV8TToMmywXB/GhkcF5ziw45OB87l85aUMFg0NLu2/zrqV/BH9vE5gRJkaL8IilGuqC03JjHIZdlQAzgqTSpcqAx7mVejwNSGWWs4aGlmhqdGjnCFPBYAqTFrMVhmw/tErzDrt1E1nqkx9Os0wHbxR48t8+rYA9icsgyFzkc5s8Ne9hwCEXWH8WM82YAhjUzGZLCR46/+MZFkk2djoLT1IzKCbi3WV1hnUrcvSm+MZtRSpiYWanQU+67DN62G7tnPGP8h5DgBGvMgjgCILl0eQyJQoo5wKKqmimhpqqSOQIIIJQUQoYYQTQSRRRBNDLHGIkRBPAonZMHXOzF6Z99D0PpIk80xVIUlCBjmykYNc5CEfBShEJaqggBIqjzpSRkIGObKRg1zkIR8FKEQlqqCAEiqPulNOAgAA) format("woff2")}.t-icon{speak:none;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wd-space-align-items--flex-start{align-items:flex-start;align-items:center;align-items:flex-end}.wd-space-justify-content--flex-start{justify-content:flex-start;justify-content:center;justify-content:flex-end}.wd-btn{--wd-btn-sm-padding:0.0625rem calc(var(--wd-space-base) * 2);--wd-btn-md-padding:0.25rem calc(var(--wd-space-base) * 4);--wd-btn-lg-padding:0.4375rem calc(var(--wd-space-base) * 6);--wd-btn-margin-top:0;--wd-btn-margin-top:0;--wd-btn-font-size-sm:var(--wd-font-size-2);--wd-btn-line-height-sm:1.5;--wd-btn-min-height-sm:24px;--wd-btn-font-size-md:var(--wd-font-size-3);--wd-btn-line-height-md:1.5;--wd-btn-min-height-md:32px;--wd-btn-font-size-lg:var(--wd-font-size-4);--wd-btn-line-height-lg:1.5;--wd-btn-min-height-lg:40px;--wd-btn-icon-space-sm:var(--wd-space-base);--wd-btn-icon-space-md:calc(var(--wd-space-base) * 2);--wd-btn-icon-space-lg:calc(var(--wd-space-base) * 3);--wd-btn-icon-size-sm:calc(var(--wd-btn-font-size-sm) + 0.125rem);--wd-btn-icon-size-md:calc(var(--wd-btn-font-size-md) + 0.125rem);--wd-btn-icon-size-lg:calc(var(--wd-btn-font-size-lg) + 0.25rem);--wd-btn-border-radius:var(--wd-border-radius);--wd-btn-color-text:var(--wd-color-text-default);--wd-btn-color-text-inverse:var(--wd-color-text-inverse);--wd-btn-color-text-hover:var(--wd-color-text-default);--wd-btn-color-text-active:var(--wd-color-text-default);--wd-btn-color-text-focus:var(--wd-color-text-default);--wd-btn-color-text-disabled:var(--wd-color-text-disabled);--wd-btn-color-brand:var(--wd-color-brand);--wd-btn-color-brand-hover:var(--wd-color-brand-hover);--wd-btn-color-brand-active:var(--wd-color-brand-active);--wd-btn-color-brand-focus:var(--wd-color-brand-focus);--wd-btn-color-brand-disabled:var(--wd-color-brand-disabled);--wd-btn-color-warning:var(--wd-color-warning);--wd-btn-color-warning-hover:var(--wd-color-warning-hover);--wd-btn-color-warning-active:var(--wd-color-warning-active);--wd-btn-color-warning-focus:var(--wd-color-warning-focus);--wd-btn-color-warning-disabled:var(--wd-color-warning-disabled);--wd-btn-color-error:var(--wd-color-error);--wd-btn-color-error-hover:var(--wd-color-error-hover);--wd-btn-color-error-active:var(--wd-color-error-active);--wd-btn-color-error-focus:var(--wd-color-error-focus);--wd-btn-color-error-disabled:var(--wd-color-error-disabled);--wd-btn-color-gray:var(
|
|
5
5
|
--wd-color-gray-1
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CommonPropsType } from '../../types';
|
|
3
|
+
import type { DataType } from '../../../configs/components/swiper';
|
|
3
4
|
import './style';
|
|
4
|
-
export interface
|
|
5
|
-
/**
|
|
6
|
-
* 是否启用指示点
|
|
7
|
-
*/
|
|
8
|
-
indicatorDots: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* 是否自动切换
|
|
11
|
-
*/
|
|
12
|
-
autoplay: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* 当前索引值
|
|
15
|
-
*/
|
|
16
|
-
current: number;
|
|
17
|
-
interval: number;
|
|
18
|
-
duration: number;
|
|
19
|
-
circular: boolean;
|
|
20
|
-
vertical: boolean;
|
|
21
|
-
indicatorColor: string;
|
|
22
|
-
indicatorActiveColor: string;
|
|
5
|
+
export interface SwiperPropsType extends CommonPropsType, DataType {
|
|
23
6
|
}
|
|
24
|
-
export default function Swiper({ children, className, style, autoplay, circular, vertical, indicatorDots, indicatorColor, indicatorActiveColor, duration, interval, current, events, id, }:
|
|
7
|
+
export default function Swiper({ children, className, style, autoplay, circular, vertical, indicatorDots, indicatorColor, indicatorActiveColor, duration, interval, current, events, id, loop, }: SwiperPropsType): JSX.Element;
|
|
@@ -8,7 +8,7 @@ import useDebouncedCallback from '../../utils/hooks/use-debounced-callback';
|
|
|
8
8
|
import { emptyObject, noop } from '../../utils/constant';
|
|
9
9
|
import './style';
|
|
10
10
|
import { useSyncValue } from '../../utils/hooks/useSyncValue';
|
|
11
|
-
export default function Swiper({ children, className, style, autoplay = true, circular = true, vertical = false, indicatorDots, indicatorColor = 'rgba(200, 200, 200, 0.9)', indicatorActiveColor = 'rgba(0, 0, 0, 0.9)', duration = 500, interval = 5000, current = 0, events = emptyObject, id, }) {
|
|
11
|
+
export default function Swiper({ children, className, style, autoplay = true, circular = true, vertical = false, indicatorDots, indicatorColor = 'rgba(200, 200, 200, 0.9)', indicatorActiveColor = 'rgba(0, 0, 0, 0.9)', duration = 500, interval = 5000, current = 0, events = emptyObject, id, loop = true, }) {
|
|
12
12
|
const originChildrenRef = useRef(null);
|
|
13
13
|
const [realChildren, setRealChildren] = useState(children);
|
|
14
14
|
const itemCount = React.Children.count(realChildren);
|
|
@@ -18,12 +18,20 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
18
18
|
const [height, setHeight] = useState(0);
|
|
19
19
|
const { change = () => { } } = events;
|
|
20
20
|
useEffect(() => {
|
|
21
|
+
/**
|
|
22
|
+
* Transforms DOM children elements into React elements by accessing their internal React fiber.
|
|
23
|
+
*
|
|
24
|
+
* This implementation detail function maps each child element to its corresponding React element
|
|
25
|
+
* by finding the React fiber instance attached to the DOM node and recreating the React element
|
|
26
|
+
* with its original type and props. The resulting React elements are stored in state via `setRealChildren`.
|
|
27
|
+
*
|
|
28
|
+
* Note: This relies on React's internal properties which may change between versions.
|
|
29
|
+
*/
|
|
21
30
|
const callback = () => {
|
|
22
31
|
var _a;
|
|
23
32
|
const realChildren = Array.from(((_a = originChildrenRef === null || originChildrenRef === void 0 ? void 0 : originChildrenRef.current) === null || _a === void 0 ? void 0 : _a.children) || []).map((elem) => {
|
|
24
33
|
const reactFiberProp = Object.keys(elem).find((prop) => {
|
|
25
|
-
return
|
|
26
|
-
prop.startsWith('__reactFiber'));
|
|
34
|
+
return prop.startsWith('__reactInternalInstance') || prop.startsWith('__reactFiber');
|
|
27
35
|
});
|
|
28
36
|
const reactFiber = elem[reactFiberProp];
|
|
29
37
|
const reactElem = React.createElement(reactFiber.elementType, reactFiber.pendingProps);
|
|
@@ -66,10 +74,10 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
66
74
|
});
|
|
67
75
|
const setIndex = (index) => {
|
|
68
76
|
if (index >= itemCount) {
|
|
69
|
-
index = 0;
|
|
77
|
+
index = loop ? 0 : currentIndex;
|
|
70
78
|
}
|
|
71
79
|
if (index < 0) {
|
|
72
|
-
index = itemCount - 1;
|
|
80
|
+
index = loop ? itemCount - 1 : currentIndex;
|
|
73
81
|
}
|
|
74
82
|
setCurrentIndex(index);
|
|
75
83
|
};
|
|
@@ -89,9 +97,7 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
89
97
|
// eslint-disable-next-line rulesdir/no-timer
|
|
90
98
|
timeout = setTimeout(() => {
|
|
91
99
|
setSwipeStyle({
|
|
92
|
-
transform: vertical
|
|
93
|
-
? `translate3d(0, -0%, 0)`
|
|
94
|
-
: `translate3d(-0%, 0, 0)`,
|
|
100
|
+
transform: vertical ? `translate3d(0, -0%, 0)` : `translate3d(-0%, 0, 0)`,
|
|
95
101
|
transitionDuration: `${duration}ms`,
|
|
96
102
|
transitionProperty: 'transform',
|
|
97
103
|
});
|
|
@@ -106,16 +112,12 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
106
112
|
if (to === length - 1 && cur === 0) {
|
|
107
113
|
circular &&
|
|
108
114
|
setSwipeStyle({
|
|
109
|
-
transform: vertical
|
|
110
|
-
? `translate3d(0, -${to * 100}%, 0)`
|
|
111
|
-
: `translate3d(-${to * 100}%, 0, 0)`,
|
|
115
|
+
transform: vertical ? `translate3d(0, -${to * 100}%, 0)` : `translate3d(-${to * 100}%, 0, 0)`,
|
|
112
116
|
});
|
|
113
117
|
// eslint-disable-next-line rulesdir/no-timer
|
|
114
118
|
timeout = setTimeout(() => {
|
|
115
119
|
setSwipeStyle({
|
|
116
|
-
transform: vertical
|
|
117
|
-
? `translate3d(0, -${to * 100}%, 0)`
|
|
118
|
-
: `translate3d(-${to * 100}%, 0, 0)`,
|
|
120
|
+
transform: vertical ? `translate3d(0, -${to * 100}%, 0)` : `translate3d(-${to * 100}%, 0, 0)`,
|
|
119
121
|
transitionDuration: `${duration}ms`,
|
|
120
122
|
});
|
|
121
123
|
}, 50);
|
|
@@ -126,9 +128,7 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
const style = {
|
|
129
|
-
transform: vertical
|
|
130
|
-
? `translate3d(0, -${to * 100}%, 0)`
|
|
131
|
-
: `translate3d(-${to * 100}%, 0, 0)`,
|
|
131
|
+
transform: vertical ? `translate3d(0, -${to * 100}%, 0)` : `translate3d(-${to * 100}%, 0, 0)`,
|
|
132
132
|
};
|
|
133
133
|
if (to !== cur) {
|
|
134
134
|
style.transitionDuration = `${duration}ms`;
|
|
@@ -140,6 +140,8 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
+
const showLeftBtn = loop || (!loop && currentIndex !== 0);
|
|
144
|
+
const showRightBtn = loop || (!loop && currentIndex + 1 !== itemCount);
|
|
143
145
|
return (_jsxs("div", { className: classNames('g-swiper weda-ui', className, {
|
|
144
146
|
vertical: vertical,
|
|
145
147
|
}), style: { height: height ? height : 'auto', ...style }, ref: outerWrapRef, id: id, children: [_jsx("div", { ref: originChildrenRef, style: { display: 'none' }, children: children }), itemCount > 0 ? (
|
|
@@ -161,13 +163,13 @@ export default function Swiper({ children, className, style, autoplay = true, ci
|
|
|
161
163
|
setIndex(i);
|
|
162
164
|
e.preventDefault();
|
|
163
165
|
}, "data-index": i }));
|
|
164
|
-
}) })) : (false), _jsx("a", { href: "#", className: "g-swiper__turn-pre", onClick: (ev) => {
|
|
166
|
+
}) })) : (false), showLeftBtn && (_jsx("a", { href: "#", className: "g-swiper__turn-pre", onClick: (ev) => {
|
|
165
167
|
ev.preventDefault();
|
|
166
168
|
setIndex(currentIndex - 1);
|
|
167
|
-
}, children: "\u4E0A\u4E00\u9875" }), _jsx("a", { href: "#", className: "g-swiper__turn-next", onClick: (ev) => {
|
|
169
|
+
}, children: "\u4E0A\u4E00\u9875" })), showRightBtn && (_jsx("a", { href: "#", className: "g-swiper__turn-next", onClick: (ev) => {
|
|
168
170
|
ev.preventDefault();
|
|
169
171
|
setIndex(currentIndex + 1);
|
|
170
|
-
}, children: "\u4E0B\u4E00\u9875" })] }));
|
|
172
|
+
}, children: "\u4E0B\u4E00\u9875" }))] }));
|
|
171
173
|
}
|
|
172
174
|
const SwiperItem = ({ height, setHeight, children, currentIndex, index, useless }) => {
|
|
173
175
|
const firstChildRef = useRef(null);
|
|
@@ -240,10 +240,8 @@ const WdForm = React.forwardRef(function WdForm(props, ref) {
|
|
|
240
240
|
});
|
|
241
241
|
});
|
|
242
242
|
}, [formsItemMap]);
|
|
243
|
-
const [visible, setVisible] = React.useState(false);
|
|
244
243
|
const [isInformContainer, setIsInformContainer] = React.useState(false);
|
|
245
244
|
React.useEffect(() => {
|
|
246
|
-
setVisible(true);
|
|
247
245
|
setIsInformContainer(true);
|
|
248
246
|
}, []);
|
|
249
247
|
useMountEffect(() => {
|
|
@@ -544,6 +542,6 @@ const WdForm = React.forwardRef(function WdForm(props, ref) {
|
|
|
544
542
|
// </ConfigProvider>
|
|
545
543
|
// );
|
|
546
544
|
// }
|
|
547
|
-
return (_jsx(FormWidgetProvider, { "$widget": $widget, children: _jsx(FormLayoutProvider, { layout: layout, children: _jsx(FormTypeProvider, { formType: formType, children: _jsx(FormFieldProvider, { setFieldValue: setFieldValue, isInformContainer: isInformContainer, getFieldValue: getFieldValue, children: _jsx(FormUi, { layout: layout, className: cls, style: style, id: id, lgWidth: lgWidth, labelPosition: labelPosition, children: initValueFetchError ? (_jsx(EmptyContent, { emptyText: '数据加载失败', errorObj: initValueFetchError, icon: 'error', isH5: isH5 })) : (
|
|
545
|
+
return (_jsx(FormWidgetProvider, { "$widget": $widget, children: _jsx(FormLayoutProvider, { layout: layout, children: _jsx(FormTypeProvider, { formType: formType, children: _jsx(FormFieldProvider, { setFieldValue: setFieldValue, isInformContainer: isInformContainer, getFieldValue: getFieldValue, children: _jsx(FormUi, { layout: layout, className: cls, style: style, id: id, lgWidth: lgWidth, labelPosition: labelPosition, children: initValueFetchError ? (_jsx(EmptyContent, { emptyText: '数据加载失败', errorObj: initValueFetchError, icon: 'error', isH5: isH5 })) : (contentSlot) }) }) }) }) }));
|
|
548
546
|
});
|
|
549
547
|
export default React.memo(WdForm);
|