@cloudbase/weda-ui 2.0.11 → 2.0.27
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/README.md +1 -0
- package/package.json +39 -35
- package/src/configs/components/button.json +60 -13
- package/src/configs/components/calendar.json +3 -3
- package/src/configs/components/carousel.json +57 -47
- package/src/configs/components/chart/bar.json +4 -13
- package/src/configs/components/chart/line.json +4 -13
- package/src/configs/components/chart/pie.json +3 -10
- package/src/configs/components/chart/statisticsCard.json +1 -4
- package/src/configs/components/container.json +1 -3
- package/src/configs/components/dataView.json +7 -15
- package/src/configs/components/drawer.json +24 -6
- package/src/configs/components/form/form.json +19 -0
- package/src/configs/components/form/input.json +20 -5
- package/src/configs/components/form/location.json +51 -48
- package/src/configs/components/form/radio.json +1 -3
- package/src/configs/components/form/richText.json +14 -14
- package/src/configs/components/form/select.json +62 -82
- package/src/configs/components/form/textarea.json +14 -1
- package/src/configs/components/form/uploader.json +64 -64
- package/src/configs/components/form/uploaderFile.json +1 -2
- package/src/configs/components/graphicCard.json +44 -45
- package/src/configs/components/image.json +44 -40
- package/src/configs/components/link.json +5 -10
- package/src/configs/components/listView.json +2 -8
- package/src/configs/components/lottery.json +7 -3
- package/src/configs/components/modal.json +26 -21
- package/src/configs/components/navLayout.json +68 -68
- package/src/configs/components/navigationBar.json +4 -1
- package/src/configs/components/richtextview.json +1 -1
- package/src/configs/components/scrollVeiw.json +14 -42
- package/src/configs/components/swiper.json +9 -9
- package/src/configs/components/wedaVideo.json +89 -0
- package/src/configs/components/wxOpenApi/phone.json +7 -21
- package/src/configs/components/wxOpenApi/phoneCode.json +7 -19
- package/src/configs/components/wxOpenApi/share.json +14 -24
- package/src/configs/components/wxOpenApi/userInfo.json +9 -27
- package/src/configs/index.js +2 -0
- package/src/mp/components/calendar/index.js +4 -1
- package/src/mp/components/calendar/index.json +3 -2
- package/src/mp/components/calendar/index.wxml +6 -28
- package/src/mp/components/calendar/index.wxss +17 -16
- package/src/mp/components/carousel/index.json +1 -1
- package/src/mp/components/carousel/index.wxml +3 -30
- package/src/mp/components/chart/bar/index.wxml +1 -6
- package/src/mp/components/chart/ec-canvas/ec-canvas.json +1 -1
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +2 -19
- package/src/mp/components/chart/line/index.wxml +1 -6
- package/src/mp/components/chart/pie/index.wxml +1 -6
- package/src/mp/components/chart/statisticsCard/index.wxml +1 -5
- package/src/mp/components/chart/statisticsCard/index.wxss +7 -10
- package/src/mp/components/dataView/index.wxml +1 -13
- package/src/mp/components/form/checkbox/index.js +5 -1
- package/src/mp/components/form/checkbox/index.wxml +3 -18
- package/src/mp/components/form/formcell/index.wxss +5 -0
- package/src/mp/components/form/input/index.js +1 -1
- package/src/mp/components/form/input/index.wxml +3 -16
- package/src/mp/components/form/input/index.wxss +7 -1
- package/src/mp/components/form/location/components/mapChoose/index.json +1 -1
- package/src/mp/components/form/location/components/mapChoose/index.wxml +11 -58
- package/src/mp/components/form/location/index.js +7 -1
- package/src/mp/components/form/location/index.json +1 -1
- package/src/mp/components/form/location/index.wxml +7 -43
- package/src/mp/components/form/radio/index.js +5 -1
- package/src/mp/components/form/radio/index.wxml +2 -14
- package/src/mp/components/form/select/index.js +2 -2
- package/src/mp/components/form/select/index.wxml +3 -33
- package/src/mp/components/form/select/index.wxss +9 -0
- package/src/mp/components/form/switch/index.wxml +2 -13
- package/src/mp/components/form/textarea/index.js +6 -0
- package/src/mp/components/form/textarea/index.wxml +4 -23
- package/src/mp/components/form/textarea/index.wxss +5 -0
- package/src/mp/components/form/uploader/index.wxml +2 -20
- package/src/mp/components/form/uploader/weui-uploader.json +6 -6
- package/src/mp/components/form/uploader/weui-uploader.wxml +10 -53
- package/src/mp/components/form/uploaderFile/index.wxml +14 -71
- package/src/mp/components/graphicCard/index.js +9 -11
- package/src/mp/components/graphicCard/index.wxml +6 -34
- package/src/mp/components/graphicCard/index.wxss +6 -6
- package/src/mp/components/image/index.wxml +3 -21
- package/src/mp/components/listView/index.wxml +8 -33
- package/src/mp/components/listView/index.wxss +2 -2
- package/src/mp/components/lottery/index.wxml +7 -31
- package/src/mp/components/navLayout/index.js +9 -12
- package/src/mp/components/navLayout/index.wxml +6 -30
- package/src/mp/components/navLayout/index.wxss +10 -10
- package/src/mp/components/navigationBar/index.json +1 -2
- package/src/mp/components/navigationBar/index.wxml +29 -146
- package/src/mp/components/navigationBar/index.wxss +10 -10
- package/src/mp/components/richText/index.wxml +1 -1
- package/src/mp/components/richText/index.wxss +7 -5
- package/src/mp/components/swiper/index.wxml +1 -14
- package/src/mp/components/tabs/index.json +1 -1
- package/src/mp/components/tabs/index.wxml +3 -22
- package/src/mp/components/tabs/index.wxss +1 -2
- package/src/mp/components/text/index.wxml +1 -7
- package/src/mp/components/wedaVideo/index.js +86 -0
- package/src/mp/components/wedaVideo/index.json +4 -0
- package/src/mp/components/wedaVideo/index.wxml +4 -0
- package/src/mp/components/wedaVideo/index.wxss +20 -0
- package/src/mp/components/wxOpenApi/phone/index.js +1 -9
- package/src/mp/components/wxOpenApi/phone/index.wxml +1 -11
- package/src/mp/components/wxOpenApi/phoneCode/index.json +1 -1
- package/src/mp/components/wxOpenApi/phoneCode/index.wxml +1 -11
- package/src/mp/components/wxOpenApi/share/index.wxml +1 -11
- package/src/mp/components/wxOpenApi/userInfo/index.wxml +1 -10
- package/src/mp/index.json +1 -0
- package/src/mp/style/weda-ui.wxss +16 -6
- package/src/web/actions/showModal/index.tsx +5 -4
- package/src/web/components/calendar/index.css +99 -65
- package/src/web/components/chart/common/core/eChartBase.ts +55 -42
- package/src/web/components/chart/common/core/type.ts +23 -23
- package/src/web/components/chart/common/echart.css +12 -12
- package/src/web/components/chart/common/echarts.ts +3 -5
- package/src/web/components/chart/common/useChart.tsx +34 -16
- package/src/web/components/chart/statisticsCard/index.css +9 -8
- package/src/web/components/container/index.tsx +3 -4
- package/src/web/components/drawer/index.tsx +15 -4
- package/src/web/components/form/checkbox/index.tsx +32 -31
- package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -2
- package/src/web/components/form/form/index.css +3 -6
- package/src/web/components/form/form/index.tsx +2 -1
- package/src/web/components/form/formcell/index.css +6 -17
- package/src/web/components/form/formcell/index.tsx +2 -6
- package/src/web/components/form/input/index.css +8 -4
- package/src/web/components/form/input/index.tsx +61 -53
- package/src/web/components/form/location/common/mapChoose.css +13 -11
- package/src/web/components/form/location/common/selectModal.jsx +2 -11
- package/src/web/components/form/location/common/useLocationInfo.js +4 -0
- package/src/web/components/form/location/components/LocationH5/index.css +19 -20
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +11 -1
- package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -13
- package/src/web/components/form/location/components/LocationPC/location.PC.jsx +14 -5
- package/src/web/components/form/radio/index.tsx +32 -26
- package/src/web/components/form/renderDecorator.tsx +23 -26
- package/src/web/components/form/select/h5.tsx +2 -2
- package/src/web/components/form/select/index.css +9 -0
- package/src/web/components/form/select/index.tsx +76 -49
- package/src/web/components/form/select/region/index.ts +101 -80
- package/src/web/components/form/select/year.tsx +2 -0
- package/src/web/components/form/switch/index.tsx +40 -40
- package/src/web/components/form/textarea/index.css +4 -0
- package/src/web/components/form/textarea/index.tsx +38 -25
- package/src/web/components/form/types.d.ts +10 -10
- package/src/web/components/form/uploader/index.css +10 -0
- package/src/web/components/form/uploader/uploader.h5.tsx +3 -6
- package/src/web/components/form/uploader/uploader.pc.tsx +3 -6
- package/src/web/components/form/uploaderFile/index.css +24 -23
- package/src/web/components/form/uploaderFile/index.jsx +0 -5
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +24 -15
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +21 -13
- package/src/web/components/graphicCard/index.css +6 -6
- package/src/web/components/image/image.tsx +2 -2
- package/src/web/components/image/index.css +9 -7
- package/src/web/components/image/index.tsx +28 -11
- package/src/web/components/index.js +1 -0
- package/src/web/components/link/index.tsx +12 -12
- package/src/web/components/listView/index.css +8 -8
- package/src/web/components/lottery/index.css +43 -37
- package/src/web/components/lottery/index.tsx +3 -3
- package/src/web/components/modal/index.tsx +34 -34
- package/src/web/components/navLayout/index.css +25 -25
- package/src/web/components/navigationBar/index.css +26 -26
- package/src/web/components/picker/datePicker.tsx +3 -3
- package/src/web/components/picker/picker.tsx +3 -3
- package/src/web/components/richText/index.jsx +41 -46
- package/src/web/components/richTextView/index.css +7 -3
- package/src/web/components/richTextView/index.tsx +4 -6
- package/src/web/components/scrollView/index.tsx +2 -2
- package/src/web/components/slot/index.tsx +3 -4
- package/src/web/components/swiper/index.css +1 -1
- package/src/web/components/swiper/index.tsx +33 -15
- package/src/web/components/tabs/index.css +2 -3
- package/src/web/components/tabs/index.tsx +6 -6
- package/src/web/components/tabs/tabs.h5.tsx +17 -12
- package/src/web/components/tabs/tabs.pc.tsx +45 -34
- package/src/web/components/text/index.css +1 -1
- package/src/web/components/wedaVideo/index.css +42 -0
- package/src/web/components/wedaVideo/index.tsx +208 -0
- package/src/web/utils/constant.ts +2 -1
- package/src/web/utils/loading-fallback.tsx +2 -2
- package/src/web/utils/lodash.ts +1 -1
- package/src/web/utils/platform.js +13 -0
- package/src/web/utils/useSetState.ts +6 -2
- package/src/web/weda-ui.css +23 -8
- package/src/docs/common/format.tsx +0 -112
- package/src/docs/common/tableView.css +0 -164
- package/src/docs/common/tableView.tsx +0 -273
- package/src/docs/compsdocs/chart/Bar.mdx +0 -159
- package/src/docs/compsdocs/chart/Line.mdx +0 -100
- package/src/docs/compsdocs/chart/Pie.mdx +0 -83
- package/src/docs/compsdocs/chart/_category_.json +0 -1
- package/src/docs/compsdocs/chart/statisticsCard.mdx +0 -51
- package/src/docs/compsdocs/database/DataView.mdx +0 -33
- package/src/docs/compsdocs/database/ListView.mdx +0 -33
- package/src/docs/compsdocs/database/_category_.json +0 -1
- package/src/docs/compsdocs/form/Form.mdx +0 -35
- package/src/docs/compsdocs/form/FormCheckbox.mdx +0 -35
- package/src/docs/compsdocs/form/FormDate.mdx +0 -30
- package/src/docs/compsdocs/form/FormEmail.mdx +0 -30
- package/src/docs/compsdocs/form/FormImageUploader.mdx +0 -31
- package/src/docs/compsdocs/form/FormInput.mdx +0 -30
- package/src/docs/compsdocs/form/FormLocation.mdx +0 -64
- package/src/docs/compsdocs/form/FormPhone.mdx +0 -30
- package/src/docs/compsdocs/form/FormRadio.mdx +0 -35
- package/src/docs/compsdocs/form/FormRegion.mdx +0 -30
- package/src/docs/compsdocs/form/FormSelect.mdx +0 -36
- package/src/docs/compsdocs/form/FormSwitch.mdx +0 -30
- package/src/docs/compsdocs/form/FormTextarea.mdx +0 -30
- package/src/docs/compsdocs/form/FormTime.mdx +0 -30
- package/src/docs/compsdocs/form/FormUploadFile.mdx +0 -30
- package/src/docs/compsdocs/form/FormUrl.mdx +0 -30
- package/src/docs/compsdocs/form/_category_.json +0 -1
- package/src/docs/compsdocs/grid/Card.mdx +0 -32
- package/src/docs/compsdocs/grid/Container.mdx +0 -42
- package/src/docs/compsdocs/grid/Footer.mdx +0 -31
- package/src/docs/compsdocs/grid/GridLayout.mdx +0 -32
- package/src/docs/compsdocs/grid/Header.mdx +0 -31
- package/src/docs/compsdocs/grid/Layout.mdx +0 -25
- package/src/docs/compsdocs/grid/List.mdx +0 -31
- package/src/docs/compsdocs/grid/ScrollView.mdx +0 -37
- package/src/docs/compsdocs/grid/Swiper.mdx +0 -58
- package/src/docs/compsdocs/grid/_category_.json +0 -1
- package/src/docs/compsdocs/media/Icon.mdx +0 -31
- package/src/docs/compsdocs/media/Image.mdx +0 -55
- package/src/docs/compsdocs/media/_category_.json +0 -1
- package/src/docs/compsdocs/model/ModelCreate.mdx +0 -20
- package/src/docs/compsdocs/model/ModelDetail.mdx +0 -20
- package/src/docs/compsdocs/model/ModelTable.mdx +0 -24
- package/src/docs/compsdocs/model/ModelUpdate.mdx +0 -21
- package/src/docs/compsdocs/model/PageLayout.mdx +0 -21
- package/src/docs/compsdocs/model/_category_.json +0 -1
- package/src/docs/compsdocs/navmenu/Classification.mdx +0 -38
- package/src/docs/compsdocs/navmenu/NavBar.mdx +0 -43
- package/src/docs/compsdocs/navmenu/NavLayout.mdx +0 -30
- package/src/docs/compsdocs/navmenu/TabBar.mdx +0 -43
- package/src/docs/compsdocs/navmenu/TabBarItem.mdx +0 -29
- package/src/docs/compsdocs/navmenu/_category_.json +0 -1
- package/src/docs/compsdocs/senior/Lottery.mdx +0 -48
- package/src/docs/compsdocs/senior/Modal.mdx +0 -58
- package/src/docs/compsdocs/senior/SlotMachine.mdx +0 -52
- package/src/docs/compsdocs/senior/_category_.json +0 -1
- package/src/docs/compsdocs/show/Calendar.mdx +0 -29
- package/src/docs/compsdocs/show/Divider.mdx +0 -31
- package/src/docs/compsdocs/show/GraphicCard.mdx +0 -30
- package/src/docs/compsdocs/show/Item.mdx +0 -32
- package/src/docs/compsdocs/show/ItemList.mdx +0 -47
- package/src/docs/compsdocs/show/Media.mdx +0 -25
- package/src/docs/compsdocs/show/StatusTip.mdx +0 -25
- package/src/docs/compsdocs/show/Swiper.mdx +0 -33
- package/src/docs/compsdocs/show/Tabs.mdx +0 -38
- package/src/docs/compsdocs/show/_category_.json +0 -1
- package/src/docs/compsdocs/show/button.mdx +0 -25
- package/src/docs/compsdocs/text/Link.mdx +0 -43
- package/src/docs/compsdocs/text/RichTextView.mdx +0 -36
- package/src/docs/compsdocs/text/Text.mdx +0 -31
- package/src/docs/compsdocs/text/Title.mdx +0 -32
- package/src/docs/compsdocs/text/_category_.json +0 -1
- package/src/docs/compsdocs/wxOpen/Phone.mdx +0 -60
- package/src/docs/compsdocs/wxOpen/Share.mdx +0 -46
- package/src/docs/compsdocs/wxOpen/UserInfo.mdx +0 -60
- package/src/docs/compsdocs/wxOpen/_category_.json +0 -4
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
.wedatea2td-menu__title
|
|
51
51
|
.wedatea2td-menu__title-icon {
|
|
52
52
|
display: block;
|
|
53
|
-
width:
|
|
54
|
-
height:
|
|
53
|
+
width: 2.28571em;
|
|
54
|
+
height: 2.28571em;
|
|
55
55
|
margin-right: 12px;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
.weda-menu__menu-content
|
|
61
61
|
.wedatea2td-menu__title
|
|
62
62
|
.wedatea2td-h2 {
|
|
63
|
-
font-size:
|
|
64
|
-
line-height:
|
|
63
|
+
font-size: 1.1428571em;
|
|
64
|
+
line-height: 1.28571em;
|
|
65
65
|
color: #000000;
|
|
66
66
|
margin-top: 0;
|
|
67
67
|
font-weight: normal;
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
.wedatea2td-menu__body
|
|
86
86
|
.wedatea2td-menu__item
|
|
87
87
|
.wedatea2td-menu__list-icon {
|
|
88
|
-
width:
|
|
89
|
-
height:
|
|
88
|
+
width: 1.42857em;
|
|
89
|
+
height: 1.42857em;
|
|
90
90
|
margin-top: 0;
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
.wedatea2td-menu__item
|
|
97
97
|
.wedatea2td-menu__text {
|
|
98
98
|
font-weight: normal;
|
|
99
|
-
font-size:
|
|
100
|
-
line-height:
|
|
99
|
+
font-size: 1em;
|
|
100
|
+
line-height: 1.5714em;
|
|
101
101
|
color: rgba(0, 0, 0, 0.9);
|
|
102
102
|
padding: 0;
|
|
103
103
|
}
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
|
|
299
299
|
.weda-menu-horizontal .weda-menu__nav .weda-menu__nav-title .weda-menu__title {
|
|
300
300
|
font-weight: normal;
|
|
301
|
-
font-size:
|
|
301
|
+
font-size: 1.14285em;
|
|
302
302
|
line-height: 18px;
|
|
303
303
|
color: #000000;
|
|
304
304
|
margin-left: 12px;
|
|
@@ -410,8 +410,8 @@
|
|
|
410
410
|
|
|
411
411
|
.weda-menu-horizontal .wedatea2td-dropdown .wedatea2td-dropdown__value {
|
|
412
412
|
font-weight: 400;
|
|
413
|
-
font-size:
|
|
414
|
-
line-height:
|
|
413
|
+
font-size: 1em;
|
|
414
|
+
line-height: 1.5714em;
|
|
415
415
|
color: #000000;
|
|
416
416
|
white-space: nowrap;
|
|
417
417
|
}
|
|
@@ -437,8 +437,8 @@
|
|
|
437
437
|
.weda-menu__dropdown
|
|
438
438
|
.wedatea2td-dropdown__value {
|
|
439
439
|
font-weight: normal;
|
|
440
|
-
font-size:
|
|
441
|
-
line-height:
|
|
440
|
+
font-size: 1em;
|
|
441
|
+
line-height: 1.5714em;
|
|
442
442
|
color: #000000;
|
|
443
443
|
padding: 0;
|
|
444
444
|
white-space: nowrap;
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
.wedatea2td-dropdown__header {
|
|
451
451
|
padding-left: 0;
|
|
452
452
|
padding-right: 23px;
|
|
453
|
-
height:
|
|
453
|
+
height: 21.5714em;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
.weda-menu-horizontal
|
|
@@ -515,8 +515,8 @@
|
|
|
515
515
|
margin-bottom: 4px;
|
|
516
516
|
color: rgba(0, 0, 0, 0.9);
|
|
517
517
|
font-weight: 400;
|
|
518
|
-
font-size:
|
|
519
|
-
line-height:
|
|
518
|
+
font-size: 1em;
|
|
519
|
+
line-height: 1.5714em;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.weda-menu__dropdown-menu-list .weda-menu__dropdown-list-item:last-child {
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
align-items: center;
|
|
544
544
|
justify-content: space-between;
|
|
545
545
|
padding: 0 20px 0 16px;
|
|
546
|
-
height:
|
|
546
|
+
height: 4.5714em;
|
|
547
547
|
background-color: #fff;
|
|
548
548
|
position: relative;
|
|
549
549
|
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.05);
|
|
@@ -557,8 +557,8 @@
|
|
|
557
557
|
|
|
558
558
|
.weda-menu-mobile .weda-menu__bar-main .weda-menu__main-logo {
|
|
559
559
|
font-weight: normal;
|
|
560
|
-
font-size:
|
|
561
|
-
line-height:
|
|
560
|
+
font-size: 1.28571em;
|
|
561
|
+
line-height: 1.28571em;
|
|
562
562
|
color: #000000;
|
|
563
563
|
text-decoration: none;
|
|
564
564
|
display: flex;
|
|
@@ -566,8 +566,8 @@
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
.weda-menu-mobile .weda-menu__bar-main .weda-menu__main-icon {
|
|
569
|
-
width:
|
|
570
|
-
height:
|
|
569
|
+
width: 2.2857em;
|
|
570
|
+
height: 2.2857em;
|
|
571
571
|
margin-right: 12px;
|
|
572
572
|
}
|
|
573
573
|
|
|
@@ -579,8 +579,8 @@
|
|
|
579
579
|
|
|
580
580
|
.weda-menu-mobile .weda-menu__bar-extra .weda-menu__bar-btn,
|
|
581
581
|
.weda-menu-mobile .weda-menu__bar-extra .weda-menu__bar-btn--close {
|
|
582
|
-
width:
|
|
583
|
-
height:
|
|
582
|
+
width: 1.71428em;
|
|
583
|
+
height: 1.71428em;
|
|
584
584
|
}
|
|
585
585
|
|
|
586
586
|
.weda-menu__drawer {
|
|
@@ -676,8 +676,8 @@
|
|
|
676
676
|
.wedatea2td-menu__submenu
|
|
677
677
|
.wedatea2td-menu__list
|
|
678
678
|
.wedatea2td-menu__text {
|
|
679
|
-
font-size:
|
|
680
|
-
line-height:
|
|
679
|
+
font-size: 1.14285em;
|
|
680
|
+
line-height: 1.142857em;
|
|
681
681
|
color: rgba(0, 0, 0, 0.9);
|
|
682
682
|
padding: 0;
|
|
683
683
|
max-width: 100%;
|
|
@@ -719,7 +719,7 @@
|
|
|
719
719
|
.weda-menu__fonticon.lcap-icon,
|
|
720
720
|
.weda-menu__fonticon.t-icon {
|
|
721
721
|
margin: 0 4px 0 0;
|
|
722
|
-
font-size:
|
|
722
|
+
font-size: 1em;
|
|
723
723
|
}
|
|
724
724
|
.weda-menu__fonticon.lcap-icon:hover {
|
|
725
725
|
background-color: unset;
|
|
@@ -2,14 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import weui from '../../utils/weui';
|
|
3
3
|
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
|
-
import { CommonPropsType } from '../../types';
|
|
5
|
+
import type { CommonPropsType } from '../../types';
|
|
6
6
|
|
|
7
7
|
export interface PropsType extends CommonPropsType {
|
|
8
8
|
start: string;
|
|
9
9
|
end: string;
|
|
10
10
|
defaultValue: string;
|
|
11
11
|
title: string;
|
|
12
|
-
children?: React.ReactNode|undefined
|
|
12
|
+
children?: React.ReactNode | undefined;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export default function DatePicker(props: PropsType) {
|
|
@@ -45,4 +45,4 @@ export default function DatePicker(props: PropsType) {
|
|
|
45
45
|
{children}
|
|
46
46
|
</div>
|
|
47
47
|
);
|
|
48
|
-
}
|
|
48
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import weui from '../../utils/weui';
|
|
3
3
|
import classNames from '../../utils/classnames';
|
|
4
|
-
import { CommonPropsType } from '../../types';
|
|
4
|
+
import type { CommonPropsType } from '../../types';
|
|
5
5
|
|
|
6
6
|
export interface PropsType extends CommonPropsType {
|
|
7
|
-
title?: string
|
|
7
|
+
title?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default function Picker(props: PropsType) {
|
|
@@ -56,4 +56,4 @@ export default function Picker(props: PropsType) {
|
|
|
56
56
|
{children}
|
|
57
57
|
</div>
|
|
58
58
|
);
|
|
59
|
-
}
|
|
59
|
+
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
Text,
|
|
18
18
|
} from 'tea-component';
|
|
19
19
|
import { v4 as uuidv4 } from 'uuid';
|
|
20
|
-
import {defaultBase64} from './const';
|
|
20
|
+
import { defaultBase64 } from './const';
|
|
21
21
|
|
|
22
22
|
import './index.css';
|
|
23
23
|
import 'braft-editor/dist/index.css';
|
|
@@ -34,7 +34,6 @@ const IMAGE_TYPES = [
|
|
|
34
34
|
'image/svg+xml',
|
|
35
35
|
];
|
|
36
36
|
|
|
37
|
-
|
|
38
37
|
export default function RichText({
|
|
39
38
|
// 系统属性
|
|
40
39
|
id,
|
|
@@ -53,7 +52,7 @@ export default function RichText({
|
|
|
53
52
|
acceptTypes,
|
|
54
53
|
cloudPath,
|
|
55
54
|
disabled,
|
|
56
|
-
decorator
|
|
55
|
+
decorator,
|
|
57
56
|
}) {
|
|
58
57
|
const [editorState, setEditorState] = useState();
|
|
59
58
|
|
|
@@ -71,7 +70,6 @@ export default function RichText({
|
|
|
71
70
|
'weui-cell_disabled': isH5 && disabled,
|
|
72
71
|
});
|
|
73
72
|
|
|
74
|
-
|
|
75
73
|
const onDataChange = function (value) {
|
|
76
74
|
events.change && events.change({ value: value === '<p></p>' ? '' : value });
|
|
77
75
|
if (onChange) {
|
|
@@ -125,49 +123,47 @@ export default function RichText({
|
|
|
125
123
|
};
|
|
126
124
|
|
|
127
125
|
const richTextEl = (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
126
|
+
<div className={subCls}>
|
|
127
|
+
<div
|
|
128
|
+
style={{
|
|
129
|
+
border: '1px solid #d1d1d1',
|
|
130
|
+
backgroundColor: '#fff',
|
|
131
|
+
...style,
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<BraftEditor
|
|
135
|
+
key={id}
|
|
136
|
+
value={editorState}
|
|
137
|
+
readOnly={readOnly}
|
|
138
|
+
blockRendererFn={blockRenderFn}
|
|
139
|
+
onBlur={(s) => {
|
|
140
|
+
setEditorState(s);
|
|
141
|
+
onDataChange(s.toHTML());
|
|
142
|
+
if (s.toHTML().length > 32768) {
|
|
143
|
+
message.warning({
|
|
144
|
+
content: '富文本长度过长,可能导致保存失败',
|
|
145
|
+
});
|
|
146
|
+
}
|
|
136
147
|
}}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}}
|
|
152
|
-
excludeControls={['media', 'fullscreen']}
|
|
153
|
-
/** @ts-ignore */
|
|
154
|
-
extendControls={extendControls}
|
|
155
|
-
handleKeyCommand={(command, editState) => {
|
|
156
|
-
const newState = ContentUtils.handleKeyCommand(
|
|
157
|
-
editState,
|
|
158
|
-
command
|
|
159
|
-
);
|
|
160
|
-
if (newState) {
|
|
161
|
-
setEditorState(newState);
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
return false;
|
|
165
|
-
}}
|
|
166
|
-
/>
|
|
167
|
-
</div>
|
|
148
|
+
excludeControls={['media', 'fullscreen']}
|
|
149
|
+
/** @ts-ignore */
|
|
150
|
+
extendControls={extendControls}
|
|
151
|
+
handleKeyCommand={(command, editState) => {
|
|
152
|
+
const newState = ContentUtils.handleKeyCommand(editState, command);
|
|
153
|
+
if (newState) {
|
|
154
|
+
setEditorState(newState);
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
return false;
|
|
158
|
+
}}
|
|
159
|
+
/>
|
|
168
160
|
</div>
|
|
161
|
+
</div>
|
|
169
162
|
);
|
|
170
|
-
return renderDecorator(
|
|
163
|
+
return renderDecorator(
|
|
164
|
+
richTextEl,
|
|
165
|
+
decorator
|
|
166
|
+
)({
|
|
171
167
|
id,
|
|
172
168
|
className: cls,
|
|
173
169
|
style,
|
|
@@ -436,8 +432,7 @@ RichText.propTypes = {
|
|
|
436
432
|
acceptTypes: PropsTypes.array,
|
|
437
433
|
cloudPath: PropsTypes.string,
|
|
438
434
|
disabled: PropsTypes.bool,
|
|
439
|
-
decorator: PropsTypes.oneOfType([PropsTypes.array, PropsTypes.node])
|
|
440
|
-
|
|
435
|
+
decorator: PropsTypes.oneOfType([PropsTypes.array, PropsTypes.node]),
|
|
441
436
|
};
|
|
442
437
|
|
|
443
438
|
RichText.defaultProps = {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
.weda-RichTextView {
|
|
2
|
+
font-size: 14px;
|
|
3
|
+
}
|
|
1
4
|
.weda-RichTextView blockquote {
|
|
2
5
|
margin: 0 0 10px;
|
|
3
6
|
padding: 15px 20px;
|
|
@@ -17,9 +20,10 @@
|
|
|
17
20
|
border-radius: 3px;
|
|
18
21
|
color: #666;
|
|
19
22
|
font-family: monospace;
|
|
20
|
-
font-size:
|
|
21
|
-
font-weight: 400;
|
|
22
|
-
|
|
23
|
+
font-size: 1em;
|
|
24
|
+
/* font-weight: 400; */
|
|
25
|
+
font-weight: inherit;
|
|
26
|
+
line-height: 1.14285px;
|
|
23
27
|
word-wrap: break-word;
|
|
24
28
|
white-space: pre-wrap;
|
|
25
29
|
}
|
|
@@ -3,18 +3,18 @@ import classNames from '../../utils/classnames';
|
|
|
3
3
|
import { getTempFileURL } from '../../utils/tcb';
|
|
4
4
|
import './index.css';
|
|
5
5
|
import { LOAD_ERR_IMG_BASE64 } from '../../utils/constant';
|
|
6
|
-
import { CommonPropsType } from '../../types';
|
|
6
|
+
import type { CommonPropsType } from '../../types';
|
|
7
7
|
import destr from 'destr';
|
|
8
8
|
|
|
9
9
|
export interface PropsType extends CommonPropsType {
|
|
10
|
-
|
|
10
|
+
value: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export default function RichTextView({
|
|
14
14
|
value = '',
|
|
15
15
|
className,
|
|
16
16
|
style,
|
|
17
|
-
id
|
|
17
|
+
id,
|
|
18
18
|
}: PropsType) {
|
|
19
19
|
let parseValue = destr(value);
|
|
20
20
|
const cls = classNames({
|
|
@@ -55,9 +55,7 @@ export default function RichTextView({
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
displayValue && (
|
|
58
|
-
<div className={cls} style={style}
|
|
59
|
-
id={id}
|
|
60
|
-
>
|
|
58
|
+
<div className={cls} style={style} id={id}>
|
|
61
59
|
<div dangerouslySetInnerHTML={{ __html: displayValue }}></div>
|
|
62
60
|
</div>
|
|
63
61
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { CommonPropsType } from '../../types';
|
|
2
|
+
import type { CommonPropsType } from '../../types';
|
|
3
3
|
import classNames from '../../utils/classnames';
|
|
4
4
|
|
|
5
5
|
export interface PropsType extends CommonPropsType {
|
|
@@ -145,4 +145,4 @@ export default function ScrollView({
|
|
|
145
145
|
{children}
|
|
146
146
|
</div>
|
|
147
147
|
);
|
|
148
|
-
}
|
|
148
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
export interface PropsType {
|
|
4
|
-
className?: string
|
|
5
|
-
name: string
|
|
6
|
-
compositeParent: any
|
|
7
|
-
|
|
4
|
+
className?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
compositeParent: any;
|
|
8
7
|
}
|
|
9
8
|
export default function Slot({ compositeParent, name, className }: PropsType) {
|
|
10
9
|
if (!compositeParent) {
|
|
@@ -2,10 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import { useState, useEffect, useRef } from 'react';
|
|
3
3
|
import classNames from '../../utils/classnames';
|
|
4
4
|
import Swipe from 'react-easy-swipe';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
useDebouncedCallback,
|
|
7
|
+
useEventListener,
|
|
8
|
+
useResizeObserver,
|
|
9
|
+
} from '@react-hookz/web';
|
|
6
10
|
|
|
7
11
|
import './index.css';
|
|
8
|
-
import { CommonPropsType } from '../../types';
|
|
12
|
+
import type { CommonPropsType } from '../../types';
|
|
9
13
|
|
|
10
14
|
export interface PropsType extends CommonPropsType {
|
|
11
15
|
/**
|
|
@@ -180,7 +184,16 @@ export default function Swiper({
|
|
|
180
184
|
>
|
|
181
185
|
{itemsClone[itemCount - 1]}
|
|
182
186
|
{React.Children.map(children, (x, i) => {
|
|
183
|
-
return
|
|
187
|
+
return (
|
|
188
|
+
<SwiperItem
|
|
189
|
+
height={height}
|
|
190
|
+
setHeight={setHeight}
|
|
191
|
+
currentIndex={currentIndex}
|
|
192
|
+
index={i}
|
|
193
|
+
>
|
|
194
|
+
{x}
|
|
195
|
+
</SwiperItem>
|
|
196
|
+
);
|
|
184
197
|
})}
|
|
185
198
|
{itemsClone[0]}
|
|
186
199
|
</Swipe>
|
|
@@ -234,21 +247,26 @@ export default function Swiper({
|
|
|
234
247
|
}
|
|
235
248
|
|
|
236
249
|
const SwiperItem: React.FC<{
|
|
237
|
-
setHeight: React.Dispatch<React.SetStateAction<number
|
|
238
|
-
currentIndex: number
|
|
239
|
-
index: number
|
|
240
|
-
height: number
|
|
241
|
-
children?: React.ReactNode
|
|
242
|
-
}> = ({height, setHeight, children, currentIndex, index}) => {
|
|
250
|
+
setHeight: React.Dispatch<React.SetStateAction<number>>;
|
|
251
|
+
currentIndex: number;
|
|
252
|
+
index: number;
|
|
253
|
+
height: number;
|
|
254
|
+
children?: React.ReactNode;
|
|
255
|
+
}> = ({ height, setHeight, children, currentIndex, index }) => {
|
|
243
256
|
const firstChildRef = useRef<HTMLDivElement>(null);
|
|
244
|
-
const syncHeight = useDebouncedCallback(
|
|
245
|
-
|
|
246
|
-
|
|
257
|
+
const syncHeight = useDebouncedCallback(
|
|
258
|
+
(e) => {
|
|
259
|
+
setHeight(e.contentRect.height);
|
|
260
|
+
},
|
|
261
|
+
[setHeight],
|
|
262
|
+
500,
|
|
263
|
+
2000
|
|
264
|
+
); // 必须debounce延迟,让resize完成后再设置高度
|
|
247
265
|
|
|
248
266
|
// 因为有loading 所以得用resizeobserver
|
|
249
267
|
// @ts-ignore
|
|
250
268
|
useResizeObserver(firstChildRef, (e) => {
|
|
251
|
-
if(currentIndex === index) {
|
|
269
|
+
if (currentIndex === index) {
|
|
252
270
|
syncHeight(e);
|
|
253
271
|
}
|
|
254
272
|
});
|
|
@@ -263,11 +281,11 @@ const SwiperItem: React.FC<{
|
|
|
263
281
|
<div
|
|
264
282
|
ref={firstChildRef}
|
|
265
283
|
style={{
|
|
266
|
-
height: height > 0 ? '100%' : 'auto'
|
|
284
|
+
height: height > 0 ? '100%' : 'auto',
|
|
267
285
|
}}
|
|
268
286
|
>
|
|
269
287
|
{children}
|
|
270
288
|
</div>
|
|
271
289
|
</div>
|
|
272
290
|
);
|
|
273
|
-
};
|
|
291
|
+
};
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
background-color: #fff;
|
|
13
13
|
position: relative;
|
|
14
|
-
font-size: 0;
|
|
15
14
|
white-space: nowrap;
|
|
16
15
|
border-bottom: 1px solid #eee;
|
|
17
16
|
overflow-x: auto;
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
flex-basis: 0;
|
|
31
30
|
flex-grow: 1;
|
|
32
31
|
height: 100%;
|
|
33
|
-
font-size:
|
|
32
|
+
font-size: 1em;
|
|
34
33
|
color: #000;
|
|
35
34
|
box-sizing: border-box;
|
|
36
35
|
padding: 0 16px;
|
|
@@ -62,4 +61,4 @@
|
|
|
62
61
|
content: '';
|
|
63
62
|
width: 100%;
|
|
64
63
|
border-top: 2px solid #0052d9;
|
|
65
|
-
}
|
|
64
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import loadable from '@loadable/component';
|
|
3
|
-
import { CommonPropsType } from '../../types';
|
|
2
|
+
// import loadable from '@loadable/component';
|
|
3
|
+
import type { CommonPropsType } from '../../types';
|
|
4
4
|
import { usePlatform } from '../../utils/platform';
|
|
5
|
-
import { fallback } from '../../utils/loading-fallback';
|
|
5
|
+
// import { fallback } from '../../utils/loading-fallback';
|
|
6
6
|
import TabsH5 from './tabs.h5';
|
|
7
7
|
import TabsPc from './tabs.pc';
|
|
8
8
|
|
|
@@ -17,9 +17,9 @@ export interface PropsType extends CommonPropsType {
|
|
|
17
17
|
// @deprecated
|
|
18
18
|
name?: string;
|
|
19
19
|
}[];
|
|
20
|
-
selectedIndex: number|string
|
|
21
|
-
isMultipleSlot: boolean
|
|
22
|
-
[key: string]: React.ReactNode
|
|
20
|
+
selectedIndex: number | string;
|
|
21
|
+
isMultipleSlot: boolean;
|
|
22
|
+
[key: string]: React.ReactNode;
|
|
23
23
|
// [panel: `panel${number}`]: React.ReactNode; // require typescript@4.4
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -3,8 +3,12 @@ import React, { useEffect, useMemo } from 'react';
|
|
|
3
3
|
import './index.css';
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
5
|
import { useSyncValue } from '../../utils/useSyncValue';
|
|
6
|
-
import {PropsType} from './index';
|
|
7
|
-
import {
|
|
6
|
+
import { PropsType } from './index';
|
|
7
|
+
import {
|
|
8
|
+
useCustomCompareEffect,
|
|
9
|
+
usePrevious,
|
|
10
|
+
useSyncedRef,
|
|
11
|
+
} from '@react-hookz/web';
|
|
8
12
|
import isObjectEqual from '../../utils/isObjectEqual';
|
|
9
13
|
|
|
10
14
|
export default function TabsH5({
|
|
@@ -17,27 +21,28 @@ export default function TabsH5({
|
|
|
17
21
|
...restProps
|
|
18
22
|
}: PropsType) {
|
|
19
23
|
const [currentIndex, setCurrentIndex] = useSyncValue(
|
|
20
|
-
typeof selectedIndex === 'string' ?
|
|
21
|
-
parseInt(selectedIndex) : selectedIndex
|
|
24
|
+
typeof selectedIndex === 'string' ? parseInt(selectedIndex) : selectedIndex
|
|
22
25
|
);
|
|
23
26
|
const stickyStyle = useMemo(() => {
|
|
24
27
|
const length = tabs.length;
|
|
25
28
|
return {
|
|
26
|
-
width: `${1 / length * 100}%`,
|
|
27
|
-
transform: `translate3d( ${currentIndex * 100}%, 0, 0)
|
|
29
|
+
width: `${(1 / length) * 100}%`,
|
|
30
|
+
transform: `translate3d( ${currentIndex * 100}%, 0, 0)`,
|
|
28
31
|
};
|
|
29
32
|
}, [tabs, currentIndex]);
|
|
30
33
|
|
|
31
34
|
const eventRef = useSyncedRef(events);
|
|
32
|
-
useCustomCompareEffect(
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
+
useCustomCompareEffect(
|
|
36
|
+
() => {
|
|
37
|
+
eventRef.current.change({
|
|
35
38
|
id: currentIndex,
|
|
36
39
|
label: tabs[currentIndex]?.title,
|
|
37
40
|
value: tabs[currentIndex]?.value,
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
[currentIndex, tabs],
|
|
44
|
+
isObjectEqual
|
|
45
|
+
);
|
|
41
46
|
return (
|
|
42
47
|
<div
|
|
43
48
|
data-testid="tabs"
|