@nutui/nutui 4.1.6 → 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 (607) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/nutui.es.js +6 -2
  3. package/dist/nutui.js +4456 -4048
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/_es/ActionSheet.js +2 -2
  6. package/dist/packages/_es/Address.js +2 -2
  7. package/dist/packages/_es/AddressList.js +1 -1
  8. package/dist/packages/_es/Animate.js +1 -1
  9. package/dist/packages/_es/Audio.js +1 -1
  10. package/dist/packages/_es/AudioOperate.js +1 -1
  11. package/dist/packages/_es/Avatar.js +1 -1
  12. package/dist/packages/_es/AvatarCropper.js +467 -0
  13. package/dist/packages/_es/AvatarGroup.js +1 -1
  14. package/dist/packages/_es/Backtop.js +1 -1
  15. package/dist/packages/_es/Badge.js +1 -1
  16. package/dist/packages/_es/Barrage.js +1 -1
  17. package/dist/packages/_es/Button.js +1 -1
  18. package/dist/packages/_es/Calendar.js +3 -3
  19. package/dist/packages/_es/CalendarItem.js +2 -2
  20. package/dist/packages/_es/Card.js +1 -1
  21. package/dist/packages/_es/Cascader.js +2 -2
  22. package/dist/packages/_es/Category.js +1 -1
  23. package/dist/packages/_es/CategoryPane.js +1 -1
  24. package/dist/packages/_es/Cell.js +1 -1
  25. package/dist/packages/_es/CellGroup.js +1 -1
  26. package/dist/packages/_es/Checkbox.js +1 -1
  27. package/dist/packages/_es/CheckboxGroup.js +1 -1
  28. package/dist/packages/_es/CircleProgress.js +1 -1
  29. package/dist/packages/_es/Col.js +1 -1
  30. package/dist/packages/_es/Collapse.js +1 -1
  31. package/dist/packages/_es/CollapseItem.js +2 -2
  32. package/dist/packages/_es/Comment.js +13 -13
  33. package/dist/packages/_es/ConfigProvider.js +1 -1
  34. package/dist/packages/_es/Countdown.js +1 -1
  35. package/dist/packages/_es/Countup.js +1 -1
  36. package/dist/packages/_es/DatePicker.js +1 -1
  37. package/dist/packages/_es/Dialog.js +4 -4
  38. package/dist/packages/_es/Divider.js +1 -1
  39. package/dist/packages/_es/Drag.js +1 -1
  40. package/dist/packages/_es/Ecard.js +1 -1
  41. package/dist/packages/_es/Elevator.js +1 -1
  42. package/dist/packages/_es/Ellipsis.js +1 -1
  43. package/dist/packages/_es/Empty.js +1 -1
  44. package/dist/packages/_es/FixedNav.js +1 -1
  45. package/dist/packages/_es/Form.js +53 -28
  46. package/dist/packages/_es/FormItem.js +15 -2
  47. package/dist/packages/_es/Grid.js +2 -2
  48. package/dist/packages/_es/GridItem.js +2 -2
  49. package/dist/packages/_es/Image.js +1 -1
  50. package/dist/packages/_es/ImagePreview.js +8 -6
  51. package/dist/packages/_es/Indicator.js +1 -1
  52. package/dist/packages/_es/InfiniteLoading.js +1 -1
  53. package/dist/packages/_es/Input.js +20 -25
  54. package/dist/packages/_es/InputNumber.js +9 -6
  55. package/dist/packages/_es/{Interceptor-c05a39f2.js → Interceptor-006f85b3.js} +1 -1
  56. package/dist/packages/_es/Invoice.js +3 -3
  57. package/dist/packages/_es/Layout.js +1 -1
  58. package/dist/packages/_es/List.js +1 -1
  59. package/dist/packages/_es/Menu.js +1 -1
  60. package/dist/packages/_es/MenuItem.js +2 -2
  61. package/dist/packages/_es/Navbar.js +1 -1
  62. package/dist/packages/_es/Noticebar.js +1 -1
  63. package/dist/packages/_es/Notify.js +2 -2
  64. package/dist/packages/_es/NumberKeyboard.js +2 -2
  65. package/dist/packages/_es/Overlay.js +1 -1
  66. package/dist/packages/_es/Pagination.js +1 -1
  67. package/dist/packages/_es/Picker.js +2 -3
  68. package/dist/packages/_es/Popover.js +2 -2
  69. package/dist/packages/_es/Popup.js +2 -2
  70. package/dist/packages/_es/Price.js +1 -1
  71. package/dist/packages/_es/Progress.js +1 -1
  72. package/dist/packages/_es/PullRefresh.js +1 -1
  73. package/dist/packages/_es/Radio.js +2 -2
  74. package/dist/packages/_es/RadioGroup.js +2 -2
  75. package/dist/packages/_es/Range.js +1 -1
  76. package/dist/packages/_es/Rate.js +1 -1
  77. package/dist/packages/_es/Row.js +1 -1
  78. package/dist/packages/_es/Searchbar.js +1 -1
  79. package/dist/packages/_es/ShortPassword.js +2 -2
  80. package/dist/packages/_es/SideNavbar.js +1 -1
  81. package/dist/packages/_es/SideNavbarItem.js +1 -1
  82. package/dist/packages/_es/Signature.js +1 -1
  83. package/dist/packages/_es/Skeleton.js +1 -1
  84. package/dist/packages/_es/Sku.js +2 -2
  85. package/dist/packages/_es/Space.js +94 -0
  86. package/dist/packages/_es/Step.js +1 -1
  87. package/dist/packages/_es/Steps.js +1 -1
  88. package/dist/packages/_es/Sticky.js +1 -1
  89. package/dist/packages/_es/SubSideNavbar.js +1 -1
  90. package/dist/packages/_es/Swipe.js +1 -1
  91. package/dist/packages/_es/SwipeGroup.js +1 -1
  92. package/dist/packages/_es/Swiper.js +1 -1
  93. package/dist/packages/_es/SwiperItem.js +1 -1
  94. package/dist/packages/_es/Switch.js +1 -1
  95. package/dist/packages/_es/TabPane.js +1 -1
  96. package/dist/packages/_es/Tabbar.js +1 -1
  97. package/dist/packages/_es/TabbarItem.js +1 -1
  98. package/dist/packages/_es/Table.js +1 -1
  99. package/dist/packages/_es/Tabs.js +19 -1
  100. package/dist/packages/_es/Tag.js +1 -1
  101. package/dist/packages/_es/Textarea.js +1 -1
  102. package/dist/packages/_es/TimeDetail.js +1 -1
  103. package/dist/packages/_es/TimePannel.js +1 -1
  104. package/dist/packages/_es/TimeSelect.js +2 -2
  105. package/dist/packages/_es/Toast.js +2 -2
  106. package/dist/packages/_es/Tour.js +2 -2
  107. package/dist/packages/_es/TrendArrow.js +1 -1
  108. package/dist/packages/_es/Uploader.js +2 -2
  109. package/dist/packages/_es/Video.js +1 -1
  110. package/dist/packages/_es/Watermark.js +1 -1
  111. package/dist/packages/_es/{common-8775d905.js → common-728db750.js} +1 -1
  112. package/dist/packages/_es/{component-0fbad28e.js → component-f86a70df.js} +4 -4
  113. package/dist/packages/_es/{index-3032df15.js → index-5a1e6d22.js} +1 -1
  114. package/dist/packages/_es/{index-aef16dc6.js → index-b53aec83.js} +1 -1
  115. package/dist/packages/_es/{index.vue_vue_type_script_lang-cdf21a24.js → index.vue_vue_type_script_lang-0ccf787e.js} +4 -9
  116. package/dist/packages/_es/{index.vue_vue_type_script_lang-2852286e.js → index.vue_vue_type_script_lang-1e118ab6.js} +2 -2
  117. package/dist/packages/_es/{mountComponent-a895e3f1.js → mountComponent-053caf41.js} +1 -1
  118. package/dist/packages/actionsheet/index.css +1 -0
  119. package/dist/packages/actionsheet/style/css.mjs +2 -0
  120. package/dist/packages/actionsheet/style/index.mjs +2 -0
  121. package/dist/packages/address/index.css +1 -0
  122. package/dist/packages/address/style/css.mjs +2 -0
  123. package/dist/packages/address/style/index.mjs +2 -0
  124. package/dist/packages/addresslist/index.css +1 -0
  125. package/dist/packages/addresslist/style/css.mjs +2 -0
  126. package/dist/packages/addresslist/style/index.mjs +2 -0
  127. package/dist/packages/animate/index.css +1 -0
  128. package/dist/packages/animate/index.scss +3 -3
  129. package/dist/packages/animate/style/css.mjs +2 -0
  130. package/dist/packages/animate/style/index.mjs +2 -0
  131. package/dist/packages/audio/index.css +1 -0
  132. package/dist/packages/audio/style/css.mjs +2 -0
  133. package/dist/packages/audio/style/index.mjs +2 -0
  134. package/dist/packages/audiooperate/index.css +1 -0
  135. package/dist/packages/audiooperate/style/css.mjs +2 -0
  136. package/dist/packages/audiooperate/style/index.mjs +2 -0
  137. package/dist/packages/avatar/index.css +1 -0
  138. package/dist/packages/avatar/style/css.mjs +2 -0
  139. package/dist/packages/avatar/style/index.mjs +2 -0
  140. package/dist/packages/avatarcropper/index.css +1 -0
  141. package/dist/packages/avatarcropper/index.mjs +4 -0
  142. package/dist/packages/avatarcropper/index.scss +98 -0
  143. package/dist/packages/avatarcropper/style/css.mjs +2 -0
  144. package/dist/packages/avatarcropper/style/index.mjs +2 -0
  145. package/dist/packages/avatargroup/index.css +1 -0
  146. package/dist/packages/avatargroup/style/css.mjs +2 -0
  147. package/dist/packages/avatargroup/style/index.mjs +2 -0
  148. package/dist/packages/backtop/index.css +1 -0
  149. package/dist/packages/backtop/style/css.mjs +2 -0
  150. package/dist/packages/backtop/style/index.mjs +2 -0
  151. package/dist/packages/badge/index.css +1 -0
  152. package/dist/packages/badge/style/css.mjs +2 -0
  153. package/dist/packages/badge/style/index.mjs +2 -0
  154. package/dist/packages/barrage/index.css +1 -0
  155. package/dist/packages/barrage/style/css.mjs +2 -0
  156. package/dist/packages/barrage/style/index.mjs +2 -0
  157. package/dist/packages/button/index.css +1 -0
  158. package/dist/packages/button/style/css.mjs +2 -0
  159. package/dist/packages/button/style/index.mjs +2 -0
  160. package/dist/packages/calendar/index.css +1 -0
  161. package/dist/packages/calendar/style/css.mjs +2 -0
  162. package/dist/packages/calendar/style/index.mjs +2 -0
  163. package/dist/packages/calendaritem/index.css +0 -0
  164. package/dist/packages/calendaritem/style/css.mjs +2 -0
  165. package/dist/packages/calendaritem/style/index.mjs +2 -0
  166. package/dist/packages/card/index.css +1 -0
  167. package/dist/packages/card/style/css.mjs +2 -0
  168. package/dist/packages/card/style/index.mjs +2 -0
  169. package/dist/packages/cascader/index.css +1 -0
  170. package/dist/packages/cascader/style/css.mjs +2 -0
  171. package/dist/packages/cascader/style/index.mjs +2 -0
  172. package/dist/packages/category/index.css +1 -0
  173. package/dist/packages/category/style/css.mjs +2 -0
  174. package/dist/packages/category/style/index.mjs +2 -0
  175. package/dist/packages/categorypane/index.css +1 -0
  176. package/dist/packages/categorypane/style/css.mjs +2 -0
  177. package/dist/packages/categorypane/style/index.mjs +2 -0
  178. package/dist/packages/cell/index.css +1 -0
  179. package/dist/packages/cell/style/css.mjs +2 -0
  180. package/dist/packages/cell/style/index.mjs +2 -0
  181. package/dist/packages/cellgroup/index.css +1 -0
  182. package/dist/packages/cellgroup/style/css.mjs +2 -0
  183. package/dist/packages/cellgroup/style/index.mjs +2 -0
  184. package/dist/packages/checkbox/index.css +1 -0
  185. package/dist/packages/checkbox/index.scss +2 -1
  186. package/dist/packages/checkbox/style/css.mjs +2 -0
  187. package/dist/packages/checkbox/style/index.mjs +2 -0
  188. package/dist/packages/checkboxgroup/index.css +0 -0
  189. package/dist/packages/checkboxgroup/style/css.mjs +2 -0
  190. package/dist/packages/checkboxgroup/style/index.mjs +2 -0
  191. package/dist/packages/circleprogress/index.css +1 -0
  192. package/dist/packages/circleprogress/style/css.mjs +2 -0
  193. package/dist/packages/circleprogress/style/index.mjs +2 -0
  194. package/dist/packages/col/index.css +1 -0
  195. package/dist/packages/col/style/css.mjs +2 -0
  196. package/dist/packages/col/style/index.mjs +2 -0
  197. package/dist/packages/collapse/index.css +0 -0
  198. package/dist/packages/collapse/style/css.mjs +2 -0
  199. package/dist/packages/collapse/style/index.mjs +2 -0
  200. package/dist/packages/collapseitem/index.css +1 -0
  201. package/dist/packages/collapseitem/style/css.mjs +2 -0
  202. package/dist/packages/collapseitem/style/index.mjs +2 -0
  203. package/dist/packages/comment/index.css +1 -0
  204. package/dist/packages/comment/style/css.mjs +2 -0
  205. package/dist/packages/comment/style/index.mjs +2 -0
  206. package/dist/packages/configprovider/index.css +0 -0
  207. package/dist/packages/configprovider/style/css.mjs +2 -0
  208. package/dist/packages/configprovider/style/index.mjs +2 -0
  209. package/dist/packages/countdown/index.css +1 -0
  210. package/dist/packages/countdown/style/css.mjs +2 -0
  211. package/dist/packages/countdown/style/index.mjs +2 -0
  212. package/dist/packages/countup/index.css +1 -0
  213. package/dist/packages/countup/style/css.mjs +2 -0
  214. package/dist/packages/countup/style/index.mjs +2 -0
  215. package/dist/packages/datepicker/index.css +1 -0
  216. package/dist/packages/datepicker/style/css.mjs +2 -0
  217. package/dist/packages/datepicker/style/index.mjs +2 -0
  218. package/dist/packages/dialog/index.css +1 -0
  219. package/dist/packages/dialog/style/css.mjs +2 -0
  220. package/dist/packages/dialog/style/index.mjs +2 -0
  221. package/dist/packages/divider/index.css +1 -0
  222. package/dist/packages/divider/style/css.mjs +2 -0
  223. package/dist/packages/divider/style/index.mjs +2 -0
  224. package/dist/packages/drag/index.css +1 -0
  225. package/dist/packages/drag/style/css.mjs +2 -0
  226. package/dist/packages/drag/style/index.mjs +2 -0
  227. package/dist/packages/ecard/index.css +1 -0
  228. package/dist/packages/ecard/style/css.mjs +2 -0
  229. package/dist/packages/ecard/style/index.mjs +2 -0
  230. package/dist/packages/elevator/index.css +1 -0
  231. package/dist/packages/elevator/style/css.mjs +2 -0
  232. package/dist/packages/elevator/style/index.mjs +2 -0
  233. package/dist/packages/ellipsis/index.css +1 -0
  234. package/dist/packages/ellipsis/style/css.mjs +2 -0
  235. package/dist/packages/ellipsis/style/index.mjs +2 -0
  236. package/dist/packages/empty/index.css +1 -0
  237. package/dist/packages/empty/style/css.mjs +2 -0
  238. package/dist/packages/empty/style/index.mjs +2 -0
  239. package/dist/packages/fixednav/index.css +1 -0
  240. package/dist/packages/fixednav/style/css.mjs +2 -0
  241. package/dist/packages/fixednav/style/index.mjs +2 -0
  242. package/dist/packages/form/index.css +1 -0
  243. package/dist/packages/form/style/css.mjs +2 -0
  244. package/dist/packages/form/style/index.mjs +2 -0
  245. package/dist/packages/formitem/index.css +1 -0
  246. package/dist/packages/formitem/style/css.mjs +2 -0
  247. package/dist/packages/formitem/style/index.mjs +2 -0
  248. package/dist/packages/grid/index.css +1 -0
  249. package/dist/packages/grid/style/css.mjs +2 -0
  250. package/dist/packages/grid/style/index.mjs +2 -0
  251. package/dist/packages/griditem/index.css +1 -0
  252. package/dist/packages/griditem/style/css.mjs +2 -0
  253. package/dist/packages/griditem/style/index.mjs +2 -0
  254. package/dist/packages/icon/index.css +1 -0
  255. package/dist/packages/icon/style/css.mjs +2 -0
  256. package/dist/packages/icon/style/index.mjs +2 -0
  257. package/dist/packages/image/index.css +1 -0
  258. package/dist/packages/image/style/css.mjs +2 -0
  259. package/dist/packages/image/style/index.mjs +2 -0
  260. package/dist/packages/imagepreview/index.css +1 -0
  261. package/dist/packages/imagepreview/style/css.mjs +2 -0
  262. package/dist/packages/imagepreview/style/index.mjs +2 -0
  263. package/dist/packages/indicator/index.css +1 -0
  264. package/dist/packages/indicator/style/css.mjs +2 -0
  265. package/dist/packages/indicator/style/index.mjs +2 -0
  266. package/dist/packages/infiniteloading/index.css +1 -0
  267. package/dist/packages/infiniteloading/style/css.mjs +2 -0
  268. package/dist/packages/infiniteloading/style/index.mjs +2 -0
  269. package/dist/packages/input/index.css +1 -0
  270. package/dist/packages/input/style/css.mjs +2 -0
  271. package/dist/packages/input/style/index.mjs +2 -0
  272. package/dist/packages/inputnumber/index.css +1 -0
  273. package/dist/packages/inputnumber/style/css.mjs +2 -0
  274. package/dist/packages/inputnumber/style/index.mjs +2 -0
  275. package/dist/packages/invoice/index.css +1 -0
  276. package/dist/packages/invoice/style/css.mjs +2 -0
  277. package/dist/packages/invoice/style/index.mjs +2 -0
  278. package/dist/packages/layout/index.css +0 -0
  279. package/dist/packages/layout/style/css.mjs +2 -0
  280. package/dist/packages/layout/style/index.mjs +2 -0
  281. package/dist/packages/list/index.css +1 -0
  282. package/dist/packages/list/style/css.mjs +2 -0
  283. package/dist/packages/list/style/index.mjs +2 -0
  284. package/dist/packages/menu/index.css +1 -0
  285. package/dist/packages/menu/style/css.mjs +2 -0
  286. package/dist/packages/menu/style/index.mjs +2 -0
  287. package/dist/packages/menuitem/index.css +1 -0
  288. package/dist/packages/menuitem/style/css.mjs +2 -0
  289. package/dist/packages/menuitem/style/index.mjs +2 -0
  290. package/dist/packages/navbar/index.css +1 -0
  291. package/dist/packages/navbar/style/css.mjs +2 -0
  292. package/dist/packages/navbar/style/index.mjs +2 -0
  293. package/dist/packages/noticebar/index.css +1 -0
  294. package/dist/packages/noticebar/style/css.mjs +2 -0
  295. package/dist/packages/noticebar/style/index.mjs +2 -0
  296. package/dist/packages/notify/index.css +1 -0
  297. package/dist/packages/notify/style/css.mjs +2 -0
  298. package/dist/packages/notify/style/index.mjs +2 -0
  299. package/dist/packages/numberkeyboard/index.css +1 -0
  300. package/dist/packages/numberkeyboard/style/css.mjs +2 -0
  301. package/dist/packages/numberkeyboard/style/index.mjs +2 -0
  302. package/dist/packages/overlay/index.css +1 -0
  303. package/dist/packages/overlay/style/css.mjs +2 -0
  304. package/dist/packages/overlay/style/index.mjs +2 -0
  305. package/dist/packages/pagination/index.css +1 -0
  306. package/dist/packages/pagination/style/css.mjs +2 -0
  307. package/dist/packages/pagination/style/index.mjs +2 -0
  308. package/dist/packages/picker/index.css +1 -0
  309. package/dist/packages/picker/style/css.mjs +2 -0
  310. package/dist/packages/picker/style/index.mjs +2 -0
  311. package/dist/packages/popover/index.css +1 -0
  312. package/dist/packages/popover/style/css.mjs +2 -0
  313. package/dist/packages/popover/style/index.mjs +2 -0
  314. package/dist/packages/popup/index.css +1 -0
  315. package/dist/packages/popup/style/css.mjs +2 -0
  316. package/dist/packages/popup/style/index.mjs +2 -0
  317. package/dist/packages/price/index.css +1 -0
  318. package/dist/packages/price/style/css.mjs +2 -0
  319. package/dist/packages/price/style/index.mjs +2 -0
  320. package/dist/packages/progress/index.css +1 -0
  321. package/dist/packages/progress/style/css.mjs +2 -0
  322. package/dist/packages/progress/style/index.mjs +2 -0
  323. package/dist/packages/pullrefresh/index.css +1 -0
  324. package/dist/packages/pullrefresh/style/css.mjs +2 -0
  325. package/dist/packages/pullrefresh/style/index.mjs +2 -0
  326. package/dist/packages/radio/index.css +1 -0
  327. package/dist/packages/radio/index.scss +13 -0
  328. package/dist/packages/radio/style/css.mjs +2 -0
  329. package/dist/packages/radio/style/index.mjs +2 -0
  330. package/dist/packages/radiogroup/index.css +1 -0
  331. package/dist/packages/radiogroup/style/css.mjs +2 -0
  332. package/dist/packages/radiogroup/style/index.mjs +2 -0
  333. package/dist/packages/range/index.css +1 -0
  334. package/dist/packages/range/style/css.mjs +2 -0
  335. package/dist/packages/range/style/index.mjs +2 -0
  336. package/dist/packages/rate/index.css +1 -0
  337. package/dist/packages/rate/style/css.mjs +2 -0
  338. package/dist/packages/rate/style/index.mjs +2 -0
  339. package/dist/packages/row/index.css +1 -0
  340. package/dist/packages/row/style/css.mjs +2 -0
  341. package/dist/packages/row/style/index.mjs +2 -0
  342. package/dist/packages/searchbar/index.css +1 -0
  343. package/dist/packages/searchbar/style/css.mjs +2 -0
  344. package/dist/packages/searchbar/style/index.mjs +2 -0
  345. package/dist/packages/shortpassword/index.css +1 -0
  346. package/dist/packages/shortpassword/style/css.mjs +2 -0
  347. package/dist/packages/shortpassword/style/index.mjs +2 -0
  348. package/dist/packages/sidenavbar/index.css +1 -0
  349. package/dist/packages/sidenavbar/style/css.mjs +2 -0
  350. package/dist/packages/sidenavbar/style/index.mjs +2 -0
  351. package/dist/packages/sidenavbaritem/index.css +1 -0
  352. package/dist/packages/sidenavbaritem/style/css.mjs +2 -0
  353. package/dist/packages/sidenavbaritem/style/index.mjs +2 -0
  354. package/dist/packages/signature/index.css +1 -0
  355. package/dist/packages/signature/style/css.mjs +2 -0
  356. package/dist/packages/signature/style/index.mjs +2 -0
  357. package/dist/packages/skeleton/index.css +1 -0
  358. package/dist/packages/skeleton/style/css.mjs +2 -0
  359. package/dist/packages/skeleton/style/index.mjs +2 -0
  360. package/dist/packages/sku/index.css +1 -0
  361. package/dist/packages/sku/style/css.mjs +2 -0
  362. package/dist/packages/sku/style/index.mjs +2 -0
  363. package/dist/packages/space/index.css +1 -0
  364. package/dist/packages/space/index.mjs +4 -0
  365. package/dist/packages/space/index.scss +76 -0
  366. package/dist/packages/space/style/css.mjs +2 -0
  367. package/dist/packages/space/style/index.mjs +2 -0
  368. package/dist/packages/step/index.css +1 -0
  369. package/dist/packages/step/style/css.mjs +2 -0
  370. package/dist/packages/step/style/index.mjs +2 -0
  371. package/dist/packages/steps/index.css +1 -0
  372. package/dist/packages/steps/style/css.mjs +2 -0
  373. package/dist/packages/steps/style/index.mjs +2 -0
  374. package/dist/packages/sticky/index.css +0 -0
  375. package/dist/packages/sticky/style/css.mjs +2 -0
  376. package/dist/packages/sticky/style/index.mjs +2 -0
  377. package/dist/packages/subsidenavbar/index.css +1 -0
  378. package/dist/packages/subsidenavbar/style/css.mjs +2 -0
  379. package/dist/packages/subsidenavbar/style/index.mjs +2 -0
  380. package/dist/packages/swipe/index.css +1 -0
  381. package/dist/packages/swipe/style/css.mjs +2 -0
  382. package/dist/packages/swipe/style/index.mjs +2 -0
  383. package/dist/packages/swipegroup/index.css +0 -0
  384. package/dist/packages/swipegroup/style/css.mjs +2 -0
  385. package/dist/packages/swipegroup/style/index.mjs +2 -0
  386. package/dist/packages/swiper/index.css +1 -0
  387. package/dist/packages/swiper/style/css.mjs +2 -0
  388. package/dist/packages/swiper/style/index.mjs +2 -0
  389. package/dist/packages/swiperitem/index.css +1 -0
  390. package/dist/packages/swiperitem/style/css.mjs +2 -0
  391. package/dist/packages/swiperitem/style/index.mjs +2 -0
  392. package/dist/packages/switch/index.css +1 -0
  393. package/dist/packages/switch/style/css.mjs +2 -0
  394. package/dist/packages/switch/style/index.mjs +2 -0
  395. package/dist/packages/tabbar/index.css +1 -0
  396. package/dist/packages/tabbar/style/css.mjs +2 -0
  397. package/dist/packages/tabbar/style/index.mjs +2 -0
  398. package/dist/packages/tabbaritem/index.css +1 -0
  399. package/dist/packages/tabbaritem/style/css.mjs +2 -0
  400. package/dist/packages/tabbaritem/style/index.mjs +2 -0
  401. package/dist/packages/table/index.css +1 -0
  402. package/dist/packages/table/style/css.mjs +2 -0
  403. package/dist/packages/table/style/index.mjs +2 -0
  404. package/dist/packages/tabpane/index.css +1 -0
  405. package/dist/packages/tabpane/style/css.mjs +2 -0
  406. package/dist/packages/tabpane/style/index.mjs +2 -0
  407. package/dist/packages/tabs/index.css +1 -0
  408. package/dist/packages/tabs/style/css.mjs +2 -0
  409. package/dist/packages/tabs/style/index.mjs +2 -0
  410. package/dist/packages/tag/index.css +1 -0
  411. package/dist/packages/tag/style/css.mjs +2 -0
  412. package/dist/packages/tag/style/index.mjs +2 -0
  413. package/dist/packages/textarea/index.css +1 -0
  414. package/dist/packages/textarea/style/css.mjs +2 -0
  415. package/dist/packages/textarea/style/index.mjs +2 -0
  416. package/dist/packages/timedetail/index.css +1 -0
  417. package/dist/packages/timedetail/style/css.mjs +2 -0
  418. package/dist/packages/timedetail/style/index.mjs +2 -0
  419. package/dist/packages/timepannel/index.css +1 -0
  420. package/dist/packages/timepannel/style/css.mjs +2 -0
  421. package/dist/packages/timepannel/style/index.mjs +2 -0
  422. package/dist/packages/timeselect/index.css +1 -0
  423. package/dist/packages/timeselect/style/css.mjs +2 -0
  424. package/dist/packages/timeselect/style/index.mjs +2 -0
  425. package/dist/packages/toast/index.css +1 -0
  426. package/dist/packages/toast/style/css.mjs +2 -0
  427. package/dist/packages/toast/style/index.mjs +2 -0
  428. package/dist/packages/tour/index.css +1 -0
  429. package/dist/packages/tour/style/css.mjs +2 -0
  430. package/dist/packages/tour/style/index.mjs +2 -0
  431. package/dist/packages/trendarrow/index.css +1 -0
  432. package/dist/packages/trendarrow/style/css.mjs +2 -0
  433. package/dist/packages/trendarrow/style/index.mjs +2 -0
  434. package/dist/packages/uploader/index.css +1 -0
  435. package/dist/packages/uploader/index.scss +1 -4
  436. package/dist/packages/uploader/style/css.mjs +2 -0
  437. package/dist/packages/uploader/style/index.mjs +2 -0
  438. package/dist/packages/video/index.css +1 -0
  439. package/dist/packages/video/style/css.mjs +2 -0
  440. package/dist/packages/video/style/index.mjs +2 -0
  441. package/dist/packages/watermark/index.css +1 -0
  442. package/dist/packages/watermark/style/css.mjs +2 -0
  443. package/dist/packages/watermark/style/index.mjs +2 -0
  444. package/dist/smartips/web-types.json +123 -1
  445. package/dist/style.css +1 -1
  446. package/dist/styles/base-jdb.css +1 -0
  447. package/dist/styles/base-jddkh.css +1 -0
  448. package/dist/styles/base-jdt.css +1 -0
  449. package/dist/styles/themes/default.scss +40 -38
  450. package/dist/styles/themes/jdb.scss +40 -38
  451. package/dist/styles/themes/jddkh.scss +40 -38
  452. package/dist/styles/themes/jdt.scss +40 -38
  453. package/dist/styles/variables-jdb.scss +10 -3
  454. package/dist/styles/variables-jddkh.scss +9 -2
  455. package/dist/styles/variables-jdt.scss +6 -1
  456. package/dist/styles/variables.scss +6 -1
  457. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  458. package/dist/types/__VUE/avatarcropper/index.vue.d.ts +100 -0
  459. package/dist/types/__VUE/avatarcropper/types.d.ts +3 -0
  460. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  461. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  462. package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -2
  463. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +1 -1
  464. package/dist/types/__VUE/circleprogress/index.vue.d.ts +1 -1
  465. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  466. package/dist/types/__VUE/countdown/index.vue.d.ts +2 -2
  467. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  468. package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
  469. package/dist/types/__VUE/dialog/index.vue.d.ts +10 -4
  470. package/dist/types/__VUE/divider/index.vue.d.ts +1 -1
  471. package/dist/types/__VUE/ecard/index.vue.d.ts +1 -1
  472. package/dist/types/__VUE/ellipsis/index.vue.d.ts +1 -1
  473. package/dist/types/__VUE/form/common.d.ts +1 -1
  474. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  475. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
  476. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  477. package/dist/types/__VUE/input/index.vue.d.ts +10 -24
  478. package/dist/types/__VUE/input/type.d.ts +3 -0
  479. package/dist/types/__VUE/input/util.d.ts +6 -0
  480. package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
  481. package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
  482. package/dist/types/__VUE/noticebar/index.vue.d.ts +2 -2
  483. package/dist/types/__VUE/pagination/index.vue.d.ts +1 -1
  484. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  485. package/dist/types/__VUE/radiogroup/index.vue.d.ts +1 -1
  486. package/dist/types/__VUE/range/index.vue.d.ts +4 -4
  487. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  488. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  489. package/dist/types/__VUE/signature/index.vue.d.ts +1 -1
  490. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  491. package/dist/types/__VUE/space/index.vue.d.ts +40 -0
  492. package/dist/types/__VUE/space/types.d.ts +3 -0
  493. package/dist/types/__VUE/swiper/index.vue.d.ts +3 -2
  494. package/dist/types/__VUE/tabbar/index.vue.d.ts +1 -1
  495. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
  496. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  497. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  498. package/dist/types/__VUE/tour/index.vue.d.ts +1 -1
  499. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  500. package/dist/types/__VUE/watermark/index.vue.d.ts +2 -2
  501. package/dist/types/index.d.ts +4 -2
  502. package/dist/types/utils/canvas.d.ts +7 -0
  503. package/package.json +2 -2
  504. package/dist/packages/actionsheet/style.mjs +0 -2
  505. package/dist/packages/address/style.mjs +0 -2
  506. package/dist/packages/addresslist/style.mjs +0 -2
  507. package/dist/packages/animate/style.mjs +0 -2
  508. package/dist/packages/audio/style.mjs +0 -2
  509. package/dist/packages/audiooperate/style.mjs +0 -2
  510. package/dist/packages/avatar/style.mjs +0 -2
  511. package/dist/packages/avatargroup/style.mjs +0 -2
  512. package/dist/packages/backtop/style.mjs +0 -2
  513. package/dist/packages/badge/style.mjs +0 -2
  514. package/dist/packages/barrage/style.mjs +0 -2
  515. package/dist/packages/button/style.mjs +0 -2
  516. package/dist/packages/calendar/style.mjs +0 -2
  517. package/dist/packages/calendaritem/style.mjs +0 -2
  518. package/dist/packages/card/style.mjs +0 -2
  519. package/dist/packages/cascader/style.mjs +0 -2
  520. package/dist/packages/category/style.mjs +0 -2
  521. package/dist/packages/categorypane/style.mjs +0 -2
  522. package/dist/packages/cell/style.mjs +0 -2
  523. package/dist/packages/cellgroup/style.mjs +0 -2
  524. package/dist/packages/checkbox/style.mjs +0 -2
  525. package/dist/packages/checkboxgroup/style.mjs +0 -2
  526. package/dist/packages/circleprogress/style.mjs +0 -2
  527. package/dist/packages/col/style.mjs +0 -2
  528. package/dist/packages/collapse/style.mjs +0 -2
  529. package/dist/packages/collapseitem/style.mjs +0 -2
  530. package/dist/packages/comment/style.mjs +0 -2
  531. package/dist/packages/configprovider/style.mjs +0 -2
  532. package/dist/packages/countdown/style.mjs +0 -2
  533. package/dist/packages/countup/style.mjs +0 -2
  534. package/dist/packages/datepicker/style.mjs +0 -2
  535. package/dist/packages/dialog/style.mjs +0 -2
  536. package/dist/packages/divider/style.mjs +0 -2
  537. package/dist/packages/drag/style.mjs +0 -2
  538. package/dist/packages/ecard/style.mjs +0 -2
  539. package/dist/packages/elevator/style.mjs +0 -2
  540. package/dist/packages/ellipsis/style.mjs +0 -2
  541. package/dist/packages/empty/style.mjs +0 -2
  542. package/dist/packages/fixednav/style.mjs +0 -2
  543. package/dist/packages/form/style.mjs +0 -2
  544. package/dist/packages/formitem/style.mjs +0 -2
  545. package/dist/packages/grid/style.mjs +0 -2
  546. package/dist/packages/griditem/style.mjs +0 -2
  547. package/dist/packages/icon/style.mjs +0 -2
  548. package/dist/packages/image/style.mjs +0 -2
  549. package/dist/packages/imagepreview/style.mjs +0 -2
  550. package/dist/packages/indicator/style.mjs +0 -2
  551. package/dist/packages/infiniteloading/style.mjs +0 -2
  552. package/dist/packages/input/style.mjs +0 -2
  553. package/dist/packages/inputnumber/style.mjs +0 -2
  554. package/dist/packages/invoice/style.mjs +0 -2
  555. package/dist/packages/layout/style.mjs +0 -2
  556. package/dist/packages/list/style.mjs +0 -2
  557. package/dist/packages/menu/style.mjs +0 -2
  558. package/dist/packages/menuitem/style.mjs +0 -2
  559. package/dist/packages/navbar/style.mjs +0 -2
  560. package/dist/packages/noticebar/style.mjs +0 -2
  561. package/dist/packages/notify/style.mjs +0 -2
  562. package/dist/packages/numberkeyboard/style.mjs +0 -2
  563. package/dist/packages/overlay/style.mjs +0 -2
  564. package/dist/packages/pagination/style.mjs +0 -2
  565. package/dist/packages/picker/style.mjs +0 -2
  566. package/dist/packages/popover/style.mjs +0 -2
  567. package/dist/packages/popup/style.mjs +0 -2
  568. package/dist/packages/price/style.mjs +0 -2
  569. package/dist/packages/progress/style.mjs +0 -2
  570. package/dist/packages/pullrefresh/style.mjs +0 -2
  571. package/dist/packages/radio/style.mjs +0 -2
  572. package/dist/packages/radiogroup/style.mjs +0 -2
  573. package/dist/packages/range/style.mjs +0 -2
  574. package/dist/packages/rate/style.mjs +0 -2
  575. package/dist/packages/row/style.mjs +0 -2
  576. package/dist/packages/searchbar/style.mjs +0 -2
  577. package/dist/packages/shortpassword/style.mjs +0 -2
  578. package/dist/packages/sidenavbar/style.mjs +0 -2
  579. package/dist/packages/sidenavbaritem/style.mjs +0 -2
  580. package/dist/packages/signature/style.mjs +0 -2
  581. package/dist/packages/skeleton/style.mjs +0 -2
  582. package/dist/packages/sku/style.mjs +0 -2
  583. package/dist/packages/step/style.mjs +0 -2
  584. package/dist/packages/steps/style.mjs +0 -2
  585. package/dist/packages/sticky/style.mjs +0 -2
  586. package/dist/packages/subsidenavbar/style.mjs +0 -2
  587. package/dist/packages/swipe/style.mjs +0 -2
  588. package/dist/packages/swipegroup/style.mjs +0 -2
  589. package/dist/packages/swiper/style.mjs +0 -2
  590. package/dist/packages/swiperitem/style.mjs +0 -2
  591. package/dist/packages/switch/style.mjs +0 -2
  592. package/dist/packages/tabbar/style.mjs +0 -2
  593. package/dist/packages/tabbaritem/style.mjs +0 -2
  594. package/dist/packages/table/style.mjs +0 -2
  595. package/dist/packages/tabpane/style.mjs +0 -2
  596. package/dist/packages/tabs/style.mjs +0 -2
  597. package/dist/packages/tag/style.mjs +0 -2
  598. package/dist/packages/textarea/style.mjs +0 -2
  599. package/dist/packages/timedetail/style.mjs +0 -2
  600. package/dist/packages/timepannel/style.mjs +0 -2
  601. package/dist/packages/timeselect/style.mjs +0 -2
  602. package/dist/packages/toast/style.mjs +0 -2
  603. package/dist/packages/tour/style.mjs +0 -2
  604. package/dist/packages/trendarrow/style.mjs +0 -2
  605. package/dist/packages/uploader/style.mjs +0 -2
  606. package/dist/packages/video/style.mjs +0 -2
  607. package/dist/packages/watermark/style.mjs +0 -2
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { c as createComponent } from "./component-0fbad28e.js";
20
+ import { c as createComponent } from "./component-f86a70df.js";
21
21
  import { useSlots, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle } from "vue";
22
- import { P as Popup, p as popupProps } from "./index-3032df15.js";
22
+ import { P as Popup, p as popupProps } from "./index-5a1e6d22.js";
23
23
  import { Loading } from "@nutui/icons-vue";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
25
25
  import "../locale/lang";
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, watch, toRefs, nextTick, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, renderSlot, withDirectives, createVNode, vShow, toDisplayString, createElementBlock, Fragment, renderList, normalizeClass, createCommentVNode, normalizeStyle, createTextVNode } from "vue";
21
- import { c as createComponent } from "./component-0fbad28e.js";
22
- import { P as Popup, p as popupProps } from "./index-3032df15.js";
21
+ import { c as createComponent } from "./component-f86a70df.js";
22
+ import { P as Popup, p as popupProps } from "./index-5a1e6d22.js";
23
23
  import Elevator from "./Elevator.js";
24
24
  import { Location, Location2, Check, Close, Left } from "@nutui/icons-vue";
25
25
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createVNode, createTextVNode, ref, h, createBlock, resolveDynamicComponent, withCtx, reactive, computed, watch, onMounted, normalizeClass, Fragment, renderList, createSlots } from "vue";
2
- import { c as createComponent, n as floatData } from "./component-0fbad28e.js";
2
+ import { c as createComponent, n as floatData } from "./component-f86a70df.js";
3
3
  import { Del, Edit } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import Button from "./Button.js";
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, watch, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { create } = createComponent("animate");
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
21
- import { c as createComponent } from "./component-0fbad28e.js";
21
+ import { c as createComponent } from "./component-f86a70df.js";
22
22
  import { Service } from "@nutui/icons-vue";
23
23
  import Range from "./Range.js";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
21
- import { c as createComponent } from "./component-0fbad28e.js";
21
+ import { c as createComponent } from "./component-f86a70df.js";
22
22
  import Button from "./Button.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
1
  import { toRefs, inject, ref, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { create } = createComponent("avatar");
@@ -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
+ };
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onMounted, nextTick, unref, onUnmounted, provide, resolveComponent, openBlock, createElementBlock, normalizeStyle, renderSlot, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import Avatar from "./Avatar.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
1
  import { reactive, computed, onMounted, onUnmounted, onActivated, onDeactivated, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, createVNode } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { r as requestAniFrame, c as cancelRaf } from "./raf-729dad54.js";
4
4
  import { Top } from "@nutui/icons-vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,5 +1,5 @@
1
1
  import { reactive, computed, openBlock, createElementBlock, withDirectives, createElementVNode, normalizeStyle, renderSlot, vShow, normalizeClass, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { create } = createComponent("badge");
@@ -1,5 +1,5 @@
1
1
  import { useSlots, computed, ref, onMounted, onUnmounted, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { componentName, create } = createComponent("barrage");
@@ -1,5 +1,5 @@
1
1
  import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { Loading } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -1,7 +1,7 @@
1
1
  import { computed, ref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createSlots, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
3
- import { C as CalendarItem, U as Utils } from "./index-aef16dc6.js";
4
- import { P as Popup } from "./index-3032df15.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
+ import { C as CalendarItem, U as Utils } from "./index-b53aec83.js";
4
+ import { P as Popup } from "./index-5a1e6d22.js";
5
5
  import { u as useExpose } from "./index-79c5dc33.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
7
7
  import "../locale/lang";
@@ -1,7 +1,7 @@
1
- import { C } from "./index-aef16dc6.js";
1
+ import { C } from "./index-b53aec83.js";
2
2
  import "vue";
3
3
  import "./_plugin-vue_export-helper-cc2b3d55.js";
4
- import "./component-0fbad28e.js";
4
+ import "./component-f86a70df.js";
5
5
  import "../locale/lang";
6
6
  import "./raf-729dad54.js";
7
7
  import "./index-79c5dc33.js";
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-0fbad28e.js";
1
+ import { c as createComponent } from "./component-f86a70df.js";
2
2
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, renderSlot, createVNode, createCommentVNode, withCtx, createTextVNode } from "vue";
3
3
  import Price from "./Price.js";
4
4
  import Tag from "./Tag.js";
@@ -55,8 +55,8 @@ var __async = (__this, __arguments, generator) => {
55
55
  });
56
56
  };
57
57
  import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
58
- import { P as Popup, p as popupProps } from "./index-3032df15.js";
59
- import { c as createComponent } from "./component-0fbad28e.js";
58
+ import { P as Popup, p as popupProps } from "./index-5a1e6d22.js";
59
+ import { c as createComponent } from "./component-f86a70df.js";
60
60
  import { Loading, Checklist } from "@nutui/icons-vue";
61
61
  import Tabs from "./Tabs.js";
62
62
  import TabPane from "./TabPane.js";
@@ -1,5 +1,5 @@
1
1
  import { ref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { create } = createComponent("category");
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-0fbad28e.js";
1
+ import { c as createComponent } from "./component-f86a70df.js";
2
2
  import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
1
  import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, createBlock } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { u as useRouter } from "./index-54d03fc1.js";
4
4
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
5
5
  import { Right } from "@nutui/icons-vue";
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-0fbad28e.js";
1
+ import { c as createComponent } from "./component-f86a70df.js";
2
2
  import { openBlock, createElementBlock, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-0fbad28e.js";
1
+ import { c as createComponent } from "./component-f86a70df.js";
2
2
  import { inject, reactive, computed, watch, onMounted, getCurrentInstance, onBeforeUnmount, h } from "vue";
3
3
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
4
4
  import { CheckNormal, Checked, CheckDisabled } from "@nutui/icons-vue";
@@ -1,5 +1,5 @@
1
1
  import { reactive, provide, computed, watch, h } from "vue";
2
- import { c as createComponent } from "./component-0fbad28e.js";
2
+ import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { u as useExpose } from "./index-79c5dc33.js";
4
4
  import "../locale/lang";
5
5
  const { create, componentName } = createComponent("checkbox-group");