@cloudbase/weda-ui 0.2.15 → 1.0.21
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 +41 -169
- package/package.json +28 -15
- package/src/configs/components/calendar.json +78 -0
- package/src/configs/components/carousel.json +273 -0
- package/src/configs/components/chart/bar.json +724 -0
- package/src/configs/components/chart/line.json +679 -0
- package/src/configs/components/chart/pie.json +497 -0
- package/src/configs/components/chart/statisticsCard.json +379 -0
- package/src/configs/components/container.json +7 -2
- package/src/configs/components/dataView.json +154 -0
- package/src/configs/components/form/checkbox.json +97 -5
- package/src/configs/components/form/location.json +152 -0
- package/src/configs/components/form/radio.json +96 -4
- package/src/configs/components/form/select.json +245 -11
- package/src/configs/components/form/uploaderFile.json +2 -1
- package/src/configs/components/graphicCard.json +410 -0
- package/src/configs/components/image.json +7 -2
- package/src/configs/components/link.json +20 -4
- package/src/configs/components/listView.json +277 -0
- package/src/configs/components/modal.json +37 -5
- package/src/configs/components/navLayout.json +362 -0
- package/src/configs/components/navigationBar.json +59 -0
- package/src/configs/components/richtextview.json +4 -1
- package/src/configs/components/scrollVeiw.json +74 -22
- package/src/configs/components/swiper.json +6 -3
- package/src/configs/components/tabs.json +51 -8
- package/src/configs/components/text.json +33 -25
- package/src/configs/components/wxOpenApi/phone.json +141 -0
- package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
- package/src/configs/components/wxOpenApi/share.json +167 -0
- package/src/configs/components/wxOpenApi/userInfo.json +174 -0
- package/src/configs/index.js +34 -0
- package/src/mp/components/button/index.js +12 -13
- package/src/mp/components/button/index.wxml +1 -1
- package/src/mp/components/calendar/arrowright--line.svg +11 -0
- package/src/mp/components/calendar/index.js +238 -0
- package/src/mp/components/calendar/index.json +4 -0
- package/src/mp/components/calendar/index.wxml +37 -0
- package/src/mp/components/calendar/index.wxss +178 -0
- package/src/mp/components/carousel/index.js +88 -0
- package/src/mp/components/carousel/index.json +7 -0
- package/src/mp/components/carousel/index.wxml +6 -0
- package/src/mp/components/chart/bar/index.js +258 -0
- package/src/mp/components/chart/bar/index.json +6 -0
- package/src/mp/components/chart/bar/index.wxml +3 -0
- package/src/mp/components/chart/bar/index.wxss +9 -0
- package/src/mp/components/chart/common/config/bar.js +50 -0
- package/src/mp/components/chart/common/config/global.js +16 -0
- package/src/mp/components/chart/common/config/line.js +48 -0
- package/src/mp/components/chart/common/config/pie.js +36 -0
- package/src/mp/components/chart/common/core/eChartBar.js +263 -0
- package/src/mp/components/chart/common/core/eChartBase.js +375 -0
- package/src/mp/components/chart/common/core/eChartLine.js +229 -0
- package/src/mp/components/chart/common/core/eChartPie.js +166 -0
- package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
- package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
- package/src/mp/components/chart/line/index.js +247 -0
- package/src/mp/components/chart/line/index.json +6 -0
- package/src/mp/components/chart/line/index.wxml +3 -0
- package/src/mp/components/chart/line/index.wxss +9 -0
- package/src/mp/components/chart/pie/index.js +182 -0
- package/src/mp/components/chart/pie/index.json +6 -0
- package/src/mp/components/chart/pie/index.wxml +4 -0
- package/src/mp/components/chart/pie/index.wxss +9 -0
- package/src/mp/components/chart/statisticsCard/index.js +253 -0
- package/src/mp/components/chart/statisticsCard/index.json +4 -0
- package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
- package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
- package/src/mp/components/dataView/index.js +34 -0
- package/src/mp/components/dataView/index.json +7 -0
- package/src/mp/components/dataView/index.wxml +15 -0
- package/src/mp/components/dataView/index.wxss +0 -0
- package/src/mp/components/form/checkbox/index.js +41 -2
- package/src/mp/components/form/checkbox/index.wxml +1 -1
- package/src/mp/components/form/input/index.js +1 -1
- package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
- package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
- package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
- package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
- package/src/mp/components/form/location/index.js +382 -0
- package/src/mp/components/form/location/index.json +6 -0
- package/src/mp/components/form/location/index.wxml +25 -0
- package/src/mp/components/form/location/index.wxss +91 -0
- package/src/mp/components/form/radio/index.js +38 -0
- package/src/mp/components/form/select/index.js +360 -40
- package/src/mp/components/form/select/index.wxml +21 -6
- package/src/mp/components/form/select/region/index.js +98 -0
- package/src/mp/components/form/textarea/index.wxml +6 -5
- package/src/mp/components/form/uploader/index.js +84 -48
- package/src/mp/components/form/uploader/index.wxml +15 -3
- package/src/mp/components/form/uploaderFile/index.js +106 -27
- package/src/mp/components/graphicCard/chevron-right.svg +3 -0
- package/src/mp/components/graphicCard/index.js +203 -0
- package/src/mp/components/graphicCard/index.json +4 -0
- package/src/mp/components/graphicCard/index.wxml +29 -0
- package/src/mp/components/graphicCard/index.wxss +157 -0
- package/src/mp/components/image/index.js +0 -1
- package/src/mp/components/listView/arrow-right-line.svg +3 -0
- package/src/mp/components/listView/index.js +285 -0
- package/src/mp/components/listView/index.json +4 -0
- package/src/mp/components/listView/index.wxml +40 -0
- package/src/mp/components/listView/index.wxss +155 -0
- package/src/mp/components/listView/more-line.svg +3 -0
- package/src/mp/components/navLayout/index.js +123 -0
- package/src/mp/components/navLayout/index.json +7 -0
- package/src/mp/components/navLayout/index.wxml +25 -0
- package/src/mp/components/navLayout/index.wxss +1193 -0
- package/src/mp/components/navigationBar/index.js +193 -0
- package/src/mp/components/navigationBar/index.json +6 -0
- package/src/mp/components/navigationBar/index.wxml +88 -0
- package/src/mp/components/navigationBar/index.wxss +1257 -0
- package/src/mp/components/swiper/index.wxml +2 -0
- package/src/mp/components/tabs/index.js +7 -2
- package/src/mp/components/tabs/index.wxml +2 -1
- package/src/mp/components/text/index.js +0 -25
- package/src/mp/components/text/index.wxml +3 -3
- package/src/mp/components/wxOpenApi/phone/index.js +117 -0
- package/src/mp/components/wxOpenApi/phone/index.json +4 -0
- package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/share/index.js +117 -0
- package/src/mp/components/wxOpenApi/share/index.json +4 -0
- package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
- package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
- package/src/mp/index.json +18 -2
- package/src/mp/style/weda-ui.wxss +2 -0
- package/src/mp/utils/debounce.js +133 -0
- package/src/mp/utils/destr.js +48 -0
- package/src/mp/utils/dr_square_point.js +25 -0
- package/src/mp/utils/platform.js +25 -0
- package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
- package/src/mp/utils/spark-md5.js +776 -0
- package/src/mp/utils/tcb.js +62 -0
- package/src/setupTests.js +2 -1
- package/src/web/components/button/index.css +8 -1
- package/src/web/components/button/index.tsx +3 -2
- package/src/web/components/calendar/index.css +382 -0
- package/src/web/components/calendar/index.jsx +312 -0
- package/src/web/components/calendar/util.js +90 -0
- package/src/web/components/carousel/index.css +119 -0
- package/src/web/components/carousel/index.tsx +417 -0
- package/src/web/components/chart/bar/index.tsx +140 -0
- package/src/web/components/chart/common/config/bar.js +49 -0
- package/src/web/components/chart/common/config/global.js +16 -0
- package/src/web/components/chart/common/config/line.js +50 -0
- package/src/web/components/chart/common/config/pie.js +37 -0
- package/src/web/components/chart/common/core/eChartBar.js +265 -0
- package/src/web/components/chart/common/core/eChartBase.ts +383 -0
- package/src/web/components/chart/common/core/eChartLine.js +231 -0
- package/src/web/components/chart/common/core/eChartPie.js +170 -0
- package/src/web/components/chart/common/core/type.ts +34 -0
- package/src/web/components/chart/common/echart.css +106 -0
- package/src/web/components/chart/common/echarts.ts +33 -0
- package/src/web/components/chart/common/useChart.tsx +69 -0
- package/src/web/components/chart/line/index.tsx +136 -0
- package/src/web/components/chart/pie/index.tsx +99 -0
- package/src/web/components/chart/statisticsCard/index.css +62 -0
- package/src/web/components/chart/statisticsCard/index.tsx +307 -0
- package/src/web/components/chart/statisticsCard/interface.ts +14 -0
- package/src/web/components/dataView/index.tsx +20 -0
- package/src/web/components/dataView/interface.ts +6 -0
- package/src/web/components/form/checkbox/index.tsx +55 -23
- package/src/web/components/form/location/common/mapChoose.css +178 -0
- package/src/web/components/form/location/common/mapChoose.jsx +343 -0
- package/src/web/components/form/location/common/mapView.jsx +190 -0
- package/src/web/components/form/location/common/propsConfig.js +54 -0
- package/src/web/components/form/location/common/selectModal.css +44 -0
- package/src/web/components/form/location/common/selectModal.jsx +82 -0
- package/src/web/components/form/location/common/useLocationInfo.js +100 -0
- package/src/web/components/form/location/components/LocationH5/index.css +243 -0
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
- package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
- package/src/web/components/form/location/components/LocationPC/index.css +44 -0
- package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
- package/src/web/components/form/location/constants.js +4 -0
- package/src/web/components/form/location/index.css +0 -0
- package/src/web/components/form/location/index.jsx +25 -0
- package/src/web/components/form/radio/index.tsx +84 -53
- package/src/web/components/form/select/h5.tsx +389 -71
- package/src/web/components/form/select/index.css +10 -0
- package/src/web/components/form/select/index.tsx +404 -144
- package/src/web/components/form/select/region/index.ts +122 -31
- package/src/web/components/form/select/time.jsx +90 -0
- package/src/web/components/form/select/year.tsx +170 -0
- package/src/web/components/form/uploader/uploader.h5.tsx +19 -4
- package/src/web/components/form/uploader/uploader.pc.tsx +8 -7
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +132 -113
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +16 -11
- package/src/web/components/graphicCard/index.css +159 -0
- package/src/web/components/graphicCard/index.tsx +310 -0
- package/src/web/components/image/image.tsx +1 -2
- package/src/web/components/image/index.tsx +1 -1
- package/src/web/components/index.js +24 -2
- package/src/web/components/link/index.tsx +6 -3
- package/src/web/components/listView/arrow-right-line.svg +3 -0
- package/src/web/components/listView/index.css +143 -0
- package/src/web/components/listView/index.tsx +359 -0
- package/src/web/components/listView/interface.ts +98 -0
- package/src/web/components/modal/index.tsx +3 -1
- package/src/web/components/navLayout/index.css +332 -0
- package/src/web/components/navLayout/index.tsx +247 -0
- package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
- package/src/web/components/navigationBar/common.tsx +198 -0
- package/src/web/components/navigationBar/h5Menu.tsx +179 -0
- package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
- package/src/web/components/navigationBar/index.css +762 -0
- package/src/web/components/navigationBar/index.tsx +231 -0
- package/src/web/components/navigationBar/type.d.ts +111 -0
- package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
- package/src/web/components/phone/index.css +0 -0
- package/src/web/components/phone/index.tsx +22 -0
- package/src/web/components/phoneCode/index.css +0 -0
- package/src/web/components/phoneCode/index.tsx +22 -0
- package/src/web/components/richTextView/index.tsx +3 -5
- package/src/web/components/share/index.css +0 -0
- package/src/web/components/share/index.tsx +38 -0
- package/src/web/components/tabs/index.tsx +4 -2
- package/src/web/components/tabs/tabs.h5.tsx +50 -37
- package/src/web/components/tabs/tabs.pc.tsx +23 -10
- package/src/web/components/text/index.tsx +6 -14
- package/src/web/components/uploaderFileView/index.css +9 -9
- package/src/web/components/uploaderFileView/index.jsx +32 -23
- package/src/web/components/userInfo/index.css +0 -0
- package/src/web/components/userInfo/index.tsx +30 -0
- package/src/web/types.d.ts +15 -14
- package/src/web/utils/debounce.js +98 -0
- package/src/web/utils/platform.js +40 -0
- package/src/web/utils/tcb.js +49 -0
- package/src/web/utils/tmap.js +4 -0
- package/src/web/weda-ui.css +2 -0
- package/CHANGELOG.md +0 -240
- package/src/.DS_Store +0 -0
- package/src/configs/.DS_Store +0 -0
- package/src/mp/.gitignore +0 -10
- package/src/web/.DS_Store +0 -0
- package/src/web/components/form/select/region/cities.ts +0 -2410
- package/src/web/components/form/select/region/provinces.ts +0 -240
- package/src/web/components/form/select/region/regions.ts +0 -20645
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
@import '../../style/weda-ui.wxss';
|
|
2
|
+
|
|
3
|
+
/* components/calendar.wxss */
|
|
4
|
+
.weda-calendar {
|
|
5
|
+
background: rgb(255, 255, 255);
|
|
6
|
+
width: 100%;
|
|
7
|
+
opacity: 0.9;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.weda-calendar .weda-calendar__control {
|
|
11
|
+
width: 100%;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
padding: 32rpx 32rpx 0;
|
|
14
|
+
position: relative;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.weda-calendar .weda-calendar__current-date {
|
|
19
|
+
font-weight: bold;
|
|
20
|
+
font-size: 28rpx;
|
|
21
|
+
line-height: 44rpx;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.weda-calendar .weda-calendar__prevMonth,
|
|
25
|
+
.weda-calendar .weda-calendar__nextMonth {
|
|
26
|
+
position: absolute;
|
|
27
|
+
width: 32rpx;
|
|
28
|
+
height: 32rpx;
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
top: 34rpx;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.weda-calendar .weda-calendar__prevMonth .weda-calendar__prevMonth-icon,
|
|
37
|
+
.weda-calendar .weda-calendar__nextMonth .weda-calendar__nextMonth-icon {
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.weda-calendar .weda-calendar__prevMonth {
|
|
43
|
+
transform: rotate(180deg);
|
|
44
|
+
left: 32rpx;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.weda-calendar .weda-calendar__nextMonth {
|
|
48
|
+
right: 32rpx;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.weda-calendar .weda-calendar__panel {
|
|
52
|
+
height: 612rpx;
|
|
53
|
+
padding: 40rpx 32rpx 32rpx 32rpx;
|
|
54
|
+
width: 100%;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.weda-calendar .weda-calendar__table {
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
justify-self: start;
|
|
64
|
+
align-items: flex-start;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.weda-calendar .weda-calendar__table-head {
|
|
68
|
+
display: block;
|
|
69
|
+
width: 100%;
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.weda-calendar .weda-calendar__table-head-row {
|
|
74
|
+
width: 100%;
|
|
75
|
+
padding-bottom: 0;
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weda-calendar .weda-calendar__table-head-cell {
|
|
80
|
+
flex: 1 1 0%;
|
|
81
|
+
display: flex;
|
|
82
|
+
color: rgba(0, 0, 0, 0.6);
|
|
83
|
+
position: relative;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
font-size: 24rpx;
|
|
88
|
+
line-height: 40rpx;
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.weda-calendar .weda-calendar__table-body {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
justify-self: center;
|
|
96
|
+
align-items: center;
|
|
97
|
+
flex: 1 1 0%;
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.weda-calendar .weda-calendar__table-body-row {
|
|
102
|
+
width: 100%;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex: 1 1 0%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.weda-calendar .weda-calendar__table-body-cell {
|
|
108
|
+
flex: 1 1 0%;
|
|
109
|
+
position: relative;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
font-size: 24rpx;
|
|
113
|
+
line-height: 40rpx;
|
|
114
|
+
box-sizing: border-box;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
flex-direction: row;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.weda-calendar .weda-calendar__table-body-cell-value {
|
|
122
|
+
font-size: 28rpx;
|
|
123
|
+
text-align: center;
|
|
124
|
+
border-radius: 50%;
|
|
125
|
+
width: 80rpx;
|
|
126
|
+
line-height: 80rpx;
|
|
127
|
+
box-sizing: border-box;
|
|
128
|
+
font-weight: 400;
|
|
129
|
+
color: rgba(0, 0, 0, 0.9);
|
|
130
|
+
position: relative;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.weda-calendar .weda-calendar__table-body-cell.is-disabled,
|
|
134
|
+
.weda-calendar .weda-calendar__table-body-cell.is-invalid {
|
|
135
|
+
cursor: not-allowed;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.weda-calendar
|
|
139
|
+
.weda-calendar__table-body-cell.is-disabled
|
|
140
|
+
.weda-calendar__table-body-cell-value {
|
|
141
|
+
color: rgba(0, 0, 0, 0.6);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.weda-calendar
|
|
145
|
+
.weda-calendar__table-body-cell.is-invalid
|
|
146
|
+
.weda-calendar__table-body-cell-value {
|
|
147
|
+
color: #c5c5c5;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.weda-calendar
|
|
151
|
+
.weda-calendar__table-body-cell.is-now
|
|
152
|
+
.weda-calendar__table-body-cell-value {
|
|
153
|
+
color: #fff;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.weda-calendar
|
|
157
|
+
.weda-calendar__table-body-cell.is-now
|
|
158
|
+
.weda-calendar__table-body-cell-bg {
|
|
159
|
+
position: absolute;
|
|
160
|
+
width: 48rpx;
|
|
161
|
+
height: 48rpx;
|
|
162
|
+
background: #0052d9;
|
|
163
|
+
border-radius: 100%;
|
|
164
|
+
left: calc(50% - 24rpx);
|
|
165
|
+
top: calc(50% - 24rpx);
|
|
166
|
+
z-index: -1;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.weda-calendar .weda-calendar__table-body-cell-marked {
|
|
170
|
+
position: absolute;
|
|
171
|
+
border-radius: 50%;
|
|
172
|
+
left: 50%;
|
|
173
|
+
transform: translate(-50%);
|
|
174
|
+
bottom: -20rpx;
|
|
175
|
+
width: 8rpx;
|
|
176
|
+
height: 8rpx;
|
|
177
|
+
top: calc(50% + 28rpx);
|
|
178
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
options: {
|
|
3
|
+
virtualHost: true,
|
|
4
|
+
},
|
|
5
|
+
properties: {
|
|
6
|
+
id: {
|
|
7
|
+
type: String,
|
|
8
|
+
value: '',
|
|
9
|
+
},
|
|
10
|
+
className: {
|
|
11
|
+
type: String,
|
|
12
|
+
value: '',
|
|
13
|
+
},
|
|
14
|
+
style: {
|
|
15
|
+
type: String,
|
|
16
|
+
value: '',
|
|
17
|
+
},
|
|
18
|
+
indicatorDots: {
|
|
19
|
+
value: true,
|
|
20
|
+
type: Boolean,
|
|
21
|
+
},
|
|
22
|
+
autoplay: {
|
|
23
|
+
value: true,
|
|
24
|
+
type: Boolean,
|
|
25
|
+
},
|
|
26
|
+
current: {
|
|
27
|
+
value: 0,
|
|
28
|
+
type: Number,
|
|
29
|
+
},
|
|
30
|
+
interval: {
|
|
31
|
+
value: 5000,
|
|
32
|
+
type: Number,
|
|
33
|
+
},
|
|
34
|
+
duration: {
|
|
35
|
+
value: 500,
|
|
36
|
+
type: Number,
|
|
37
|
+
},
|
|
38
|
+
circular: {
|
|
39
|
+
value: true,
|
|
40
|
+
type: Boolean,
|
|
41
|
+
},
|
|
42
|
+
vertical: {
|
|
43
|
+
value: false,
|
|
44
|
+
type: Boolean,
|
|
45
|
+
},
|
|
46
|
+
indicatorColor: {
|
|
47
|
+
type: String,
|
|
48
|
+
value: 'rgba(200, 200, 200, 0.9)',
|
|
49
|
+
},
|
|
50
|
+
indicatorActiveColor: {
|
|
51
|
+
type: String,
|
|
52
|
+
value: 'rgba(0, 0, 0, 0.9)',
|
|
53
|
+
},
|
|
54
|
+
images: {
|
|
55
|
+
type: Array,
|
|
56
|
+
value: [],
|
|
57
|
+
},
|
|
58
|
+
insideUrl: {
|
|
59
|
+
type: String,
|
|
60
|
+
value: '',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
changeCurrent(event) {
|
|
65
|
+
const { current } = event.detail;
|
|
66
|
+
this.triggerEvent('change', { current });
|
|
67
|
+
},
|
|
68
|
+
tapImg: (event) => {
|
|
69
|
+
const { tapmode, insideurl, params } = event.currentTarget.dataset;
|
|
70
|
+
if (tapmode === 'inside' && insideurl) {
|
|
71
|
+
let paramObj =
|
|
72
|
+
params &&
|
|
73
|
+
params.length > 0 &&
|
|
74
|
+
params.reduce((p, x) => {
|
|
75
|
+
p[x.key] = x.value;
|
|
76
|
+
return p;
|
|
77
|
+
}, {});
|
|
78
|
+
let { app } = getApp();
|
|
79
|
+
app.navigateTo({
|
|
80
|
+
pageId: insideurl,
|
|
81
|
+
packageName: '',
|
|
82
|
+
mode: 'weDa',
|
|
83
|
+
params: paramObj,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!--components/carousel/index.wxml-->
|
|
2
|
+
<swiper id="{{id}}" class="weda-ui {{className}}" style="{{style}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current="{{current}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" vertical="{{vertical}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}" bindchange="changeCurrent">
|
|
3
|
+
<swiper-item class="carousle-swiper-item" bindtap="tapImg" wx:for="{{images}}" wx:key="index" data-tapMode="{{item.tapMode}}" data-insideUrl="{{item.insideUrl}}" data-params="{{item.params}}" >
|
|
4
|
+
<Img class="carousle-image" src="{{item.image}}" fit="{{item.fit}}" style="{{'height:'+item.height+';'+'width:'+item.width}}" />
|
|
5
|
+
</swiper-item>
|
|
6
|
+
</swiper>
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import * as echarts from '../common/lib/echarts.min';
|
|
2
|
+
import EchartBar from '../common/core/eChartBar';
|
|
3
|
+
Component({
|
|
4
|
+
options: {
|
|
5
|
+
virtualHost: true,
|
|
6
|
+
multipleSlots: true,
|
|
7
|
+
},
|
|
8
|
+
properties: {
|
|
9
|
+
id: {
|
|
10
|
+
type: String,
|
|
11
|
+
value: '',
|
|
12
|
+
},
|
|
13
|
+
className: {
|
|
14
|
+
type: String,
|
|
15
|
+
value: '',
|
|
16
|
+
},
|
|
17
|
+
style: {
|
|
18
|
+
type: String,
|
|
19
|
+
value: '',
|
|
20
|
+
},
|
|
21
|
+
directionType: {
|
|
22
|
+
// 柱状图方向
|
|
23
|
+
type: String,
|
|
24
|
+
value: 'lengthways',
|
|
25
|
+
},
|
|
26
|
+
isPile: {
|
|
27
|
+
// 柱状图方向
|
|
28
|
+
type: Boolean,
|
|
29
|
+
value: false,
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
// 图表标题
|
|
33
|
+
type: String,
|
|
34
|
+
},
|
|
35
|
+
isTitle: {
|
|
36
|
+
// 是否显示标题
|
|
37
|
+
type: Boolean,
|
|
38
|
+
value: false,
|
|
39
|
+
},
|
|
40
|
+
titleLocation: {
|
|
41
|
+
type: String,
|
|
42
|
+
value: 'top',
|
|
43
|
+
},
|
|
44
|
+
dataSource: {
|
|
45
|
+
// 数据源
|
|
46
|
+
type: Object,
|
|
47
|
+
},
|
|
48
|
+
filterData: {
|
|
49
|
+
// 数据筛选
|
|
50
|
+
type: Array,
|
|
51
|
+
value: [],
|
|
52
|
+
},
|
|
53
|
+
setColor: {
|
|
54
|
+
// 设置颜色
|
|
55
|
+
type: Array,
|
|
56
|
+
value: [],
|
|
57
|
+
},
|
|
58
|
+
xField: {
|
|
59
|
+
// x轴字段选择
|
|
60
|
+
type: Object,
|
|
61
|
+
value: {
|
|
62
|
+
format: '',
|
|
63
|
+
type: '', // 数据源字段 类型
|
|
64
|
+
title: '', // 字段名中文
|
|
65
|
+
name: '', // 字段名英文
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
xStatistics: {
|
|
69
|
+
// x轴统计维度
|
|
70
|
+
type: String,
|
|
71
|
+
value: '', // 统计纬度, 只有选择时间类型才有,y 年,m月,d 日,w周,h时,min 分,s秒
|
|
72
|
+
},
|
|
73
|
+
groupKey: {
|
|
74
|
+
// x轴字段选择
|
|
75
|
+
type: Object,
|
|
76
|
+
value: {
|
|
77
|
+
format: '',
|
|
78
|
+
type: '', // 数据源字段 类型
|
|
79
|
+
title: '', // 字段名中文
|
|
80
|
+
name: '', // 字段名英文
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
groupKeyTimeSpan: {
|
|
84
|
+
// x轴统计维度
|
|
85
|
+
type: String,
|
|
86
|
+
value: '', // 统计纬度, 只有选择时间类型才有,y 年,m月,d 日,w周,h时,min 分,s秒
|
|
87
|
+
},
|
|
88
|
+
xIsCountEmpty: {
|
|
89
|
+
// x轴 是否统计空值
|
|
90
|
+
type: Boolean,
|
|
91
|
+
value: false,
|
|
92
|
+
},
|
|
93
|
+
yField: {
|
|
94
|
+
// Y轴字段,分组字段,是否分组
|
|
95
|
+
type: Object,
|
|
96
|
+
value: {
|
|
97
|
+
numValue: [{ key: '', operationType: '' }],
|
|
98
|
+
groupKey: '',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
isLegend: {
|
|
102
|
+
// 是否显示图例
|
|
103
|
+
type: Boolean,
|
|
104
|
+
value: false,
|
|
105
|
+
},
|
|
106
|
+
legend: {
|
|
107
|
+
// 图例
|
|
108
|
+
type: String,
|
|
109
|
+
value: 'bottom', // 上top,下 bottom
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// 高级属性
|
|
113
|
+
isXaxisName: {
|
|
114
|
+
// 是否显示坐标轴名称
|
|
115
|
+
type: Boolean,
|
|
116
|
+
value: true,
|
|
117
|
+
},
|
|
118
|
+
xAxisName: {
|
|
119
|
+
// 是否显示坐标轴名称
|
|
120
|
+
type: String,
|
|
121
|
+
value: '',
|
|
122
|
+
},
|
|
123
|
+
isXaxisAxisLabelShow: {
|
|
124
|
+
// 是否显示标签
|
|
125
|
+
type: Boolean,
|
|
126
|
+
value: true,
|
|
127
|
+
},
|
|
128
|
+
isXaxisAxisTickShow: {
|
|
129
|
+
// 显示X轴刻度线
|
|
130
|
+
type: Boolean,
|
|
131
|
+
value: true,
|
|
132
|
+
},
|
|
133
|
+
isXaxisAxisLabelRotate: {
|
|
134
|
+
// 文字自动倾斜
|
|
135
|
+
type: Boolean,
|
|
136
|
+
value: false,
|
|
137
|
+
},
|
|
138
|
+
isYAxisShow: {
|
|
139
|
+
// 是否显示 Y 轴刻度线
|
|
140
|
+
type: Boolean,
|
|
141
|
+
value: true,
|
|
142
|
+
},
|
|
143
|
+
isYAxisName: {
|
|
144
|
+
// 是否显示 Y坐标轴名称
|
|
145
|
+
type: Boolean,
|
|
146
|
+
value: true,
|
|
147
|
+
},
|
|
148
|
+
isYAxisSplitlineLinestyleWidth: {
|
|
149
|
+
// 是否显示网格线 ,yAxis.splitLine.lineStyle.width设置为0
|
|
150
|
+
type: Boolean,
|
|
151
|
+
value: true,
|
|
152
|
+
},
|
|
153
|
+
yAxisSplitlineLinestyleType: {
|
|
154
|
+
// 网格线线条类型 solid,dashed,dotted
|
|
155
|
+
type: String,
|
|
156
|
+
value: 'dashed',
|
|
157
|
+
},
|
|
158
|
+
yAxisName: {
|
|
159
|
+
// Y坐标轴名称 显示名称后需要设置居中,轴线距离属性 yAxis.nameLocation='middle' yAxis.nameGap =20
|
|
160
|
+
type: String,
|
|
161
|
+
value: '',
|
|
162
|
+
},
|
|
163
|
+
yAxisMin: {
|
|
164
|
+
// Y轴刻度最小值
|
|
165
|
+
type: Number,
|
|
166
|
+
value: 0,
|
|
167
|
+
},
|
|
168
|
+
yAxisMax: {
|
|
169
|
+
// Y轴刻度最大值, 切记如果为0时,则不设置
|
|
170
|
+
type: Number,
|
|
171
|
+
value: 0,
|
|
172
|
+
},
|
|
173
|
+
isSeriesShowSymbol: {
|
|
174
|
+
// 是否显示数据标签 开启后 属性 series.label.show 要同时设置为true
|
|
175
|
+
type: Boolean,
|
|
176
|
+
value: true,
|
|
177
|
+
},
|
|
178
|
+
isUnit: {
|
|
179
|
+
// 显示单位
|
|
180
|
+
type: Boolean,
|
|
181
|
+
value: false,
|
|
182
|
+
},
|
|
183
|
+
unit: {
|
|
184
|
+
// 数字显示的单位 百分比,千分比,千,万,百万,亿,十亿
|
|
185
|
+
type: String,
|
|
186
|
+
value: '%',
|
|
187
|
+
},
|
|
188
|
+
decimalDigits: {
|
|
189
|
+
// 小数位数
|
|
190
|
+
type: Number,
|
|
191
|
+
value: 0,
|
|
192
|
+
},
|
|
193
|
+
suffix: {
|
|
194
|
+
// 后缀
|
|
195
|
+
type: String,
|
|
196
|
+
value: '',
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
},
|
|
200
|
+
data: {
|
|
201
|
+
ec: {},
|
|
202
|
+
canvas_id: {
|
|
203
|
+
type: String,
|
|
204
|
+
value: `canvas_bar_${Date.now()}_${Math.random() * 100}`,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
lifetimes: {
|
|
208
|
+
attached() {
|
|
209
|
+
// 在组件实例进入页面节点树时执行
|
|
210
|
+
this.initData();
|
|
211
|
+
},
|
|
212
|
+
detached() {
|
|
213
|
+
// 在组件实例被从页面节点树移除时执行
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
// 以下是旧式的定义方式,可以保持对 <2.2.3 版本基础库的兼容
|
|
217
|
+
attached() {
|
|
218
|
+
// 在组件实例进入页面节点树时执行
|
|
219
|
+
this.initData();
|
|
220
|
+
},
|
|
221
|
+
detached() {
|
|
222
|
+
// 在组件实例被从页面节点树移除时执行
|
|
223
|
+
},
|
|
224
|
+
observers: {
|
|
225
|
+
// 当参数变化时
|
|
226
|
+
'**': async function() {
|
|
227
|
+
const objEChartBar = new EchartBar();
|
|
228
|
+
await objEChartBar.setOptions(this.properties);
|
|
229
|
+
const options = await objEChartBar.getOptions();
|
|
230
|
+
this._chart && this._chart.setOption(options);
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
methods: {
|
|
234
|
+
initData() {
|
|
235
|
+
this.setData({
|
|
236
|
+
ec: {
|
|
237
|
+
onInit: this.initChart.bind(this),
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
},
|
|
241
|
+
async initChart(canvas, width, height, dpr) {
|
|
242
|
+
const objEchart = echarts.init(canvas, null, {
|
|
243
|
+
width,
|
|
244
|
+
height,
|
|
245
|
+
devicePixelRatio: dpr,
|
|
246
|
+
});
|
|
247
|
+
canvas.setChart(objEchart);
|
|
248
|
+
const objEChartBar = new EchartBar();
|
|
249
|
+
await objEChartBar.setOptions(this.properties);
|
|
250
|
+
const options = await objEChartBar.getOptions();
|
|
251
|
+
// objEchart.clear();
|
|
252
|
+
console.log('设置前参数bar', options);
|
|
253
|
+
objEchart.setOption(options);
|
|
254
|
+
this._chart = objEchart;
|
|
255
|
+
return objEchart;
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** 根据当前环境获取 pc 上配置,还是 H5上的配置 */
|
|
2
|
+
const getConfig = () => {
|
|
3
|
+
const barH5 = {
|
|
4
|
+
xAxis: {
|
|
5
|
+
name: 'X轴名',
|
|
6
|
+
nameTextStyle: { align: 'center' },
|
|
7
|
+
axisLabel: {
|
|
8
|
+
show: true, // 刻度标签显示
|
|
9
|
+
rotate: 0, // 字体倾斜
|
|
10
|
+
},
|
|
11
|
+
axisTick: {
|
|
12
|
+
show: true, // 刻度显示
|
|
13
|
+
},
|
|
14
|
+
type: 'category',
|
|
15
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
16
|
+
inverse:false,
|
|
17
|
+
},
|
|
18
|
+
yAxis: {
|
|
19
|
+
type: 'value',
|
|
20
|
+
show: true, // y轴刻度线
|
|
21
|
+
name: 'Y轴名',
|
|
22
|
+
splitLine: {
|
|
23
|
+
lineStyle: {
|
|
24
|
+
width: 1, // 网格线宽度,为0则不显示
|
|
25
|
+
type: 'dashed', //solid,dashed,dotted
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
axisLabel: { padding: [0, -10, 0, 0] },
|
|
29
|
+
min: null,
|
|
30
|
+
max: null,
|
|
31
|
+
},
|
|
32
|
+
series: [
|
|
33
|
+
{
|
|
34
|
+
name: 'demo',
|
|
35
|
+
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
36
|
+
type: 'bar',
|
|
37
|
+
itemStyle: {
|
|
38
|
+
color: 'green',
|
|
39
|
+
},
|
|
40
|
+
smooth: true,
|
|
41
|
+
showSymbol: true, //是否显示线条上数据标签
|
|
42
|
+
label: {
|
|
43
|
+
show: true, // 显示线条上的数据
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
return barH5;
|
|
49
|
+
};
|
|
50
|
+
export default getConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** 根据当前环境获取 pc 上配置,还是 H5上的配置 */
|
|
2
|
+
const getConfig = () => {
|
|
3
|
+
const globalH5 = {
|
|
4
|
+
title: {
|
|
5
|
+
text: 'demo实例',
|
|
6
|
+
show: true,
|
|
7
|
+
left: '45%',
|
|
8
|
+
},
|
|
9
|
+
legend: {
|
|
10
|
+
top: '83%',
|
|
11
|
+
},
|
|
12
|
+
tooltip: {},
|
|
13
|
+
};
|
|
14
|
+
return globalH5;
|
|
15
|
+
};
|
|
16
|
+
export default getConfig;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** 根据当前环境获取 pc 上配置,还是 H5上的配置 */
|
|
2
|
+
const getConfig = () => {
|
|
3
|
+
const lineH5 = {
|
|
4
|
+
xAxis: {
|
|
5
|
+
name: 'X轴名',
|
|
6
|
+
nameTextStyle: { align: 'center' },
|
|
7
|
+
axisLabel: {
|
|
8
|
+
show: true, // 刻度标签显示
|
|
9
|
+
rotate: 0, // 字体倾斜
|
|
10
|
+
},
|
|
11
|
+
axisTick: {
|
|
12
|
+
show: true, // 刻度显示
|
|
13
|
+
},
|
|
14
|
+
type: 'category',
|
|
15
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
16
|
+
},
|
|
17
|
+
yAxis: {
|
|
18
|
+
type: 'value',
|
|
19
|
+
show: true, // y轴刻度线
|
|
20
|
+
name: 'Y轴名',
|
|
21
|
+
splitLine: {
|
|
22
|
+
lineStyle: {
|
|
23
|
+
width: 1, // 网格线宽度,为0则不显示
|
|
24
|
+
type: 'dashed', //solid,dashed,dotted
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
axisLabel: {
|
|
28
|
+
padding: [0, -10, 0, 0],
|
|
29
|
+
},
|
|
30
|
+
min: null,
|
|
31
|
+
max: null,
|
|
32
|
+
},
|
|
33
|
+
series: [
|
|
34
|
+
{
|
|
35
|
+
name: 'demo',
|
|
36
|
+
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
37
|
+
type: 'line',
|
|
38
|
+
smooth: true,
|
|
39
|
+
showSymbol: true, //是否显示线条上数据标签
|
|
40
|
+
label: {
|
|
41
|
+
show: true, // 显示线条上的数据
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
return lineH5;
|
|
47
|
+
};
|
|
48
|
+
export default getConfig;
|