@tuya-miniapp/smart-ui 0.0.1-beta-6 → 1.0.0-beta-1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (616) hide show
  1. package/README.md +2 -2
  2. package/dist/action-sheet/index.css +1 -1
  3. package/dist/action-sheet/index.js +2 -2
  4. package/dist/action-sheet/index.json +3 -3
  5. package/dist/action-sheet/index.wxml +15 -15
  6. package/dist/action-sheet/index.wxss +1 -1
  7. package/dist/area/index.js +3 -3
  8. package/dist/area/index.json +1 -1
  9. package/dist/area/index.wxml +2 -2
  10. package/dist/battery/index.js +2 -2
  11. package/dist/button/index.css +1 -1
  12. package/dist/button/index.js +3 -3
  13. package/dist/button/index.json +2 -2
  14. package/dist/button/index.wxml +9 -9
  15. package/dist/button/index.wxss +1 -1
  16. package/dist/calendar/calendar.wxml +5 -5
  17. package/dist/calendar/components/header/index.css +1 -1
  18. package/dist/calendar/components/header/index.js +2 -2
  19. package/dist/calendar/components/header/index.wxml +6 -6
  20. package/dist/calendar/components/header/index.wxss +1 -1
  21. package/dist/calendar/components/month/index.css +1 -1
  22. package/dist/calendar/components/month/index.js +2 -2
  23. package/dist/calendar/components/month/index.wxml +9 -9
  24. package/dist/calendar/components/month/index.wxss +1 -1
  25. package/dist/calendar/index.css +1 -1
  26. package/dist/calendar/index.js +3 -3
  27. package/dist/calendar/index.json +3 -3
  28. package/dist/calendar/index.wxml +5 -5
  29. package/dist/calendar/index.wxss +1 -1
  30. package/dist/cascader/index.css +1 -1
  31. package/dist/cascader/index.js +3 -2
  32. package/dist/cascader/index.json +3 -3
  33. package/dist/cascader/index.wxml +13 -13
  34. package/dist/cascader/index.wxss +1 -1
  35. package/dist/cell/index.css +1 -1
  36. package/dist/cell/index.js +2 -2
  37. package/dist/cell/index.json +1 -1
  38. package/dist/cell/index.wxml +10 -10
  39. package/dist/cell/index.wxss +1 -1
  40. package/dist/cell-group/index.css +1 -1
  41. package/dist/cell-group/index.js +2 -2
  42. package/dist/cell-group/index.wxml +1 -1
  43. package/dist/cell-group/index.wxss +1 -1
  44. package/dist/checkbox/index.css +1 -1
  45. package/dist/checkbox/index.js +2 -2
  46. package/dist/checkbox/index.json +1 -1
  47. package/dist/checkbox/index.wxml +2 -2
  48. package/dist/checkbox/index.wxss +1 -1
  49. package/dist/checkbox-group/index.css +1 -1
  50. package/dist/checkbox-group/index.js +2 -2
  51. package/dist/checkbox-group/index.wxss +1 -1
  52. package/dist/circle/index.css +1 -1
  53. package/dist/circle/index.js +2 -2
  54. package/dist/circle/index.wxml +6 -6
  55. package/dist/circle/index.wxss +1 -1
  56. package/dist/col/index.css +1 -1
  57. package/dist/col/index.js +2 -2
  58. package/dist/col/index.wxml +1 -1
  59. package/dist/col/index.wxss +1 -1
  60. package/dist/collapse/index.js +2 -2
  61. package/dist/collapse/index.wxml +1 -1
  62. package/dist/collapse-item/animate.js +1 -1
  63. package/dist/collapse-item/index.css +1 -1
  64. package/dist/collapse-item/index.js +2 -2
  65. package/dist/collapse-item/index.json +1 -1
  66. package/dist/collapse-item/index.wxml +7 -7
  67. package/dist/collapse-item/index.wxss +1 -1
  68. package/dist/common/component.d.ts +3 -3
  69. package/dist/common/component.js +5 -5
  70. package/dist/common/index.css +1 -1
  71. package/dist/common/index.wxss +1 -1
  72. package/dist/common/style/clearfix.css +1 -1
  73. package/dist/common/style/clearfix.wxss +1 -1
  74. package/dist/common/style/ellipsis.css +1 -1
  75. package/dist/common/style/ellipsis.wxss +1 -1
  76. package/dist/common/style/hairline.css +1 -1
  77. package/dist/common/style/hairline.wxss +1 -1
  78. package/dist/config-provider/index.js +2 -2
  79. package/dist/config-provider/index.wxml +1 -1
  80. package/dist/count-down/index.css +1 -1
  81. package/dist/count-down/index.js +2 -2
  82. package/dist/count-down/index.wxml +1 -1
  83. package/dist/count-down/index.wxss +1 -1
  84. package/dist/custom-keyboard/index.js +2 -2
  85. package/dist/custom-keyboard/index.json +4 -4
  86. package/dist/custom-keyboard/index.wxml +2 -2
  87. package/dist/datetime-picker/index.js +3 -3
  88. package/dist/datetime-picker/index.json +1 -1
  89. package/dist/datetime-picker/index.wxml +2 -2
  90. package/dist/definitions/index.d.ts +4 -3
  91. package/dist/dialog/index.css +1 -1
  92. package/dist/dialog/index.js +2 -2
  93. package/dist/dialog/index.json +5 -5
  94. package/dist/dialog/index.wxml +25 -25
  95. package/dist/dialog/index.wxss +1 -1
  96. package/dist/divider/index.css +1 -1
  97. package/dist/divider/index.js +2 -2
  98. package/dist/divider/index.wxss +1 -1
  99. package/dist/dropdown-item/index.css +1 -1
  100. package/dist/dropdown-item/index.js +2 -2
  101. package/dist/dropdown-item/index.json +3 -3
  102. package/dist/dropdown-item/index.wxml +7 -7
  103. package/dist/dropdown-item/index.wxss +1 -1
  104. package/dist/dropdown-menu/index.css +1 -1
  105. package/dist/dropdown-menu/index.js +3 -3
  106. package/dist/dropdown-menu/index.wxml +2 -2
  107. package/dist/dropdown-menu/index.wxss +1 -1
  108. package/dist/empty/index.css +1 -1
  109. package/dist/empty/index.js +2 -2
  110. package/dist/empty/index.wxml +7 -7
  111. package/dist/empty/index.wxs +7 -6
  112. package/dist/empty/index.wxss +1 -1
  113. package/dist/field/index.css +1 -1
  114. package/dist/field/index.js +15 -3
  115. package/dist/field/index.json +2 -2
  116. package/dist/field/index.wxml +10 -10
  117. package/dist/field/index.wxss +1 -1
  118. package/dist/field/props.js +1 -9
  119. package/dist/goods-action/index.css +1 -1
  120. package/dist/goods-action/index.js +2 -2
  121. package/dist/goods-action/index.wxss +1 -1
  122. package/dist/goods-action-button/index.css +1 -1
  123. package/dist/goods-action-button/index.js +2 -2
  124. package/dist/goods-action-button/index.json +1 -1
  125. package/dist/goods-action-button/index.wxml +3 -3
  126. package/dist/goods-action-button/index.wxss +1 -1
  127. package/dist/goods-action-icon/index.css +1 -1
  128. package/dist/goods-action-icon/index.js +3 -3
  129. package/dist/goods-action-icon/index.json +2 -2
  130. package/dist/goods-action-icon/index.wxml +5 -5
  131. package/dist/goods-action-icon/index.wxss +1 -1
  132. package/dist/grid/index.css +1 -1
  133. package/dist/grid/index.js +2 -2
  134. package/dist/grid/index.wxml +1 -1
  135. package/dist/grid/index.wxss +1 -1
  136. package/dist/grid-item/index.css +1 -1
  137. package/dist/grid-item/index.js +3 -3
  138. package/dist/grid-item/index.json +1 -1
  139. package/dist/grid-item/index.wxml +4 -4
  140. package/dist/grid-item/index.wxss +1 -1
  141. package/dist/icon/index.css +1 -1
  142. package/dist/icon/index.js +3 -3
  143. package/dist/icon/index.json +1 -1
  144. package/dist/icon/index.wxml +4 -4
  145. package/dist/icon/index.wxs +6 -7
  146. package/dist/icon/index.wxss +1 -1
  147. package/dist/image/index.css +1 -1
  148. package/dist/image/index.js +2 -2
  149. package/dist/image/index.json +2 -2
  150. package/dist/image/index.wxml +5 -5
  151. package/dist/image/index.wxss +1 -1
  152. package/dist/index-anchor/index.css +1 -1
  153. package/dist/index-anchor/index.js +3 -3
  154. package/dist/index-anchor/index.wxml +2 -2
  155. package/dist/index-anchor/index.wxss +1 -1
  156. package/dist/index-bar/index.css +1 -1
  157. package/dist/index-bar/index.js +6 -6
  158. package/dist/index-bar/index.wxml +3 -3
  159. package/dist/index-bar/index.wxss +1 -1
  160. package/dist/info/index.css +1 -1
  161. package/dist/info/index.js +2 -2
  162. package/dist/info/index.wxml +1 -1
  163. package/dist/info/index.wxss +1 -1
  164. package/dist/loading/index.css +1 -1
  165. package/dist/loading/index.js +2 -2
  166. package/dist/loading/index.wxml +3 -3
  167. package/dist/loading/index.wxss +1 -1
  168. package/dist/mixins/basic.js +15 -0
  169. package/dist/mixins/page-scroll.js +10 -10
  170. package/dist/mixins/transition.js +4 -4
  171. package/dist/nav-bar/index.css +1 -1
  172. package/dist/nav-bar/index.js +4 -4
  173. package/dist/nav-bar/index.json +1 -1
  174. package/dist/nav-bar/index.wxml +11 -11
  175. package/dist/nav-bar/index.wxss +1 -1
  176. package/dist/normal-slider/index.js +2 -2
  177. package/dist/notice-bar/index.css +1 -1
  178. package/dist/notice-bar/index.js +4 -4
  179. package/dist/notice-bar/index.json +1 -1
  180. package/dist/notice-bar/index.wxml +7 -7
  181. package/dist/notice-bar/index.wxss +1 -1
  182. package/dist/notify/index.css +1 -1
  183. package/dist/notify/index.js +2 -2
  184. package/dist/notify/index.json +1 -1
  185. package/dist/notify/index.wxml +4 -4
  186. package/dist/notify/index.wxss +1 -1
  187. package/dist/notify/notify.js +2 -2
  188. package/dist/overlay/index.css +1 -1
  189. package/dist/overlay/index.js +2 -2
  190. package/dist/overlay/index.json +1 -1
  191. package/dist/overlay/index.wxss +1 -1
  192. package/dist/overlay/overlay.wxml +3 -3
  193. package/dist/picker/index.css +1 -1
  194. package/dist/picker/index.js +3 -3
  195. package/dist/picker/index.wxml +5 -5
  196. package/dist/picker/index.wxss +1 -1
  197. package/dist/picker/toolbar.wxml +6 -6
  198. package/dist/picker-column/index.css +1 -1
  199. package/dist/picker-column/index.js +2 -2
  200. package/dist/picker-column/index.wxml +6 -6
  201. package/dist/picker-column/index.wxss +1 -1
  202. package/dist/popup/index.css +1 -1
  203. package/dist/popup/index.js +2 -2
  204. package/dist/popup/index.json +2 -2
  205. package/dist/popup/index.wxml +1 -1
  206. package/dist/popup/index.wxss +1 -1
  207. package/dist/popup/popup.wxml +2 -2
  208. package/dist/progress/index.css +1 -1
  209. package/dist/progress/index.js +4 -4
  210. package/dist/progress/index.wxml +3 -3
  211. package/dist/progress/index.wxss +1 -1
  212. package/dist/radio/index.css +1 -1
  213. package/dist/radio/index.js +2 -2
  214. package/dist/radio/index.json +1 -1
  215. package/dist/radio/index.wxml +2 -2
  216. package/dist/radio/index.wxss +1 -1
  217. package/dist/radio-group/index.css +1 -1
  218. package/dist/radio-group/index.js +2 -2
  219. package/dist/radio-group/index.wxss +1 -1
  220. package/dist/rate/index.css +1 -1
  221. package/dist/rate/index.js +7 -7
  222. package/dist/rate/index.json +1 -1
  223. package/dist/rate/index.wxml +2 -2
  224. package/dist/rate/index.wxss +1 -1
  225. package/dist/row/index.css +1 -1
  226. package/dist/row/index.js +2 -2
  227. package/dist/row/index.wxml +1 -1
  228. package/dist/row/index.wxss +1 -1
  229. package/dist/search/index.css +1 -1
  230. package/dist/search/index.js +2 -2
  231. package/dist/search/index.json +1 -1
  232. package/dist/search/index.wxml +7 -7
  233. package/dist/search/index.wxss +1 -1
  234. package/dist/sidebar/index.css +1 -1
  235. package/dist/sidebar/index.js +2 -2
  236. package/dist/sidebar/index.wxml +1 -1
  237. package/dist/sidebar/index.wxss +1 -1
  238. package/dist/sidebar-item/index.css +1 -1
  239. package/dist/sidebar-item/index.js +2 -2
  240. package/dist/sidebar-item/index.json +1 -1
  241. package/dist/sidebar-item/index.wxml +3 -3
  242. package/dist/sidebar-item/index.wxss +1 -1
  243. package/dist/skeleton/index.css +1 -1
  244. package/dist/skeleton/index.js +2 -2
  245. package/dist/skeleton/index.wxss +1 -1
  246. package/dist/slider/index.css +1 -1
  247. package/dist/slider/index.js +4 -4
  248. package/dist/slider/index.wxss +1 -1
  249. package/dist/stepper/index.css +1 -1
  250. package/dist/stepper/index.js +2 -2
  251. package/dist/stepper/index.wxml +4 -4
  252. package/dist/stepper/index.wxss +1 -1
  253. package/dist/steps/index.css +1 -1
  254. package/dist/steps/index.js +2 -2
  255. package/dist/steps/index.json +1 -1
  256. package/dist/steps/index.wxml +9 -9
  257. package/dist/steps/index.wxss +1 -1
  258. package/dist/sticky/index.css +1 -1
  259. package/dist/sticky/index.js +3 -3
  260. package/dist/sticky/index.wxml +1 -1
  261. package/dist/sticky/index.wxss +1 -1
  262. package/dist/swipe-cell/index.css +1 -1
  263. package/dist/swipe-cell/index.js +2 -2
  264. package/dist/swipe-cell/index.wxml +3 -3
  265. package/dist/swipe-cell/index.wxss +1 -1
  266. package/dist/switch/index.css +1 -1
  267. package/dist/switch/index.js +2 -2
  268. package/dist/switch/index.json +1 -1
  269. package/dist/switch/index.wxml +3 -3
  270. package/dist/switch/index.wxss +1 -1
  271. package/dist/tab/index.css +1 -1
  272. package/dist/tab/index.js +2 -2
  273. package/dist/tab/index.wxss +1 -1
  274. package/dist/tabbar/index.css +1 -1
  275. package/dist/tabbar/index.js +3 -3
  276. package/dist/tabbar/index.wxss +1 -1
  277. package/dist/tabbar-item/index.css +1 -1
  278. package/dist/tabbar-item/index.js +3 -3
  279. package/dist/tabbar-item/index.json +2 -2
  280. package/dist/tabbar-item/index.wxml +6 -6
  281. package/dist/tabbar-item/index.wxss +1 -1
  282. package/dist/tabs/index.css +1 -1
  283. package/dist/tabs/index.js +7 -7
  284. package/dist/tabs/index.json +2 -2
  285. package/dist/tabs/index.wxml +9 -9
  286. package/dist/tabs/index.wxs +1 -1
  287. package/dist/tabs/index.wxss +1 -1
  288. package/dist/tag/index.css +1 -1
  289. package/dist/tag/index.js +2 -2
  290. package/dist/tag/index.json +1 -1
  291. package/dist/tag/index.wxml +2 -2
  292. package/dist/tag/index.wxss +1 -1
  293. package/dist/toast/index.css +1 -1
  294. package/dist/toast/index.js +2 -2
  295. package/dist/toast/index.json +4 -4
  296. package/dist/toast/index.wxml +9 -9
  297. package/dist/toast/index.wxss +1 -1
  298. package/dist/toast/toast.js +2 -2
  299. package/dist/transition/index.css +1 -1
  300. package/dist/transition/index.js +2 -2
  301. package/dist/transition/index.wxml +1 -1
  302. package/dist/transition/index.wxss +1 -1
  303. package/dist/tree-select/index.css +1 -1
  304. package/dist/tree-select/index.js +4 -4
  305. package/dist/tree-select/index.json +3 -3
  306. package/dist/tree-select/index.wxml +9 -9
  307. package/dist/tree-select/index.wxss +1 -1
  308. package/dist/wxs/bem.wxs +1 -1
  309. package/lib/action-sheet/index.css +1 -1
  310. package/lib/action-sheet/index.js +1 -1
  311. package/lib/action-sheet/index.json +3 -3
  312. package/lib/action-sheet/index.wxml +15 -15
  313. package/lib/action-sheet/index.wxss +1 -1
  314. package/lib/area/index.js +2 -2
  315. package/lib/area/index.json +1 -1
  316. package/lib/area/index.wxml +2 -2
  317. package/lib/battery/index.js +1 -1
  318. package/lib/button/index.css +1 -1
  319. package/lib/button/index.js +2 -2
  320. package/lib/button/index.json +2 -2
  321. package/lib/button/index.wxml +9 -9
  322. package/lib/button/index.wxss +1 -1
  323. package/lib/calendar/calendar.wxml +5 -5
  324. package/lib/calendar/components/header/index.css +1 -1
  325. package/lib/calendar/components/header/index.js +1 -1
  326. package/lib/calendar/components/header/index.wxml +6 -6
  327. package/lib/calendar/components/header/index.wxss +1 -1
  328. package/lib/calendar/components/month/index.css +1 -1
  329. package/lib/calendar/components/month/index.js +1 -1
  330. package/lib/calendar/components/month/index.wxml +9 -9
  331. package/lib/calendar/components/month/index.wxss +1 -1
  332. package/lib/calendar/index.css +1 -1
  333. package/lib/calendar/index.js +2 -2
  334. package/lib/calendar/index.json +3 -3
  335. package/lib/calendar/index.wxml +5 -5
  336. package/lib/calendar/index.wxss +1 -1
  337. package/lib/cascader/index.css +1 -1
  338. package/lib/cascader/index.js +2 -1
  339. package/lib/cascader/index.json +3 -3
  340. package/lib/cascader/index.wxml +13 -13
  341. package/lib/cascader/index.wxss +1 -1
  342. package/lib/cell/index.css +1 -1
  343. package/lib/cell/index.js +1 -1
  344. package/lib/cell/index.json +1 -1
  345. package/lib/cell/index.wxml +10 -10
  346. package/lib/cell/index.wxss +1 -1
  347. package/lib/cell-group/index.css +1 -1
  348. package/lib/cell-group/index.js +1 -1
  349. package/lib/cell-group/index.wxml +1 -1
  350. package/lib/cell-group/index.wxss +1 -1
  351. package/lib/checkbox/index.css +1 -1
  352. package/lib/checkbox/index.js +1 -1
  353. package/lib/checkbox/index.json +1 -1
  354. package/lib/checkbox/index.wxml +2 -2
  355. package/lib/checkbox/index.wxss +1 -1
  356. package/lib/checkbox-group/index.css +1 -1
  357. package/lib/checkbox-group/index.js +1 -1
  358. package/lib/checkbox-group/index.wxss +1 -1
  359. package/lib/circle/index.css +1 -1
  360. package/lib/circle/index.js +1 -1
  361. package/lib/circle/index.wxml +6 -6
  362. package/lib/circle/index.wxss +1 -1
  363. package/lib/col/index.css +1 -1
  364. package/lib/col/index.js +1 -1
  365. package/lib/col/index.wxml +1 -1
  366. package/lib/col/index.wxss +1 -1
  367. package/lib/collapse/index.js +1 -1
  368. package/lib/collapse/index.wxml +1 -1
  369. package/lib/collapse-item/animate.js +1 -1
  370. package/lib/collapse-item/index.css +1 -1
  371. package/lib/collapse-item/index.js +1 -1
  372. package/lib/collapse-item/index.json +1 -1
  373. package/lib/collapse-item/index.wxml +7 -7
  374. package/lib/collapse-item/index.wxss +1 -1
  375. package/lib/common/component.d.ts +3 -3
  376. package/lib/common/component.js +6 -6
  377. package/lib/common/index.css +1 -1
  378. package/lib/common/index.wxss +1 -1
  379. package/lib/common/style/clearfix.css +1 -1
  380. package/lib/common/style/clearfix.wxss +1 -1
  381. package/lib/common/style/ellipsis.css +1 -1
  382. package/lib/common/style/ellipsis.wxss +1 -1
  383. package/lib/common/style/hairline.css +1 -1
  384. package/lib/common/style/hairline.wxss +1 -1
  385. package/lib/config-provider/index.js +1 -1
  386. package/lib/config-provider/index.wxml +1 -1
  387. package/lib/count-down/index.css +1 -1
  388. package/lib/count-down/index.js +1 -1
  389. package/lib/count-down/index.wxml +1 -1
  390. package/lib/count-down/index.wxss +1 -1
  391. package/lib/custom-keyboard/index.js +1 -1
  392. package/lib/custom-keyboard/index.json +4 -4
  393. package/lib/custom-keyboard/index.wxml +2 -2
  394. package/lib/datetime-picker/index.js +2 -2
  395. package/lib/datetime-picker/index.json +1 -1
  396. package/lib/datetime-picker/index.wxml +2 -2
  397. package/lib/definitions/index.d.ts +4 -3
  398. package/lib/dialog/index.css +1 -1
  399. package/lib/dialog/index.js +1 -1
  400. package/lib/dialog/index.json +5 -5
  401. package/lib/dialog/index.wxml +25 -25
  402. package/lib/dialog/index.wxss +1 -1
  403. package/lib/divider/index.css +1 -1
  404. package/lib/divider/index.js +1 -1
  405. package/lib/divider/index.wxss +1 -1
  406. package/lib/dropdown-item/index.css +1 -1
  407. package/lib/dropdown-item/index.js +1 -1
  408. package/lib/dropdown-item/index.json +3 -3
  409. package/lib/dropdown-item/index.wxml +7 -7
  410. package/lib/dropdown-item/index.wxss +1 -1
  411. package/lib/dropdown-menu/index.css +1 -1
  412. package/lib/dropdown-menu/index.js +2 -2
  413. package/lib/dropdown-menu/index.wxml +2 -2
  414. package/lib/dropdown-menu/index.wxss +1 -1
  415. package/lib/empty/index.css +1 -1
  416. package/lib/empty/index.js +1 -1
  417. package/lib/empty/index.wxml +7 -7
  418. package/lib/empty/index.wxs +7 -6
  419. package/lib/empty/index.wxss +1 -1
  420. package/lib/field/index.css +1 -1
  421. package/lib/field/index.js +14 -2
  422. package/lib/field/index.json +2 -2
  423. package/lib/field/index.wxml +10 -10
  424. package/lib/field/index.wxss +1 -1
  425. package/lib/field/props.js +1 -9
  426. package/lib/goods-action/index.css +1 -1
  427. package/lib/goods-action/index.js +1 -1
  428. package/lib/goods-action/index.wxss +1 -1
  429. package/lib/goods-action-button/index.css +1 -1
  430. package/lib/goods-action-button/index.js +1 -1
  431. package/lib/goods-action-button/index.json +1 -1
  432. package/lib/goods-action-button/index.wxml +3 -3
  433. package/lib/goods-action-button/index.wxss +1 -1
  434. package/lib/goods-action-icon/index.css +1 -1
  435. package/lib/goods-action-icon/index.js +2 -2
  436. package/lib/goods-action-icon/index.json +2 -2
  437. package/lib/goods-action-icon/index.wxml +5 -5
  438. package/lib/goods-action-icon/index.wxss +1 -1
  439. package/lib/grid/index.css +1 -1
  440. package/lib/grid/index.js +1 -1
  441. package/lib/grid/index.wxml +1 -1
  442. package/lib/grid/index.wxss +1 -1
  443. package/lib/grid-item/index.css +1 -1
  444. package/lib/grid-item/index.js +2 -2
  445. package/lib/grid-item/index.json +1 -1
  446. package/lib/grid-item/index.wxml +4 -4
  447. package/lib/grid-item/index.wxss +1 -1
  448. package/lib/icon/index.css +1 -1
  449. package/lib/icon/index.js +2 -2
  450. package/lib/icon/index.json +1 -1
  451. package/lib/icon/index.wxml +4 -4
  452. package/lib/icon/index.wxs +6 -7
  453. package/lib/icon/index.wxss +1 -1
  454. package/lib/image/index.css +1 -1
  455. package/lib/image/index.js +1 -1
  456. package/lib/image/index.json +2 -2
  457. package/lib/image/index.wxml +5 -5
  458. package/lib/image/index.wxss +1 -1
  459. package/lib/index-anchor/index.css +1 -1
  460. package/lib/index-anchor/index.js +2 -2
  461. package/lib/index-anchor/index.wxml +2 -2
  462. package/lib/index-anchor/index.wxss +1 -1
  463. package/lib/index-bar/index.css +1 -1
  464. package/lib/index-bar/index.js +5 -5
  465. package/lib/index-bar/index.wxml +3 -3
  466. package/lib/index-bar/index.wxss +1 -1
  467. package/lib/info/index.css +1 -1
  468. package/lib/info/index.js +1 -1
  469. package/lib/info/index.wxml +1 -1
  470. package/lib/info/index.wxss +1 -1
  471. package/lib/loading/index.css +1 -1
  472. package/lib/loading/index.js +1 -1
  473. package/lib/loading/index.wxml +3 -3
  474. package/lib/loading/index.wxss +1 -1
  475. package/lib/mixins/basic.js +16 -0
  476. package/lib/mixins/page-scroll.js +10 -10
  477. package/lib/mixins/transition.js +4 -4
  478. package/lib/nav-bar/index.css +1 -1
  479. package/lib/nav-bar/index.js +3 -3
  480. package/lib/nav-bar/index.json +1 -1
  481. package/lib/nav-bar/index.wxml +11 -11
  482. package/lib/nav-bar/index.wxss +1 -1
  483. package/lib/normal-slider/index.js +1 -1
  484. package/lib/notice-bar/index.css +1 -1
  485. package/lib/notice-bar/index.js +3 -3
  486. package/lib/notice-bar/index.json +1 -1
  487. package/lib/notice-bar/index.wxml +7 -7
  488. package/lib/notice-bar/index.wxss +1 -1
  489. package/lib/notify/index.css +1 -1
  490. package/lib/notify/index.js +1 -1
  491. package/lib/notify/index.json +1 -1
  492. package/lib/notify/index.wxml +4 -4
  493. package/lib/notify/index.wxss +1 -1
  494. package/lib/notify/notify.js +2 -2
  495. package/lib/overlay/index.css +1 -1
  496. package/lib/overlay/index.js +1 -1
  497. package/lib/overlay/index.json +1 -1
  498. package/lib/overlay/index.wxss +1 -1
  499. package/lib/overlay/overlay.wxml +3 -3
  500. package/lib/picker/index.css +1 -1
  501. package/lib/picker/index.js +2 -2
  502. package/lib/picker/index.wxml +5 -5
  503. package/lib/picker/index.wxss +1 -1
  504. package/lib/picker/toolbar.wxml +6 -6
  505. package/lib/picker-column/index.css +1 -1
  506. package/lib/picker-column/index.js +1 -1
  507. package/lib/picker-column/index.wxml +6 -6
  508. package/lib/picker-column/index.wxss +1 -1
  509. package/lib/popup/index.css +1 -1
  510. package/lib/popup/index.js +1 -1
  511. package/lib/popup/index.json +2 -2
  512. package/lib/popup/index.wxml +1 -1
  513. package/lib/popup/index.wxss +1 -1
  514. package/lib/popup/popup.wxml +2 -2
  515. package/lib/progress/index.css +1 -1
  516. package/lib/progress/index.js +3 -3
  517. package/lib/progress/index.wxml +3 -3
  518. package/lib/progress/index.wxss +1 -1
  519. package/lib/radio/index.css +1 -1
  520. package/lib/radio/index.js +1 -1
  521. package/lib/radio/index.json +1 -1
  522. package/lib/radio/index.wxml +2 -2
  523. package/lib/radio/index.wxss +1 -1
  524. package/lib/radio-group/index.css +1 -1
  525. package/lib/radio-group/index.js +1 -1
  526. package/lib/radio-group/index.wxss +1 -1
  527. package/lib/rate/index.css +1 -1
  528. package/lib/rate/index.js +6 -6
  529. package/lib/rate/index.json +1 -1
  530. package/lib/rate/index.wxml +2 -2
  531. package/lib/rate/index.wxss +1 -1
  532. package/lib/row/index.css +1 -1
  533. package/lib/row/index.js +1 -1
  534. package/lib/row/index.wxml +1 -1
  535. package/lib/row/index.wxss +1 -1
  536. package/lib/search/index.css +1 -1
  537. package/lib/search/index.js +1 -1
  538. package/lib/search/index.json +1 -1
  539. package/lib/search/index.wxml +7 -7
  540. package/lib/search/index.wxss +1 -1
  541. package/lib/sidebar/index.css +1 -1
  542. package/lib/sidebar/index.js +1 -1
  543. package/lib/sidebar/index.wxml +1 -1
  544. package/lib/sidebar/index.wxss +1 -1
  545. package/lib/sidebar-item/index.css +1 -1
  546. package/lib/sidebar-item/index.js +1 -1
  547. package/lib/sidebar-item/index.json +1 -1
  548. package/lib/sidebar-item/index.wxml +3 -3
  549. package/lib/sidebar-item/index.wxss +1 -1
  550. package/lib/skeleton/index.css +1 -1
  551. package/lib/skeleton/index.js +1 -1
  552. package/lib/skeleton/index.wxss +1 -1
  553. package/lib/slider/index.css +1 -1
  554. package/lib/slider/index.js +3 -3
  555. package/lib/slider/index.wxss +1 -1
  556. package/lib/stepper/index.css +1 -1
  557. package/lib/stepper/index.js +1 -1
  558. package/lib/stepper/index.wxml +4 -4
  559. package/lib/stepper/index.wxss +1 -1
  560. package/lib/steps/index.css +1 -1
  561. package/lib/steps/index.js +1 -1
  562. package/lib/steps/index.json +1 -1
  563. package/lib/steps/index.wxml +9 -9
  564. package/lib/steps/index.wxss +1 -1
  565. package/lib/sticky/index.css +1 -1
  566. package/lib/sticky/index.js +2 -2
  567. package/lib/sticky/index.wxml +1 -1
  568. package/lib/sticky/index.wxss +1 -1
  569. package/lib/swipe-cell/index.css +1 -1
  570. package/lib/swipe-cell/index.js +1 -1
  571. package/lib/swipe-cell/index.wxml +3 -3
  572. package/lib/swipe-cell/index.wxss +1 -1
  573. package/lib/switch/index.css +1 -1
  574. package/lib/switch/index.js +1 -1
  575. package/lib/switch/index.json +1 -1
  576. package/lib/switch/index.wxml +3 -3
  577. package/lib/switch/index.wxss +1 -1
  578. package/lib/tab/index.css +1 -1
  579. package/lib/tab/index.js +1 -1
  580. package/lib/tab/index.wxss +1 -1
  581. package/lib/tabbar/index.css +1 -1
  582. package/lib/tabbar/index.js +2 -2
  583. package/lib/tabbar/index.wxss +1 -1
  584. package/lib/tabbar-item/index.css +1 -1
  585. package/lib/tabbar-item/index.js +2 -2
  586. package/lib/tabbar-item/index.json +2 -2
  587. package/lib/tabbar-item/index.wxml +6 -6
  588. package/lib/tabbar-item/index.wxss +1 -1
  589. package/lib/tabs/index.css +1 -1
  590. package/lib/tabs/index.js +6 -6
  591. package/lib/tabs/index.json +2 -2
  592. package/lib/tabs/index.wxml +9 -9
  593. package/lib/tabs/index.wxs +1 -1
  594. package/lib/tabs/index.wxss +1 -1
  595. package/lib/tag/index.css +1 -1
  596. package/lib/tag/index.js +2 -2
  597. package/lib/tag/index.json +1 -1
  598. package/lib/tag/index.wxml +2 -2
  599. package/lib/tag/index.wxss +1 -1
  600. package/lib/toast/index.css +1 -1
  601. package/lib/toast/index.js +2 -2
  602. package/lib/toast/index.json +4 -4
  603. package/lib/toast/index.wxml +9 -9
  604. package/lib/toast/index.wxss +1 -1
  605. package/lib/toast/toast.js +2 -2
  606. package/lib/transition/index.css +1 -1
  607. package/lib/transition/index.js +1 -1
  608. package/lib/transition/index.wxml +1 -1
  609. package/lib/transition/index.wxss +1 -1
  610. package/lib/tree-select/index.css +1 -1
  611. package/lib/tree-select/index.js +2 -2
  612. package/lib/tree-select/index.json +3 -3
  613. package/lib/tree-select/index.wxml +9 -9
  614. package/lib/tree-select/index.wxss +1 -1
  615. package/lib/wxs/bem.wxs +1 -1
  616. package/package.json +3 -4
@@ -1 +1 @@
1
- @import '../common/index.wxss';.van-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,2em)}.van-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,1em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,1em);z-index:var(--switch-node-z-index,1)}.van-switch__loading{height:50%;left:25%;position:absolute!important;top:25%;width:50%}.van-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
1
+ @import '../common/index.wxss';.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,2em)}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,1em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,1em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{height:50%;left:25%;position:absolute!important;top:25%;width:50%}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
@@ -1 +1 @@
1
- @import '../common/index.css';:host{box-sizing:border-box;flex-shrink:0;width:100%}.van-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
1
+ @import '../common/index.css';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
package/dist/tab/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useParent } from '../common/relation';
2
- import { VantComponent } from '../common/component';
3
- VantComponent({
2
+ import { SmartComponent } from '../common/component';
3
+ SmartComponent({
4
4
  relation: useParent('tabs'),
5
5
  props: {
6
6
  dot: {
@@ -1 +1 @@
1
- @import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.van-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
1
+ @import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.smart-tab__pane{-webkit-overflow-scrolling:touch;background-color:var(--app-B3);box-sizing:border-box;color:var(--app-B3-N1);overflow-y:auto}.smart-tab__pane--active{height:auto}.smart-tab__pane--inactive{height:0;overflow:visible}
@@ -1 +1 @@
1
- @import '../common/index.css';.van-tabbar{background-color:var(--tabbar-background-color,var(--app-B5,#f6f7fb));box-sizing:initial;display:flex;height:var(--tabbar-height,55px);width:100%}.van-tabbar--fixed{bottom:0;left:0;position:fixed}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}.van-tabbar--border{box-shadow:0 -.5px 0 0 var(--tabbar-border-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
1
+ @import '../common/index.css';.smart-tabbar{background-color:var(--tabbar-background-color,var(--app-B5,#f6f7fb));box-sizing:initial;display:flex;height:var(--tabbar-height,55px);width:100%}.smart-tabbar--fixed{bottom:0;left:0;position:fixed}.smart-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}.smart-tabbar--border{box-shadow:0 -.5px 0 0 var(--tabbar-border-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
@@ -1,7 +1,7 @@
1
- import { VantComponent } from '../common/component';
1
+ import { SmartComponent } from '../common/component';
2
2
  import { useChildren } from '../common/relation';
3
3
  import { getRect } from '../common/utils';
4
- VantComponent({
4
+ SmartComponent({
5
5
  relation: useChildren('tabbar-item', function () {
6
6
  this.updateChildren();
7
7
  }),
@@ -57,7 +57,7 @@ VantComponent({
57
57
  return;
58
58
  }
59
59
  wx.nextTick(() => {
60
- getRect(this, '.van-tabbar').then((res) => {
60
+ getRect(this, '.smart-tabbar').then((res) => {
61
61
  this.setData({ height: res.height });
62
62
  });
63
63
  });
@@ -1 +1 @@
1
- @import '../common/index.wxss';.van-tabbar{background-color:var(--tabbar-background-color,var(--app-B5,#f6f7fb));box-sizing:initial;display:flex;height:var(--tabbar-height,55px);width:100%}.van-tabbar--fixed{bottom:0;left:0;position:fixed}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}.van-tabbar--border{box-shadow:0 -.5px 0 0 var(--tabbar-border-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
1
+ @import '../common/index.wxss';.smart-tabbar{background-color:var(--tabbar-background-color,var(--app-B5,#f6f7fb));box-sizing:initial;display:flex;height:var(--tabbar-height,55px);width:100%}.smart-tabbar--fixed{bottom:0;left:0;position:fixed}.smart-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}.smart-tabbar--border{box-shadow:0 -.5px 0 0 var(--tabbar-border-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
@@ -1 +1 @@
1
- @import '../common/index.css';:host{flex:1}.van-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.van-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.van-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.van-tabbar-item__info{margin-top:2px}
1
+ @import '../common/index.css';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item__info{margin-top:2px}
@@ -1,6 +1,6 @@
1
- import { VantComponent } from '../common/component';
1
+ import { SmartComponent } from '../common/component';
2
2
  import { useParent } from '../common/relation';
3
- VantComponent({
3
+ SmartComponent({
4
4
  props: {
5
5
  info: null,
6
6
  name: null,
@@ -16,7 +16,7 @@ VantComponent({
16
16
  },
17
17
  iconPrefix: {
18
18
  type: String,
19
- value: 'van-icon',
19
+ value: 'smart-icon',
20
20
  },
21
21
  },
22
22
  relation: useParent('tabbar'),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {
4
- "van-icon": "../icon/index",
5
- "van-info": "../info/index"
4
+ "smart-icon": "../icon/index",
5
+ "smart-info": "../info/index"
6
6
  }
7
7
  }
@@ -5,25 +5,25 @@
5
5
  style="color: {{ active ? activeColor : inactiveColor }}"
6
6
  bindtap="onClick"
7
7
  >
8
- <view class="van-tabbar-item__icon">
9
- <van-icon
8
+ <view class="smart-tabbar-item__icon">
9
+ <smart-icon
10
10
  wx:if="{{ icon }}"
11
11
  name="{{ icon }}"
12
12
  color="{{active ? activeColor : inactiveColor}}"
13
13
  class-prefix="{{ iconPrefix }}"
14
- custom-class="van-tabbar-item__icon__inner"
14
+ custom-class="smart-tabbar-item__icon__inner"
15
15
  />
16
16
  <block wx:else>
17
17
  <slot wx:if="{{ active }}" name="icon-active" />
18
18
  <slot wx:else name="icon" />
19
19
  </block>
20
- <van-info
20
+ <smart-info
21
21
  dot="{{ dot }}"
22
22
  info="{{ info }}"
23
- custom-class="van-tabbar-item__info"
23
+ custom-class="smart-tabbar-item__info"
24
24
  />
25
25
  </view>
26
- <view class="van-tabbar-item__text">
26
+ <view class="smart-tabbar-item__text">
27
27
  <slot />
28
28
  </view>
29
29
  </view>
@@ -1 +1 @@
1
- @import '../common/index.wxss';:host{flex:1}.van-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.van-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.van-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.van-tabbar-item__info{margin-top:2px}
1
+ @import '../common/index.wxss';:host{flex:1}.smart-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,var(--app-B6-N5,rgba(0,0,0,.3)));display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.smart-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.smart-tabbar-item__icon__inner{display:block;min-height:1em;min-width:1em}.smart-tabbar-item--active{color:var(--tabbar-item-active-color,var(--app-M1,#3678e3))}.smart-tabbar-item__info{margin-top:2px}
@@ -1 +1 @@
1
- @import '../common/index.css';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,30px);padding:2px}.van-tabs__nav--card .van-tab{border-radius:6px;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,32px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
1
+ @import '../common/index.css';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,30px);padding:2px}.smart-tabs__nav--card .smart-tab{border-radius:6px;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 30px) - 2px)}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__track{height:100%;position:relative;width:100%}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--card{height:var(--tabs-card-height,30px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;padding:0 5px;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
@@ -1,9 +1,9 @@
1
- import { VantComponent } from '../common/component';
1
+ import { SmartComponent } from '../common/component';
2
2
  import { touch } from '../mixins/touch';
3
3
  import { getAllRect, getRect, groupSetData, nextTick, requestAnimationFrame, } from '../common/utils';
4
4
  import { isDef } from '../common/validator';
5
5
  import { useChildren } from '../common/relation';
6
- VantComponent({
6
+ SmartComponent({
7
7
  mixins: [touch],
8
8
  classes: [
9
9
  'nav-class',
@@ -99,7 +99,7 @@ VantComponent({
99
99
  requestAnimationFrame(() => {
100
100
  this.swiping = true;
101
101
  this.setData({
102
- container: () => this.createSelectorQuery().select('.van-tabs'),
102
+ container: () => this.createSelectorQuery().select('.smart-tabs'),
103
103
  });
104
104
  this.resize();
105
105
  this.scrollIntoView();
@@ -190,8 +190,8 @@ VantComponent({
190
190
  }
191
191
  const { currentIndex, ellipsis, skipTransition } = this.data;
192
192
  Promise.all([
193
- getAllRect(this, '.van-tab'),
194
- getRect(this, '.van-tabs__line'),
193
+ getAllRect(this, '.smart-tab'),
194
+ getRect(this, '.smart-tabs__line'),
195
195
  ]).then(([rects = [], lineRect]) => {
196
196
  const rect = rects[currentIndex];
197
197
  if (rect == null) {
@@ -219,8 +219,8 @@ VantComponent({
219
219
  return;
220
220
  }
221
221
  Promise.all([
222
- getAllRect(this, '.van-tab'),
223
- getRect(this, '.van-tabs__nav'),
222
+ getAllRect(this, '.smart-tab'),
223
+ getRect(this, '.smart-tabs__nav'),
224
224
  ]).then(([tabRects, navRect]) => {
225
225
  const tabRect = tabRects[currentIndex];
226
226
  const offsetLeft = tabRects
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {
4
- "van-info": "../info/index",
5
- "van-sticky": "../sticky/index"
4
+ "smart-info": "../info/index",
5
+ "smart-sticky": "../sticky/index"
6
6
  }
7
7
  }
@@ -2,14 +2,14 @@
2
2
  <wxs src="./index.wxs" module="computed" />
3
3
 
4
4
  <view class="custom-class {{ utils.bem('tabs') }}">
5
- <van-sticky
5
+ <smart-sticky
6
6
  disabled="{{ !sticky }}"
7
7
  z-index="{{ zIndex }}"
8
8
  offset-top="{{ offsetTop }}"
9
9
  container="{{ container }}"
10
10
  bind:scroll="onTouchScroll"
11
11
  >
12
- <view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class">
12
+ <view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'smart-hairline--top-bottom' : '' }} wrap-class">
13
13
  <slot name="nav-left" />
14
14
 
15
15
  <scroll-view
@@ -20,7 +20,7 @@
20
20
  style="{{ color ? 'border-color: ' + color : '' }}"
21
21
  >
22
22
  <view class="{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class" style="{{ computed.navStyle(color, type) }}">
23
- <view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}" />
23
+ <view wx:if="{{ type === 'line' }}" class="smart-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}" />
24
24
  <view
25
25
  wx:for="{{ tabs }}"
26
26
  wx:key="index"
@@ -29,13 +29,13 @@
29
29
  style="{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}"
30
30
  bind:tap="onTap"
31
31
  >
32
- <view class="{{ ellipsis ? 'van-ellipsis' : '' }}" style="{{ item.titleStyle }}">
32
+ <view class="{{ ellipsis ? 'smart-ellipsis' : '' }}" style="{{ item.titleStyle }}">
33
33
  {{ item.title }}
34
- <van-info
34
+ <smart-info
35
35
  wx:if="{{ item.info !== null || item.dot }}"
36
36
  info="{{ item.info }}"
37
37
  dot="{{ item.dot }}"
38
- custom-class="van-tab__title__info"
38
+ custom-class="smart-tab__title__info"
39
39
  />
40
40
  </view>
41
41
  </view>
@@ -44,17 +44,17 @@
44
44
 
45
45
  <slot name="nav-right" />
46
46
  </view>
47
- </van-sticky>
47
+ </smart-sticky>
48
48
 
49
49
  <view
50
- class="van-tabs__content"
50
+ class="smart-tabs__content"
51
51
  bind:touchstart="onTouchStart"
52
52
  bind:touchmove="onTouchMove"
53
53
  bind:touchend="onTouchEnd"
54
54
  bind:touchcancel="onTouchEnd"
55
55
  >
56
56
  <view
57
- class="{{ utils.bem('tabs__track', [{ animated }]) }} van-tabs__track"
57
+ class="{{ utils.bem('tabs__track', [{ animated }]) }} smart-tabs__track"
58
58
  style="{{ computed.trackStyle({ duration, currentIndex, animated }) }}"
59
59
  >
60
60
  <slot />
@@ -10,7 +10,7 @@ function tabClass(active, ellipsis) {
10
10
  }
11
11
 
12
12
  if (ellipsis) {
13
- classes.push('van-ellipsis');
13
+ classes.push('smart-ellipsis');
14
14
  }
15
15
 
16
16
  return classes.join(' ');
@@ -1 +1 @@
1
- @import '../common/index.wxss';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,30px);padding:2px}.van-tabs__nav--card .van-tab{border-radius:6px;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,32px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
1
+ @import '../common/index.wxss';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,30px);padding:2px}.smart-tabs__nav--card .smart-tab{border-radius:6px;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 30px) - 2px)}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__track{height:100%;position:relative;width:100%}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--card{height:var(--tabs-card-height,30px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;padding:0 5px;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
@@ -1 +1 @@
1
- @import '../common/index.css';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:"";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}
1
+ @import '../common/index.css';.smart-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.smart-tag--default{background-color:var(--tag-default-color,#969799)}.smart-tag--default.smart-tag--plain{color:var(--tag-default-color,#969799)}.smart-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.smart-tag--danger.smart-tag--plain{color:var(--tag-danger-color,#ee0a24)}.smart-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.smart-tag--primary.smart-tag--plain{color:var(--tag-primary-color,#1989fa)}.smart-tag--success{background-color:var(--tag-success-color,#07c160)}.smart-tag--success.smart-tag--plain{color:var(--tag-success-color,#07c160)}.smart-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.smart-tag--warning.smart-tag--plain{color:var(--tag-warning-color,#ff976a)}.smart-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.smart-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.smart-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.smart-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.smart-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.smart-tag--mark:after{content:"";display:block;width:2px}.smart-tag--round{border-radius:var(--tag-round-border-radius,999px)}.smart-tag__close{margin-left:2px;min-width:1em}
package/dist/tag/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { VantComponent } from '../common/component';
2
1
  import Xmark from '@tuya-miniapp/icons/dist/svg/Xmark';
3
- VantComponent({
2
+ import { SmartComponent } from '../common/component';
3
+ SmartComponent({
4
4
  props: {
5
5
  size: String,
6
6
  mark: Boolean,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {
4
- "van-icon": "../icon/index"
4
+ "smart-icon": "../icon/index"
5
5
  }
6
6
  }
@@ -6,10 +6,10 @@
6
6
  style="{{ computed.rootStyle({ plain, color, textColor }) }}"
7
7
  >
8
8
  <slot />
9
- <van-icon
9
+ <smart-icon
10
10
  wx:if="{{ closeable }}"
11
11
  name="{{crossIcon}}"
12
- custom-class="van-tag__close"
12
+ custom-class="smart-tag__close"
13
13
  bind:click="onClose"
14
14
  color="{{textColor || closeColor}}"
15
15
  />
@@ -1 +1 @@
1
- @import '../common/index.wxss';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:"";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}
1
+ @import '../common/index.wxss';.smart-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.smart-tag--default{background-color:var(--tag-default-color,#969799)}.smart-tag--default.smart-tag--plain{color:var(--tag-default-color,#969799)}.smart-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.smart-tag--danger.smart-tag--plain{color:var(--tag-danger-color,#ee0a24)}.smart-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.smart-tag--primary.smart-tag--plain{color:var(--tag-primary-color,#1989fa)}.smart-tag--success{background-color:var(--tag-success-color,#07c160)}.smart-tag--success.smart-tag--plain{color:var(--tag-success-color,#07c160)}.smart-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.smart-tag--warning.smart-tag--plain{color:var(--tag-warning-color,#ff976a)}.smart-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.smart-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.smart-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.smart-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.smart-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.smart-tag--mark:after{content:"";display:block;width:2px}.smart-tag--round{border-radius:var(--tag-round-border-radius,999px)}.smart-tag__close{margin-left:2px;min-width:1em}
@@ -1 +1 @@
1
- @import '../common/index.css';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}
1
+ @import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh)}.smart-toast--bottom{transform:translateY(30vh)}
@@ -1,7 +1,7 @@
1
- import { VantComponent } from '../common/component';
2
1
  import Checkmark from '@tuya-miniapp/icons/dist/svg/Checkmark';
3
2
  import Smark from '@tuya-miniapp/icons/dist/svg/Xmark';
4
- VantComponent({
3
+ import { SmartComponent } from '../common/component';
4
+ SmartComponent({
5
5
  props: {
6
6
  show: Boolean,
7
7
  mask: Boolean,
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {
4
- "van-icon": "../icon/index",
5
- "van-loading": "../loading/index",
6
- "van-overlay": "../overlay/index",
7
- "van-transition": "../transition/index"
4
+ "smart-icon": "../icon/index",
5
+ "smart-loading": "../loading/index",
6
+ "smart-overlay": "../overlay/index",
7
+ "smart-transition": "../transition/index"
8
8
  }
9
9
  }
@@ -1,16 +1,16 @@
1
- <van-overlay
1
+ <smart-overlay
2
2
  wx:if="{{ mask || forbidClick }}"
3
3
  show="{{ show }}"
4
4
  z-index="{{ zIndex }}"
5
5
  custom-style="{{ mask ? '' : 'background-color: transparent;' }}"
6
6
  />
7
- <van-transition
7
+ <smart-transition
8
8
  show="{{ show }}"
9
9
  custom-style="z-index: {{ zIndex }}"
10
- custom-class="van-toast__container"
10
+ custom-class="smart-toast__container"
11
11
  >
12
12
  <view
13
- class="van-toast van-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} van-toast--{{ position }}"
13
+ class="smart-toast smart-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} smart-toast--{{ position }}"
14
14
  catch:touchmove="noop"
15
15
  >
16
16
  <!-- text only -->
@@ -21,16 +21,16 @@
21
21
 
22
22
  <!-- with icon -->
23
23
  <block wx:else>
24
- <van-loading
24
+ <smart-loading
25
25
  wx:if="{{ type === 'loading' }}"
26
26
  color="white"
27
27
  type="{{ loadingType }}"
28
- custom-class="van-toast__loading"
28
+ custom-class="smart-toast__loading"
29
29
  />
30
- <van-icon color="white" wx:else class="van-toast__icon" name="{{ type === 'success' ? success : error }}" />
31
- <text wx:if="{{ message }}" class="van-toast__text">{{ message }}</text>
30
+ <smart-icon color="white" wx:else class="smart-toast__icon" name="{{ type === 'success' ? success : error }}" />
31
+ <text wx:if="{{ message }}" class="smart-toast__text">{{ message }}</text>
32
32
  </block>
33
33
 
34
34
  <slot />
35
35
  </view>
36
- </van-transition>
36
+ </smart-transition>
@@ -1 +1 @@
1
- @import '../common/index.wxss';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}
1
+ @import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh)}.smart-toast--bottom{transform:translateY(30vh)}
@@ -9,7 +9,7 @@ const defaultOptions = {
9
9
  position: 'middle',
10
10
  forbidClick: false,
11
11
  loadingType: 'circular',
12
- selector: '#van-toast',
12
+ selector: '#smart-toast',
13
13
  };
14
14
  let queue = [];
15
15
  let currentOptions = Object.assign({}, defaultOptions);
@@ -27,7 +27,7 @@ function Toast(toastOptions) {
27
27
  : options.context) || getContext();
28
28
  const toast = context.selectComponent(options.selector);
29
29
  if (!toast) {
30
- console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确');
30
+ console.warn('未找到 smart-toast 节点,请确认 selector 及 context 是否正确');
31
31
  return;
32
32
  }
33
33
  delete options.context;
@@ -1 +1 @@
1
- @import '../common/index.css';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:transform}.van-slide-up-enter,.van-slide-up-leave-to{transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{transform:translate3d(100%,0,0)}
1
+ @import '../common/index.css';.smart-transition{transition-timing-function:ease}.smart-fade-enter-active,.smart-fade-leave-active{transition-property:opacity}.smart-fade-enter,.smart-fade-leave-to{opacity:0}.smart-fade-down-enter-active,.smart-fade-down-leave-active,.smart-fade-left-enter-active,.smart-fade-left-leave-active,.smart-fade-right-enter-active,.smart-fade-right-leave-active,.smart-fade-up-enter-active,.smart-fade-up-leave-active{transition-property:opacity,transform}.smart-fade-up-enter,.smart-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.smart-fade-down-enter,.smart-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.smart-fade-left-enter,.smart-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.smart-fade-right-enter,.smart-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.smart-slide-down-enter-active,.smart-slide-down-leave-active,.smart-slide-left-enter-active,.smart-slide-left-leave-active,.smart-slide-right-enter-active,.smart-slide-right-leave-active,.smart-slide-up-enter-active,.smart-slide-up-leave-active{transition-property:transform}.smart-slide-up-enter,.smart-slide-up-leave-to{transform:translate3d(0,100%,0)}.smart-slide-down-enter,.smart-slide-down-leave-to{transform:translate3d(0,-100%,0)}.smart-slide-left-enter,.smart-slide-left-leave-to{transform:translate3d(-100%,0,0)}.smart-slide-right-enter,.smart-slide-right-leave-to{transform:translate3d(100%,0,0)}
@@ -1,6 +1,6 @@
1
- import { VantComponent } from '../common/component';
1
+ import { SmartComponent } from '../common/component';
2
2
  import { transition } from '../mixins/transition';
3
- VantComponent({
3
+ SmartComponent({
4
4
  classes: [
5
5
  'enter-class',
6
6
  'enter-active-class',
@@ -2,7 +2,7 @@
2
2
 
3
3
  <view
4
4
  wx:if="{{ inited }}"
5
- class="van-transition custom-class {{ classes }}"
5
+ class="smart-transition custom-class {{ classes }}"
6
6
  style="{{ computed.rootStyle({ currentDuration, display, customStyle }) }}"
7
7
  bind:transitionend="onTransitionEnd"
8
8
  >
@@ -1 +1 @@
1
- @import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:transform}.van-slide-up-enter,.van-slide-up-leave-to{transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{transform:translate3d(100%,0,0)}
1
+ @import '../common/index.wxss';.smart-transition{transition-timing-function:ease}.smart-fade-enter-active,.smart-fade-leave-active{transition-property:opacity}.smart-fade-enter,.smart-fade-leave-to{opacity:0}.smart-fade-down-enter-active,.smart-fade-down-leave-active,.smart-fade-left-enter-active,.smart-fade-left-leave-active,.smart-fade-right-enter-active,.smart-fade-right-leave-active,.smart-fade-up-enter-active,.smart-fade-up-leave-active{transition-property:opacity,transform}.smart-fade-up-enter,.smart-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.smart-fade-down-enter,.smart-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.smart-fade-left-enter,.smart-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.smart-fade-right-enter,.smart-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.smart-slide-down-enter-active,.smart-slide-down-leave-active,.smart-slide-left-enter-active,.smart-slide-left-leave-active,.smart-slide-right-enter-active,.smart-slide-right-leave-active,.smart-slide-up-enter-active,.smart-slide-up-leave-active{transition-property:transform}.smart-slide-up-enter,.smart-slide-up-leave-to{transform:translate3d(0,100%,0)}.smart-slide-down-enter,.smart-slide-down-leave-to{transform:translate3d(0,-100%,0)}.smart-slide-left-enter,.smart-slide-left-leave-to{transform:translate3d(-100%,0,0)}.smart-slide-right-enter,.smart-slide-right-leave-to{transform:translate3d(100%,0,0)}
@@ -1 +1 @@
1
- @import '../common/index.css';.van-tree-select{color:var(--tree-select-font-color,var(--app-B6-N1,#000));display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.van-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,var(--app-B3,#fff));flex:1}.van-tree-select__nav__inner{height:100%;width:100%!important}.van-tree-select__content{background-color:var(--tree-select-content-background-color,var(--app-B3,#fff));flex:2}.van-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.van-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,var(--app-B6-N4,rgba(0,0,0,.4)))}.van-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}
1
+ @import '../common/index.css';.smart-tree-select{color:var(--tree-select-font-color,var(--app-B6-N1,#000));display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.smart-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,var(--app-B3,#fff));flex:1}.smart-tree-select__nav__inner{height:100%;width:100%!important}.smart-tree-select__content{background-color:var(--tree-select-content-background-color,var(--app-B3,#fff));flex:2}.smart-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.smart-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.smart-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,var(--app-B6-N4,rgba(0,0,0,.4)))}.smart-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}
@@ -1,6 +1,6 @@
1
- import { VantComponent } from '../common/component';
2
- import success from '@tuya-miniapp/icons/dist/svg/Checkmark';
3
- VantComponent({
1
+ import IconCheckmark from '@tuya-miniapp/icons/dist/svg/Checkmark';
2
+ import { SmartComponent } from '../common/component';
3
+ SmartComponent({
4
4
  classes: [
5
5
  'main-item-class',
6
6
  'content-item-class',
@@ -30,7 +30,7 @@ VantComponent({
30
30
  },
31
31
  selectedIcon: {
32
32
  type: String,
33
- value: success,
33
+ value: IconCheckmark,
34
34
  },
35
35
  },
36
36
  data: {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {
4
- "van-icon": "../icon/index",
5
- "van-sidebar": "../sidebar/index",
6
- "van-sidebar-item": "../sidebar-item/index"
4
+ "smart-icon": "../icon/index",
5
+ "smart-sidebar": "../sidebar/index",
6
+ "smart-sidebar-item": "../sidebar-item/index"
7
7
  }
8
8
  }
@@ -2,12 +2,12 @@
2
2
  <wxs src="./index.wxs" module="wxs" />
3
3
 
4
4
  <view
5
- class="van-tree-select"
5
+ class="smart-tree-select"
6
6
  style="height: {{ utils.addUnit(height) }}"
7
7
  >
8
- <scroll-view scroll-y class="van-tree-select__nav">
9
- <van-sidebar active-key="{{ mainActiveIndex }}" bind:change="onClickNav" custom-class="van-tree-select__nav__inner">
10
- <van-sidebar-item
8
+ <scroll-view scroll-y class="smart-tree-select__nav">
9
+ <smart-sidebar active-key="{{ mainActiveIndex }}" bind:change="onClickNav" custom-class="smart-tree-select__nav__inner">
10
+ <smart-sidebar-item
11
11
  wx:for="{{ items }}"
12
12
  wx:key="index"
13
13
  custom-class="main-item-class"
@@ -18,23 +18,23 @@
18
18
  title="{{ item.text }}"
19
19
  disabled="{{ item.disabled }}"
20
20
  />
21
- </van-sidebar>
21
+ </smart-sidebar>
22
22
  </scroll-view>
23
- <scroll-view scroll-y class="van-tree-select__content">
23
+ <scroll-view scroll-y class="smart-tree-select__content">
24
24
  <slot name="content" />
25
25
  <view
26
26
  wx:for="{{ subItems }}"
27
27
  wx:key="id"
28
- class="van-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}"
28
+ class="smart-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}"
29
29
  data-item="{{ item }}"
30
30
  bind:tap="onSelectItem"
31
31
  >
32
32
  {{ item.text }}
33
- <van-icon
33
+ <smart-icon
34
34
  wx:if="{{ wxs.isActive(activeId, item.id) }}"
35
35
  name="{{ selectedIcon }}"
36
36
  size="16px"
37
- class="van-tree-select__selected"
37
+ class="smart-tree-select__selected"
38
38
  />
39
39
  </view>
40
40
  </scroll-view>
@@ -1 +1 @@
1
- @import '../common/index.wxss';.van-tree-select{color:var(--tree-select-font-color,var(--app-B6-N1,#000));display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.van-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,var(--app-B3,#fff));flex:1}.van-tree-select__nav__inner{height:100%;width:100%!important}.van-tree-select__content{background-color:var(--tree-select-content-background-color,var(--app-B3,#fff));flex:2}.van-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.van-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,var(--app-B6-N4,rgba(0,0,0,.4)))}.van-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}
1
+ @import '../common/index.wxss';.smart-tree-select{color:var(--tree-select-font-color,var(--app-B6-N1,#000));display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.smart-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,var(--app-B3,#fff));flex:1}.smart-tree-select__nav__inner{height:100%;width:100%!important}.smart-tree-select__content{background-color:var(--tree-select-content-background-color,var(--app-B3,#fff));flex:2}.smart-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.smart-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.smart-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,var(--app-B6-N4,rgba(0,0,0,.4)))}.smart-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}
package/dist/wxs/bem.wxs CHANGED
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  var array = require('./array.wxs');
3
3
  var object = require('./object.wxs');
4
- var PREFIX = 'van-';
4
+ var PREFIX = 'smart-';
5
5
 
6
6
  function join(name, mods) {
7
7
  name = PREFIX + name;