@cloudbase/weda-ui 2.0.11 → 2.0.12
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 +5 -4
- 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 +6 -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 +43 -44
- 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 +66 -67
- 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 +86 -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/docs/common/format.tsx +4 -1
- package/src/docs/common/tableView.css +3 -3
- package/src/docs/common/tableView.tsx +18 -8
- package/src/docs/compsdocs/form/FormLocation.mdx +1 -1
- package/src/docs/compsdocs/form/FormSelect.mdx +0 -1
- package/src/docs/compsdocs/grid/Card.mdx +0 -1
- package/src/docs/compsdocs/grid/Container.mdx +0 -1
- package/src/docs/compsdocs/grid/GridLayout.mdx +0 -1
- package/src/docs/compsdocs/grid/ScrollView.mdx +2 -2
- package/src/docs/compsdocs/grid/Swiper.mdx +1 -2
- package/src/docs/compsdocs/media/Icon.mdx +1 -1
- package/src/docs/compsdocs/media/Image.mdx +6 -6
- package/src/docs/compsdocs/model/ModelCreate.mdx +24 -0
- package/src/docs/compsdocs/model/ModelDetail.mdx +24 -0
- package/src/docs/compsdocs/model/ModelTable.mdx +133 -1
- package/src/docs/compsdocs/model/ModelUpdate.mdx +24 -1
- package/src/docs/compsdocs/navmenu/Classification.mdx +2 -3
- package/src/docs/compsdocs/navmenu/NavBar.mdx +14 -5
- package/src/docs/compsdocs/navmenu/NavLayout.mdx +0 -1
- package/src/docs/compsdocs/navmenu/TabBar.mdx +3 -3
- package/src/docs/compsdocs/navmenu/TabBarItem.mdx +1 -1
- package/src/docs/compsdocs/senior/Lottery.mdx +3 -6
- package/src/docs/compsdocs/senior/Modal.mdx +2 -3
- package/src/docs/compsdocs/senior/SlotMachine.mdx +2 -5
- package/src/docs/compsdocs/senior/_category_.json +1 -1
- package/src/docs/compsdocs/show/GraphicCard.mdx +0 -1
- package/src/docs/compsdocs/show/Item.mdx +0 -1
- package/src/docs/compsdocs/show/ItemList.mdx +1 -0
- package/src/docs/compsdocs/show/Tabs.mdx +2 -3
- package/src/docs/compsdocs/text/Link.mdx +1 -1
- package/src/docs/compsdocs/text/RichTextView.mdx +1 -2
- package/src/docs/compsdocs/text/Text.mdx +1 -1
- package/src/docs/compsdocs/text/Title.mdx +1 -2
- package/src/docs/compsdocs/wxOpen/Phone.mdx +1 -2
- package/src/docs/compsdocs/wxOpen/Share.mdx +0 -1
- package/src/docs/compsdocs/wxOpen/UserInfo.mdx +1 -2
- package/src/mp/components/calendar/index.json +1 -1
- package/src/mp/components/calendar/index.wxml +5 -27
- 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/dataView/index.wxml +1 -13
- 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.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.wxml +2 -14
- 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.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/image/index.wxml +3 -21
- package/src/mp/components/listView/index.wxml +8 -33
- 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/navigationBar/index.json +1 -2
- package/src/mp/components/navigationBar/index.wxml +29 -146
- 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/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 +12 -4
- package/src/web/actions/showModal/index.tsx +5 -4
- package/src/web/components/calendar/index.css +81 -34
- 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/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 +5 -3
- package/src/web/components/form/formcell/index.tsx +2 -6
- package/src/web/components/form/input/index.css +4 -4
- package/src/web/components/form/input/index.tsx +61 -53
- 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 +0 -1
- 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 +1 -1
- package/src/web/components/form/select/index.css +9 -0
- package/src/web/components/form/select/index.tsx +75 -48
- 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 +26 -25
- package/src/web/components/form/types.d.ts +10 -10
- package/src/web/components/form/uploaderFile/index.jsx +0 -5
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +15 -11
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +14 -9
- 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/lottery/index.css +43 -37
- package/src/web/components/lottery/index.tsx +2 -2
- package/src/web/components/modal/index.tsx +34 -34
- 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.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 +1 -1
- 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 +198 -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/useSetState.ts +6 -2
- package/src/web/weda-ui.css +13 -0
|
@@ -6,15 +6,31 @@ import './index.css';
|
|
|
6
6
|
import { ImageInner } from './image';
|
|
7
7
|
import type { CommonPropsType } from '../../types';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type TMode =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const defaultSrc =
|
|
10
|
+
'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSI0MCIgY3k9IjQwIiByPSI0MCIgZmlsbD0iI0VCRUZGNSIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0yMCA1NlYyNGg0MHYzMnoiLz48cGF0aCBmaWxsPSIjQzFDQ0REIiBkPSJNMjYgMzdoMjh2MkgyNnptMCA3aDIwdjJIMjZ6bS02LTIwaDQwdjdIMjB6Ii8+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDggNDQpIj48Y2lyY2xlIGZpbGw9IiNGRkYiIGN4PSIxMCIgY3k9IjEwIiByPSI3Ii8+PHBhdGggZD0iTTEwIDJhOCA4IDAgMSAxIDAgMTYgOCA4IDAgMCAxIDAtMTZ6bTEgMTBIOXYyaDJ2LTJ6bTAtNkg5djVoMlY2eiIgZmlsbD0iIzAwNkVGRiIvPjwvZz48L2c+PC9zdmc+';
|
|
11
|
+
type TMode =
|
|
12
|
+
| 'scaleToFill'
|
|
13
|
+
| 'aspectFit'
|
|
14
|
+
| 'aspectFill'
|
|
15
|
+
| 'widthFix'
|
|
16
|
+
| 'heightFix'
|
|
17
|
+
| 'top'
|
|
18
|
+
| 'bottom'
|
|
19
|
+
| 'center'
|
|
20
|
+
| 'left'
|
|
21
|
+
| 'right'
|
|
22
|
+
| 'top left'
|
|
23
|
+
| 'top right'
|
|
24
|
+
| 'bottom left'
|
|
25
|
+
| 'bottom right';
|
|
26
|
+
export interface PropsType
|
|
27
|
+
extends CommonPropsType,
|
|
28
|
+
Pick<HTMLImageElement, 'src' | 'alt'> {
|
|
29
|
+
mode: TMode;
|
|
30
|
+
lazyLoad: boolean;
|
|
31
|
+
maskClosable: boolean;
|
|
32
|
+
imgPreview: boolean;
|
|
33
|
+
fit: React.CSSProperties['objectFit'];
|
|
18
34
|
}
|
|
19
35
|
|
|
20
36
|
export default function Image({
|
|
@@ -75,8 +91,9 @@ export default function Image({
|
|
|
75
91
|
) : null;
|
|
76
92
|
}
|
|
77
93
|
|
|
78
|
-
|
|
79
|
-
|
|
94
|
+
function getObjectFitByWxImageMode(
|
|
95
|
+
mode: TMode
|
|
96
|
+
): React.CSSProperties['objectFit'] {
|
|
80
97
|
const array = [
|
|
81
98
|
{
|
|
82
99
|
mode: 'scaleToFill',
|
|
@@ -47,6 +47,7 @@ export { default as Link } from './link';
|
|
|
47
47
|
export { default as Drawer } from './drawer';
|
|
48
48
|
export { default as UploaderView } from './uploaderView';
|
|
49
49
|
export { default as UploaderFileView } from './uploaderFileView';
|
|
50
|
+
export { default as WedaVideo } from './wedaVideo/index';
|
|
50
51
|
|
|
51
52
|
export { default as Picker } from './picker/picker';
|
|
52
53
|
export { default as DatePicker } from './picker/datePicker';
|
|
@@ -7,17 +7,17 @@ export interface PropsType extends CommonPropsType {
|
|
|
7
7
|
/**
|
|
8
8
|
* 内容
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
content?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 链接地址
|
|
13
|
+
*/
|
|
14
|
+
url?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 参数
|
|
17
|
+
*/
|
|
18
|
+
params?: { key: string; value: string }[];
|
|
19
|
+
contentSlot?: React.ReactNode;
|
|
20
|
+
isOpenInNewWindow: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// 所有绝对地址直接交由浏览器,新开窗口交由浏览器
|
|
@@ -110,7 +110,7 @@ export default function Link({
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}}
|
|
113
|
-
rel=
|
|
113
|
+
rel="noopener noreferrer"
|
|
114
114
|
>
|
|
115
115
|
{contentSlot && <div className="weda-link-slot">{contentSlot}</div>}
|
|
116
116
|
{content}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
position: relative;
|
|
9
9
|
width: 100%;
|
|
10
10
|
height: 100%;
|
|
11
|
-
background: #
|
|
11
|
+
background: #ff465c;
|
|
12
12
|
border: 1px solid rgba(255, 255, 255, 0.6);
|
|
13
13
|
box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0.5);
|
|
14
14
|
border-radius: 10px;
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
height: 9px;
|
|
57
57
|
box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
|
|
58
58
|
border-radius: 50%;
|
|
59
|
-
background: #
|
|
59
|
+
background: #ffffff;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(odd) {
|
|
63
|
-
background: #
|
|
63
|
+
background: #ffee52;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(even) {
|
|
67
|
-
background: #
|
|
67
|
+
background: #ffffff;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
position: relative;
|
|
119
119
|
width: 100%;
|
|
120
120
|
box-sizing: border-box;
|
|
121
|
-
background: linear-gradient(180deg, #
|
|
121
|
+
background: linear-gradient(180deg, #dd0d00 0%, #d80027 100%);
|
|
122
122
|
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
123
123
|
box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0.5);
|
|
124
124
|
border-radius: 10px;
|
|
@@ -137,23 +137,23 @@
|
|
|
137
137
|
|
|
138
138
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item {
|
|
139
139
|
position: absolute;
|
|
140
|
-
width: calc((100% - 32px)/ 3);
|
|
141
|
-
height: calc((100% - 32px)/ 3);
|
|
140
|
+
width: calc((100% - 32px) / 3);
|
|
141
|
+
height: calc((100% - 32px) / 3);
|
|
142
142
|
font-size: 0;
|
|
143
143
|
text-align: center;
|
|
144
|
-
background: #
|
|
145
|
-
box-shadow: inset 0px -2px 0px #
|
|
144
|
+
background: #fff8ee;
|
|
145
|
+
box-shadow: inset 0px -2px 0px #ffddbd;
|
|
146
146
|
border-radius: 8px;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived {
|
|
150
|
-
background: #
|
|
151
|
-
box-shadow: 0px 0px 6px #
|
|
150
|
+
background: #fff8ee;
|
|
151
|
+
box-shadow: 0px 0px 6px #ffffff;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected {
|
|
155
|
-
background: #
|
|
156
|
-
box-shadow: inset 0px -2px 0px #
|
|
155
|
+
background: #ff6666;
|
|
156
|
+
box-shadow: inset 0px -2px 0px #ffa4a4;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:first-child {
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
|
|
164
164
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(2) {
|
|
165
165
|
top: 8px;
|
|
166
|
-
left: calc((100% - 32px)/ 3 + 16px);
|
|
166
|
+
left: calc((100% - 32px) / 3 + 16px);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(3) {
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(4) {
|
|
175
|
-
top: calc((100% - 32px)/ 3 + 16px);
|
|
175
|
+
top: calc((100% - 32px) / 3 + 16px);
|
|
176
176
|
right: 8px;
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
|
|
184
184
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(6) {
|
|
185
185
|
bottom: 8px;
|
|
186
|
-
left: calc((100% - 32px)/ 3 + 16px);
|
|
186
|
+
left: calc((100% - 32px) / 3 + 16px);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(7) {
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(8) {
|
|
195
|
-
bottom: calc((100% - 32px)/ 3 + 16px);
|
|
195
|
+
bottom: calc((100% - 32px) / 3 + 16px);
|
|
196
196
|
left: 8px;
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -210,8 +210,11 @@
|
|
|
210
210
|
align-items: center;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.weda-lottery
|
|
214
|
-
|
|
213
|
+
.weda-lottery
|
|
214
|
+
.weda-lottery__inner
|
|
215
|
+
.weda-lottery__turntable-item.is-actived
|
|
216
|
+
.weda-lottery__turntable-cell {
|
|
217
|
+
border-color: #ffe05f;
|
|
215
218
|
}
|
|
216
219
|
|
|
217
220
|
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-image {
|
|
@@ -234,32 +237,35 @@
|
|
|
234
237
|
font-size: 12px;
|
|
235
238
|
line-height: 17px;
|
|
236
239
|
text-align: center;
|
|
237
|
-
color: #
|
|
240
|
+
color: #ba0000;
|
|
238
241
|
white-space: nowrap;
|
|
239
242
|
text-overflow: ellipsis;
|
|
240
243
|
overflow: hidden;
|
|
241
244
|
width: 100%;
|
|
242
245
|
}
|
|
243
246
|
|
|
244
|
-
.weda-lottery
|
|
245
|
-
|
|
247
|
+
.weda-lottery
|
|
248
|
+
.weda-lottery__inner
|
|
249
|
+
.weda-lottery__turntable-item.is-selected
|
|
250
|
+
.weda-lottery__turntable-cell-desc {
|
|
251
|
+
color: #ffffff;
|
|
246
252
|
}
|
|
247
253
|
|
|
248
254
|
.weda-lottery .weda-lottery__turntable-btn {
|
|
249
255
|
z-index: 2;
|
|
250
256
|
position: absolute;
|
|
251
|
-
width: calc((100% - 32px)/ 3);
|
|
252
|
-
height: calc((100% - 32px)/ 3);
|
|
253
|
-
top: calc((100% - 32px)/ 3 + 16px);
|
|
254
|
-
left: calc((100% - 32px)/ 3 + 16px);
|
|
255
|
-
background: linear-gradient(180deg, #
|
|
256
|
-
box-shadow: inset 0px -2px 0px #
|
|
257
|
+
width: calc((100% - 32px) / 3);
|
|
258
|
+
height: calc((100% - 32px) / 3);
|
|
259
|
+
top: calc((100% - 32px) / 3 + 16px);
|
|
260
|
+
left: calc((100% - 32px) / 3 + 16px);
|
|
261
|
+
background: linear-gradient(180deg, #ffee81 0%, #ffd646 100%);
|
|
262
|
+
box-shadow: inset 0px -2px 0px #ff7a00;
|
|
257
263
|
border-radius: 50%;
|
|
258
264
|
}
|
|
259
265
|
|
|
260
266
|
.weda-lottery .weda-lottery__turntable-btn.is-actived {
|
|
261
|
-
background: linear-gradient(180deg, #
|
|
262
|
-
box-shadow: inset 0px 2px 0px #
|
|
267
|
+
background: linear-gradient(180deg, #ffee81 0%, #ffd646 100%);
|
|
268
|
+
box-shadow: inset 0px 2px 0px #ffffff;
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
.weda-lottery .weda-lottery__btn-inner {
|
|
@@ -271,7 +277,7 @@
|
|
|
271
277
|
.weda-lottery .weda-lottery__btn {
|
|
272
278
|
width: 100%;
|
|
273
279
|
height: 100%;
|
|
274
|
-
background: linear-gradient(180deg, #
|
|
280
|
+
background: linear-gradient(180deg, #ff922d 0%, #ff3c76 100%);
|
|
275
281
|
box-shadow: inset 0px 0px 8px rgba(234, 27, 53, 0.5);
|
|
276
282
|
border-radius: 50%;
|
|
277
283
|
display: flex;
|
|
@@ -280,7 +286,7 @@
|
|
|
280
286
|
}
|
|
281
287
|
|
|
282
288
|
.weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn {
|
|
283
|
-
background: linear-gradient(180deg, #
|
|
289
|
+
background: linear-gradient(180deg, #ff922d 0%, #ff3c76 100%);
|
|
284
290
|
box-shadow: inset 0px 0px 8px rgba(234, 27, 53, 0.5);
|
|
285
291
|
}
|
|
286
292
|
|
|
@@ -291,16 +297,16 @@
|
|
|
291
297
|
box-sizing: border-box;
|
|
292
298
|
display: flex;
|
|
293
299
|
align-items: center;
|
|
294
|
-
text-decoration: none
|
|
300
|
+
text-decoration: none;
|
|
295
301
|
}
|
|
296
302
|
|
|
297
|
-
.weda-lottery .weda-lottery__btn-image
|
|
303
|
+
.weda-lottery .weda-lottery__btn-image .weda-lottery__btn-text {
|
|
298
304
|
font-weight: 600;
|
|
299
305
|
font-size: 18px;
|
|
300
306
|
line-height: 22px;
|
|
301
307
|
text-align: center;
|
|
302
|
-
color: #
|
|
303
|
-
text-shadow: 0px 0.5px 0px #
|
|
308
|
+
color: #ffffff;
|
|
309
|
+
text-shadow: 0px 0.5px 0px #e42b27;
|
|
304
310
|
max-height: 100%;
|
|
305
311
|
display: -webkit-box;
|
|
306
312
|
overflow: hidden;
|
|
@@ -324,4 +330,4 @@
|
|
|
324
330
|
.weda-lottery-mobile .weda-lottery__content {
|
|
325
331
|
width: 100%;
|
|
326
332
|
}
|
|
327
|
-
/* mobile style end */
|
|
333
|
+
/* mobile style end */
|
|
@@ -297,7 +297,7 @@ export default function Lottery({
|
|
|
297
297
|
<div className={`${CLASS_PREFIX}__wrap`}>
|
|
298
298
|
{dotList.map((dot, index) => {
|
|
299
299
|
return (
|
|
300
|
-
|
|
300
|
+
<div key={index}>
|
|
301
301
|
{dot.single && (
|
|
302
302
|
<div
|
|
303
303
|
key={`${dot.direction}-${index}`}
|
|
@@ -371,7 +371,7 @@ export default function Lottery({
|
|
|
371
371
|
{true && renderDot(dot.direction, dot.list)}
|
|
372
372
|
</div>
|
|
373
373
|
)}
|
|
374
|
-
|
|
374
|
+
</div>
|
|
375
375
|
);
|
|
376
376
|
})}
|
|
377
377
|
<div
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Modal, Button, ModalProps, ConfigProvider } from 'tea-component';
|
|
3
|
-
import { unknownFunction } from '../../types';
|
|
3
|
+
import type { unknownFunction } from '../../types';
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
5
|
|
|
6
6
|
export interface PropTypes extends ModalProps {
|
|
7
|
-
content: string
|
|
8
|
-
customButton: React.ReactNode
|
|
9
|
-
customContent: React.ReactNode
|
|
10
|
-
isDefaultButton: boolean
|
|
11
|
-
emit?: unknownFunction
|
|
12
|
-
events: Record<string, unknownFunction
|
|
13
|
-
size: ModalProps['size']
|
|
7
|
+
content: string;
|
|
8
|
+
customButton: React.ReactNode;
|
|
9
|
+
customContent: React.ReactNode;
|
|
10
|
+
isDefaultButton: boolean;
|
|
11
|
+
emit?: unknownFunction;
|
|
12
|
+
events: Record<string, unknownFunction>;
|
|
13
|
+
size: ModalProps['size'];
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export default function WeDaModal(_props: PropTypes) {
|
|
@@ -28,33 +28,33 @@ export default function WeDaModal(_props: PropTypes) {
|
|
|
28
28
|
} = _props;
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
<ConfigProvider classPrefix="wedatea2td">
|
|
32
|
+
<Modal
|
|
33
|
+
size={size}
|
|
34
|
+
className={classNames('weda-ui', 'lcap-modal', 'container', className)}
|
|
35
|
+
visible={visible}
|
|
36
|
+
onClose={() => {
|
|
37
|
+
emit('close', {});
|
|
38
|
+
}}
|
|
39
|
+
{...props}
|
|
40
40
|
>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
<Modal.Body>{content ? content : customContent}</Modal.Body>
|
|
42
|
+
<Modal.Footer>
|
|
43
|
+
{isDefaultButton ? (
|
|
44
|
+
<Button
|
|
45
|
+
type="primary"
|
|
46
|
+
onClick={() => {
|
|
47
|
+
emit('confirm', {});
|
|
48
|
+
// events.confirm();
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
确定
|
|
52
|
+
</Button>
|
|
53
|
+
) : (
|
|
54
|
+
customButton
|
|
55
55
|
)}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
</Modal.Footer>
|
|
57
|
+
</Modal>
|
|
58
|
+
</ConfigProvider>
|
|
59
59
|
);
|
|
60
60
|
}
|
|
@@ -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 = {
|
|
@@ -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) {
|