@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,50 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var component_1 = require("../../common/component");
7
+ var notify_1 = __importDefault(require("../../notify/notify"));
8
+ (0, component_1.SmartComponent)({
9
+ methods: {
10
+ showNotify: function () {
11
+ (0, notify_1.default)({
12
+ context: this,
13
+ message: I18n.t('notificationContent'),
14
+ duration: 0,
15
+ transition: 'fade',
16
+ });
17
+ },
18
+ showCustomColor: function () {
19
+ (0, notify_1.default)({
20
+ context: this,
21
+ message: I18n.t('customColor'),
22
+ color: '#ad0000',
23
+ background: '#ffe1e1',
24
+ });
25
+ notify_1.default.clear();
26
+ },
27
+ showCustomDuration: function () {
28
+ (0, notify_1.default)({
29
+ context: this,
30
+ duration: 1000,
31
+ message: I18n.t('customDuration'),
32
+ });
33
+ },
34
+ showNotifyByType: function (event) {
35
+ var type = event.currentTarget.dataset.type;
36
+ (0, notify_1.default)({
37
+ type: type,
38
+ context: this,
39
+ message: I18n.t('notificationContent'),
40
+ });
41
+ },
42
+ showSafe: function () {
43
+ (0, notify_1.default)({
44
+ context: this,
45
+ message: I18n.t('notificationContent'),
46
+ safeAreaInsetTop: true,
47
+ });
48
+ },
49
+ },
50
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var component_1 = require("../../common/component");
4
+ (0, component_1.SmartComponent)({
5
+ data: {
6
+ show: false,
7
+ showEmbedded: false,
8
+ },
9
+ methods: {
10
+ onClickShow: function () {
11
+ this.setData({ show: true });
12
+ },
13
+ onClickHide: function () {
14
+ this.setData({ show: false });
15
+ },
16
+ onClickShowEmbedded: function () {
17
+ this.setData({ showEmbedded: true });
18
+ },
19
+ onClickHideEmbedded: function () {
20
+ this.setData({ showEmbedded: false });
21
+ },
22
+ noop: function () { },
23
+ },
24
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ var _a;
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var component_1 = require("../../common/component");
8
+ var toast_1 = __importDefault(require("../../toast/toast"));
9
+ (0, component_1.SmartComponent)({
10
+ data: {
11
+ activeIndex: 3,
12
+ column1: [I18n.t('hangzhou'), I18n.t('ningbo'), I18n.t('wenzhou'), I18n.t('jiaxing'), I18n.t('huzhou')],
13
+ column2: [
14
+ { text: I18n.t('hangzhou'), disabled: true },
15
+ { text: I18n.t('ningbo') },
16
+ { text: I18n.t('wenzhou') },
17
+ ],
18
+ column3: (_a = {},
19
+ _a[I18n.t('zhejiang')] = [I18n.t('hangzhou'), I18n.t('ningbo'), I18n.t('wenzhou'), I18n.t('jiaxing'), I18n.t('huzhou')],
20
+ _a[I18n.t('fujian')] = [I18n.t('fuzhou'), I18n.t('xiamen'), I18n.t('putian'), I18n.t('sanming'), I18n.t('quanzhou')],
21
+ _a),
22
+ column4: [
23
+ {
24
+ values: [I18n.t('zhejiang'), I18n.t('fujian')],
25
+ className: 'column1',
26
+ unit: I18n.t('province'),
27
+ },
28
+ {
29
+ values: [I18n.t('hangzhou'), I18n.t('ningbo'), I18n.t('wenzhou'), I18n.t('jiaxing'), I18n.t('huzhou')],
30
+ className: 'column2',
31
+ defaultIndex: 2,
32
+ unit: I18n.t('city'),
33
+ },
34
+ ],
35
+ column5: [
36
+ {
37
+ values: new Array(100).fill(1).map(function (x, i) { return i; }),
38
+ style: 'flex: none;width: auto;min-width: 61px;'
39
+ },
40
+ {
41
+ values: ['.'],
42
+ style: 'flex: none;width: 8px;display:flex;justify-content: center;'
43
+ },
44
+ {
45
+ values: new Array(20).fill(1).map(function (x, i) { return i; }),
46
+ style: 'flex: none;width: auto;min-width: 61px;',
47
+ unit: 'Kg',
48
+ },
49
+ ],
50
+ },
51
+ methods: {
52
+ onChange1: function (event) {
53
+ var _a = event.detail, value = _a.value, index = _a.index;
54
+ (0, toast_1.default)({
55
+ context: this,
56
+ message: "Value: ".concat(value, ", Index\uFF1A").concat(index),
57
+ });
58
+ // this.setData({
59
+ // column1: new Array(200).fill(1).map((v, i) => `杭州${i}`),
60
+ // activeIndex: 50,
61
+ // });
62
+ },
63
+ onConfirm: function (event) {
64
+ var _a = event.detail, value = _a.value, index = _a.index;
65
+ (0, toast_1.default)({
66
+ context: this,
67
+ message: "Value: ".concat(value, ", Index\uFF1A").concat(index),
68
+ });
69
+ },
70
+ onCancel: function () {
71
+ (0, toast_1.default)({
72
+ context: this,
73
+ message: I18n.t('cancel'),
74
+ });
75
+ },
76
+ onChange2: function (event) {
77
+ var _a = event.detail, picker = _a.picker, value = _a.value;
78
+ picker.setColumnValues(1, this.data.column3[value[0]]);
79
+ getApp().picker = picker;
80
+ },
81
+ },
82
+ });
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
1
+ @import '../common/index.css';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;justify-content:center;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
@@ -146,9 +146,7 @@ var shared_1 = require("./shared");
146
146
  // set values of all columns
147
147
  setValues: function (values) {
148
148
  var _this = this;
149
- var stack = values.map(function (value, index) {
150
- return _this.setColumnValue(index, value);
151
- });
149
+ var stack = values.map(function (value, index) { return _this.setColumnValue(index, value); });
152
150
  return Promise.all(stack);
153
151
  },
154
152
  // get indexes of all columns
@@ -19,6 +19,7 @@
19
19
  data-index="{{ index }}"
20
20
  custom-class="column-class"
21
21
  value-key="{{ valueKey }}"
22
+ style="{{ item.style }}"
22
23
  options="{{ item.values }}"
23
24
  unit="{{ item.unit || unit }}"
24
25
  default-index="{{ item.defaultIndex || defaultIndex }}"
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
1
+ @import '../common/index.wxss';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;justify-content:center;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
@@ -105,9 +105,7 @@ var DEFAULT_DURATION = 200;
105
105
  var maxText_1 = '';
106
106
  options.forEach(function (option) {
107
107
  var _a;
108
- var value = (0, validator_1.isObj)(option)
109
- ? (_a = option[valueKey]) === null || _a === void 0 ? void 0 : _a.toString()
110
- : option === null || option === void 0 ? void 0 : option.toString();
108
+ var value = (0, validator_1.isObj)(option) ? (_a = option[valueKey]) === null || _a === void 0 ? void 0 : _a.toString() : option === null || option === void 0 ? void 0 : option.toString();
111
109
  if (maxText_1.length < value.length) {
112
110
  maxText_1 = value;
113
111
  }
@@ -157,9 +155,7 @@ var DEFAULT_DURATION = 200;
157
155
  },
158
156
  getOptionText: function (option) {
159
157
  var data = this.data;
160
- return (0, validator_1.isObj)(option) && data.valueKey in option
161
- ? option[data.valueKey]
162
- : option;
158
+ return (0, validator_1.isObj)(option) && data.valueKey in option ? option[data.valueKey] : option;
163
159
  },
164
160
  setIndex: function (index, userAction, animate) {
165
161
  var _this = this;
@@ -183,7 +179,6 @@ var DEFAULT_DURATION = 200;
183
179
  _this.$emit('change', index);
184
180
  return;
185
181
  }
186
- ;
187
182
  _this.fireChange = true;
188
183
  });
189
184
  });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
7
+ var component_1 = require("../../common/component");
8
+ (0, component_1.SmartComponent)({
9
+ data: {
10
+ show: {
11
+ basic: false,
12
+ top: false,
13
+ bottom: false,
14
+ left: false,
15
+ right: false,
16
+ round: false,
17
+ closeIcon: false,
18
+ customCloseIcon: false,
19
+ customIconPosition: false,
20
+ },
21
+ rightIcon: Right_1.default,
22
+ },
23
+ methods: {
24
+ toggle: function (type, show) {
25
+ var _a;
26
+ this.setData((_a = {},
27
+ _a["show.".concat(type)] = show,
28
+ _a));
29
+ },
30
+ showBasic: function () {
31
+ this.toggle('basic', true);
32
+ },
33
+ hideBasic: function () {
34
+ this.toggle('basic', false);
35
+ },
36
+ showTop: function () {
37
+ this.toggle('top', true);
38
+ },
39
+ hideTop: function () {
40
+ this.toggle('top', false);
41
+ },
42
+ showLeft: function () {
43
+ this.toggle('left', true);
44
+ },
45
+ hideLeft: function () {
46
+ this.toggle('left', false);
47
+ },
48
+ showRight: function () {
49
+ this.toggle('right', true);
50
+ },
51
+ hideRight: function () {
52
+ this.toggle('right', false);
53
+ },
54
+ showBottom: function () {
55
+ this.toggle('bottom', true);
56
+ },
57
+ hideBottom: function () {
58
+ this.toggle('bottom', false);
59
+ },
60
+ showRound: function () {
61
+ this.toggle('round', true);
62
+ },
63
+ hideRound: function () {
64
+ this.toggle('round', false);
65
+ },
66
+ showCloseIcon: function () {
67
+ this.toggle('closeIcon', true);
68
+ },
69
+ hideCloseIcon: function () {
70
+ this.toggle('closeIcon', false);
71
+ },
72
+ showCustomCloseIcon: function () {
73
+ this.toggle('customCloseIcon', true);
74
+ },
75
+ hideCustomCloseIcon: function () {
76
+ this.toggle('customCloseIcon', false);
77
+ },
78
+ showCustomIconPosition: function () {
79
+ this.toggle('customIconPosition', true);
80
+ },
81
+ hideCustomIconPosition: function () {
82
+ this.toggle('customIconPosition', false);
83
+ },
84
+ },
85
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var component_1 = require("../../common/component");
4
+ (0, component_1.SmartComponent)({
5
+ data: {},
6
+ });
@@ -39,10 +39,7 @@ var utils_1 = require("../common/utils");
39
39
  methods: {
40
40
  setLeft: function () {
41
41
  var _this = this;
42
- Promise.all([
43
- (0, utils_1.getRect)(this, '.smart-progress'),
44
- (0, utils_1.getRect)(this, '.smart-progress__pivot'),
45
- ]).then(function (_a) {
42
+ Promise.all([(0, utils_1.getRect)(this, '.smart-progress'), (0, utils_1.getRect)(this, '.smart-progress__pivot')]).then(function (_a) {
46
43
  var portion = _a[0], pivot = _a[1];
47
44
  if (portion && pivot) {
48
45
  _this.setData({
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var component_1 = require("../../common/component");
4
+ (0, component_1.SmartComponent)({
5
+ data: {
6
+ radioBasic: '1',
7
+ radioDisabled: '2',
8
+ radioColor: '1',
9
+ radioText: '1',
10
+ radioHoriz: '1',
11
+ radioIcon: '1',
12
+ radioSize: '1',
13
+ radioLabel: '1',
14
+ radioShape: '1',
15
+ radioCell: '1',
16
+ icon: {
17
+ normal: 'https://images.tuyacn.com/content-platform/hestia/1729664215ebd89f13e54.png',
18
+ active: 'https://images.tuyacn.com/content-platform/hestia/1730877912e76cbdb7563.png',
19
+ },
20
+ },
21
+ methods: {
22
+ onChange: function (event) {
23
+ var _a;
24
+ var key = event.currentTarget.dataset.key;
25
+ this.setData((_a = {}, _a[key] = event.detail, _a));
26
+ },
27
+ onClick: function (event) {
28
+ var name = event.currentTarget.dataset.name;
29
+ this.setData({
30
+ radioCell: name,
31
+ });
32
+ },
33
+ },
34
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var Icloud_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Icloud"));
7
+ var XmarkIcloud_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/XmarkIcloud"));
8
+ var component_1 = require("../../common/component");
9
+ var toast_1 = __importDefault(require("../../toast/toast"));
10
+ (0, component_1.SmartComponent)({
11
+ data: {
12
+ value1: 3,
13
+ value2: 3,
14
+ value3: 3,
15
+ value4: 2.5,
16
+ value5: 4,
17
+ value6: 3,
18
+ value8: 2,
19
+ icon: Icloud_1.default,
20
+ voidIcon: XmarkIcloud_1.default,
21
+ },
22
+ methods: {
23
+ onChange: function (event) {
24
+ (0, toast_1.default)({
25
+ context: this,
26
+ message: I18n.t('currentValue') + event.detail,
27
+ });
28
+ },
29
+ },
30
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var component_1 = require("../../common/component");
7
+ var TriangleDown_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/TriangleDown"));
8
+ (0, component_1.SmartComponent)({
9
+ data: {
10
+ value: '',
11
+ icon: TriangleDown_1.default,
12
+ },
13
+ methods: {
14
+ onChange: function (e) {
15
+ this.setData({
16
+ value: e.detail,
17
+ });
18
+ },
19
+ onSearch: function (event) {
20
+ if (event.detail) {
21
+ wx.showToast({
22
+ title: I18n.t('searchText') + ': ' + event.detail,
23
+ icon: 'none',
24
+ });
25
+ }
26
+ },
27
+ onClick: function () {
28
+ if (this.data.value) {
29
+ wx.showToast({
30
+ title: I18n.t('searchText') + ': ' + this.data.value,
31
+ icon: 'none',
32
+ });
33
+ }
34
+ },
35
+ onCancel: function () {
36
+ wx.showToast({
37
+ title: I18n.t('cancel'),
38
+ icon: 'none',
39
+ });
40
+ },
41
+ onClear: function () {
42
+ wx.showToast({
43
+ title: I18n.t('clear'),
44
+ icon: 'none',
45
+ });
46
+ },
47
+ },
48
+ });
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:.4}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:.4}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:12px;margin-right:12px;width:1px}
1
+ @import '../common/index.css';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:var(--search-submit-line-height,12px);margin-right:12px;width:var(--search-submit-line-width,1px)}
@@ -32,11 +32,7 @@ var Close_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Close"));
32
32
  rightIcon: String,
33
33
  placeholder: String,
34
34
  placeholderStyle: String,
35
- searchText: {
36
- type: String,
37
- value: 'Search',
38
- },
39
- showSearchButton: Boolean,
35
+ searchText: String,
40
36
  background: String,
41
37
  actionText: {
42
38
  type: String,
@@ -40,7 +40,7 @@
40
40
  <smart-icon wx:if="{{ !useLeftIconSlot && leftIcon }}" size="18" name="{{ leftIcon }}" custom-class="smart-search__field__left-icon" slot="left-icon" />
41
41
  <slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
42
42
  <slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
43
- <view wx:if="{{ showSearchButton && searchText }}" hover-class="smart-search__hover" bind:tap="goSearch" class="smart-search__submit" slot="button" >{{ searchText }}</view>
43
+ <view wx:if="{{ searchText }}" hover-class="smart-search__hover" bind:tap="goSearch" class="smart-search__submit" slot="button" >{{ searchText }}</view>
44
44
  <slot name="search-button" slot="button" />
45
45
  </smart-field>
46
46
  </view>
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:.4}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:.4}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:12px;margin-right:12px;width:1px}
1
+ @import '../common/index.wxss';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:var(--search-submit-line-height,12px);margin-right:12px;width:var(--search-submit-line-width,1px)}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var component_1 = require("../../common/component");
7
+ var toast_1 = __importDefault(require("../../toast/toast"));
8
+ (0, component_1.SmartComponent)({
9
+ methods: {
10
+ onChange: function (event) {
11
+ (0, toast_1.default)({ context: this, message: "".concat(I18n.t('switchTo')).concat(event.detail).concat(I18n.t('item')) });
12
+ },
13
+ },
14
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var component_1 = require("../../common/component");
4
+ (0, component_1.SmartComponent)({
5
+ data: {
6
+ show: false,
7
+ },
8
+ methods: {
9
+ onChange: function (_a) {
10
+ var detail = _a.detail;
11
+ this.setData({ show: detail });
12
+ },
13
+ },
14
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var component_1 = require("../../common/component");
4
+ (0, component_1.SmartComponent)({
5
+ data: {
6
+ currentValue: 50,
7
+ },
8
+ methods: {
9
+ onChange: function (event) {
10
+ wx.showToast({
11
+ icon: 'none',
12
+ title: "".concat(I18n.t('currentValue')).concat(event.detail),
13
+ });
14
+ },
15
+ onDrag: function (event) {
16
+ this.setData({
17
+ currentValue: event.detail.value,
18
+ });
19
+ },
20
+ },
21
+ });
@@ -111,9 +111,7 @@ var DRAG_STATUS = {
111
111
  (0, utils_1.getRect)(this, '.smart-slider').then(function (rect) {
112
112
  var vertical = _this.data.vertical;
113
113
  var touch = event.touches[0];
114
- var delta = vertical
115
- ? touch.clientY - rect.top
116
- : touch.clientX - rect.left;
114
+ var delta = vertical ? touch.clientY - rect.top : touch.clientX - rect.left;
117
115
  var total = vertical ? rect.height : rect.width;
118
116
  var value = Number(min) + (delta / total) * _this.getRange();
119
117
  if (_this.isRange(_this.value)) {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var component_1 = require("../../common/component");
7
+ var toast_1 = __importDefault(require("../../toast/toast"));
8
+ (0, component_1.SmartComponent)({
9
+ data: {
10
+ value: 1,
11
+ },
12
+ methods: {
13
+ onChange: function (event) {
14
+ var _this = this;
15
+ toast_1.default.loading({
16
+ context: this,
17
+ forbidClick: true,
18
+ });
19
+ setTimeout(function () {
20
+ toast_1.default.clear();
21
+ _this.setData({ value: event.detail });
22
+ }, 500);
23
+ },
24
+ },
25
+ });
@@ -0,0 +1 @@
1
+ export {};