@tuya-miniapp/smart-ui 1.3.1-beta-2 → 1.3.1-beta-4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (373) hide show
  1. package/dist/action-sheet/demo/index.d.ts +1 -0
  2. package/dist/action-sheet/demo/index.js +101 -0
  3. package/dist/action-sheet/index.js +1 -1
  4. package/dist/area/demo/index.d.ts +1 -0
  5. package/dist/area/demo/index.js +41 -0
  6. package/dist/area/index.js +4 -5
  7. package/dist/battery/demo/index.d.ts +1 -0
  8. package/dist/battery/demo/index.js +2 -0
  9. package/dist/battery/index.js +1 -3
  10. package/dist/bottom-sheet/demo/index.d.ts +1 -0
  11. package/dist/bottom-sheet/demo/index.js +24 -0
  12. package/dist/bottom-sheet/index.css +1 -1
  13. package/dist/bottom-sheet/index.js +3 -2
  14. package/dist/bottom-sheet/index.wxml +3 -1
  15. package/dist/bottom-sheet/index.wxss +1 -1
  16. package/dist/button/demo/index.d.ts +1 -0
  17. package/dist/button/demo/index.js +9 -0
  18. package/dist/button/index.js +1 -1
  19. package/dist/calendar/calendar.wxml +13 -8
  20. package/dist/calendar/components/header/index.css +1 -1
  21. package/dist/calendar/components/header/index.js +7 -3
  22. package/dist/calendar/components/header/index.wxml +3 -3
  23. package/dist/calendar/components/header/index.wxss +1 -1
  24. package/dist/calendar/components/month/index.css +1 -1
  25. package/dist/calendar/components/month/index.js +3 -5
  26. package/dist/calendar/components/month/index.wxs +1 -4
  27. package/dist/calendar/components/month/index.wxss +1 -1
  28. package/dist/calendar/components/month-list/index.css +1 -1
  29. package/dist/calendar/components/month-list/index.js +26 -41
  30. package/dist/calendar/components/month-list/index.wxml +8 -2
  31. package/dist/calendar/components/month-list/index.wxss +1 -1
  32. package/dist/calendar/components/year-list/index.css +1 -1
  33. package/dist/calendar/components/year-list/index.js +17 -4
  34. package/dist/calendar/components/year-list/index.wxml +8 -2
  35. package/dist/calendar/components/year-list/index.wxss +1 -1
  36. package/dist/calendar/demo/index.d.ts +1 -0
  37. package/dist/calendar/demo/index.js +103 -0
  38. package/dist/calendar/index.js +32 -39
  39. package/dist/calendar/index.wxs +5 -8
  40. package/dist/calendar/utils.d.ts +4 -0
  41. package/dist/calendar/utils.js +30 -4
  42. package/dist/cascader/demo/index.d.ts +1 -0
  43. package/dist/cascader/demo/index.js +191 -0
  44. package/dist/cascader/index.js +3 -3
  45. package/dist/cell/demo/index.d.ts +1 -0
  46. package/dist/cell/demo/index.js +14 -0
  47. package/dist/cell/index.js +1 -7
  48. package/dist/checkbox/demo/index.d.ts +1 -0
  49. package/dist/checkbox/demo/index.js +34 -0
  50. package/dist/checkbox-group/index.js +1 -1
  51. package/dist/circle/demo/index.d.ts +1 -0
  52. package/dist/circle/demo/index.js +19 -0
  53. package/dist/col/demo/index.d.ts +1 -0
  54. package/dist/col/demo/index.js +4 -0
  55. package/dist/collapse/demo/index.d.ts +1 -0
  56. package/dist/collapse/demo/index.js +36 -0
  57. package/dist/collapse/index.js +1 -1
  58. package/dist/collapse-item/animate.js +1 -1
  59. package/dist/common/component.js +1 -1
  60. package/dist/common/utils.js +3 -3
  61. package/dist/config-provider/demo/index.d.ts +1 -0
  62. package/dist/config-provider/demo/index.js +22 -0
  63. package/dist/count-down/demo/index.d.ts +1 -0
  64. package/dist/count-down/demo/index.js +33 -0
  65. package/dist/custom-keyboard/demo/index.d.ts +1 -0
  66. package/dist/custom-keyboard/demo/index.js +17 -0
  67. package/dist/custom-keyboard/index.js +1 -3
  68. package/dist/datetime-picker/demo/index.d.ts +1 -0
  69. package/dist/datetime-picker/demo/index.js +63 -0
  70. package/dist/datetime-picker/index.js +4 -5
  71. package/dist/dialog/demo/index.d.ts +1 -0
  72. package/dist/dialog/demo/index.js +134 -0
  73. package/dist/dialog/dialog.js +3 -5
  74. package/dist/dialog/index.js +1 -1
  75. package/dist/divider/demo/index.d.ts +1 -0
  76. package/dist/divider/demo/index.js +4 -0
  77. package/dist/dropdown-item/index.js +3 -3
  78. package/dist/dropdown-item/index.wxml +1 -7
  79. package/dist/dropdown-menu/demo/index.d.ts +1 -0
  80. package/dist/dropdown-menu/demo/index.js +47 -0
  81. package/dist/dropdown-menu/index.js +8 -10
  82. package/dist/empty/demo/index.d.ts +1 -0
  83. package/dist/empty/demo/index.js +13 -0
  84. package/dist/empty/index.css +1 -1
  85. package/dist/empty/index.wxs +1 -1
  86. package/dist/empty/index.wxss +1 -1
  87. package/dist/field/demo/index.d.ts +1 -0
  88. package/dist/field/demo/index.js +21 -0
  89. package/dist/goods-action/demo/index.d.ts +1 -0
  90. package/dist/goods-action/demo/index.js +12 -0
  91. package/dist/goods-action/index.js +1 -1
  92. package/dist/grid/demo/index.d.ts +1 -0
  93. package/dist/grid/demo/index.js +9 -0
  94. package/dist/grid/index.js +1 -1
  95. package/dist/grid-item/index.js +1 -1
  96. package/dist/icon/demo/index.d.ts +1 -0
  97. package/dist/icon/demo/index.js +26 -0
  98. package/dist/image/demo/index.d.ts +1 -0
  99. package/dist/image/demo/index.js +15 -0
  100. package/dist/index-anchor/index.js +1 -1
  101. package/dist/index-bar/demo/index.d.ts +1 -0
  102. package/dist/index-bar/demo/index.js +21 -0
  103. package/dist/index-bar/index.js +9 -16
  104. package/dist/loading/demo/index.d.ts +1 -0
  105. package/dist/loading/demo/index.js +4 -0
  106. package/dist/loading/index.js +25 -1
  107. package/dist/loading/index.wxml +2 -2
  108. package/dist/loading/index.wxs +6 -21
  109. package/dist/mixins/basic.js +2 -2
  110. package/dist/mixins/link.js +1 -2
  111. package/dist/mixins/page-scroll.js +1 -1
  112. package/dist/mixins/touch.js +1 -2
  113. package/dist/mixins/transition.js +1 -1
  114. package/dist/nav-bar/demo/index.d.ts +1 -0
  115. package/dist/nav-bar/demo/index.js +26 -0
  116. package/dist/nav-bar/index.css +1 -1
  117. package/dist/nav-bar/index.js +1 -1
  118. package/dist/nav-bar/index.wxml +1 -1
  119. package/dist/nav-bar/index.wxss +1 -1
  120. package/dist/normal-slider/demo/index.d.ts +1 -0
  121. package/dist/normal-slider/demo/index.js +19 -0
  122. package/dist/notice-bar/demo/index.d.ts +1 -0
  123. package/dist/notice-bar/demo/index.js +11 -0
  124. package/dist/notice-bar/index.css +1 -1
  125. package/dist/notice-bar/index.js +3 -6
  126. package/dist/notice-bar/index.wxml +1 -5
  127. package/dist/notice-bar/index.wxss +1 -1
  128. package/dist/notify/demo/index.d.ts +1 -0
  129. package/dist/notify/demo/index.js +45 -0
  130. package/dist/overlay/demo/index.d.ts +1 -0
  131. package/dist/overlay/demo/index.js +22 -0
  132. package/dist/picker/demo/index.d.ts +1 -0
  133. package/dist/picker/demo/index.js +76 -0
  134. package/dist/picker/index.css +1 -1
  135. package/dist/picker/index.js +2 -2
  136. package/dist/picker/index.wxml +1 -0
  137. package/dist/picker/index.wxss +1 -1
  138. package/dist/picker-column/index.js +3 -8
  139. package/dist/popup/demo/index.d.ts +1 -0
  140. package/dist/popup/demo/index.js +79 -0
  141. package/dist/progress/demo/index.d.ts +1 -0
  142. package/dist/progress/demo/index.js +4 -0
  143. package/dist/progress/index.js +1 -4
  144. package/dist/radio/demo/index.d.ts +1 -0
  145. package/dist/radio/demo/index.js +31 -0
  146. package/dist/radio-group/index.js +1 -1
  147. package/dist/rate/demo/index.d.ts +1 -0
  148. package/dist/rate/demo/index.js +25 -0
  149. package/dist/rate/index.js +2 -2
  150. package/dist/row/index.js +1 -1
  151. package/dist/search/demo/index.d.ts +1 -0
  152. package/dist/search/demo/index.js +43 -0
  153. package/dist/search/index.css +1 -1
  154. package/dist/search/index.js +1 -5
  155. package/dist/search/index.wxml +1 -1
  156. package/dist/search/index.wxss +1 -1
  157. package/dist/sidebar/demo/index.d.ts +1 -0
  158. package/dist/sidebar/demo/index.js +9 -0
  159. package/dist/skeleton/demo/index.d.ts +1 -0
  160. package/dist/skeleton/demo/index.js +11 -0
  161. package/dist/slider/demo/index.d.ts +1 -0
  162. package/dist/slider/demo/index.js +19 -0
  163. package/dist/slider/index.js +5 -7
  164. package/dist/stepper/demo/index.d.ts +1 -0
  165. package/dist/stepper/demo/index.js +19 -0
  166. package/dist/steps/demo/index.d.ts +1 -0
  167. package/dist/steps/demo/index.js +42 -0
  168. package/dist/sticky/demo/index.d.ts +1 -0
  169. package/dist/sticky/demo/index.js +26 -0
  170. package/dist/sticky/index.js +2 -2
  171. package/dist/swipe-cell/demo/index.d.ts +1 -0
  172. package/dist/swipe-cell/demo/index.js +45 -0
  173. package/dist/swipe-cell/index.js +3 -5
  174. package/dist/switch/demo/index.d.ts +1 -0
  175. package/dist/switch/demo/index.js +29 -0
  176. package/dist/switch/index.css +1 -1
  177. package/dist/switch/index.wxss +1 -1
  178. package/dist/tab/demo/index.d.ts +1 -0
  179. package/dist/tab/demo/index.js +55 -0
  180. package/dist/tabbar/demo/index.d.ts +1 -0
  181. package/dist/tabbar/demo/index.js +34 -0
  182. package/dist/tabbar/index.js +1 -1
  183. package/dist/tabs/index.css +1 -1
  184. package/dist/tabs/index.js +7 -25
  185. package/dist/tabs/index.wxss +1 -1
  186. package/dist/tag/demo/index.d.ts +1 -0
  187. package/dist/tag/demo/index.js +16 -0
  188. package/dist/tag/index.css +1 -1
  189. package/dist/tag/index.wxss +1 -1
  190. package/dist/toast/demo/index.d.ts +1 -0
  191. package/dist/toast/demo/index.js +67 -0
  192. package/dist/toast/toast.js +5 -5
  193. package/dist/transition/demo/index.d.ts +1 -0
  194. package/dist/transition/demo/index.js +67 -0
  195. package/dist/tree-select/demo/index.d.ts +1 -0
  196. package/dist/tree-select/demo/index.js +113 -0
  197. package/dist/wxs/style.wxs +0 -7
  198. package/lib/action-sheet/demo/index.d.ts +1 -0
  199. package/lib/action-sheet/demo/index.js +115 -0
  200. package/lib/area/demo/index.d.ts +1 -0
  201. package/lib/area/demo/index.js +47 -0
  202. package/lib/area/index.js +1 -2
  203. package/lib/battery/demo/index.d.ts +1 -0
  204. package/lib/battery/demo/index.js +4 -0
  205. package/lib/battery/index.js +1 -3
  206. package/lib/bottom-sheet/demo/index.d.ts +1 -0
  207. package/lib/bottom-sheet/demo/index.js +27 -0
  208. package/lib/bottom-sheet/index.css +1 -1
  209. package/lib/bottom-sheet/index.js +3 -2
  210. package/lib/bottom-sheet/index.wxml +3 -1
  211. package/lib/bottom-sheet/index.wxss +1 -1
  212. package/lib/button/demo/index.d.ts +1 -0
  213. package/lib/button/demo/index.js +14 -0
  214. package/lib/calendar/calendar.wxml +13 -8
  215. package/lib/calendar/components/header/index.css +1 -1
  216. package/lib/calendar/components/header/index.js +6 -2
  217. package/lib/calendar/components/header/index.wxml +3 -3
  218. package/lib/calendar/components/header/index.wxss +1 -1
  219. package/lib/calendar/components/month/index.css +1 -1
  220. package/lib/calendar/components/month/index.js +2 -6
  221. package/lib/calendar/components/month/index.wxs +1 -4
  222. package/lib/calendar/components/month/index.wxss +1 -1
  223. package/lib/calendar/components/month-list/index.css +1 -1
  224. package/lib/calendar/components/month-list/index.js +25 -40
  225. package/lib/calendar/components/month-list/index.wxml +8 -2
  226. package/lib/calendar/components/month-list/index.wxss +1 -1
  227. package/lib/calendar/components/year-list/index.css +1 -1
  228. package/lib/calendar/components/year-list/index.js +15 -2
  229. package/lib/calendar/components/year-list/index.wxml +8 -2
  230. package/lib/calendar/components/year-list/index.wxss +1 -1
  231. package/lib/calendar/demo/index.d.ts +1 -0
  232. package/lib/calendar/demo/index.js +105 -0
  233. package/lib/calendar/index.js +29 -38
  234. package/lib/calendar/index.wxs +5 -8
  235. package/lib/calendar/utils.d.ts +4 -0
  236. package/lib/calendar/utils.js +31 -4
  237. package/lib/cascader/demo/index.d.ts +1 -0
  238. package/lib/cascader/demo/index.js +197 -0
  239. package/lib/cell/demo/index.d.ts +1 -0
  240. package/lib/cell/demo/index.js +39 -0
  241. package/lib/cell/index.js +1 -7
  242. package/lib/checkbox/demo/index.d.ts +1 -0
  243. package/lib/checkbox/demo/index.js +38 -0
  244. package/lib/circle/demo/index.d.ts +1 -0
  245. package/lib/circle/demo/index.js +21 -0
  246. package/lib/col/demo/index.d.ts +1 -0
  247. package/lib/col/demo/index.js +6 -0
  248. package/lib/collapse/demo/index.d.ts +1 -0
  249. package/lib/collapse/demo/index.js +42 -0
  250. package/lib/config-provider/demo/index.d.ts +1 -0
  251. package/lib/config-provider/demo/index.js +24 -0
  252. package/lib/count-down/demo/index.d.ts +1 -0
  253. package/lib/count-down/demo/index.js +38 -0
  254. package/lib/custom-keyboard/demo/index.d.ts +1 -0
  255. package/lib/custom-keyboard/demo/index.js +19 -0
  256. package/lib/custom-keyboard/index.js +1 -3
  257. package/lib/datetime-picker/demo/index.d.ts +1 -0
  258. package/lib/datetime-picker/demo/index.js +68 -0
  259. package/lib/datetime-picker/index.js +4 -3
  260. package/lib/dialog/demo/index.d.ts +1 -0
  261. package/lib/dialog/demo/index.js +144 -0
  262. package/lib/dialog/dialog.js +1 -3
  263. package/lib/divider/demo/index.d.ts +1 -0
  264. package/lib/divider/demo/index.js +6 -0
  265. package/lib/dropdown-item/index.wxml +1 -7
  266. package/lib/dropdown-menu/demo/index.d.ts +1 -0
  267. package/lib/dropdown-menu/demo/index.js +52 -0
  268. package/lib/dropdown-menu/index.js +2 -4
  269. package/lib/empty/demo/index.d.ts +1 -0
  270. package/lib/empty/demo/index.js +15 -0
  271. package/lib/empty/index.css +1 -1
  272. package/lib/empty/index.wxs +1 -1
  273. package/lib/empty/index.wxss +1 -1
  274. package/lib/field/demo/index.d.ts +1 -0
  275. package/lib/field/demo/index.js +23 -0
  276. package/lib/goods-action/demo/index.d.ts +1 -0
  277. package/lib/goods-action/demo/index.js +17 -0
  278. package/lib/grid/demo/index.d.ts +1 -0
  279. package/lib/grid/demo/index.js +11 -0
  280. package/lib/icon/demo/index.d.ts +1 -0
  281. package/lib/icon/demo/index.js +54 -0
  282. package/lib/image/demo/index.d.ts +1 -0
  283. package/lib/image/demo/index.js +17 -0
  284. package/lib/index-bar/demo/index.d.ts +1 -0
  285. package/lib/index-bar/demo/index.js +23 -0
  286. package/lib/index-bar/index.js +3 -10
  287. package/lib/loading/demo/index.d.ts +1 -0
  288. package/lib/loading/demo/index.js +6 -0
  289. package/lib/loading/index.js +27 -1
  290. package/lib/loading/index.wxml +2 -2
  291. package/lib/loading/index.wxs +6 -21
  292. package/lib/mixins/link.js +1 -2
  293. package/lib/mixins/touch.js +1 -2
  294. package/lib/nav-bar/demo/index.d.ts +1 -0
  295. package/lib/nav-bar/demo/index.js +31 -0
  296. package/lib/nav-bar/index.css +1 -1
  297. package/lib/nav-bar/index.wxml +1 -1
  298. package/lib/nav-bar/index.wxss +1 -1
  299. package/lib/normal-slider/demo/index.d.ts +1 -0
  300. package/lib/normal-slider/demo/index.js +21 -0
  301. package/lib/notice-bar/demo/index.d.ts +1 -0
  302. package/lib/notice-bar/demo/index.js +16 -0
  303. package/lib/notice-bar/index.css +1 -1
  304. package/lib/notice-bar/index.js +2 -5
  305. package/lib/notice-bar/index.wxml +1 -5
  306. package/lib/notice-bar/index.wxss +1 -1
  307. package/lib/notify/demo/index.d.ts +1 -0
  308. package/lib/notify/demo/index.js +50 -0
  309. package/lib/overlay/demo/index.d.ts +1 -0
  310. package/lib/overlay/demo/index.js +24 -0
  311. package/lib/picker/demo/index.d.ts +1 -0
  312. package/lib/picker/demo/index.js +82 -0
  313. package/lib/picker/index.css +1 -1
  314. package/lib/picker/index.js +1 -3
  315. package/lib/picker/index.wxml +1 -0
  316. package/lib/picker/index.wxss +1 -1
  317. package/lib/picker-column/index.js +2 -7
  318. package/lib/popup/demo/index.d.ts +1 -0
  319. package/lib/popup/demo/index.js +85 -0
  320. package/lib/progress/demo/index.d.ts +1 -0
  321. package/lib/progress/demo/index.js +6 -0
  322. package/lib/progress/index.js +1 -4
  323. package/lib/radio/demo/index.d.ts +1 -0
  324. package/lib/radio/demo/index.js +34 -0
  325. package/lib/rate/demo/index.d.ts +1 -0
  326. package/lib/rate/demo/index.js +30 -0
  327. package/lib/search/demo/index.d.ts +1 -0
  328. package/lib/search/demo/index.js +48 -0
  329. package/lib/search/index.css +1 -1
  330. package/lib/search/index.js +1 -5
  331. package/lib/search/index.wxml +1 -1
  332. package/lib/search/index.wxss +1 -1
  333. package/lib/sidebar/demo/index.d.ts +1 -0
  334. package/lib/sidebar/demo/index.js +14 -0
  335. package/lib/skeleton/demo/index.d.ts +1 -0
  336. package/lib/skeleton/demo/index.js +14 -0
  337. package/lib/slider/demo/index.d.ts +1 -0
  338. package/lib/slider/demo/index.js +21 -0
  339. package/lib/slider/index.js +1 -3
  340. package/lib/stepper/demo/index.d.ts +1 -0
  341. package/lib/stepper/demo/index.js +25 -0
  342. package/lib/steps/demo/index.d.ts +1 -0
  343. package/lib/steps/demo/index.js +47 -0
  344. package/lib/sticky/demo/index.d.ts +1 -0
  345. package/lib/sticky/demo/index.js +30 -0
  346. package/lib/sticky/index.js +3 -1
  347. package/lib/swipe-cell/demo/index.d.ts +1 -0
  348. package/lib/swipe-cell/demo/index.js +50 -0
  349. package/lib/swipe-cell/index.js +1 -3
  350. package/lib/switch/demo/index.d.ts +1 -0
  351. package/lib/switch/demo/index.js +37 -0
  352. package/lib/switch/index.css +1 -1
  353. package/lib/switch/index.wxss +1 -1
  354. package/lib/tab/demo/index.d.ts +1 -0
  355. package/lib/tab/demo/index.js +57 -0
  356. package/lib/tabbar/demo/index.d.ts +1 -0
  357. package/lib/tabbar/demo/index.js +41 -0
  358. package/lib/tabs/index.css +1 -1
  359. package/lib/tabs/index.js +6 -24
  360. package/lib/tabs/index.wxss +1 -1
  361. package/lib/tag/demo/index.d.ts +1 -0
  362. package/lib/tag/demo/index.js +19 -0
  363. package/lib/tag/index.css +1 -1
  364. package/lib/tag/index.wxss +1 -1
  365. package/lib/toast/demo/index.d.ts +1 -0
  366. package/lib/toast/demo/index.js +74 -0
  367. package/lib/toast/toast.js +3 -3
  368. package/lib/transition/demo/index.d.ts +1 -0
  369. package/lib/transition/demo/index.js +71 -0
  370. package/lib/tree-select/demo/index.d.ts +1 -0
  371. package/lib/tree-select/demo/index.js +130 -0
  372. package/lib/wxs/style.wxs +0 -7
  373. package/package.json +15 -3
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,101 @@
1
+ import { SmartComponent } from '../../common/component';
2
+ SmartComponent({
3
+ data: {
4
+ show1: false,
5
+ show2: false,
6
+ show3: false,
7
+ show4: false,
8
+ show5: false,
9
+ showSelect: false,
10
+ showSelect2: false,
11
+ showNumber: false,
12
+ showPicker: false,
13
+ action1: [{ name: 'Action' }, { name: 'Action' }, { name: 'Action' }],
14
+ action2: [
15
+ { name: I18n.t('coloringOptions'), color: '#ee0a24' },
16
+ { loading: true },
17
+ { name: I18n.t('disableOption'), disabled: true },
18
+ ],
19
+ actionSelect: [
20
+ { id: 0, name: 'Action', checked: true },
21
+ { id: 1, name: 'Action', checked: false },
22
+ { id: 2, name: 'Action', checked: false },
23
+ ],
24
+ currentNumber: 100,
25
+ currentDate: new Date(2018, 0, 1),
26
+ currentDateStr: new Date(2018, 0, 1).toLocaleDateString(),
27
+ minDate: new Date(2018, 0, 1).getTime(),
28
+ formatter(type, value) {
29
+ if (type === 'year') {
30
+ return `${value}${I18n.t('year')}`;
31
+ }
32
+ if (type === 'month') {
33
+ return `${value}${I18n.t('month')}`;
34
+ }
35
+ return value;
36
+ },
37
+ },
38
+ methods: {
39
+ toggle(type) {
40
+ this.setData({
41
+ [type]: !this.data[type],
42
+ });
43
+ },
44
+ toggleActionSheet1() {
45
+ this.toggle('show1');
46
+ },
47
+ toggleActionSheet2() {
48
+ this.toggle('show2');
49
+ },
50
+ toggleActionSheet3() {
51
+ this.toggle('show3');
52
+ },
53
+ toggleActionSheet4() {
54
+ this.toggle('show4');
55
+ },
56
+ toggleActionSheet5() {
57
+ this.toggle('show5');
58
+ },
59
+ toggleActionSheet6() {
60
+ this.toggle('show6');
61
+ },
62
+ toggleActionSheetSelect() {
63
+ this.toggle('showSelect');
64
+ },
65
+ toggleActionSheetSelect2() {
66
+ this.toggle('showSelect2');
67
+ },
68
+ toggleActionSheetNumber() {
69
+ this.toggle('showNumber');
70
+ },
71
+ toggleActionSheetPicker() {
72
+ this.toggle('showPicker');
73
+ },
74
+ onChange(event) {
75
+ this.setData({ currentNumber: event.detail.value });
76
+ },
77
+ onSelect(evt) {
78
+ const { id } = evt.detail;
79
+ const newActionSelect = this.data.actionSelect.map((item) => {
80
+ if (item.id === id)
81
+ return Object.assign(Object.assign({}, item), { checked: true });
82
+ return Object.assign(Object.assign({}, item), { checked: false });
83
+ });
84
+ this.setData({
85
+ actionSelect: newActionSelect,
86
+ });
87
+ },
88
+ onInput(event) {
89
+ const { detail } = event;
90
+ const date = new Date(detail);
91
+ this.setData({ currentDate: date });
92
+ },
93
+ onPickerConfirm() {
94
+ var _a, _b;
95
+ this.setData({
96
+ showPicker: false,
97
+ currentDateStr: (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.currentDate) === null || _b === void 0 ? void 0 : _b.toLocaleDateString(),
98
+ });
99
+ },
100
+ },
101
+ });
@@ -72,7 +72,7 @@ SmartComponent({
72
72
  if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
73
73
  wx.getUserProfile({
74
74
  desc: item.getUserProfileDesc || ' ',
75
- complete: (userProfile) => {
75
+ complete: userProfile => {
76
76
  this.$emit('getuserinfo', userProfile);
77
77
  },
78
78
  });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ var _a;
2
+ import { SmartComponent } from '../../common/component';
3
+ import Toast from '../../toast/toast';
4
+ const db = (_a = wx.cloud) === null || _a === void 0 ? void 0 : _a.database();
5
+ SmartComponent({
6
+ data: {
7
+ areaList: {},
8
+ loading: true,
9
+ value: 330302,
10
+ },
11
+ mounted() {
12
+ db === null || db === void 0 ? void 0 : db.collection('region').limit(1).get().then((res) => {
13
+ if (res.data && res.data.length > 0) {
14
+ this.setData({
15
+ loading: false,
16
+ areaList: res.data[0],
17
+ });
18
+ }
19
+ }).catch((err) => {
20
+ console.log(err);
21
+ this.setData({
22
+ loading: false,
23
+ });
24
+ });
25
+ },
26
+ methods: {
27
+ onChange(event) {
28
+ const { values } = event.detail;
29
+ Toast({
30
+ context: this,
31
+ message: values.map((item) => item.name).join('-'),
32
+ });
33
+ },
34
+ onConfirm(event) {
35
+ console.log(event);
36
+ },
37
+ onCancel(event) {
38
+ console.log(event);
39
+ },
40
+ },
41
+ });
@@ -65,8 +65,7 @@ SmartComponent({
65
65
  parseValues(values) {
66
66
  const { columnsPlaceholder } = this.data;
67
67
  return values.map((value, index) => {
68
- if (value &&
69
- (!value.code || value.name === columnsPlaceholder[index])) {
68
+ if (value && (!value.code || value.name === columnsPlaceholder[index])) {
70
69
  return Object.assign(Object.assign({}, value), { code: '', name: '' });
71
70
  }
72
71
  return value;
@@ -94,7 +93,7 @@ SmartComponent({
94
93
  }
95
94
  const { typeToColumnsPlaceholder } = this.data;
96
95
  const list = this.getConfig(type);
97
- let result = Object.keys(list).map((code) => ({
96
+ let result = Object.keys(list).map(code => ({
98
97
  code,
99
98
  name: list[code],
100
99
  }));
@@ -103,7 +102,7 @@ SmartComponent({
103
102
  if (code[0] === '9' && type === 'city') {
104
103
  code = '9';
105
104
  }
106
- result = result.filter((item) => item.code.indexOf(code) === 0);
105
+ result = result.filter(item => item.code.indexOf(code) === 0);
107
106
  }
108
107
  if (typeToColumnsPlaceholder[type] && result.length) {
109
108
  // set columns placeholder
@@ -185,7 +184,7 @@ SmartComponent({
185
184
  if (!picker) {
186
185
  return [];
187
186
  }
188
- return this.parseValues(picker.getValues().filter((value) => !!value));
187
+ return this.parseValues(picker.getValues().filter(value => !!value));
189
188
  },
190
189
  getDetail() {
191
190
  const values = this.getValues();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { SmartComponent } from '../../common/component';
2
+ SmartComponent({});
@@ -91,9 +91,7 @@ SmartComponent({
91
91
  toSvgCssBackground(svgString) {
92
92
  let res = svgString;
93
93
  res = svgString
94
- .replace('<svg', ~svgString.indexOf('xmlns')
95
- ? '<svg'
96
- : '<svg xmlns="http://www.w3.org/2000/svg"')
94
+ .replace('<svg', ~svgString.indexOf('xmlns') ? '<svg' : '<svg xmlns="http://www.w3.org/2000/svg"')
97
95
  .replace(/"/g, "'")
98
96
  .replace(/%/g, '%25')
99
97
  .replace(/#/g, '%23')
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { SmartComponent } from '../../common/component';
2
+ SmartComponent({
3
+ data: {
4
+ show1: false,
5
+ show2: false,
6
+ show3: false,
7
+ },
8
+ methods: {
9
+ toggle(type) {
10
+ this.setData({
11
+ [type]: !this.data[type],
12
+ });
13
+ },
14
+ toggleActionSheet1() {
15
+ this.toggle('show1');
16
+ },
17
+ toggleActionSheet2() {
18
+ this.toggle('show2');
19
+ },
20
+ toggleActionSheet3() {
21
+ this.toggle('show3');
22
+ },
23
+ },
24
+ });
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));max-height:var(--bottom-sheet-max-height,50%)!important;min-height:var(--bottom-sheet-min-height,auto);padding:var(--bottom-sheet-padding,0 16px);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)!important}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);text-align:center}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
1
+ @import '../common/index.css';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%)!important;min-height:var(--bottom-sheet-min-height,auto);padding:var(--bottom-sheet-padding,0 16px);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)!important}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);text-align:center}.smart-bottom-sheet__content{overflow-y:scroll}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
@@ -4,6 +4,7 @@ SmartComponent({
4
4
  props: {
5
5
  show: Boolean,
6
6
  title: String,
7
+ iconColor: String,
7
8
  iconSize: {
8
9
  type: null,
9
10
  value: 24,
@@ -31,13 +32,13 @@ SmartComponent({
31
32
  },
32
33
  data: {
33
34
  xmarkIcon,
34
- xmarkIconColor: '#3678E3',
35
+ xmarkIconColor: 'rgba(0, 0, 0, 0.5)',
35
36
  },
36
37
  mounted() {
37
38
  var _a;
38
39
  // @ts-ignore
39
40
  const themeInfo = (_a = ty === null || ty === void 0 ? void 0 : ty.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
40
- const xmarkIconColor = this.data.activeColor || themeInfo['--app-B4-N3'] || 'rgba(0, 0, 0, 0.5)';
41
+ const xmarkIconColor = this.data.iconColor || themeInfo['--app-B4-N3'] || 'rgba(0, 0, 0, 0.5)';
41
42
  this.setData({ xmarkIconColor });
42
43
  },
43
44
  methods: {
@@ -22,5 +22,7 @@
22
22
  {{ title }}
23
23
  <smart-icon bind:click="onClose" name="{{ xmarkIcon }}" class="smart-bottom-sheet__icon" size="{{ iconSize }}" color="{{ xmarkIconColor }}" />
24
24
  </view>
25
- <slot />
25
+ <view class="smart-bottom-sheet__content">
26
+ <slot />
27
+ </view>
26
28
  </smart-popup>
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));max-height:var(--bottom-sheet-max-height,50%)!important;min-height:var(--bottom-sheet-min-height,auto);padding:var(--bottom-sheet-padding,0 16px);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)!important}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);text-align:center}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
1
+ @import '../common/index.wxss';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%)!important;min-height:var(--bottom-sheet-min-height,auto);padding:var(--bottom-sheet-padding,0 16px);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)!important}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);text-align:center}.smart-bottom-sheet__content{overflow-y:scroll}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import iconAdd from '@tuya-miniapp/icons/dist/svg/PlusCircle';
2
+ import iconRight from '@tuya-miniapp/icons/dist/svg/Right';
3
+ import { SmartComponent } from '../../common/component';
4
+ SmartComponent({
5
+ data: {
6
+ iconAdd,
7
+ iconRight,
8
+ },
9
+ });
@@ -56,7 +56,7 @@ SmartComponent({
56
56
  wx.getUserProfile({
57
57
  desc: getUserProfileDesc || ' ',
58
58
  lang: lang || 'en',
59
- complete: (userProfile) => {
59
+ complete: userProfile => {
60
60
  this.$emit('getuserinfo', userProfile);
61
61
  },
62
62
  });
@@ -4,7 +4,7 @@
4
4
  <header
5
5
  title="{{ title }}"
6
6
  showTitle="{{ showTitle }}"
7
- subtitle="{{ mode === 'year' ? '' : mode === 'month' ? computed.formatYearTitle(currentDate, visibleIndex, locale.yearFormatter) : computed.formatMonthTitle(months[visibleIndex], subFormatter) }}"
7
+ subtitle="{{ type === 'year' ? '' : type === 'month' ? computed.formatYearTitle(currentDate, visibleIndex, locale.yearFormatter) : computed.formatMonthTitle(months[visibleIndex], subFormatter) }}"
8
8
  subFormatter="{{locale.subFormatter || 'YYYY-MM'}}"
9
9
  showSubtitle="{{ showSubtitle }}"
10
10
  firstDayOfWeek="{{ firstDayOfWeek }}"
@@ -13,12 +13,14 @@
13
13
  bind:click-prev="onPrev"
14
14
  bind:click-next="onNext"
15
15
  bind:click-save="onConfirm"
16
- hideWeek="{{ mode !== 'day' }}"
16
+ hideWeek="{{ type === 'year' || type === 'month' }}"
17
+ right-text="{{confirmText}}"
18
+ showConfirm="{{showConfirm}}"
17
19
  >
18
20
  <slot name="title" slot="title"></slot>
19
21
  </header>
20
22
 
21
- <block wx:if="{{mode === 'day'}}">
23
+ <block wx:if="{{ type !== 'year' && type !== 'month' }}">
22
24
  <view class="smart-calendar-month_wrap" wx:for="{{ months }}" wx:key="index">
23
25
  <month
24
26
  id="month{{ index }}"
@@ -47,25 +49,28 @@
47
49
  </view>
48
50
  </block>
49
51
 
50
- <block wx:if="{{mode === 'month'}}">
52
+ <block wx:if="{{type === 'month'}}">
51
53
  <month-list
52
54
  minDate="{{ minDate }}"
53
55
  maxDate="{{ maxDate }}"
54
56
  monthsFormatter="{{ locale.monthsFormatter }}"
55
57
  bind:click="onClickDate"
56
- date="{{defaultDate}}"
57
- visibleIndex="{{visibleIndex}}"
58
+ date="{{currentDate}}"
59
+ color="{{color}}"
60
+ readonly="{{readonly}}"
58
61
  />
59
62
  </block>
60
63
 
61
- <block wx:if="{{mode === 'year'}}">
64
+ <block wx:if="{{type === 'year'}}">
62
65
  <year-list
63
66
  minDate="{{ minDate }}"
64
67
  maxDate="{{ maxDate }}"
65
68
  yearFormatter="{{ locale.yearFormatter }}"
66
69
  bind:click="onClickDate"
67
- date="{{defaultDate}}"
70
+ date="{{currentDate}}"
68
71
  visibleIndex="{{visibleIndex}}"
72
+ color="{{color}}"
73
+ readonly="{{readonly}}"
69
74
  />
70
75
  </block>
71
76
 
@@ -1 +1 @@
1
- @import '../../../common/index.css';.smart-calendar__header{flex-shrink:0}.smart-calendar__header-title{position:relative}.smart-calendar__header-title-save{color:var(--calendar-header-title-save-color,#1989fa);font-size:16px;font-weight:400;letter-spacing:0;line-height:24px;position:absolute;right:48rpx;text-align:right;top:50%;transform:translateY(-50%)}.smart-calendar__header-subtitle,.smart-calendar__header-title{font-size:16px;font-weight:var(--font-weight-bold,500);font-weight:500;height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-subtitle_wrap{align-items:center;display:flex;justify-content:center;position:relative}.smart-calendar__header-subtitle_left{left:52rpx}.smart-calendar__header-subtitle_left,.smart-calendar__header-subtitle_right{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_right{right:52rpx}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex;margin-bottom:16rpx;margin-top:16rpx}.smart-calendar__weekday{color:var(--calendar-weekdays-font-color,var(--app-B4-N1,#000));flex:1;font-size:var(--calendar-weekdays-font-size,12px);font-weight:500;line-height:var(--calendar-weekdays-height,30px);opacity:.5;text-align:center}
1
+ @import '../../../common/index.css';.smart-calendar__header{flex-shrink:0}.smart-calendar__header-title{position:relative}.smart-calendar__header-title-save{color:var(--calendar-header-title-save-color,#1989fa);font-size:16px;font-weight:400;letter-spacing:0;line-height:24px;position:absolute;right:48rpx;text-align:right;top:50%;transform:translateY(-50%)}.smart-calendar__header-subtitle,.smart-calendar__header-title{color:var(--calendar-header-title-font-color,var(--app-B4-N1,#000));font-size:16px;font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-subtitle_wrap{align-items:center;display:flex;justify-content:center;position:relative}.smart-calendar__header-subtitle_left{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;left:52rpx;position:absolute;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_left_icon{left:-1px;position:relative}.smart-calendar__header-subtitle_right{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;position:absolute;right:52rpx;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_right_icon{position:relative;right:-1px}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex;margin-bottom:16rpx;margin-top:16rpx;padding-left:16rpx;padding-right:16rpx}.smart-calendar__weekday{color:var(--calendar-weekdays-font-color,var(--app-B4-N1,#000));flex:1;font-size:var(--calendar-weekdays-font-size,12px);font-weight:500;line-height:var(--calendar-weekdays-height,30px);opacity:.5;text-align:center}
@@ -5,17 +5,21 @@ SmartComponent({
5
5
  props: {
6
6
  title: {
7
7
  type: String,
8
- value: '日期选择',
8
+ value: 'Select Date',
9
9
  },
10
10
  rightText: {
11
11
  type: String,
12
- value: '保存',
12
+ value: 'Save',
13
13
  },
14
14
  subtitle: String,
15
15
  showTitle: Boolean,
16
16
  showSubtitle: Boolean,
17
17
  defaultWeeks: Array,
18
18
  hideWeek: Boolean,
19
+ showConfirm: {
20
+ type: Boolean,
21
+ value: true,
22
+ },
19
23
  firstDayOfWeek: {
20
24
  type: Number,
21
25
  observer: 'initWeekDay',
@@ -31,7 +35,7 @@ SmartComponent({
31
35
  },
32
36
  methods: {
33
37
  initWeekDay() {
34
- const defaultWeeks = this.properties.defaultWeeks;
38
+ const { defaultWeeks } = this.properties;
35
39
  const firstDayOfWeek = this.data.firstDayOfWeek || 0;
36
40
  this.setData({
37
41
  weekdays: [
@@ -3,19 +3,19 @@
3
3
  <view class="smart-calendar__header-title"><slot name="title"></slot></view>
4
4
  <view class="smart-calendar__header-title">
5
5
  {{ title }}
6
- <view class="smart-calendar__header-title-save" bind:tap=="onSave">{{ rightText }}</view>
6
+ <view class="smart-calendar__header-title-save" bind:tap="onSave" wx:if="{{showConfirm}}">{{ rightText }}</view>
7
7
  </view>
8
8
  </block>
9
9
 
10
10
  <view class="smart-calendar__header-subtitle_wrap">
11
11
  <view class="smart-calendar__header-subtitle_left" bind:tap="onPrev">
12
- <smart-icon name="{{LeftIcon}}" />
12
+ <smart-icon class="smart-calendar__header-subtitle_left_icon" name="{{LeftIcon}}" />
13
13
  </view>
14
14
  <view wx:if="{{ showSubtitle }}" class="smart-calendar__header-subtitle" bind:tap="onClickSubtitle">
15
15
  {{ subtitle }}
16
16
  </view>
17
17
  <view class="smart-calendar__header-subtitle_right" bind:tap="onNext">
18
- <smart-icon name="{{RightIcon}}" />
18
+ <smart-icon class="smart-calendar__header-subtitle_right_icon" name="{{RightIcon}}" />
19
19
  </view>
20
20
  </view>
21
21
 
@@ -1 +1 @@
1
- @import '../../../common/index.wxss';.smart-calendar__header{flex-shrink:0}.smart-calendar__header-title{position:relative}.smart-calendar__header-title-save{color:var(--calendar-header-title-save-color,#1989fa);font-size:16px;font-weight:400;letter-spacing:0;line-height:24px;position:absolute;right:48rpx;text-align:right;top:50%;transform:translateY(-50%)}.smart-calendar__header-subtitle,.smart-calendar__header-title{font-size:16px;font-weight:var(--font-weight-bold,500);font-weight:500;height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-subtitle_wrap{align-items:center;display:flex;justify-content:center;position:relative}.smart-calendar__header-subtitle_left{left:52rpx}.smart-calendar__header-subtitle_left,.smart-calendar__header-subtitle_right{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_right{right:52rpx}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex;margin-bottom:16rpx;margin-top:16rpx}.smart-calendar__weekday{color:var(--calendar-weekdays-font-color,var(--app-B4-N1,#000));flex:1;font-size:var(--calendar-weekdays-font-size,12px);font-weight:500;line-height:var(--calendar-weekdays-height,30px);opacity:.5;text-align:center}
1
+ @import '../../../common/index.wxss';.smart-calendar__header{flex-shrink:0}.smart-calendar__header-title{position:relative}.smart-calendar__header-title-save{color:var(--calendar-header-title-save-color,#1989fa);font-size:16px;font-weight:400;letter-spacing:0;line-height:24px;position:absolute;right:48rpx;text-align:right;top:50%;transform:translateY(-50%)}.smart-calendar__header-subtitle,.smart-calendar__header-title{color:var(--calendar-header-title-font-color,var(--app-B4-N1,#000));font-size:16px;font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-subtitle_wrap{align-items:center;display:flex;justify-content:center;position:relative}.smart-calendar__header-subtitle_left{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;left:52rpx;position:absolute;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_left_icon{left:-1px;position:relative}.smart-calendar__header-subtitle_right{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;position:absolute;right:52rpx;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_right_icon{position:relative;right:-1px}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex;margin-bottom:16rpx;margin-top:16rpx;padding-left:16rpx;padding-right:16rpx}.smart-calendar__weekday{color:var(--calendar-weekdays-font-color,var(--app-B4-N1,#000));flex:1;font-size:var(--calendar-weekdays-font-size,12px);font-weight:500;line-height:var(--calendar-weekdays-height,30px);opacity:.5;text-align:center}
@@ -1 +1 @@
1
- @import '../../../common/index.css';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{font-size:var(--calendar-day-font-size,15px);font-weight:500;height:var(--calendar-day-height,100rpx);position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-bottom-left-radius:34rpx;border-top-left-radius:34rpx}.smart-calendar__day--end{border-bottom-right-radius:34rpx;border-top-right-radius:34rpx}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-middle-color,var(--app-B3,#fff))}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#3678e3);border-radius:50%;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,34px);width:var(--calendar-selected-day-size,34px)}
1
+ @import '../../../common/index.css';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month{padding-bottom:48rpx;padding-left:16rpx;padding-right:16rpx}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{color:var(--calendar-cell-item-font-color,var(--app-B4-N1,#000));font-size:var(--calendar-cell-item-font-size,15px);font-weight:var(--calendar-day-font-weight,500);height:var(--calendar-day-height,100rpx);margin:4px 0;position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-bottom-left-radius:var(--calendar-day-select-border-radius,34rpx);border-top-left-radius:var(--calendar-day-select-border-radius,34rpx)}.smart-calendar__day--end{border-bottom-right-radius:var(--calendar-day-select-border-radius,34rpx);border-top-right-radius:var(--calendar-day-select-border-radius,34rpx)}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-middle-color,#fff)}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#3678e3);border-radius:50%;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,34px);width:var(--calendar-selected-day-size,34px)}
@@ -1,5 +1,5 @@
1
1
  import { SmartComponent } from '../../../common/component';
2
- import { getMonthEndDay, compareDay, getPrevDay, getNextDay, } from '../../utils';
2
+ import { getMonthEndDay, compareDay, getPrevDay, getNextDay } from '../../utils';
3
3
  SmartComponent({
4
4
  props: {
5
5
  date: {
@@ -82,7 +82,7 @@ SmartComponent({
82
82
  if (!Array.isArray(currentDate)) {
83
83
  return '';
84
84
  }
85
- const isSelected = (date) => currentDate.some((item) => compareDay(item, date) === 0);
85
+ const isSelected = date => currentDate.some(item => compareDay(item, date) === 0);
86
86
  if (isSelected(day)) {
87
87
  const prevDay = getPrevDay(day);
88
88
  const nextDay = getNextDay(day);
@@ -155,9 +155,7 @@ SmartComponent({
155
155
  return this.properties.rangeEnd || 'End';
156
156
  }
157
157
  if (type === 'start-end') {
158
- return ((this.properties.rangeStart || 'Start') +
159
- '/' +
160
- (this.properties.rangeEnd || 'End'));
158
+ return ((this.properties.rangeStart || 'Start') + '/' + (this.properties.rangeEnd || 'End'));
161
159
  }
162
160
  }
163
161
  },
@@ -49,10 +49,7 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
49
49
  function formatMonthTitle(date, formatter = 'YYYY-MM') {
50
50
  date = getDate(date);
51
51
  const year = date.getFullYear();
52
- const month =
53
- date.getMonth() + 1 < 10
54
- ? `0${date.getMonth() + 1}`
55
- : date.getMonth() + 1 + '';
52
+ const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1 + "";
56
53
  return formatter.replace('YYYY', year + '').replace('MM', month);
57
54
  }
58
55
 
@@ -1 +1 @@
1
- @import '../../../common/index.wxss';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{font-size:var(--calendar-day-font-size,15px);font-weight:500;height:var(--calendar-day-height,100rpx);position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-bottom-left-radius:34rpx;border-top-left-radius:34rpx}.smart-calendar__day--end{border-bottom-right-radius:34rpx;border-top-right-radius:34rpx}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-middle-color,var(--app-B3,#fff))}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#3678e3);border-radius:50%;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,34px);width:var(--calendar-selected-day-size,34px)}
1
+ @import '../../../common/index.wxss';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month{padding-bottom:48rpx;padding-left:16rpx;padding-right:16rpx}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{color:var(--calendar-cell-item-font-color,var(--app-B4-N1,#000));font-size:var(--calendar-cell-item-font-size,15px);font-weight:var(--calendar-day-font-weight,500);height:var(--calendar-day-height,100rpx);margin:4px 0;position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-bottom-left-radius:var(--calendar-day-select-border-radius,34rpx);border-top-left-radius:var(--calendar-day-select-border-radius,34rpx)}.smart-calendar__day--end{border-bottom-right-radius:var(--calendar-day-select-border-radius,34rpx);border-top-right-radius:var(--calendar-day-select-border-radius,34rpx)}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-middle-color,#fff)}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#3678e3);border-radius:50%;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,34px);width:var(--calendar-selected-day-size,34px)}
@@ -1 +1 @@
1
- @import '../../../common/index.css';.item{border-radius:50%;color:rgba(0,0,0,.9);font-size:15px;font-weight:500;line-height:104rpx;text-align:center}.item,.item_active{height:104rpx;width:104rpx}.item_active{background:#3678e3;color:#fff}.item_disabled{opacity:.5}
1
+ @import '../../../common/index.css';.contain{margin:24rpx 0}.item{border-radius:var(--calendar-cell-item-border-radius,104rpx);color:var(--calendar-cell-item-font-color,var(--app-B4-N1,#000));font-size:var(--calendar-cell-item-font-size,15px);font-weight:var(--calendar-day-font-weight,500);height:var(--calendar-cell-item-height,104rpx);line-height:var(--calendar-cell-item-height,104rpx);text-align:center;width:var(--calendar-cell-item-width,104rpx)}.item_active{background:#3678e3;color:#fff}.item_disabled{opacity:.5}.col_item{display:flex;justify-content:center}