@nutui/nutui 4.1.7 → 4.1.8-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/dist/nutui.es.js +6 -2
  2. package/dist/nutui.js +4508 -4151
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/AvatarCropper.js +467 -0
  5. package/dist/packages/_es/CollapseItem.js +1 -1
  6. package/dist/packages/_es/Comment.js +12 -12
  7. package/dist/packages/_es/Input.js +19 -24
  8. package/dist/packages/_es/InputNumber.js +8 -5
  9. package/dist/packages/_es/Picker.js +1 -2
  10. package/dist/packages/_es/Space.js +94 -0
  11. package/dist/packages/actionsheet/index.css +1 -0
  12. package/dist/packages/actionsheet/style/css.mjs +2 -0
  13. package/dist/packages/actionsheet/style/index.mjs +2 -0
  14. package/dist/packages/address/index.css +1 -0
  15. package/dist/packages/address/style/css.mjs +2 -0
  16. package/dist/packages/address/style/index.mjs +2 -0
  17. package/dist/packages/addresslist/index.css +1 -0
  18. package/dist/packages/addresslist/style/css.mjs +2 -0
  19. package/dist/packages/addresslist/style/index.mjs +2 -0
  20. package/dist/packages/animate/index.css +1 -0
  21. package/dist/packages/animate/index.scss +3 -3
  22. package/dist/packages/animate/style/css.mjs +2 -0
  23. package/dist/packages/animate/style/index.mjs +2 -0
  24. package/dist/packages/audio/index.css +1 -0
  25. package/dist/packages/audio/style/css.mjs +2 -0
  26. package/dist/packages/audio/style/index.mjs +2 -0
  27. package/dist/packages/audiooperate/index.css +1 -0
  28. package/dist/packages/audiooperate/style/css.mjs +2 -0
  29. package/dist/packages/audiooperate/style/index.mjs +2 -0
  30. package/dist/packages/avatar/index.css +1 -0
  31. package/dist/packages/avatar/style/css.mjs +2 -0
  32. package/dist/packages/avatar/style/index.mjs +2 -0
  33. package/dist/packages/avatarcropper/index.css +1 -0
  34. package/dist/packages/avatarcropper/index.mjs +4 -0
  35. package/dist/packages/avatarcropper/index.scss +98 -0
  36. package/dist/packages/avatarcropper/style/css.mjs +2 -0
  37. package/dist/packages/avatarcropper/style/index.mjs +2 -0
  38. package/dist/packages/avatargroup/index.css +1 -0
  39. package/dist/packages/avatargroup/style/css.mjs +2 -0
  40. package/dist/packages/avatargroup/style/index.mjs +2 -0
  41. package/dist/packages/backtop/index.css +1 -0
  42. package/dist/packages/backtop/style/css.mjs +2 -0
  43. package/dist/packages/backtop/style/index.mjs +2 -0
  44. package/dist/packages/badge/index.css +1 -0
  45. package/dist/packages/badge/style/css.mjs +2 -0
  46. package/dist/packages/badge/style/index.mjs +2 -0
  47. package/dist/packages/barrage/index.css +1 -0
  48. package/dist/packages/barrage/style/css.mjs +2 -0
  49. package/dist/packages/barrage/style/index.mjs +2 -0
  50. package/dist/packages/button/index.css +1 -0
  51. package/dist/packages/button/style/css.mjs +2 -0
  52. package/dist/packages/button/style/index.mjs +2 -0
  53. package/dist/packages/calendar/index.css +1 -0
  54. package/dist/packages/calendar/style/css.mjs +2 -0
  55. package/dist/packages/calendar/style/index.mjs +2 -0
  56. package/dist/packages/calendaritem/index.css +0 -0
  57. package/dist/packages/calendaritem/style/css.mjs +2 -0
  58. package/dist/packages/calendaritem/style/index.mjs +2 -0
  59. package/dist/packages/card/index.css +1 -0
  60. package/dist/packages/card/style/css.mjs +2 -0
  61. package/dist/packages/card/style/index.mjs +2 -0
  62. package/dist/packages/cascader/index.css +1 -0
  63. package/dist/packages/cascader/style/css.mjs +2 -0
  64. package/dist/packages/cascader/style/index.mjs +2 -0
  65. package/dist/packages/category/index.css +1 -0
  66. package/dist/packages/category/style/css.mjs +2 -0
  67. package/dist/packages/category/style/index.mjs +2 -0
  68. package/dist/packages/categorypane/index.css +1 -0
  69. package/dist/packages/categorypane/style/css.mjs +2 -0
  70. package/dist/packages/categorypane/style/index.mjs +2 -0
  71. package/dist/packages/cell/index.css +1 -0
  72. package/dist/packages/cell/style/css.mjs +2 -0
  73. package/dist/packages/cell/style/index.mjs +2 -0
  74. package/dist/packages/cellgroup/index.css +1 -0
  75. package/dist/packages/cellgroup/style/css.mjs +2 -0
  76. package/dist/packages/cellgroup/style/index.mjs +2 -0
  77. package/dist/packages/checkbox/index.css +1 -0
  78. package/dist/packages/checkbox/style/css.mjs +2 -0
  79. package/dist/packages/checkbox/style/index.mjs +2 -0
  80. package/dist/packages/checkboxgroup/index.css +0 -0
  81. package/dist/packages/checkboxgroup/style/css.mjs +2 -0
  82. package/dist/packages/checkboxgroup/style/index.mjs +2 -0
  83. package/dist/packages/circleprogress/index.css +1 -0
  84. package/dist/packages/circleprogress/style/css.mjs +2 -0
  85. package/dist/packages/circleprogress/style/index.mjs +2 -0
  86. package/dist/packages/col/index.css +1 -0
  87. package/dist/packages/col/style/css.mjs +2 -0
  88. package/dist/packages/col/style/index.mjs +2 -0
  89. package/dist/packages/collapse/index.css +0 -0
  90. package/dist/packages/collapse/style/css.mjs +2 -0
  91. package/dist/packages/collapse/style/index.mjs +2 -0
  92. package/dist/packages/collapseitem/index.css +1 -0
  93. package/dist/packages/collapseitem/style/css.mjs +2 -0
  94. package/dist/packages/collapseitem/style/index.mjs +2 -0
  95. package/dist/packages/comment/index.css +1 -0
  96. package/dist/packages/comment/style/css.mjs +2 -0
  97. package/dist/packages/comment/style/index.mjs +2 -0
  98. package/dist/packages/configprovider/index.css +0 -0
  99. package/dist/packages/configprovider/style/css.mjs +2 -0
  100. package/dist/packages/configprovider/style/index.mjs +2 -0
  101. package/dist/packages/countdown/index.css +1 -0
  102. package/dist/packages/countdown/style/css.mjs +2 -0
  103. package/dist/packages/countdown/style/index.mjs +2 -0
  104. package/dist/packages/countup/index.css +1 -0
  105. package/dist/packages/countup/style/css.mjs +2 -0
  106. package/dist/packages/countup/style/index.mjs +2 -0
  107. package/dist/packages/datepicker/index.css +1 -0
  108. package/dist/packages/datepicker/style/css.mjs +2 -0
  109. package/dist/packages/datepicker/style/index.mjs +2 -0
  110. package/dist/packages/dialog/index.css +1 -0
  111. package/dist/packages/dialog/style/css.mjs +2 -0
  112. package/dist/packages/dialog/style/index.mjs +2 -0
  113. package/dist/packages/divider/index.css +1 -0
  114. package/dist/packages/divider/style/css.mjs +2 -0
  115. package/dist/packages/divider/style/index.mjs +2 -0
  116. package/dist/packages/drag/index.css +1 -0
  117. package/dist/packages/drag/style/css.mjs +2 -0
  118. package/dist/packages/drag/style/index.mjs +2 -0
  119. package/dist/packages/ecard/index.css +1 -0
  120. package/dist/packages/ecard/style/css.mjs +2 -0
  121. package/dist/packages/ecard/style/index.mjs +2 -0
  122. package/dist/packages/elevator/index.css +1 -0
  123. package/dist/packages/elevator/style/css.mjs +2 -0
  124. package/dist/packages/elevator/style/index.mjs +2 -0
  125. package/dist/packages/ellipsis/index.css +1 -0
  126. package/dist/packages/ellipsis/style/css.mjs +2 -0
  127. package/dist/packages/ellipsis/style/index.mjs +2 -0
  128. package/dist/packages/empty/index.css +1 -0
  129. package/dist/packages/empty/style/css.mjs +2 -0
  130. package/dist/packages/empty/style/index.mjs +2 -0
  131. package/dist/packages/fixednav/index.css +1 -0
  132. package/dist/packages/fixednav/style/css.mjs +2 -0
  133. package/dist/packages/fixednav/style/index.mjs +2 -0
  134. package/dist/packages/form/index.css +1 -0
  135. package/dist/packages/form/style/css.mjs +2 -0
  136. package/dist/packages/form/style/index.mjs +2 -0
  137. package/dist/packages/formitem/index.css +1 -0
  138. package/dist/packages/formitem/style/css.mjs +2 -0
  139. package/dist/packages/formitem/style/index.mjs +2 -0
  140. package/dist/packages/grid/index.css +1 -0
  141. package/dist/packages/grid/style/css.mjs +2 -0
  142. package/dist/packages/grid/style/index.mjs +2 -0
  143. package/dist/packages/griditem/index.css +1 -0
  144. package/dist/packages/griditem/style/css.mjs +2 -0
  145. package/dist/packages/griditem/style/index.mjs +2 -0
  146. package/dist/packages/icon/index.css +1 -0
  147. package/dist/packages/icon/style/css.mjs +2 -0
  148. package/dist/packages/icon/style/index.mjs +2 -0
  149. package/dist/packages/image/index.css +1 -0
  150. package/dist/packages/image/style/css.mjs +2 -0
  151. package/dist/packages/image/style/index.mjs +2 -0
  152. package/dist/packages/imagepreview/index.css +1 -0
  153. package/dist/packages/imagepreview/style/css.mjs +2 -0
  154. package/dist/packages/imagepreview/style/index.mjs +2 -0
  155. package/dist/packages/indicator/index.css +1 -0
  156. package/dist/packages/indicator/style/css.mjs +2 -0
  157. package/dist/packages/indicator/style/index.mjs +2 -0
  158. package/dist/packages/infiniteloading/index.css +1 -0
  159. package/dist/packages/infiniteloading/style/css.mjs +2 -0
  160. package/dist/packages/infiniteloading/style/index.mjs +2 -0
  161. package/dist/packages/input/index.css +1 -0
  162. package/dist/packages/input/style/css.mjs +2 -0
  163. package/dist/packages/input/style/index.mjs +2 -0
  164. package/dist/packages/inputnumber/index.css +1 -0
  165. package/dist/packages/inputnumber/style/css.mjs +2 -0
  166. package/dist/packages/inputnumber/style/index.mjs +2 -0
  167. package/dist/packages/invoice/index.css +1 -0
  168. package/dist/packages/invoice/style/css.mjs +2 -0
  169. package/dist/packages/invoice/style/index.mjs +2 -0
  170. package/dist/packages/layout/index.css +0 -0
  171. package/dist/packages/layout/style/css.mjs +2 -0
  172. package/dist/packages/layout/style/index.mjs +2 -0
  173. package/dist/packages/list/index.css +1 -0
  174. package/dist/packages/list/style/css.mjs +2 -0
  175. package/dist/packages/list/style/index.mjs +2 -0
  176. package/dist/packages/menu/index.css +1 -0
  177. package/dist/packages/menu/style/css.mjs +2 -0
  178. package/dist/packages/menu/style/index.mjs +2 -0
  179. package/dist/packages/menuitem/index.css +1 -0
  180. package/dist/packages/menuitem/style/css.mjs +2 -0
  181. package/dist/packages/menuitem/style/index.mjs +2 -0
  182. package/dist/packages/navbar/index.css +1 -0
  183. package/dist/packages/navbar/style/css.mjs +2 -0
  184. package/dist/packages/navbar/style/index.mjs +2 -0
  185. package/dist/packages/noticebar/index.css +1 -0
  186. package/dist/packages/noticebar/style/css.mjs +2 -0
  187. package/dist/packages/noticebar/style/index.mjs +2 -0
  188. package/dist/packages/notify/index.css +1 -0
  189. package/dist/packages/notify/style/css.mjs +2 -0
  190. package/dist/packages/notify/style/index.mjs +2 -0
  191. package/dist/packages/numberkeyboard/index.css +1 -0
  192. package/dist/packages/numberkeyboard/style/css.mjs +2 -0
  193. package/dist/packages/numberkeyboard/style/index.mjs +2 -0
  194. package/dist/packages/overlay/index.css +1 -0
  195. package/dist/packages/overlay/style/css.mjs +2 -0
  196. package/dist/packages/overlay/style/index.mjs +2 -0
  197. package/dist/packages/pagination/index.css +1 -0
  198. package/dist/packages/pagination/style/css.mjs +2 -0
  199. package/dist/packages/pagination/style/index.mjs +2 -0
  200. package/dist/packages/picker/index.css +1 -0
  201. package/dist/packages/picker/style/css.mjs +2 -0
  202. package/dist/packages/picker/style/index.mjs +2 -0
  203. package/dist/packages/popover/index.css +1 -0
  204. package/dist/packages/popover/style/css.mjs +2 -0
  205. package/dist/packages/popover/style/index.mjs +2 -0
  206. package/dist/packages/popup/index.css +1 -0
  207. package/dist/packages/popup/style/css.mjs +2 -0
  208. package/dist/packages/popup/style/index.mjs +2 -0
  209. package/dist/packages/price/index.css +1 -0
  210. package/dist/packages/price/style/css.mjs +2 -0
  211. package/dist/packages/price/style/index.mjs +2 -0
  212. package/dist/packages/progress/index.css +1 -0
  213. package/dist/packages/progress/style/css.mjs +2 -0
  214. package/dist/packages/progress/style/index.mjs +2 -0
  215. package/dist/packages/pullrefresh/index.css +1 -0
  216. package/dist/packages/pullrefresh/style/css.mjs +2 -0
  217. package/dist/packages/pullrefresh/style/index.mjs +2 -0
  218. package/dist/packages/radio/index.css +1 -0
  219. package/dist/packages/radio/style/css.mjs +2 -0
  220. package/dist/packages/radio/style/index.mjs +2 -0
  221. package/dist/packages/radiogroup/index.css +1 -0
  222. package/dist/packages/radiogroup/style/css.mjs +2 -0
  223. package/dist/packages/radiogroup/style/index.mjs +2 -0
  224. package/dist/packages/range/index.css +1 -0
  225. package/dist/packages/range/style/css.mjs +2 -0
  226. package/dist/packages/range/style/index.mjs +2 -0
  227. package/dist/packages/rate/index.css +1 -0
  228. package/dist/packages/rate/style/css.mjs +2 -0
  229. package/dist/packages/rate/style/index.mjs +2 -0
  230. package/dist/packages/row/index.css +1 -0
  231. package/dist/packages/row/style/css.mjs +2 -0
  232. package/dist/packages/row/style/index.mjs +2 -0
  233. package/dist/packages/searchbar/index.css +1 -0
  234. package/dist/packages/searchbar/style/css.mjs +2 -0
  235. package/dist/packages/searchbar/style/index.mjs +2 -0
  236. package/dist/packages/shortpassword/index.css +1 -0
  237. package/dist/packages/shortpassword/style/css.mjs +2 -0
  238. package/dist/packages/shortpassword/style/index.mjs +2 -0
  239. package/dist/packages/sidenavbar/index.css +1 -0
  240. package/dist/packages/sidenavbar/style/css.mjs +2 -0
  241. package/dist/packages/sidenavbar/style/index.mjs +2 -0
  242. package/dist/packages/sidenavbaritem/index.css +1 -0
  243. package/dist/packages/sidenavbaritem/style/css.mjs +2 -0
  244. package/dist/packages/sidenavbaritem/style/index.mjs +2 -0
  245. package/dist/packages/signature/index.css +1 -0
  246. package/dist/packages/signature/style/css.mjs +2 -0
  247. package/dist/packages/signature/style/index.mjs +2 -0
  248. package/dist/packages/skeleton/index.css +1 -0
  249. package/dist/packages/skeleton/style/css.mjs +2 -0
  250. package/dist/packages/skeleton/style/index.mjs +2 -0
  251. package/dist/packages/sku/index.css +1 -0
  252. package/dist/packages/sku/style/css.mjs +2 -0
  253. package/dist/packages/sku/style/index.mjs +2 -0
  254. package/dist/packages/space/index.css +1 -0
  255. package/dist/packages/space/index.mjs +4 -0
  256. package/dist/packages/space/index.scss +76 -0
  257. package/dist/packages/space/style/css.mjs +2 -0
  258. package/dist/packages/space/style/index.mjs +2 -0
  259. package/dist/packages/step/index.css +1 -0
  260. package/dist/packages/step/style/css.mjs +2 -0
  261. package/dist/packages/step/style/index.mjs +2 -0
  262. package/dist/packages/steps/index.css +1 -0
  263. package/dist/packages/steps/style/css.mjs +2 -0
  264. package/dist/packages/steps/style/index.mjs +2 -0
  265. package/dist/packages/sticky/index.css +0 -0
  266. package/dist/packages/sticky/style/css.mjs +2 -0
  267. package/dist/packages/sticky/style/index.mjs +2 -0
  268. package/dist/packages/subsidenavbar/index.css +1 -0
  269. package/dist/packages/subsidenavbar/style/css.mjs +2 -0
  270. package/dist/packages/subsidenavbar/style/index.mjs +2 -0
  271. package/dist/packages/swipe/index.css +1 -0
  272. package/dist/packages/swipe/style/css.mjs +2 -0
  273. package/dist/packages/swipe/style/index.mjs +2 -0
  274. package/dist/packages/swipegroup/index.css +0 -0
  275. package/dist/packages/swipegroup/style/css.mjs +2 -0
  276. package/dist/packages/swipegroup/style/index.mjs +2 -0
  277. package/dist/packages/swiper/index.css +1 -0
  278. package/dist/packages/swiper/style/css.mjs +2 -0
  279. package/dist/packages/swiper/style/index.mjs +2 -0
  280. package/dist/packages/swiperitem/index.css +1 -0
  281. package/dist/packages/swiperitem/style/css.mjs +2 -0
  282. package/dist/packages/swiperitem/style/index.mjs +2 -0
  283. package/dist/packages/switch/index.css +1 -0
  284. package/dist/packages/switch/style/css.mjs +2 -0
  285. package/dist/packages/switch/style/index.mjs +2 -0
  286. package/dist/packages/tabbar/index.css +1 -0
  287. package/dist/packages/tabbar/style/css.mjs +2 -0
  288. package/dist/packages/tabbar/style/index.mjs +2 -0
  289. package/dist/packages/tabbaritem/index.css +1 -0
  290. package/dist/packages/tabbaritem/style/css.mjs +2 -0
  291. package/dist/packages/tabbaritem/style/index.mjs +2 -0
  292. package/dist/packages/table/index.css +1 -0
  293. package/dist/packages/table/style/css.mjs +2 -0
  294. package/dist/packages/table/style/index.mjs +2 -0
  295. package/dist/packages/tabpane/index.css +1 -0
  296. package/dist/packages/tabpane/style/css.mjs +2 -0
  297. package/dist/packages/tabpane/style/index.mjs +2 -0
  298. package/dist/packages/tabs/index.css +1 -0
  299. package/dist/packages/tabs/style/css.mjs +2 -0
  300. package/dist/packages/tabs/style/index.mjs +2 -0
  301. package/dist/packages/tag/index.css +1 -0
  302. package/dist/packages/tag/style/css.mjs +2 -0
  303. package/dist/packages/tag/style/index.mjs +2 -0
  304. package/dist/packages/textarea/index.css +1 -0
  305. package/dist/packages/textarea/style/css.mjs +2 -0
  306. package/dist/packages/textarea/style/index.mjs +2 -0
  307. package/dist/packages/timedetail/index.css +1 -0
  308. package/dist/packages/timedetail/style/css.mjs +2 -0
  309. package/dist/packages/timedetail/style/index.mjs +2 -0
  310. package/dist/packages/timepannel/index.css +1 -0
  311. package/dist/packages/timepannel/style/css.mjs +2 -0
  312. package/dist/packages/timepannel/style/index.mjs +2 -0
  313. package/dist/packages/timeselect/index.css +1 -0
  314. package/dist/packages/timeselect/style/css.mjs +2 -0
  315. package/dist/packages/timeselect/style/index.mjs +2 -0
  316. package/dist/packages/toast/index.css +1 -0
  317. package/dist/packages/toast/style/css.mjs +2 -0
  318. package/dist/packages/toast/style/index.mjs +2 -0
  319. package/dist/packages/tour/index.css +1 -0
  320. package/dist/packages/tour/style/css.mjs +2 -0
  321. package/dist/packages/tour/style/index.mjs +2 -0
  322. package/dist/packages/trendarrow/index.css +1 -0
  323. package/dist/packages/trendarrow/style/css.mjs +2 -0
  324. package/dist/packages/trendarrow/style/index.mjs +2 -0
  325. package/dist/packages/uploader/index.css +1 -0
  326. package/dist/packages/uploader/index.scss +1 -4
  327. package/dist/packages/uploader/style/css.mjs +2 -0
  328. package/dist/packages/uploader/style/index.mjs +2 -0
  329. package/dist/packages/video/index.css +1 -0
  330. package/dist/packages/video/style/css.mjs +2 -0
  331. package/dist/packages/video/style/index.mjs +2 -0
  332. package/dist/packages/watermark/index.css +1 -0
  333. package/dist/packages/watermark/style/css.mjs +2 -0
  334. package/dist/packages/watermark/style/index.mjs +2 -0
  335. package/dist/smartips/web-types.json +123 -1
  336. package/dist/style.css +1 -1
  337. package/dist/styles/base-jdb.css +1 -0
  338. package/dist/styles/base-jddkh.css +1 -0
  339. package/dist/styles/base-jdt.css +1 -0
  340. package/dist/styles/themes/default.scss +2 -0
  341. package/dist/styles/themes/jdb.scss +2 -0
  342. package/dist/styles/themes/jddkh.scss +2 -0
  343. package/dist/styles/themes/jdt.scss +2 -0
  344. package/dist/styles/variables-jdb.scss +7 -2
  345. package/dist/styles/variables-jddkh.scss +7 -2
  346. package/dist/styles/variables-jdt.scss +3 -0
  347. package/dist/styles/variables.scss +3 -0
  348. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  349. package/dist/types/__VUE/avatarcropper/index.vue.d.ts +100 -0
  350. package/dist/types/__VUE/avatarcropper/types.d.ts +3 -0
  351. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  352. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  353. package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -2
  354. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +1 -1
  355. package/dist/types/__VUE/circleprogress/index.vue.d.ts +1 -1
  356. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  357. package/dist/types/__VUE/countdown/index.vue.d.ts +2 -2
  358. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  359. package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
  360. package/dist/types/__VUE/dialog/index.vue.d.ts +10 -4
  361. package/dist/types/__VUE/divider/index.vue.d.ts +1 -1
  362. package/dist/types/__VUE/ecard/index.vue.d.ts +1 -1
  363. package/dist/types/__VUE/ellipsis/index.vue.d.ts +1 -1
  364. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  365. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
  366. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  367. package/dist/types/__VUE/input/index.vue.d.ts +10 -24
  368. package/dist/types/__VUE/input/type.d.ts +3 -0
  369. package/dist/types/__VUE/input/util.d.ts +6 -0
  370. package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
  371. package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
  372. package/dist/types/__VUE/noticebar/index.vue.d.ts +2 -2
  373. package/dist/types/__VUE/pagination/index.vue.d.ts +1 -1
  374. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  375. package/dist/types/__VUE/radiogroup/index.vue.d.ts +1 -1
  376. package/dist/types/__VUE/range/index.vue.d.ts +4 -4
  377. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  378. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  379. package/dist/types/__VUE/signature/index.vue.d.ts +1 -1
  380. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  381. package/dist/types/__VUE/space/index.vue.d.ts +40 -0
  382. package/dist/types/__VUE/space/types.d.ts +3 -0
  383. package/dist/types/__VUE/swiper/index.vue.d.ts +3 -2
  384. package/dist/types/__VUE/tabbar/index.vue.d.ts +1 -1
  385. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
  386. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  387. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  388. package/dist/types/__VUE/tour/index.vue.d.ts +1 -1
  389. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  390. package/dist/types/__VUE/watermark/index.vue.d.ts +2 -2
  391. package/dist/types/index.d.ts +4 -2
  392. package/dist/types/utils/canvas.d.ts +7 -0
  393. package/package.json +2 -2
  394. package/dist/packages/actionsheet/style.mjs +0 -2
  395. package/dist/packages/address/style.mjs +0 -2
  396. package/dist/packages/addresslist/style.mjs +0 -2
  397. package/dist/packages/animate/style.mjs +0 -2
  398. package/dist/packages/audio/style.mjs +0 -2
  399. package/dist/packages/audiooperate/style.mjs +0 -2
  400. package/dist/packages/avatar/style.mjs +0 -2
  401. package/dist/packages/avatargroup/style.mjs +0 -2
  402. package/dist/packages/backtop/style.mjs +0 -2
  403. package/dist/packages/badge/style.mjs +0 -2
  404. package/dist/packages/barrage/style.mjs +0 -2
  405. package/dist/packages/button/style.mjs +0 -2
  406. package/dist/packages/calendar/style.mjs +0 -2
  407. package/dist/packages/calendaritem/style.mjs +0 -2
  408. package/dist/packages/card/style.mjs +0 -2
  409. package/dist/packages/cascader/style.mjs +0 -2
  410. package/dist/packages/category/style.mjs +0 -2
  411. package/dist/packages/categorypane/style.mjs +0 -2
  412. package/dist/packages/cell/style.mjs +0 -2
  413. package/dist/packages/cellgroup/style.mjs +0 -2
  414. package/dist/packages/checkbox/style.mjs +0 -2
  415. package/dist/packages/checkboxgroup/style.mjs +0 -2
  416. package/dist/packages/circleprogress/style.mjs +0 -2
  417. package/dist/packages/col/style.mjs +0 -2
  418. package/dist/packages/collapse/style.mjs +0 -2
  419. package/dist/packages/collapseitem/style.mjs +0 -2
  420. package/dist/packages/comment/style.mjs +0 -2
  421. package/dist/packages/configprovider/style.mjs +0 -2
  422. package/dist/packages/countdown/style.mjs +0 -2
  423. package/dist/packages/countup/style.mjs +0 -2
  424. package/dist/packages/datepicker/style.mjs +0 -2
  425. package/dist/packages/dialog/style.mjs +0 -2
  426. package/dist/packages/divider/style.mjs +0 -2
  427. package/dist/packages/drag/style.mjs +0 -2
  428. package/dist/packages/ecard/style.mjs +0 -2
  429. package/dist/packages/elevator/style.mjs +0 -2
  430. package/dist/packages/ellipsis/style.mjs +0 -2
  431. package/dist/packages/empty/style.mjs +0 -2
  432. package/dist/packages/fixednav/style.mjs +0 -2
  433. package/dist/packages/form/style.mjs +0 -2
  434. package/dist/packages/formitem/style.mjs +0 -2
  435. package/dist/packages/grid/style.mjs +0 -2
  436. package/dist/packages/griditem/style.mjs +0 -2
  437. package/dist/packages/icon/style.mjs +0 -2
  438. package/dist/packages/image/style.mjs +0 -2
  439. package/dist/packages/imagepreview/style.mjs +0 -2
  440. package/dist/packages/indicator/style.mjs +0 -2
  441. package/dist/packages/infiniteloading/style.mjs +0 -2
  442. package/dist/packages/input/style.mjs +0 -2
  443. package/dist/packages/inputnumber/style.mjs +0 -2
  444. package/dist/packages/invoice/style.mjs +0 -2
  445. package/dist/packages/layout/style.mjs +0 -2
  446. package/dist/packages/list/style.mjs +0 -2
  447. package/dist/packages/menu/style.mjs +0 -2
  448. package/dist/packages/menuitem/style.mjs +0 -2
  449. package/dist/packages/navbar/style.mjs +0 -2
  450. package/dist/packages/noticebar/style.mjs +0 -2
  451. package/dist/packages/notify/style.mjs +0 -2
  452. package/dist/packages/numberkeyboard/style.mjs +0 -2
  453. package/dist/packages/overlay/style.mjs +0 -2
  454. package/dist/packages/pagination/style.mjs +0 -2
  455. package/dist/packages/picker/style.mjs +0 -2
  456. package/dist/packages/popover/style.mjs +0 -2
  457. package/dist/packages/popup/style.mjs +0 -2
  458. package/dist/packages/price/style.mjs +0 -2
  459. package/dist/packages/progress/style.mjs +0 -2
  460. package/dist/packages/pullrefresh/style.mjs +0 -2
  461. package/dist/packages/radio/style.mjs +0 -2
  462. package/dist/packages/radiogroup/style.mjs +0 -2
  463. package/dist/packages/range/style.mjs +0 -2
  464. package/dist/packages/rate/style.mjs +0 -2
  465. package/dist/packages/row/style.mjs +0 -2
  466. package/dist/packages/searchbar/style.mjs +0 -2
  467. package/dist/packages/shortpassword/style.mjs +0 -2
  468. package/dist/packages/sidenavbar/style.mjs +0 -2
  469. package/dist/packages/sidenavbaritem/style.mjs +0 -2
  470. package/dist/packages/signature/style.mjs +0 -2
  471. package/dist/packages/skeleton/style.mjs +0 -2
  472. package/dist/packages/sku/style.mjs +0 -2
  473. package/dist/packages/step/style.mjs +0 -2
  474. package/dist/packages/steps/style.mjs +0 -2
  475. package/dist/packages/sticky/style.mjs +0 -2
  476. package/dist/packages/subsidenavbar/style.mjs +0 -2
  477. package/dist/packages/swipe/style.mjs +0 -2
  478. package/dist/packages/swipegroup/style.mjs +0 -2
  479. package/dist/packages/swiper/style.mjs +0 -2
  480. package/dist/packages/swiperitem/style.mjs +0 -2
  481. package/dist/packages/switch/style.mjs +0 -2
  482. package/dist/packages/tabbar/style.mjs +0 -2
  483. package/dist/packages/tabbaritem/style.mjs +0 -2
  484. package/dist/packages/table/style.mjs +0 -2
  485. package/dist/packages/tabpane/style.mjs +0 -2
  486. package/dist/packages/tabs/style.mjs +0 -2
  487. package/dist/packages/tag/style.mjs +0 -2
  488. package/dist/packages/textarea/style.mjs +0 -2
  489. package/dist/packages/timedetail/style.mjs +0 -2
  490. package/dist/packages/timepannel/style.mjs +0 -2
  491. package/dist/packages/timeselect/style.mjs +0 -2
  492. package/dist/packages/toast/style.mjs +0 -2
  493. package/dist/packages/tour/style.mjs +0 -2
  494. package/dist/packages/trendarrow/style.mjs +0 -2
  495. package/dist/packages/uploader/style.mjs +0 -2
  496. package/dist/packages/video/style.mjs +0 -2
  497. package/dist/packages/watermark/style.mjs +0 -2
@@ -0,0 +1,467 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __pow = Math.pow;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __async = (__this, __arguments, generator) => {
22
+ return new Promise((resolve, reject) => {
23
+ var fulfilled = (value) => {
24
+ try {
25
+ step(generator.next(value));
26
+ } catch (e) {
27
+ reject(e);
28
+ }
29
+ };
30
+ var rejected = (value) => {
31
+ try {
32
+ step(generator.throw(value));
33
+ } catch (e) {
34
+ reject(e);
35
+ }
36
+ };
37
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
38
+ step((generator = generator.apply(__this, __arguments)).next());
39
+ });
40
+ };
41
+ import { reactive, ref, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, renderSlot, withDirectives, normalizeStyle, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, vShow } from "vue";
42
+ import Button from "./Button.js";
43
+ import { c as createComponent, d as preventDefault, e as clamp } from "./component-f86a70df.js";
44
+ import { Refresh2, Retweet } from "@nutui/icons-vue";
45
+ import { u as useTouch } from "./index-7a7385e4.js";
46
+ import { u as useRect } from "./index-29892cda.js";
47
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
48
+ import "../locale/lang";
49
+ const { create } = createComponent("avatar-cropper");
50
+ const _sfc_main = create({
51
+ components: {
52
+ [Button.name]: Button,
53
+ Refresh2,
54
+ Retweet
55
+ },
56
+ props: {
57
+ maxZoom: {
58
+ type: Number,
59
+ default: 3
60
+ },
61
+ space: {
62
+ type: Number,
63
+ default: 10
64
+ },
65
+ toolbarPosition: {
66
+ type: String,
67
+ default: "bottom"
68
+ },
69
+ editText: {
70
+ type: String,
71
+ default: "编辑"
72
+ },
73
+ cancelText: {
74
+ type: String,
75
+ default: "取消"
76
+ },
77
+ confirmText: {
78
+ type: String,
79
+ default: "确定"
80
+ }
81
+ },
82
+ emits: ["confirm", "cancel"],
83
+ setup(props, { emit, expose }) {
84
+ const state = reactive({
85
+ visible: false,
86
+ defScale: 1,
87
+ scale: 1,
88
+ angle: 0,
89
+ moveX: 0,
90
+ moveY: 0,
91
+ moving: false,
92
+ zooming: false,
93
+ displayWidth: 0,
94
+ displayHeight: 0
95
+ });
96
+ const defDrawImage = {
97
+ img: new Image(),
98
+ // 规定要使用的图像
99
+ sx: 0,
100
+ // 开始剪切的 x 坐标位置
101
+ sy: 0,
102
+ // 开始剪切的 y 坐标位置
103
+ swidth: 0,
104
+ // 被剪切区域的宽度
105
+ sheight: 0,
106
+ // 被剪切区域的高度
107
+ x: 0,
108
+ // 在画布上x的坐标位置
109
+ y: 0,
110
+ // 在画布上y的坐标位置
111
+ width: 0,
112
+ // 要使用的图像的宽度
113
+ height: 0
114
+ // 要使用的图像的高度
115
+ };
116
+ const drawImage = ref(__spreadValues({}, defDrawImage));
117
+ const cropperPopupRef = ref();
118
+ const canvasRef = ref();
119
+ const inputImageRef = ref();
120
+ const devicePixelRatio = window.devicePixelRatio || 1;
121
+ const touch = useTouch();
122
+ const isAngle = computed(() => {
123
+ return state.angle === 90 || state.angle === 270;
124
+ });
125
+ const highlightStyle = computed(() => {
126
+ const { swidth } = drawImage.value;
127
+ const width = swidth / devicePixelRatio + "px";
128
+ const height = width;
129
+ return {
130
+ width,
131
+ height
132
+ };
133
+ });
134
+ const maxMoveX = computed(() => {
135
+ const { displayWidth, scale } = state;
136
+ const { swidth, height } = drawImage.value;
137
+ if (isAngle.value) {
138
+ return Math.max(0, (height * scale - swidth) / 2);
139
+ }
140
+ return Math.max(0, (displayWidth * scale - swidth) / 2);
141
+ });
142
+ const maxMoveY = computed(() => {
143
+ const { displayWidth, scale } = state;
144
+ const { swidth, height } = drawImage.value;
145
+ if (isAngle.value) {
146
+ return Math.max(0, (displayWidth * scale - swidth) / 2);
147
+ }
148
+ return Math.max(0, (height * scale - swidth) / 2);
149
+ });
150
+ const fileToDataURL = (file) => {
151
+ return new Promise((resolve) => {
152
+ const reader = new FileReader();
153
+ reader.onloadend = (e) => resolve(e.target.result);
154
+ reader.readAsDataURL(file);
155
+ });
156
+ };
157
+ const dataURLToImage = (dataURL) => {
158
+ return new Promise((resolve) => {
159
+ const img = new Image();
160
+ img.onload = () => resolve(img);
161
+ img.src = dataURL;
162
+ });
163
+ };
164
+ const draw = () => {
165
+ const { img, width, height, x, y, swidth } = drawImage.value;
166
+ const { moveX, moveY, scale } = state;
167
+ const canvas = canvasRef.value;
168
+ if (!canvas)
169
+ return;
170
+ const ctx = canvas.getContext("2d");
171
+ canvas.width = state.displayWidth;
172
+ canvas.height = state.displayHeight;
173
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
174
+ ctx.fillStyle = "#666";
175
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
176
+ ctx.fillStyle = "#000";
177
+ ctx.fillRect(props.space * devicePixelRatio, (canvas.height - swidth) / 2, swidth, swidth);
178
+ ctx.translate(canvas.width / 2 + moveX, canvas.height / 2 + moveY);
179
+ ctx.rotate(Math.PI / 180 * state.angle);
180
+ ctx.scale(scale, scale);
181
+ ctx.drawImage(img, x, y, width, height);
182
+ };
183
+ const setDrawImg = (image) => {
184
+ const rect = useRect(cropperPopupRef.value);
185
+ const { width: clientWidth, height: clientHeight } = rect;
186
+ const canvasWidth = state.displayWidth = clientWidth * devicePixelRatio;
187
+ const canvasHeight = state.displayHeight = clientHeight * devicePixelRatio;
188
+ let drawImg = __spreadValues({}, defDrawImage);
189
+ const { width: imgWidth, height: imgHeight } = image;
190
+ drawImg.img = image;
191
+ const isPortrait = imgHeight > imgWidth;
192
+ const rate = isPortrait ? imgWidth / imgHeight : imgHeight / imgWidth;
193
+ drawImg.width = canvasWidth;
194
+ drawImg.height = isPortrait ? canvasWidth / rate : canvasWidth * rate;
195
+ drawImg.x = -drawImg.width / 2;
196
+ drawImg.y = -drawImg.height / 2;
197
+ drawImg.swidth = canvasWidth - props.space * 2 * devicePixelRatio;
198
+ drawImg.sheight = isPortrait ? drawImg.swidth / rate : drawImg.swidth * rate;
199
+ drawImg.sx = props.space * devicePixelRatio;
200
+ drawImg.sy = (canvasHeight - drawImg.swidth) / 2;
201
+ drawImage.value = drawImg;
202
+ state.defScale = drawImg.swidth / (isPortrait ? drawImg.width : drawImg.height);
203
+ resetScale();
204
+ };
205
+ const inputImageChange = (event) => __async(this, null, function* () {
206
+ state.visible = true;
207
+ const $el = event.target;
208
+ let { files } = $el;
209
+ if (!(files == null ? void 0 : files.length))
210
+ return;
211
+ const base64 = yield fileToDataURL(files[0]);
212
+ const image = yield dataURLToImage(base64);
213
+ setDrawImg(image);
214
+ draw();
215
+ });
216
+ const resetScale = () => {
217
+ setScale(state.defScale);
218
+ state.moveX = 0;
219
+ state.moveY = 0;
220
+ state.angle = 0;
221
+ };
222
+ const setScale = (scale) => {
223
+ scale = clamp(scale, 0.3, +props.maxZoom + 1);
224
+ if (scale !== state.scale) {
225
+ state.scale = scale;
226
+ }
227
+ };
228
+ const getDistance = (touches) => Math.sqrt(__pow(touches[0].clientX - touches[1].clientX, 2) + __pow(touches[0].clientY - touches[1].clientY, 2));
229
+ let startMoveX;
230
+ let startMoveY;
231
+ let startScale;
232
+ let startDistance;
233
+ let fingerNum;
234
+ const onTouchStart = (event) => {
235
+ const { touches } = event;
236
+ const { offsetX } = touch;
237
+ touch.start(event);
238
+ fingerNum = touches.length;
239
+ startMoveX = state.moveX;
240
+ startMoveY = state.moveY;
241
+ state.moving = fingerNum === 1;
242
+ state.zooming = fingerNum === 2 && !offsetX.value;
243
+ if (state.zooming) {
244
+ startScale = state.scale;
245
+ startDistance = getDistance(event.touches);
246
+ }
247
+ };
248
+ const onTouchMove = (event) => {
249
+ const { touches } = event;
250
+ touch.move(event);
251
+ if (state.moving || state.zooming) {
252
+ preventDefault(event, true);
253
+ }
254
+ if (state.moving) {
255
+ const { deltaX, deltaY } = touch;
256
+ const moveX = deltaX.value * state.scale + startMoveX;
257
+ const moveY = deltaY.value * state.scale + startMoveY;
258
+ state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
259
+ state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
260
+ }
261
+ if (state.zooming && touches.length === 2) {
262
+ const distance = getDistance(touches);
263
+ const scale = startScale * distance / startDistance;
264
+ setScale(scale);
265
+ }
266
+ };
267
+ const onTouchEnd = (event) => {
268
+ let stopPropagation = false;
269
+ if (state.moving || state.zooming) {
270
+ stopPropagation = !(state.moving && startMoveX === state.moveX && startMoveY === state.moveY);
271
+ if (!event.touches.length) {
272
+ if (state.zooming) {
273
+ state.moveX = clamp(state.moveX, -maxMoveX.value, maxMoveX.value);
274
+ state.moveY = clamp(state.moveY, -maxMoveY.value, maxMoveY.value);
275
+ state.zooming = false;
276
+ }
277
+ state.moving = false;
278
+ startMoveX = 0;
279
+ startMoveY = 0;
280
+ startScale = state.defScale;
281
+ if (state.scale < state.defScale) {
282
+ resetScale();
283
+ }
284
+ if (state.scale > props.maxZoom) {
285
+ state.scale = +props.maxZoom;
286
+ }
287
+ }
288
+ }
289
+ preventDefault(event, stopPropagation);
290
+ touch.reset();
291
+ };
292
+ const reset = () => {
293
+ state.angle = 0;
294
+ };
295
+ const rotate = () => {
296
+ if (state.angle === 270) {
297
+ state.angle = 0;
298
+ return;
299
+ }
300
+ state.angle += 90;
301
+ };
302
+ const cancel = (isEmit = true) => {
303
+ state.visible = false;
304
+ resetScale();
305
+ inputImageRef.value.value = "";
306
+ isEmit && emit("cancel");
307
+ };
308
+ const confirm = () => {
309
+ const canvas = canvasRef.value;
310
+ const { sx, sy, swidth } = drawImage.value;
311
+ const width = swidth;
312
+ const height = swidth;
313
+ const croppedCanvas = document.createElement("canvas");
314
+ const croppedCtx = croppedCanvas.getContext("2d");
315
+ croppedCanvas.width = width;
316
+ croppedCanvas.height = height;
317
+ canvas && croppedCtx.drawImage(canvas, sx, sy, width, height, 0, 0, width, height);
318
+ const imageDataURL = croppedCanvas.toDataURL("image/png");
319
+ emit("confirm", imageDataURL);
320
+ cancel(false);
321
+ };
322
+ watch(
323
+ () => state.scale,
324
+ () => {
325
+ draw();
326
+ }
327
+ );
328
+ watch(
329
+ () => state.angle,
330
+ () => {
331
+ if (Math.abs(state.moveX) > maxMoveX.value) {
332
+ state.moveX = maxMoveX.value;
333
+ }
334
+ if (Math.abs(state.moveY) > maxMoveY.value) {
335
+ state.moveY = maxMoveY.value;
336
+ }
337
+ draw();
338
+ }
339
+ );
340
+ watch(
341
+ () => state.moveX,
342
+ () => {
343
+ draw();
344
+ }
345
+ );
346
+ watch(
347
+ () => state.moveY,
348
+ () => {
349
+ draw();
350
+ }
351
+ );
352
+ expose({
353
+ cancel,
354
+ reset,
355
+ rotate,
356
+ confirm
357
+ });
358
+ return __spreadProps(__spreadValues({}, toRefs(state)), {
359
+ cropperPopupRef,
360
+ canvasRef,
361
+ inputImageRef,
362
+ highlightStyle,
363
+ inputImageChange,
364
+ reset,
365
+ rotate,
366
+ cancel,
367
+ confirm,
368
+ onTouchStart,
369
+ onTouchMove,
370
+ onTouchEnd
371
+ });
372
+ }
373
+ });
374
+ const _hoisted_1 = ["data-edit-text"];
375
+ const _hoisted_2 = {
376
+ ref: "cropperPopupRef",
377
+ class: "nut-cropper-popup"
378
+ };
379
+ const _hoisted_3 = {
380
+ ref: "canvasRef",
381
+ class: "nut-cropper-popup__canvas"
382
+ };
383
+ const _hoisted_4 = {
384
+ key: 1,
385
+ class: "flex-sb"
386
+ };
387
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
388
+ const _component_nut_button = resolveComponent("nut-button");
389
+ const _component_Refresh2 = resolveComponent("Refresh2");
390
+ const _component_Retweet = resolveComponent("Retweet");
391
+ return openBlock(), createElementBlock(Fragment, null, [
392
+ createElementVNode("div", {
393
+ class: "nut-avatar-cropper",
394
+ "data-edit-text": _ctx.editText
395
+ }, [
396
+ renderSlot(_ctx.$slots, "default"),
397
+ createElementVNode("input", {
398
+ ref: "inputImageRef",
399
+ type: "file",
400
+ accept: "image/*",
401
+ class: "nut-avatar-cropper__input",
402
+ onChange: _cache[0] || (_cache[0] = (...args) => _ctx.inputImageChange && _ctx.inputImageChange(...args))
403
+ }, null, 544)
404
+ ], 8, _hoisted_1),
405
+ withDirectives(createElementVNode("div", _hoisted_2, [
406
+ createElementVNode("canvas", _hoisted_3, null, 512),
407
+ createElementVNode("div", {
408
+ class: "nut-cropper-popup__highlight",
409
+ onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
410
+ onTouchmove: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
411
+ onTouchend: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
412
+ onTouchcancel: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
413
+ }, [
414
+ createElementVNode("div", {
415
+ class: "highlight",
416
+ style: normalizeStyle(_ctx.highlightStyle)
417
+ }, null, 4)
418
+ ], 32),
419
+ createElementVNode("div", {
420
+ class: normalizeClass(["nut-cropper-popup__toolbar", [_ctx.toolbarPosition]])
421
+ }, [
422
+ _ctx.$slots.toolbar ? renderSlot(_ctx.$slots, "toolbar", { key: 0 }) : (openBlock(), createElementBlock("div", _hoisted_4, [
423
+ createElementVNode("div", {
424
+ class: "nut-cropper-popup__toolbar-item",
425
+ onClick: _cache[5] || (_cache[5] = ($event) => _ctx.cancel())
426
+ }, [
427
+ createVNode(_component_nut_button, { type: "danger" }, {
428
+ default: withCtx(() => [
429
+ createTextVNode(toDisplayString(_ctx.cancelText), 1)
430
+ ]),
431
+ _: 1
432
+ })
433
+ ]),
434
+ createElementVNode("div", {
435
+ class: "nut-cropper-popup__toolbar-item",
436
+ onClick: _cache[6] || (_cache[6] = (...args) => _ctx.reset && _ctx.reset(...args))
437
+ }, [
438
+ createVNode(_component_Refresh2, { color: "#fff" })
439
+ ]),
440
+ createElementVNode("div", {
441
+ class: "nut-cropper-popup__toolbar-item",
442
+ onClick: _cache[7] || (_cache[7] = (...args) => _ctx.rotate && _ctx.rotate(...args))
443
+ }, [
444
+ createVNode(_component_Retweet, { color: "#fff" })
445
+ ]),
446
+ createElementVNode("div", {
447
+ class: "nut-cropper-popup__toolbar-item",
448
+ onClick: _cache[8] || (_cache[8] = (...args) => _ctx.confirm && _ctx.confirm(...args))
449
+ }, [
450
+ createVNode(_component_nut_button, { type: "success" }, {
451
+ default: withCtx(() => [
452
+ createTextVNode(toDisplayString(_ctx.confirmText), 1)
453
+ ]),
454
+ _: 1
455
+ })
456
+ ])
457
+ ]))
458
+ ], 2)
459
+ ], 512), [
460
+ [vShow, _ctx.visible]
461
+ ])
462
+ ], 64);
463
+ }
464
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
465
+ export {
466
+ index as default
467
+ };
@@ -157,7 +157,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
157
157
  class: normalizeClass(["nut-collapse-item__title-icon", { "nut-collapse-item__title-icon--expanded": _ctx.expanded }]),
158
158
  style: normalizeStyle({ transform: "rotate(" + (_ctx.expanded ? _ctx.rotate : 0) + "deg)" })
159
159
  }, [
160
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.icon))))
160
+ _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.icon)), { key: 1 }))
161
161
  ], 6)
162
162
  ], 2),
163
163
  _ctx.$slots.extra ? (openBlock(), createElementBlock("view", _hoisted_7, [
@@ -39,7 +39,7 @@ const _sfc_main$3 = create$3({
39
39
  const _hoisted_1$3 = { class: "nut-comment-header__user" };
40
40
  const _hoisted_2$3 = { class: "nut-comment-header__user-avter" };
41
41
  const _hoisted_3$3 = ["src"];
42
- const _hoisted_4$3 = { class: "nut-comment-header__user-score" };
42
+ const _hoisted_4$2 = { class: "nut-comment-header__user-score" };
43
43
  const _hoisted_5$1 = {
44
44
  key: 0,
45
45
  class: "nut-comment-header__time"
@@ -69,7 +69,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
69
69
  createElementVNode("span", null, toDisplayString(_ctx.info.nickName), 1),
70
70
  renderSlot(_ctx.$slots, "labels")
71
71
  ], 2),
72
- createElementVNode("view", _hoisted_4$3, [
72
+ createElementVNode("view", _hoisted_4$2, [
73
73
  createVNode(_component_nut_rate, {
74
74
  modelValue: _ctx.info.score,
75
75
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.info.score = $event),
@@ -170,7 +170,7 @@ const _sfc_main$2 = create$2({
170
170
  const _hoisted_1$2 = ["onClick"];
171
171
  const _hoisted_2$2 = ["src"];
172
172
  const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("view", { class: "nut-comment-images__play" }, null, -1);
173
- const _hoisted_4$2 = ["onClick"];
173
+ const _hoisted_4$1 = ["onClick"];
174
174
  const _hoisted_5 = ["src"];
175
175
  const _hoisted_6 = {
176
176
  key: 0,
@@ -209,7 +209,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
209
209
  createElementVNode("span", null, "共 " + toDisplayString(_ctx.totalImages.length) + " 张", 1),
210
210
  createVNode(_component_Right, { style: { "width": "12px" } })
211
211
  ])) : createCommentVNode("", true)
212
- ], 8, _hoisted_4$2)) : createCommentVNode("", true)
212
+ ], 8, _hoisted_4$1)) : createCommentVNode("", true)
213
213
  ], 64);
214
214
  }), 128))
215
215
  ], 2);
@@ -262,7 +262,7 @@ const _sfc_main$1 = create$1({
262
262
  const _hoisted_1$1 = { class: "nut-comment-bottom" };
263
263
  const _hoisted_2$1 = { key: 0 };
264
264
  const _hoisted_3$1 = { class: "nut-comment-bottom__cpx" };
265
- const _hoisted_4$1 = ["onClick"];
265
+ const _hoisted_4 = ["onClick"];
266
266
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
267
267
  const _component_Fabulous = resolveComponent("Fabulous");
268
268
  const _component_Comment = resolveComponent("Comment");
@@ -293,7 +293,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
293
293
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.operate("popover"))
294
294
  }, toDisplayString(_ctx.translate("complaintsText")), 1)) : createCommentVNode("", true)
295
295
  ], 64)) : createCommentVNode("", true)
296
- ], 10, _hoisted_4$1);
296
+ ], 10, _hoisted_4);
297
297
  }), 128))
298
298
  ])
299
299
  ]);
@@ -375,10 +375,6 @@ const _sfc_main = create({
375
375
  const _hoisted_1 = ["innerHTML"];
376
376
  const _hoisted_2 = { class: "nut-comment__follow-title" };
377
377
  const _hoisted_3 = { class: "nut-comment__follow-com" };
378
- const _hoisted_4 = {
379
- key: 0,
380
- class: "nut-comment__follow-img"
381
- };
382
378
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
383
379
  const _component_comment_header = resolveComponent("comment-header");
384
380
  const _component_comment_images = resolveComponent("comment-images");
@@ -415,11 +411,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
415
411
  _ctx.follow && _ctx.follow.days > 0 ? (openBlock(), createElementBlock("view", {
416
412
  key: 0,
417
413
  class: "nut-comment__follow",
418
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
414
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
419
415
  }, [
420
416
  createElementVNode("view", _hoisted_2, toDisplayString(_ctx.translate("additionalReview", _ctx.follow.days)), 1),
421
417
  createElementVNode("view", _hoisted_3, toDisplayString(_ctx.follow.content), 1),
422
- _ctx.follow.images && _ctx.follow.images.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_4, [
418
+ _ctx.follow.images && _ctx.follow.images.length > 0 ? (openBlock(), createElementBlock("view", {
419
+ key: 0,
420
+ class: "nut-comment__follow-img",
421
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.clickImages(_ctx.follow.images))
422
+ }, [
423
423
  createTextVNode(toDisplayString(_ctx.translate("additionalImages", _ctx.follow.images.length)) + " ", 1),
424
424
  createVNode(_component_Right, { width: "12px" })
425
425
  ])) : createCommentVNode("", true)
@@ -43,6 +43,21 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
43
43
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
44
44
  return value.replace(regExp, "");
45
45
  }
46
+ function mapInputType(type) {
47
+ if (type === "number") {
48
+ return {
49
+ type: "text",
50
+ inputmode: "decimal"
51
+ };
52
+ }
53
+ if (type === "digit") {
54
+ return {
55
+ type: "tel",
56
+ inputmode: "numeric"
57
+ };
58
+ }
59
+ return { type };
60
+ }
46
61
  const { componentName, create } = createComponent("input");
47
62
  const _sfc_main = create({
48
63
  props: {
@@ -133,11 +148,7 @@ const _sfc_main = create({
133
148
  var _a;
134
149
  return String((_a = props.modelValue) != null ? _a : "");
135
150
  };
136
- const renderInput = (type) => {
137
- return h("input", __spreadValues({
138
- style: styles
139
- }, inputType(type)));
140
- };
151
+ const renderInput = (type) => h("input", __spreadValues({}, mapInputType(type)));
141
152
  const state = reactive({
142
153
  focused: false,
143
154
  validateFailed: false,
@@ -161,19 +172,6 @@ const _sfc_main = create({
161
172
  textAlign: props.inputAlign
162
173
  };
163
174
  });
164
- const inputType = (type) => {
165
- if (type === "number") {
166
- return {
167
- type: "text"
168
- };
169
- }
170
- if (type === "digit") {
171
- return {
172
- type: "tel"
173
- };
174
- }
175
- return { type };
176
- };
177
175
  const onInput = (event) => {
178
176
  if (!event.target.composing) {
179
177
  const input = event.target;
@@ -186,11 +184,9 @@ const _sfc_main = create({
186
184
  };
187
185
  const updateValue = (value, trigger = "onChange") => {
188
186
  var _a;
189
- if (props.type === "digit") {
190
- value = formatNumber(value, false, false);
191
- }
192
- if (props.type === "number") {
193
- value = formatNumber(value, true, true);
187
+ if (["number", "digit"].includes(props.type)) {
188
+ const isNumber = props.type === "number";
189
+ value = formatNumber(value, isNumber, isNumber);
194
190
  }
195
191
  if (props.formatter && trigger === props.formatTrigger) {
196
192
  value = props.formatter(value);
@@ -283,7 +279,6 @@ const _sfc_main = create({
283
279
  active,
284
280
  classes,
285
281
  styles,
286
- inputType,
287
282
  onInput,
288
283
  onFocus,
289
284
  onBlur,
@@ -64,7 +64,8 @@ const _sfc_main = create({
64
64
  const emitChange = (value, event) => {
65
65
  let output_value = fixedDecimalPlaces(value);
66
66
  emit("update:modelValue", output_value, event);
67
- emit("change", output_value, event);
67
+ if (Number(props.modelValue) !== Number(output_value))
68
+ emit("change", output_value, event);
68
69
  };
69
70
  const addAllow = (value = Number(props.modelValue)) => {
70
71
  return value < Number(props.max) && !props.disabled;
@@ -74,19 +75,21 @@ const _sfc_main = create({
74
75
  };
75
76
  const reduce = (event) => {
76
77
  emit("reduce", event);
77
- if (reduceAllow()) {
78
- let output_value = Number(props.modelValue) - Number(props.step);
78
+ let output_value = Number(props.modelValue) - Number(props.step);
79
+ if (reduceAllow() && output_value >= Number(props.min)) {
79
80
  emitChange(output_value, event);
80
81
  } else {
82
+ emitChange(Number(props.min), event);
81
83
  emit("overlimit", event, "reduce");
82
84
  }
83
85
  };
84
86
  const add = (event) => {
85
87
  emit("add", event);
86
- if (addAllow()) {
87
- let output_value = Number(props.modelValue) + Number(props.step);
88
+ let output_value = Number(props.modelValue) + Number(props.step);
89
+ if (addAllow() && output_value <= Number(props.max)) {
88
90
  emitChange(output_value, event);
89
91
  } else {
92
+ emitChange(Number(props.max), event);
90
93
  emit("overlimit", event, "add");
91
94
  }
92
95
  };
@@ -174,8 +174,7 @@ const usePicker = (props, emit) => {
174
174
  watch(
175
175
  () => props.columns,
176
176
  (val) => {
177
- if (val.length)
178
- state.formattedColumns = val;
177
+ state.formattedColumns = val;
179
178
  }
180
179
  );
181
180
  return __spreadProps(__spreadValues({}, toRefs(state)), {