@cloudbase/weda-ui 0.2.17 → 2.0.8

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.
Files changed (269) hide show
  1. package/README.md +3 -0
  2. package/package.json +10 -5
  3. package/src/configs/components/button.json +0 -2
  4. package/src/configs/components/calendar.json +9 -3
  5. package/src/configs/components/carousel.json +18 -9
  6. package/src/configs/components/chart/bar.json +31 -12
  7. package/src/configs/components/chart/line.json +27 -10
  8. package/src/configs/components/chart/pie.json +22 -8
  9. package/src/configs/components/chart/statisticsCard.json +61 -13
  10. package/src/configs/components/container.json +7 -2
  11. package/src/configs/components/dataView.json +31 -11
  12. package/src/configs/components/form/checkbox.json +97 -5
  13. package/src/configs/components/form/radio.json +123 -4
  14. package/src/configs/components/form/select.json +247 -13
  15. package/src/configs/components/graphicCard.json +90 -75
  16. package/src/configs/components/image.json +19 -8
  17. package/src/configs/components/link.json +25 -6
  18. package/src/configs/components/listView.json +83 -27
  19. package/src/configs/components/lottery.json +153 -0
  20. package/src/configs/components/modal.json +37 -5
  21. package/src/configs/components/navLayout.json +97 -79
  22. package/src/configs/components/navigationBar.json +59 -0
  23. package/src/configs/components/richtextview.json +6 -2
  24. package/src/configs/components/scrollVeiw.json +98 -34
  25. package/src/configs/components/swiper.json +22 -10
  26. package/src/configs/components/tabs.json +54 -9
  27. package/src/configs/components/text.json +43 -30
  28. package/src/configs/components/wxOpenApi/phone.json +141 -0
  29. package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
  30. package/src/configs/components/wxOpenApi/share.json +167 -0
  31. package/src/configs/components/wxOpenApi/userInfo.json +174 -0
  32. package/src/configs/index.js +13 -0
  33. package/src/docs/common/format.tsx +112 -0
  34. package/src/docs/common/tableView.css +164 -0
  35. package/src/docs/common/tableView.tsx +273 -0
  36. package/src/docs/compsdocs/chart/Bar.mdx +159 -0
  37. package/src/docs/compsdocs/chart/Line.mdx +100 -0
  38. package/src/docs/compsdocs/chart/Pie.mdx +83 -0
  39. package/src/docs/compsdocs/chart/_category_.json +1 -0
  40. package/src/docs/compsdocs/chart/statisticsCard.mdx +51 -0
  41. package/src/docs/compsdocs/database/DataView.mdx +33 -0
  42. package/src/docs/compsdocs/database/ListView.mdx +33 -0
  43. package/src/docs/compsdocs/database/_category_.json +1 -0
  44. package/src/docs/compsdocs/form/Form.mdx +35 -0
  45. package/src/docs/compsdocs/form/FormCheckbox.mdx +35 -0
  46. package/src/docs/compsdocs/form/FormDate.mdx +30 -0
  47. package/src/docs/compsdocs/form/FormEmail.mdx +30 -0
  48. package/src/docs/compsdocs/form/FormImageUploader.mdx +31 -0
  49. package/src/docs/compsdocs/form/FormInput.mdx +30 -0
  50. package/src/docs/compsdocs/form/FormLocation.mdx +64 -0
  51. package/src/docs/compsdocs/form/FormPhone.mdx +30 -0
  52. package/src/docs/compsdocs/form/FormRadio.mdx +35 -0
  53. package/src/docs/compsdocs/form/FormRegion.mdx +30 -0
  54. package/src/docs/compsdocs/form/FormSelect.mdx +36 -0
  55. package/src/docs/compsdocs/form/FormSwitch.mdx +30 -0
  56. package/src/docs/compsdocs/form/FormTextarea.mdx +30 -0
  57. package/src/docs/compsdocs/form/FormTime.mdx +30 -0
  58. package/src/docs/compsdocs/form/FormUploadFile.mdx +30 -0
  59. package/src/docs/compsdocs/form/FormUrl.mdx +30 -0
  60. package/src/docs/compsdocs/form/_category_.json +1 -0
  61. package/src/docs/compsdocs/grid/Card.mdx +32 -0
  62. package/src/docs/compsdocs/grid/Container.mdx +42 -0
  63. package/src/docs/compsdocs/grid/Footer.mdx +31 -0
  64. package/src/docs/compsdocs/grid/GridLayout.mdx +32 -0
  65. package/src/docs/compsdocs/grid/Header.mdx +31 -0
  66. package/src/docs/compsdocs/grid/Layout.mdx +25 -0
  67. package/src/docs/compsdocs/grid/List.mdx +31 -0
  68. package/src/docs/compsdocs/grid/ScrollView.mdx +37 -0
  69. package/src/docs/compsdocs/grid/Swiper.mdx +58 -0
  70. package/src/docs/compsdocs/grid/_category_.json +1 -0
  71. package/src/docs/compsdocs/media/Icon.mdx +31 -0
  72. package/src/docs/compsdocs/media/Image.mdx +55 -0
  73. package/src/docs/compsdocs/media/_category_.json +1 -0
  74. package/src/docs/compsdocs/model/ModelCreate.mdx +20 -0
  75. package/src/docs/compsdocs/model/ModelDetail.mdx +20 -0
  76. package/src/docs/compsdocs/model/ModelTable.mdx +24 -0
  77. package/src/docs/compsdocs/model/ModelUpdate.mdx +21 -0
  78. package/src/docs/compsdocs/model/PageLayout.mdx +21 -0
  79. package/src/docs/compsdocs/model/_category_.json +1 -0
  80. package/src/docs/compsdocs/navmenu/Classification.mdx +38 -0
  81. package/src/docs/compsdocs/navmenu/NavBar.mdx +43 -0
  82. package/src/docs/compsdocs/navmenu/NavLayout.mdx +30 -0
  83. package/src/docs/compsdocs/navmenu/TabBar.mdx +43 -0
  84. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +29 -0
  85. package/src/docs/compsdocs/navmenu/_category_.json +1 -0
  86. package/src/docs/compsdocs/senior/Lottery.mdx +48 -0
  87. package/src/docs/compsdocs/senior/Modal.mdx +58 -0
  88. package/src/docs/compsdocs/senior/SlotMachine.mdx +52 -0
  89. package/src/docs/compsdocs/senior/_category_.json +1 -0
  90. package/src/docs/compsdocs/show/Calendar.mdx +29 -0
  91. package/src/docs/compsdocs/show/Divider.mdx +31 -0
  92. package/src/docs/compsdocs/show/GraphicCard.mdx +30 -0
  93. package/src/docs/compsdocs/show/Item.mdx +32 -0
  94. package/src/docs/compsdocs/show/ItemList.mdx +47 -0
  95. package/src/docs/compsdocs/show/Media.mdx +25 -0
  96. package/src/docs/compsdocs/show/StatusTip.mdx +25 -0
  97. package/src/docs/compsdocs/show/Swiper.mdx +33 -0
  98. package/src/docs/compsdocs/show/Tabs.mdx +38 -0
  99. package/src/docs/compsdocs/show/_category_.json +1 -0
  100. package/src/docs/compsdocs/show/button.mdx +25 -0
  101. package/src/docs/compsdocs/text/Link.mdx +43 -0
  102. package/src/docs/compsdocs/text/RichTextView.mdx +36 -0
  103. package/src/docs/compsdocs/text/Text.mdx +31 -0
  104. package/src/docs/compsdocs/text/Title.mdx +32 -0
  105. package/src/docs/compsdocs/text/_category_.json +1 -0
  106. package/src/docs/compsdocs/wxOpen/Phone.mdx +60 -0
  107. package/src/docs/compsdocs/wxOpen/Share.mdx +46 -0
  108. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +60 -0
  109. package/src/docs/compsdocs/wxOpen/_category_.json +4 -0
  110. package/src/index.js +2 -0
  111. package/src/mp/components/button/index.js +18 -2
  112. package/src/mp/components/button/index.wxml +7 -4
  113. package/src/mp/components/chart/bar/index.js +6 -2
  114. package/src/mp/components/chart/common/core/eChartBar.js +9 -8
  115. package/src/mp/components/chart/common/core/eChartBase.js +20 -16
  116. package/src/mp/components/chart/common/core/eChartLine.js +6 -5
  117. package/src/mp/components/chart/line/index.js +10 -6
  118. package/src/mp/components/chart/pie/index.js +6 -2
  119. package/src/mp/components/chart/statisticsCard/index.js +33 -6
  120. package/src/mp/components/dataView/index.json +1 -1
  121. package/src/mp/components/form/checkbox/index.js +41 -2
  122. package/src/mp/components/form/checkbox/index.wxml +1 -1
  123. package/src/mp/components/form/form/index.wxml +1 -2
  124. package/src/mp/components/form/formcell/index.wxml +1 -1
  125. package/src/mp/components/form/formcell/index.wxss +17 -0
  126. package/src/mp/components/form/input/index.js +1 -1
  127. package/src/mp/components/form/input/index.wxss +15 -0
  128. package/src/mp/components/form/location/index.js +43 -2
  129. package/src/mp/components/form/location/index.wxss +4 -6
  130. package/src/mp/components/form/radio/index.js +34 -1
  131. package/src/mp/components/form/select/index.js +351 -41
  132. package/src/mp/components/form/select/index.wxml +17 -2
  133. package/src/mp/components/form/select/index.wxss +4 -0
  134. package/src/mp/components/form/select/region/index.js +101 -0
  135. package/src/mp/components/form/textarea/index.js +1 -1
  136. package/src/mp/components/form/textarea/index.wxss +4 -0
  137. package/src/mp/components/form/uploader/index.js +39 -27
  138. package/src/mp/components/form/uploader/index.json +3 -2
  139. package/src/mp/components/form/uploader/index.wxml +11 -7
  140. package/src/mp/components/form/uploader/index.wxss +20 -2
  141. package/src/mp/components/form/uploader/weui-uploader.js +209 -0
  142. package/src/mp/components/form/uploader/weui-uploader.json +7 -0
  143. package/src/mp/components/form/uploader/weui-uploader.wxml +45 -0
  144. package/src/mp/components/form/uploader/weui-uploader.wxss +1 -0
  145. package/src/mp/components/form/uploaderFile/index.js +10 -6
  146. package/src/mp/components/form/uploaderFile/index.wxss +4 -4
  147. package/src/mp/components/image/index.wxss +3 -2
  148. package/src/mp/components/listView/index.js +38 -43
  149. package/src/mp/components/listView/index.wxml +1 -1
  150. package/src/mp/components/listView/index.wxss +5 -0
  151. package/src/mp/components/lottery/index.js +270 -0
  152. package/src/mp/components/{internals/listView → lottery}/index.json +0 -0
  153. package/src/mp/components/lottery/index.wxml +43 -0
  154. package/src/mp/components/lottery/index.wxss +317 -0
  155. package/src/mp/components/navigationBar/index.js +193 -0
  156. package/src/mp/components/navigationBar/index.json +6 -0
  157. package/src/mp/components/navigationBar/index.wxml +88 -0
  158. package/src/mp/components/navigationBar/index.wxss +1257 -0
  159. package/src/mp/components/tabs/index.js +7 -2
  160. package/src/mp/components/tabs/index.wxml +2 -1
  161. package/src/mp/components/text/index.js +0 -25
  162. package/src/mp/components/text/index.wxml +3 -3
  163. package/src/mp/components/wxOpenApi/phone/index.js +117 -0
  164. package/src/mp/components/wxOpenApi/phone/index.json +4 -0
  165. package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
  166. package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
  167. package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
  168. package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
  169. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
  170. package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
  171. package/src/mp/components/wxOpenApi/share/index.js +117 -0
  172. package/src/mp/components/wxOpenApi/share/index.json +4 -0
  173. package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
  174. package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
  175. package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
  176. package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
  177. package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
  178. package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
  179. package/src/mp/index.json +7 -1
  180. package/src/mp/style/weda-ui.wxss +16 -0
  181. package/src/mp/utils/constant.js +15 -0
  182. package/src/mp/utils/destr.js +48 -0
  183. package/src/mp/utils/lodash.js +2 -0
  184. package/src/mp/utils/platform.js +10 -0
  185. package/src/mp/utils/tcb.js +44 -0
  186. package/src/web/components/button/index.css +8 -1
  187. package/src/web/components/button/index.tsx +10 -9
  188. package/src/web/components/calendar/index.jsx +1 -1
  189. package/src/web/components/carousel/index.tsx +8 -8
  190. package/src/web/components/chart/bar/index.tsx +40 -39
  191. package/src/web/components/chart/common/config/line.js +1 -1
  192. package/src/web/components/chart/common/core/eChartBar.js +7 -6
  193. package/src/web/components/chart/common/core/eChartBase.ts +20 -16
  194. package/src/web/components/chart/common/core/eChartLine.js +8 -6
  195. package/src/web/components/chart/line/index.tsx +40 -39
  196. package/src/web/components/chart/statisticsCard/index.tsx +29 -8
  197. package/src/web/components/form/checkbox/index.tsx +61 -23
  198. package/src/web/components/form/form/index.css +5 -1
  199. package/src/web/components/form/form/index.tsx +3 -1
  200. package/src/web/components/form/formcell/index.css +22 -1
  201. package/src/web/components/form/formcell/index.tsx +11 -6
  202. package/src/web/components/form/input/index.css +7 -12
  203. package/src/web/components/form/location/components/LocationH5/index.css +4 -7
  204. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +1 -1
  205. package/src/web/components/form/radio/index.tsx +90 -53
  206. package/src/web/components/form/select/h5.tsx +370 -73
  207. package/src/web/components/form/select/index.css +15 -0
  208. package/src/web/components/form/select/index.tsx +392 -145
  209. package/src/web/components/form/select/region/index.ts +122 -31
  210. package/src/web/components/form/select/time.jsx +89 -0
  211. package/src/web/components/form/select/year.tsx +170 -0
  212. package/src/web/components/form/textarea/index.css +4 -0
  213. package/src/web/components/form/textarea/index.tsx +2 -2
  214. package/src/web/components/form/tips/index.css +4 -0
  215. package/src/web/components/form/tips/index.tsx +4 -3
  216. package/src/web/components/form/uploader/index.css +26 -2
  217. package/src/web/components/form/uploader/uploader.h5.tsx +89 -57
  218. package/src/web/components/form/uploader/uploader.pc.tsx +4 -4
  219. package/src/web/components/form/uploaderFile/index.css +2 -4
  220. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +13 -7
  221. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +13 -5
  222. package/src/web/components/image/image.tsx +1 -1
  223. package/src/web/components/image/index.css +3 -3
  224. package/src/web/components/image/index.tsx +6 -7
  225. package/src/web/components/index.js +8 -0
  226. package/src/web/components/link/index.tsx +7 -4
  227. package/src/web/components/listView/index.css +4 -0
  228. package/src/web/components/listView/index.tsx +12 -20
  229. package/src/web/components/lottery/index.css +327 -0
  230. package/src/web/components/lottery/index.tsx +567 -0
  231. package/src/web/components/lottery/lotteryUtil.ts +130 -0
  232. package/src/web/components/modal/index.tsx +3 -1
  233. package/src/web/components/navLayout/index.tsx +2 -2
  234. package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
  235. package/src/web/components/navigationBar/common.tsx +198 -0
  236. package/src/web/components/navigationBar/h5Menu.tsx +179 -0
  237. package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
  238. package/src/web/components/navigationBar/index.css +762 -0
  239. package/src/web/components/navigationBar/index.tsx +230 -0
  240. package/src/web/components/navigationBar/type.d.ts +111 -0
  241. package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
  242. package/src/web/components/phone/index.css +0 -0
  243. package/src/web/components/phone/index.tsx +22 -0
  244. package/src/web/components/phoneCode/index.css +0 -0
  245. package/src/web/components/phoneCode/index.tsx +22 -0
  246. package/src/web/components/picker/timePicker.tsx +2 -2
  247. package/src/web/components/richTextView/index.tsx +3 -5
  248. package/src/web/components/share/index.css +0 -0
  249. package/src/web/components/share/index.tsx +38 -0
  250. package/src/web/components/slot/index.tsx +1 -1
  251. package/src/web/components/tabs/index.tsx +2 -0
  252. package/src/web/components/tabs/tabs.h5.tsx +43 -33
  253. package/src/web/components/tabs/tabs.pc.tsx +23 -10
  254. package/src/web/components/text/index.tsx +12 -20
  255. package/src/web/components/userInfo/index.css +0 -0
  256. package/src/web/components/userInfo/index.tsx +30 -0
  257. package/src/web/utils/{constant.js → constant.ts} +17 -2
  258. package/src/web/utils/lodash.ts +2 -0
  259. package/src/web/utils/platform.js +9 -0
  260. package/src/web/utils/tcb.js +26 -0
  261. package/src/web/weda-ui.css +7 -1
  262. package/src/mp/components/internals/listView/arrow-right-line.svg +0 -3
  263. package/src/mp/components/internals/listView/index.js +0 -286
  264. package/src/mp/components/internals/listView/index.wxml +0 -40
  265. package/src/mp/components/internals/listView/index.wxss +0 -150
  266. package/src/mp/components/internals/listView/more-line.svg +0 -3
  267. package/src/web/components/form/select/region/cities.ts +0 -2410
  268. package/src/web/components/form/select/region/provinces.ts +0 -240
  269. package/src/web/components/form/select/region/regions.ts +0 -20645
@@ -0,0 +1,317 @@
1
+ .weda-lottery {
2
+ width: 100%;
3
+ height: 652rpx;
4
+ position: relative;
5
+ }
6
+
7
+ .weda-lottery .weda-lottery__wrap {
8
+ position: relative;
9
+ width: 100%;
10
+ height: 652rpx;
11
+ background: #FF465C;
12
+ border: 2rpx solid rgba(255, 255, 255, 0.6);
13
+ box-shadow: inset 0px 0px 8rpx rgba(255, 255, 255, 0.5);
14
+ border-radius: 20rpx;
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ .weda-lottery .weda-lottery__dot-top {
19
+ position: absolute;
20
+ top: 8rpx;
21
+ left: calc((100% - 434rpx) / 2);
22
+ }
23
+
24
+ .weda-lottery .weda-lottery__dot-bottom {
25
+ position: absolute;
26
+ bottom: 8rpx;
27
+ left: calc((100% - 434rpx) / 2);
28
+ }
29
+
30
+ .weda-lottery .weda-lottery__dot-left {
31
+ position: absolute;
32
+ left: 8rpx;
33
+ top: calc((100% - 434rpx) / 2);
34
+ }
35
+
36
+ .weda-lottery .weda-lottery__dot-right {
37
+ position: absolute;
38
+ right: 8rpx;
39
+ top: calc((100% - 434rpx) / 2);
40
+ }
41
+
42
+ .weda-lottery .weda-lottery__dot {
43
+ display: flex;
44
+ }
45
+
46
+ .weda-lottery .weda-lottery__dot-horizontal {
47
+ flex-direction: row;
48
+ }
49
+
50
+ .weda-lottery .weda-lottery__dot-vertical {
51
+ flex-direction: column;
52
+ }
53
+
54
+ .weda-lottery .weda-lottery__dot .weda-lottery__dot-item,
55
+ .weda-lottery .weda-lottery__dot-single {
56
+ width: 18rpx;
57
+ height: 18rpx;
58
+ box-shadow: 0px 0px 8rpx rgba(255, 255, 255, 0.3);
59
+ border-radius: 50%;
60
+ background: #FFFFFF;
61
+ }
62
+
63
+ .weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(odd) {
64
+ background: #FFEE52;
65
+ }
66
+
67
+ .weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(even) {
68
+ background: #FFFFFF
69
+ }
70
+
71
+ .weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item {
72
+ margin-right: 86rpx;
73
+ }
74
+
75
+ .weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item:last-child {
76
+ margin-right: 0;
77
+ }
78
+
79
+ .weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item {
80
+ margin-bottom: 86rpx;
81
+ }
82
+
83
+ .weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item:last-child {
84
+ margin-bottom: 0;
85
+ }
86
+
87
+ .weda-lottery .weda-lottery__dot-left-top {
88
+ position: absolute;
89
+ top: 18rpx;
90
+ left: 12rpx;
91
+ }
92
+
93
+ .weda-lottery .weda-lottery__dot-right-top {
94
+ position: absolute;
95
+ top: 18rpx;
96
+ right: 12rpx;
97
+ }
98
+
99
+ .weda-lottery .weda-lottery__dot-left-bottom {
100
+ position: absolute;
101
+ left: 12rpx;
102
+ bottom: 18rpx;
103
+ }
104
+
105
+ .weda-lottery .weda-lottery__dot-right-bottom {
106
+ position: absolute;
107
+ right: 12rpx;
108
+ bottom: 18rpx;
109
+ }
110
+
111
+ .weda-lottery .weda-lottery__inner {
112
+ padding: 36rpx;
113
+ width: 100%;
114
+ height: 100%;
115
+ box-sizing: border-box;
116
+ }
117
+
118
+ .weda-lottery .weda-lottery__inner .weda-lottery__inner-wrap {
119
+ position: relative;
120
+ width: 100%;
121
+ box-sizing: border-box;
122
+ background: linear-gradient(180deg, #DD0D00 0%, #D80027 100%);
123
+ border: 2rpx solid rgba(255, 255, 255, 0.25);
124
+ box-shadow: inset 0px 0px 8rpx rgba(255, 255, 255, 0.5);
125
+ border-radius: 20rpx;
126
+ height: 100%;
127
+ }
128
+
129
+ .weda-lottery .weda-lottery__inner .weda-lottery__list {
130
+ position: absolute;
131
+ top: 0;
132
+ left: 0;
133
+ right: 0;
134
+ bottom: 0;
135
+ z-index: 1;
136
+ box-sizing: border-box;
137
+ }
138
+
139
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item {
140
+ position: absolute;
141
+ width: calc((100% - 64rpx) / 3);
142
+ height: calc((100% - 64rpx) / 3);
143
+ font-size: 0;
144
+ text-align: center;
145
+ background: #FFF8EE;
146
+ box-shadow: inset 0px -4rpx 0px #FFDDBD;
147
+ border-radius: 16rpx;
148
+ box-sizing: border-box;
149
+ }
150
+
151
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived {
152
+ background: #FFF8EE;
153
+ box-shadow: 0px 0px 12rpx #FFFFFF;
154
+ }
155
+
156
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected {
157
+ background: #FF6666;
158
+ box-shadow: inset 0px -4rpx 0px #FFA4A4;
159
+ }
160
+
161
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:first-child {
162
+ top: 16rpx;
163
+ left: 16rpx;
164
+ }
165
+
166
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(2) {
167
+ top: 16rpx;
168
+ left: calc((100% - 64rpx) / 3 + 32rpx);
169
+ }
170
+
171
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(3) {
172
+ top: 16rpx;
173
+ right: 16rpx;
174
+ }
175
+
176
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(4) {
177
+ top: calc((100% - 64rpx) / 3 + 32rpx);
178
+ right: 16rpx;
179
+ }
180
+
181
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(5) {
182
+ bottom: 16rpx;
183
+ right: 16rpx;
184
+ }
185
+
186
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(6) {
187
+ bottom: 16rpx;
188
+ left: calc((100% - 64rpx) / 3 + 32rpx);
189
+ }
190
+
191
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(7) {
192
+ bottom: 16rpx;
193
+ left: 16rpx;
194
+ }
195
+
196
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(8) {
197
+ bottom: calc((100% - 64rpx) / 3 + 32rpx);
198
+ left: 16rpx;
199
+ }
200
+
201
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell {
202
+ width: 100%;
203
+ height: 100%;
204
+ max-width: 100%;
205
+ max-height: 100%;
206
+ box-sizing: border-box;
207
+ border-width: 8rpx;
208
+ border-style: solid;
209
+ border-color: transparent;
210
+ border-radius: 16rpx;
211
+ display: flex;
212
+ flex-direction: column;
213
+ align-items: center;
214
+ justify-content: center;
215
+ padding: 16rpx 5rpx 16rpx 5rpx;
216
+ }
217
+
218
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived .weda-lottery__turntable-cell {
219
+ border-color: #FFE05F;
220
+ }
221
+
222
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-image {
223
+ height: 80rpx;
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: center;
227
+ }
228
+
229
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-icon {
230
+ display: block;
231
+ width: 80rpx;
232
+ height: 80rpx;
233
+ }
234
+
235
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-desc {
236
+ margin-top: 12rpx;
237
+ font-weight: 400;
238
+ font-size: 24rpx;
239
+ line-height: 34rpx;
240
+ text-align: center;
241
+ color: #BA0000;
242
+ white-space: nowrap;
243
+ text-overflow: ellipsis;
244
+ overflow: hidden;
245
+ width: 100%;
246
+ }
247
+
248
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected .weda-lottery__turntable-cell-desc {
249
+ color: #FFFFFF;
250
+ }
251
+
252
+ .weda-lottery .weda-lottery__turntable-btn {
253
+ z-index: 2;
254
+ position: absolute;
255
+ width: calc((100% - 64rpx) / 3);
256
+ height: calc((100% - 64rpx) / 3);
257
+ top: calc((100% - 64rpx) / 3 + 32rpx);
258
+ left: calc((100% - 64rpx) / 3 + 32rpx);
259
+ background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
260
+ box-shadow: inset 0px -4rpx 0px #FF7A00;
261
+ border-radius: 50%;
262
+ }
263
+
264
+ .weda-lottery .weda-lottery__turntable-btn.is-actived {
265
+ background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
266
+ box-shadow: inset 0px 4rpx 0px #FFFFFF;
267
+ }
268
+
269
+ .weda-lottery .weda-lottery__btn-inner {
270
+ padding: 18rpx;
271
+ width: 100%;
272
+ height: 100%;
273
+ box-sizing: border-box;
274
+ }
275
+
276
+ .weda-lottery .weda-lottery__btn {
277
+ width: 100%;
278
+ height: 100%;
279
+ background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
280
+ box-shadow: inset 0px 0px 16rpx rgba(234, 27, 53, 0.5);
281
+ border-radius: 50%;
282
+ display: flex;
283
+ align-items: center;
284
+ justify-content: center;
285
+ }
286
+
287
+ .weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn {
288
+ background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
289
+ box-shadow: inset 0px 0px 16rpx rgba(234, 27, 53, 0.5);
290
+ }
291
+
292
+ .weda-lottery .weda-lottery__btn-image {
293
+ padding: 22rpx 30rpx;
294
+ width: 100%;
295
+ box-sizing: border-box;
296
+ }
297
+
298
+ .weda-lottery .weda-lottery__btn-image .weda-lottery__btn-text {
299
+ font-weight: 600;
300
+ font-size: 18px;
301
+ line-height: 22px;
302
+ text-align: center;
303
+ color: #FFFFFF;
304
+ text-shadow: 0px 0.5px 0px #E42B27;
305
+ max-height: 100%;
306
+ display: -webkit-box;
307
+ overflow: hidden;
308
+ text-overflow: ellipsis;
309
+ -webkit-box-orient: vertical;
310
+ -webkit-line-clamp: 2;
311
+ width: 100%;
312
+ height: 100%;
313
+ }
314
+
315
+ .weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn-image {
316
+ opacity: 0.6;
317
+ }
@@ -0,0 +1,193 @@
1
+ import destr from '../../utils/destr';
2
+ import { isUrl } from '../../utils/platform';
3
+ import { getAppCustomNav } from '../../utils/tcb';
4
+
5
+ Component({
6
+ properties: {
7
+ className: {
8
+ type: String,
9
+ value: '',
10
+ },
11
+ style: {
12
+ type: String,
13
+ value: '',
14
+ },
15
+ navigationbar: { type: Object, value: {} },
16
+ },
17
+ data: {
18
+ defaultLogoUrl:
19
+ 'https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/43d3b2b7-445c-4858-8eb0-50ac5d5cc08e.svg',
20
+ visible: false,
21
+ selectedKey: 'index',
22
+ menuData: [],
23
+ navigationStyle: {
24
+ isHorizontal: false,
25
+ showMenuIcon: true,
26
+ fixedTop: true,
27
+ menuFontSize: 14,
28
+ menuBackgroundColor: '#fff',
29
+ menuColor: '#000',
30
+ menuHoverColor: '#f3f3f3',
31
+ showTitle: true,
32
+ title: '标题',
33
+ showLogo: true,
34
+ logoUrl:
35
+ 'https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/43d3b2b7-445c-4858-8eb0-50ac5d5cc08e.svg ',
36
+ titleFontSize: '18',
37
+ titleColor: '#000',
38
+ logoWidth: '32',
39
+ logoHeight: '32',
40
+ },
41
+ },
42
+ observers: {
43
+ navigationbar: function (navigationbar) {
44
+ this.getMenusByapi(navigationbar);
45
+ },
46
+ },
47
+ methods: {
48
+ getMenusByapi(navigationbar) {
49
+ getAppCustomNav()
50
+ .then((res) => {
51
+ const { Content } = res;
52
+ const navigationData = destr(Content);
53
+ if (navigationData?.navigationStyle) {
54
+ const {
55
+ menuData,
56
+ navigationStyle,
57
+ isMultiTerminal,
58
+ mobileMenuData,
59
+ } = navigationData;
60
+ let menus = isMultiTerminal ? mobileMenuData : menuData;
61
+ let selectedKey = this.defaultSelectedMenu(menus);
62
+ this.setData({
63
+ menuData: this.generateMenuData(
64
+ menus,
65
+ { key: selectedKey },
66
+ true
67
+ ),
68
+ navigationStyle,
69
+ selectedKey,
70
+ });
71
+ }
72
+ })
73
+ .catch((error) => {
74
+ console.log(error);
75
+ const { menuData, navigationStyle } = navigationbar;
76
+ let selectedKey = this.defaultSelectedMenu(menuData);
77
+
78
+ this.setData({
79
+ menuData: this.generateMenuData(
80
+ menuData,
81
+ { key: selectedKey },
82
+ true
83
+ ),
84
+ navigationStyle,
85
+ selectedKey,
86
+ });
87
+ });
88
+ },
89
+ generateMenuData(menuData, menuItem, init = false) {
90
+ let menus = JSON.parse(JSON.stringify(menuData));
91
+ return menus?.map((i) => {
92
+ let { iconUrl = 'td:view-module', children } = i;
93
+ let iconType = 'image';
94
+ let ticon = '';
95
+ if (!isUrl(iconUrl)) {
96
+ iconType = 'icon';
97
+ if (iconUrl.includes('td:')) {
98
+ iconType = 't-icon';
99
+ ticon = iconUrl?.replace('td:', '');
100
+ }
101
+ }
102
+ if (init) {
103
+ i.expand = this.hasSelectedMenu(i, menuItem.key);
104
+ } else if (i.key === menuItem.key) {
105
+ i.expand = menuItem.expand;
106
+ }
107
+ return {
108
+ ...i,
109
+ iconType,
110
+ iconUrl,
111
+ ticon,
112
+ children: this.generateMenuData(children || [], menuItem, init),
113
+ };
114
+ });
115
+ },
116
+ showMenu() {
117
+ this.setData({ visible: !this.data.visible });
118
+ },
119
+ menuClick(itemInfo) {
120
+ const menu = itemInfo?.currentTarget?.dataset?.menu;
121
+ const { path, type, key, children, expand } = menu;
122
+ if (children.length) {
123
+ this.setData({
124
+ menuData: this.generateMenuData(this.data.menuData, {
125
+ ...menu,
126
+ expand: !expand,
127
+ }),
128
+ });
129
+ return;
130
+ }
131
+ if (type === 'route') {
132
+ let { app } = getApp();
133
+ app.navigateTo({
134
+ pageId: path?.replace('/', ''),
135
+ packageName: '',
136
+ mode: 'weDa',
137
+ });
138
+ }
139
+ },
140
+ hasSelectedMenu(menu, selectedkey) {
141
+ let opened = false;
142
+ if (menu.key === selectedkey) {
143
+ return true;
144
+ }
145
+ menu?.children?.forEach((i) => {
146
+ if (i.key === selectedkey) {
147
+ opened = true;
148
+ }
149
+ if (i?.children?.length) {
150
+ opened = this.hasSelectedMenu(i, selectedkey);
151
+ }
152
+ });
153
+ return opened;
154
+ },
155
+ findMenuItemByPath(menus, targetPath) {
156
+ const queue = [];
157
+ let targetNode = null;
158
+ menus.forEach((node) => queue.push(node));
159
+
160
+ while (queue.length) {
161
+ const node = queue.shift();
162
+ if (!node) return null;
163
+
164
+ if (node.path === targetPath) {
165
+ // 添加节点
166
+ targetNode = node;
167
+ break;
168
+ } else {
169
+ node.children?.forEach((node) => queue.push(node));
170
+ }
171
+ }
172
+
173
+ return targetNode;
174
+ },
175
+ defaultSelectedMenu(menu) {
176
+ try {
177
+ // eslint-disable-next-line no-undef
178
+ const pages = getCurrentPages();
179
+ const currentpage = pages[pages.length - 1];
180
+ let path = currentpage.route.split('/');
181
+ path = path[1];
182
+ let selectedKey = '';
183
+ const targetMenu = this.findMenuItemByPath(menu, `/${path}`);
184
+ if (targetMenu) {
185
+ selectedKey = targetMenu.key;
186
+ }
187
+ return selectedKey;
188
+ } catch (error) {
189
+ return '';
190
+ }
191
+ },
192
+ },
193
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "shared",
4
+ "usingComponents": {
5
+ }
6
+ }
@@ -0,0 +1,88 @@
1
+ <view class="weda-menu weda-menu-mobile" style="display: {{menuData.length?'block':'none'}};">
2
+ <view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
3
+ <view class="weda-menu__bar-main">
4
+ <view class="weda-menu__main-logo">
5
+ <image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
6
+ <text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;">
7
+ {{navigationStyle.title}}
8
+ </text>
9
+ </view>
10
+ </view>
11
+ <view class="weda-menu__bar-extra">
12
+ <view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
13
+ <view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
14
+ </view>
15
+ </view>
16
+ <view class="menu-solt">
17
+ <slot></slot>
18
+ </view>
19
+ </view>
20
+
21
+
22
+ <view class="weda-menu-mobile__drawer" wx-if="{{visible}}">
23
+
24
+ <view class="weda-menu weda-menu-mobile">
25
+ <view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
26
+ <view class="weda-menu__bar-main">
27
+ <view class="weda-menu__main-logo">
28
+ <image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
29
+ <text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;">
30
+ {{navigationStyle.title}}
31
+ </text>
32
+ </view>
33
+ </view>
34
+ <view class="weda-menu__bar-extra">
35
+ <view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
36
+ <view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
37
+ </view>
38
+ </view>
39
+ </view>
40
+ <view class="weda-drawer-drawer__body">
41
+ <scroll-view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" scroll-y >
42
+ <view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" style="background:{{navigationStyle.menuBackgroundColor}}">
43
+ <view class="weda-drawer-menu__body">
44
+ <view class="weda-drawer-menu__list">
45
+ <block wx:for="{{menuData}}" wx:key="menuIndex" wx:for-item="menu">
46
+ <view class="{{menu.children ? 'weda-drawer-menu__submenu' : ''}} {{menu.expand?'expand':''}}" >
47
+ <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===menu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{menu}}">
48
+ <view wx:if="{{navigationStyle.showMenuIcon && menu.iconType!=='image'}}" class="weda-grid-navigation__icon">
49
+ <view wx:if="{{menu.iconType === 't-icon'}}" class="weda-icon t-icon t-icon-{{menu.ticon}}" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"></view>
50
+ <view wx:if="{{menu.iconType !== 't-icon'}}" class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{menu.iconUrl}}" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">
51
+ </view>
52
+ </view>
53
+ <image wx:if="{{navigationStyle.showMenuIcon && menu.iconType==='image'}}" class="weda-drawer-menu__list-icon" src="{{menu.iconUrl}}" alt="icon"></image>
54
+ <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{menu.title}}</view>
55
+ <view wx-if="{{menu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
56
+ </view>
57
+ <view class="weda-drawer-menu__list">
58
+ <block wx-if="{{menu.children}}">
59
+ <block wx:for="{{menu.children}}" wx:key="secondIndex" wx:for-item="secondMenu">
60
+ <view class="{{secondMenu.children ? 'weda-drawer-menu__submenu weda-menu__submenu' : ''}} {{secondMenu.expand?'expand':''}}">
61
+ <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===secondMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{secondMenu}}">
62
+ <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{secondMenu.title}}</view>
63
+ <view wx-if="{{secondMenu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
64
+ </view>
65
+ <view class="weda-drawer-menu__list">
66
+ <block wx-if="{{secondMenu.children}}">
67
+ <block wx:for="{{secondMenu.children}}" wx:key="thridIndex" wx:for-item="thridMenu">
68
+ <view class="">
69
+ <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===thridMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{thridMenu}}">
70
+ <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{thridMenu.title}}</view>
71
+ </view>
72
+ </view>
73
+ </block>
74
+ </block>
75
+ </view>
76
+ </view>
77
+ </block>
78
+ </block>
79
+ </view>
80
+ </view>
81
+ </block>
82
+ </view>
83
+ </view>
84
+ </view>
85
+ </scroll-view>
86
+ </view>
87
+
88
+ </view>