@nutui/nutui 3.1.21-beta.3 → 3.1.22-beta.3

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 (284) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/nutui.es.js +4024 -18197
  3. package/dist/nutui.umd.js +4017 -18290
  4. package/dist/packages/_es/ActionSheet.js +26 -157
  5. package/dist/packages/_es/Address.js +119 -542
  6. package/dist/packages/_es/AddressList.js +113 -611
  7. package/dist/packages/_es/Audio.js +62 -274
  8. package/dist/packages/_es/AudioOperate.js +18 -107
  9. package/dist/packages/_es/Avatar.js +42 -165
  10. package/dist/packages/_es/AvatarGroup.js +14 -73
  11. package/dist/packages/_es/BackTop.js +43 -156
  12. package/dist/packages/_es/Badge.js +14 -86
  13. package/dist/packages/_es/Barrage.js +41 -113
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +24 -237
  16. package/dist/packages/_es/CalendarItem.js +1 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +156 -500
  19. package/dist/packages/_es/Category.js +15 -58
  20. package/dist/packages/_es/CategoryPane.js +11 -111
  21. package/dist/packages/_es/Cell.js +21 -98
  22. package/dist/packages/_es/CellGroup.js +9 -44
  23. package/dist/packages/_es/Checkbox.js +31 -113
  24. package/dist/packages/_es/CheckboxGroup.js +29 -58
  25. package/dist/packages/_es/CircleProgress.js +28 -151
  26. package/dist/packages/_es/Col.js +14 -56
  27. package/dist/packages/_es/Collapse.js +24 -85
  28. package/dist/packages/_es/CollapseItem.js +70 -261
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/CountDown.js +61 -242
  31. package/dist/packages/_es/CountUp.js +149 -548
  32. package/dist/packages/_es/DatePicker.js +107 -322
  33. package/dist/packages/_es/Dialog.js +69 -259
  34. package/dist/packages/_es/Divider.js +32 -45
  35. package/dist/packages/_es/Drag.js +56 -197
  36. package/dist/packages/_es/Ecard.js +24 -159
  37. package/dist/packages/_es/Elevator.js +63 -194
  38. package/dist/packages/_es/Empty.js +12 -71
  39. package/dist/packages/_es/FixedNav.js +15 -122
  40. package/dist/packages/_es/Form.js +64 -146
  41. package/dist/packages/_es/FormItem.js +15 -110
  42. package/dist/packages/_es/Grid.js +5 -6
  43. package/dist/packages/_es/GridItem.js +33 -144
  44. package/dist/packages/_es/Icon.js +15 -40
  45. package/dist/packages/_es/ImagePreview.js +74 -298
  46. package/dist/packages/_es/Indicator.js +15 -62
  47. package/dist/packages/_es/InfiniteLoading.js +66 -258
  48. package/dist/packages/_es/Input.js +51 -413
  49. package/dist/packages/_es/InputNumber.js +41 -160
  50. package/dist/packages/_es/Layout.js +4 -5
  51. package/dist/packages/_es/List.js +23 -109
  52. package/dist/packages/_es/Menu.js +30 -114
  53. package/dist/packages/_es/MenuItem.js +34 -161
  54. package/dist/packages/_es/Navbar.js +30 -94
  55. package/dist/packages/_es/NoticeBar.js +83 -387
  56. package/dist/packages/_es/Notify.js +81 -236
  57. package/dist/packages/_es/NumberKeyboard.js +41 -262
  58. package/dist/packages/_es/OldPicker.js +140 -464
  59. package/dist/packages/_es/OverLay.js +32 -105
  60. package/dist/packages/_es/Pagination.js +39 -157
  61. package/dist/packages/_es/Picker.js +138 -457
  62. package/dist/packages/_es/Popover.js +344 -185
  63. package/dist/packages/_es/Popup.js +64 -300
  64. package/dist/packages/_es/Price.js +16 -118
  65. package/dist/packages/_es/Progress.js +14 -146
  66. package/dist/packages/_es/PullRefresh.js +92 -346
  67. package/dist/packages/_es/Radio.js +22 -90
  68. package/dist/packages/_es/RadioGroup.js +8 -37
  69. package/dist/packages/_es/Range.js +92 -417
  70. package/dist/packages/_es/Rate.js +16 -139
  71. package/dist/packages/_es/Row.js +22 -64
  72. package/dist/packages/_es/SearchBar.js +46 -181
  73. package/dist/packages/_es/ShortPassword.js +35 -225
  74. package/dist/packages/_es/SideNavBar.js +33 -89
  75. package/dist/packages/_es/SideNavBarItem.js +11 -46
  76. package/dist/packages/_es/Signature.js +46 -165
  77. package/dist/packages/_es/Skeleton.js +20 -136
  78. package/dist/packages/_es/Sku.js +93 -499
  79. package/dist/packages/_es/Step.js +25 -119
  80. package/dist/packages/_es/Steps.js +18 -53
  81. package/dist/packages/_es/Sticky.js +53 -138
  82. package/dist/packages/_es/SubSideNavBar.js +26 -90
  83. package/dist/packages/_es/Swipe.js +46 -183
  84. package/dist/packages/_es/Swiper.js +121 -414
  85. package/dist/packages/_es/SwiperItem.js +22 -50
  86. package/dist/packages/_es/Switch.js +21 -116
  87. package/dist/packages/_es/TabPane.js +12 -35
  88. package/dist/packages/_es/Tabbar.js +17 -72
  89. package/dist/packages/_es/TabbarItem.js +29 -150
  90. package/dist/packages/_es/Table.js +27 -186
  91. package/dist/packages/_es/Tabs.js +51 -204
  92. package/dist/packages/_es/Tag.js +20 -97
  93. package/dist/packages/_es/TextArea.js +42 -160
  94. package/dist/packages/_es/TimeDetail.js +23 -84
  95. package/dist/packages/_es/TimePannel.js +19 -52
  96. package/dist/packages/_es/TimeSelect.js +15 -103
  97. package/dist/packages/_es/Toast.js +80 -319
  98. package/dist/packages/_es/Uploader.js +112 -459
  99. package/dist/packages/_es/Video.js +83 -340
  100. package/dist/packages/_es/common.js +38 -128
  101. package/dist/packages/_es/component.js +35 -76
  102. package/dist/packages/_es/index.js +5 -6
  103. package/dist/packages/_es/index2.js +9 -30
  104. package/dist/packages/_es/index3.js +6 -8
  105. package/dist/packages/_es/index4.js +13 -58
  106. package/dist/packages/_es/index5.js +120 -675
  107. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  108. package/dist/packages/_es/pxCheck.js +3 -5
  109. package/dist/packages/_es/raf.js +8 -15
  110. package/dist/packages/addresslist/index.scss +2 -2
  111. package/dist/packages/button/index.scss +2 -1
  112. package/dist/packages/card/index.scss +1 -1
  113. package/dist/packages/cell/index.scss +15 -0
  114. package/dist/packages/checkbox/index.scss +6 -0
  115. package/dist/packages/dialog/index.scss +1 -2
  116. package/dist/packages/divider/index.scss +9 -0
  117. package/dist/packages/elevator/index.scss +21 -0
  118. package/dist/packages/formitem/index.scss +1 -0
  119. package/dist/packages/input/index.scss +13 -1
  120. package/dist/packages/locale/index.d.ts +8 -3
  121. package/dist/packages/locale/{locale/lang → lang}/baseLang.d.ts +1 -0
  122. package/dist/packages/locale/lang/baseLang.js +3 -3
  123. package/dist/packages/locale/{locale/lang → lang}/en-US.d.ts +16 -0
  124. package/dist/packages/locale/lang/en-US.js +5 -89
  125. package/dist/packages/locale/lang/id-ID.d.ts +104 -0
  126. package/dist/packages/locale/lang/id-ID.js +12 -0
  127. package/dist/packages/locale/lang/index.js +16 -38
  128. package/dist/packages/locale/{locale/lang → lang}/zh-CN.d.ts +16 -0
  129. package/dist/packages/locale/lang/zh-CN.js +5 -89
  130. package/dist/packages/locale/{locale/lang → lang}/zh-TW.d.ts +16 -0
  131. package/dist/packages/locale/lang/zh-TW.js +5 -89
  132. package/dist/packages/menuitem/index.scss +0 -1
  133. package/dist/packages/navbar/index.scss +8 -1
  134. package/dist/packages/popover/index.scss +402 -81
  135. package/dist/packages/popup/index.scss +3 -0
  136. package/dist/packages/radio/index.scss +1 -0
  137. package/dist/packages/searchbar/index.scss +4 -0
  138. package/dist/packages/switch/index.scss +3 -3
  139. package/dist/packages/tabbar/index.scss +2 -2
  140. package/dist/packages/tabpane/index.scss +5 -2
  141. package/dist/packages/tabs/index.scss +3 -0
  142. package/dist/packages/timeselect/index.scss +3 -2
  143. package/dist/smartips/attributes.json +188 -44
  144. package/dist/smartips/tags.json +65 -27
  145. package/dist/style.css +1 -1
  146. package/dist/styles/themes/default.scss +48 -48
  147. package/dist/styles/themes/jdb.scss +48 -48
  148. package/dist/styles/themes/jdt.scss +48 -48
  149. package/dist/styles/variables-jdb.scss +25 -8
  150. package/dist/styles/variables-jdt.scss +25 -8
  151. package/dist/styles/variables.scss +25 -7
  152. package/dist/types/__VUE/actionsheet/{index.d.ts → index.vue.d.ts} +62 -114
  153. package/dist/types/__VUE/address/{index.d.ts → index.vue.d.ts} +81 -151
  154. package/dist/types/__VUE/addresslist/components/{GeneralShell.d.ts → GeneralShell.vue.d.ts} +6 -7
  155. package/dist/types/__VUE/addresslist/components/{ItemContents.d.ts → ItemContents.vue.d.ts} +9 -11
  156. package/dist/types/__VUE/addresslist/components/{LongPressShell.d.ts → LongPressShell.vue.d.ts} +6 -7
  157. package/dist/types/__VUE/addresslist/components/{SwipeShell.d.ts → SwipeShell.vue.d.ts} +6 -7
  158. package/dist/types/__VUE/addresslist/{index.d.ts → index.vue.d.ts} +14 -23
  159. package/dist/types/__VUE/audio/index.vue.d.ts +102 -0
  160. package/dist/types/__VUE/audiooperate/index.vue.d.ts +88 -0
  161. package/dist/types/__VUE/avatar/{index.d.ts → index.vue.d.ts} +17 -30
  162. package/dist/types/__VUE/avatargroup/{index.d.ts → index.vue.d.ts} +20 -35
  163. package/dist/types/__VUE/backtop/{index.d.ts → index.vue.d.ts} +18 -34
  164. package/dist/types/__VUE/badge/{index.d.ts → index.vue.d.ts} +20 -33
  165. package/dist/types/__VUE/barrage/{index.d.ts → index.vue.d.ts} +15 -26
  166. package/dist/types/__VUE/button/{index.d.ts → index.vue.d.ts} +33 -50
  167. package/dist/types/__VUE/button/type.d.ts +7 -0
  168. package/dist/types/__VUE/calendar/{index.d.ts → index.vue.d.ts} +32 -57
  169. package/dist/types/__VUE/calendaritem/{index.d.ts → index.vue.d.ts} +33 -58
  170. package/dist/types/__VUE/card/{index.d.ts → index.vue.d.ts} +19 -34
  171. package/dist/types/__VUE/cascader/{cascader-item.d.ts → cascader-item.vue.d.ts} +22 -23
  172. package/dist/types/__VUE/cascader/{index.d.ts → index.vue.d.ts} +62 -98
  173. package/dist/types/__VUE/category/{index.d.ts → index.vue.d.ts} +7 -10
  174. package/dist/types/__VUE/categorypane/{index.d.ts → index.vue.d.ts} +10 -15
  175. package/dist/types/__VUE/cell/{index.d.ts → index.vue.d.ts} +38 -39
  176. package/dist/types/__VUE/cellgroup/{index.d.ts → index.vue.d.ts} +8 -11
  177. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  178. package/dist/types/__VUE/checkbox/{index.d.ts → index.vue.d.ts} +36 -40
  179. package/dist/types/__VUE/checkboxgroup/{index.d.ts → index.vue.d.ts} +15 -11
  180. package/dist/types/__VUE/circleprogress/{index.d.ts → index.vue.d.ts} +18 -31
  181. package/dist/types/__VUE/col/{index.d.ts → index.vue.d.ts} +7 -10
  182. package/dist/types/__VUE/collapse/{index.d.ts → index.vue.d.ts} +24 -40
  183. package/dist/types/__VUE/collapseitem/{index.d.ts → index.vue.d.ts} +22 -30
  184. package/dist/types/__VUE/comment/components/{CmtBottom.d.ts → CmtBottom.vue.d.ts} +10 -15
  185. package/dist/types/__VUE/comment/components/{CmtHeader.d.ts → CmtHeader.vue.d.ts} +10 -15
  186. package/dist/types/__VUE/comment/components/{CmtImages.d.ts → CmtImages.vue.d.ts} +10 -15
  187. package/dist/types/__VUE/comment/{index.d.ts → index.vue.d.ts} +21 -38
  188. package/dist/types/__VUE/countdown/{index.d.ts → index.vue.d.ts} +21 -35
  189. package/dist/types/__VUE/countup/{index.d.ts → index.vue.d.ts} +41 -74
  190. package/dist/types/__VUE/datepicker/{index.d.ts → index.vue.d.ts} +71 -125
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +44 -302
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +263 -0
  194. package/dist/types/__VUE/divider/{index.d.ts → index.vue.d.ts} +15 -15
  195. package/dist/types/__VUE/drag/{index.d.ts → index.vue.d.ts} +9 -19
  196. package/dist/types/__VUE/ecard/{index.d.ts → index.vue.d.ts} +25 -44
  197. package/dist/types/__VUE/elevator/{index.d.ts → index.vue.d.ts} +39 -14
  198. package/dist/types/__VUE/empty/{index.d.ts → index.vue.d.ts} +9 -14
  199. package/dist/types/__VUE/fixednav/{index.d.ts → index.vue.d.ts} +18 -34
  200. package/dist/types/__VUE/form/{index.d.ts → index.vue.d.ts} +5 -6
  201. package/dist/types/__VUE/formitem/{index.d.ts → index.vue.d.ts} +29 -55
  202. package/dist/types/__VUE/grid/common.d.ts +3 -3
  203. package/dist/types/__VUE/grid/{index.d.ts → index.vue.d.ts} +24 -40
  204. package/dist/types/__VUE/griditem/{index.d.ts → index.vue.d.ts} +19 -26
  205. package/dist/types/__VUE/icon/{index.d.ts → index.vue.d.ts} +15 -26
  206. package/dist/types/__VUE/imagepreview/index.d.ts +20 -121
  207. package/dist/types/__VUE/imagepreview/index.vue.d.ts +108 -0
  208. package/dist/types/__VUE/indicator/{index.d.ts → index.vue.d.ts} +13 -24
  209. package/dist/types/__VUE/infiniteloading/{index.d.ts → index.vue.d.ts} +26 -47
  210. package/dist/types/__VUE/input/{index.d.ts → index.vue.d.ts} +81 -144
  211. package/dist/types/__VUE/input/type.d.ts +13 -0
  212. package/dist/types/__VUE/inputnumber/{index.d.ts → index.vue.d.ts} +22 -39
  213. package/dist/types/__VUE/layout/{index.d.ts → index.vue.d.ts} +1 -1
  214. package/dist/types/__VUE/list/{index.d.ts → index.vue.d.ts} +10 -14
  215. package/dist/types/__VUE/menu/{index.d.ts → index.vue.d.ts} +16 -14
  216. package/dist/types/__VUE/menuitem/{index.d.ts → index.vue.d.ts} +20 -24
  217. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  218. package/dist/types/__VUE/navbar/{index.d.ts → index.vue.d.ts} +48 -26
  219. package/dist/types/__VUE/noticebar/{index.d.ts → index.vue.d.ts} +35 -64
  220. package/dist/types/__VUE/notify/index.d.ts +12 -109
  221. package/dist/types/__VUE/notify/index.vue.d.ts +101 -0
  222. package/dist/types/__VUE/numberkeyboard/{index.d.ts → index.vue.d.ts} +41 -43
  223. package/dist/types/__VUE/oldpicker/{Column.d.ts → Column.vue.d.ts} +17 -22
  224. package/dist/types/__VUE/oldpicker/{index.d.ts → index.vue.d.ts} +75 -128
  225. package/dist/types/__VUE/overlay/{index.d.ts → index.vue.d.ts} +19 -30
  226. package/dist/types/__VUE/pagination/{index.d.ts → index.vue.d.ts} +21 -38
  227. package/dist/types/__VUE/picker/{Column.d.ts → Column.vue.d.ts} +16 -18
  228. package/dist/types/__VUE/picker/{index.d.ts → index.vue.d.ts} +79 -129
  229. package/dist/types/__VUE/popover/{index.d.ts → index.vue.d.ts} +85 -109
  230. package/dist/types/__VUE/popover/type.d.ts +6 -0
  231. package/dist/types/__VUE/popup/{index.d.ts → index.vue.d.ts} +45 -80
  232. package/dist/types/__VUE/price/{index.d.ts → index.vue.d.ts} +17 -30
  233. package/dist/types/__VUE/progress/{index.d.ts → index.vue.d.ts} +29 -53
  234. package/dist/types/__VUE/pullrefresh/{index.d.ts → index.vue.d.ts} +18 -46
  235. package/dist/types/__VUE/radio/{index.d.ts → index.vue.d.ts} +19 -34
  236. package/dist/types/__VUE/radiogroup/{index.d.ts → index.vue.d.ts} +10 -15
  237. package/dist/types/__VUE/range/{index.d.ts → index.vue.d.ts} +35 -47
  238. package/dist/types/__VUE/range/type.d.ts +5 -0
  239. package/dist/types/__VUE/rate/{index.d.ts → index.vue.d.ts} +30 -55
  240. package/dist/types/__VUE/row/{index.d.ts → index.vue.d.ts} +16 -25
  241. package/dist/types/__VUE/searchbar/{index.d.ts → index.vue.d.ts} +62 -32
  242. package/dist/types/__VUE/shortpassword/{index.d.ts → index.vue.d.ts} +25 -44
  243. package/dist/types/__VUE/sidenavbar/{index.d.ts → index.vue.d.ts} +6 -7
  244. package/dist/types/__VUE/sidenavbaritem/{index.d.ts → index.vue.d.ts} +8 -11
  245. package/dist/types/__VUE/signature/{index.d.ts → index.vue.d.ts} +13 -22
  246. package/dist/types/__VUE/skeleton/common.d.ts +3 -5
  247. package/dist/types/__VUE/skeleton/{index.d.ts → index.vue.d.ts} +24 -43
  248. package/dist/types/__VUE/sku/components/{SkuHeader.d.ts → SkuHeader.vue.d.ts} +6 -7
  249. package/dist/types/__VUE/sku/components/{SkuOperate.d.ts → SkuOperate.vue.d.ts} +14 -23
  250. package/dist/types/__VUE/sku/components/{SkuSelect.d.ts → SkuSelect.vue.d.ts} +6 -7
  251. package/dist/types/__VUE/sku/components/{SkuStepper.d.ts → SkuStepper.vue.d.ts} +12 -19
  252. package/dist/types/__VUE/sku/{index.d.ts → index.vue.d.ts} +66 -124
  253. package/dist/types/__VUE/step/{index.d.ts → index.vue.d.ts} +14 -23
  254. package/dist/types/__VUE/steps/{index.d.ts → index.vue.d.ts} +9 -14
  255. package/dist/types/__VUE/sticky/{index.d.ts → index.vue.d.ts} +14 -21
  256. package/dist/types/__VUE/subsidenavbar/{index.d.ts → index.vue.d.ts} +10 -15
  257. package/dist/types/__VUE/swipe/{index.d.ts → index.vue.d.ts} +11 -18
  258. package/dist/types/__VUE/swiper/{index.d.ts → index.vue.d.ts} +30 -50
  259. package/dist/types/__VUE/swiperitem/{index.d.ts → index.vue.d.ts} +2 -2
  260. package/dist/types/__VUE/switch/{index.d.ts → index.vue.d.ts} +28 -51
  261. package/dist/types/__VUE/tabbar/{index.d.ts → index.vue.d.ts} +17 -30
  262. package/dist/types/__VUE/tabbaritem/{index.d.ts → index.vue.d.ts} +25 -40
  263. package/dist/types/__VUE/table/common.d.ts +1 -1
  264. package/dist/types/__VUE/table/{index.d.ts → index.vue.d.ts} +14 -23
  265. package/dist/types/__VUE/tabpane/{index.d.ts → index.vue.d.ts} +11 -15
  266. package/dist/types/__VUE/tabs/common.d.ts +6 -2
  267. package/dist/types/__VUE/tabs/{index.d.ts → index.vue.d.ts} +30 -42
  268. package/dist/types/__VUE/tag/{index.d.ts → index.vue.d.ts} +21 -34
  269. package/dist/types/__VUE/tag/type.d.ts +5 -0
  270. package/dist/types/__VUE/textarea/{index.d.ts → index.vue.d.ts} +26 -45
  271. package/dist/types/__VUE/timedetail/{index.d.ts → index.vue.d.ts} +8 -11
  272. package/dist/types/__VUE/timepannel/{index.d.ts → index.vue.d.ts} +8 -11
  273. package/dist/types/__VUE/timeselect/{index.d.ts → index.vue.d.ts} +25 -29
  274. package/dist/types/__VUE/toast/index.d.ts +12 -145
  275. package/dist/types/__VUE/toast/index.vue.d.ts +134 -0
  276. package/dist/types/__VUE/uploader/{index.d.ts → index.vue.d.ts} +59 -106
  277. package/dist/types/__VUE/uploader/type.d.ts +18 -0
  278. package/dist/types/__VUE/video/{index.d.ts → index.vue.d.ts} +9 -26
  279. package/dist/types/index.d.ts +7 -2
  280. package/dist/types/nutui.d.ts +92 -92
  281. package/package.json +7 -3
  282. package/dist/packages/locale/locale/index.d.ts +0 -8
  283. package/dist/types/__VUE/audio/index.d.ts +0 -92
  284. package/dist/types/__VUE/audiooperate/index.d.ts +0 -68
@@ -3,181 +3,58 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
6
+ var __spreadValues = (a2, b) => {
7
7
  for (var prop in b || (b = {}))
8
8
  if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
9
+ __defNormalProp(a2, prop, b[prop]);
10
10
  if (__getOwnPropSymbols)
11
11
  for (var prop of __getOwnPropSymbols(b)) {
12
12
  if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
13
+ __defNormalProp(a2, prop, b[prop]);
14
14
  }
15
- return a;
15
+ return a2;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
19
19
  * (c) 2022 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
22
- import { toRefs, inject, ref, reactive, onMounted, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, Fragment, createBlock, createCommentVNode, renderSlot, toDisplayString } from "vue";
23
- import { c as createComponent } from "./component.js";
24
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
22
+ import { toRefs as a, inject as e, ref as t, reactive as r, onMounted as o, computed as n, resolveComponent as s, openBlock as l, createElementBlock as p, normalizeStyle as u, normalizeClass as i, Fragment as x, createBlock as v, createCommentVNode as c, renderSlot as m, toDisplayString as d } from "vue";
23
+ import { c as f } from "./component.js";
24
+ import { _ as g } from "./plugin-vue_export-helper.js";
25
25
  import "../locale/lang";
26
- const { componentName, create } = createComponent("avatar");
27
- const _sfc_main = create({
28
- props: {
29
- size: {
30
- type: String,
31
- default: ""
32
- },
33
- shape: {
34
- type: String,
35
- default: "round"
36
- },
37
- bgColor: {
38
- type: String,
39
- default: "#eee"
40
- },
41
- color: {
42
- type: String,
43
- default: "#666"
44
- },
45
- url: {
46
- type: String,
47
- default: ""
48
- },
49
- alt: {
50
- type: String,
51
- default: ""
52
- },
53
- icon: {
54
- type: String,
55
- default: ""
56
- }
57
- },
58
- emits: ["active-avatar", "onError"],
59
- setup(props, { emit, slots }) {
60
- const { size, shape, bgColor, color, icon } = toRefs(props);
61
- const sizeValue = ["large", "normal", "small"];
62
- const avatarGroup = inject("avatarGroup", null);
63
- const avatarRef = ref(null);
64
- const visible = reactive({
65
- lightTheme: false
66
- });
67
- const state = reactive({
68
- index: 1,
69
- showMax: false,
70
- maxIndex: 0
71
- });
72
- onMounted(() => {
73
- var _a, _b;
74
- const children = (_b = (_a = avatarGroup == null ? void 0 : avatarGroup.avatarGroupRef) == null ? void 0 : _a.value) == null ? void 0 : _b.children;
75
- if (children) {
76
- avatarLength(children);
77
- }
78
- });
79
- const classes = computed(() => {
80
- var _a, _b;
81
- const prefixCls = componentName;
82
- return {
83
- [prefixCls]: true,
84
- [`nut-avatar-${size.value || ((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.size) || "normal"}`]: true,
85
- [`nut-avatar-${shape.value || ((_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.shape) || "normal"}`]: true
86
- };
87
- });
88
- const styles = computed(() => {
89
- var _a, _b, _c;
90
- return {
91
- width: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
92
- height: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
93
- backgroundColor: `${bgColor.value}`,
94
- color: `${color.value}`,
95
- marginLeft: state.index != 1 && (((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.span) ? `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.span}px` : ""),
96
- zIndex: ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.zIndex) == "right" ? `${Math.abs(state.maxIndex - state.index)}` : ""
97
- };
98
- });
99
- const maxStyles = computed(() => {
100
- var _a, _b;
101
- return {
102
- backgroundColor: `${(_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.maxBgColor}`,
103
- color: `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.maxColor}`
104
- };
105
- });
106
- const iconStyles = computed(() => {
107
- return !!icon.value ? icon.value : "";
108
- });
109
- const isShowText = computed(() => {
110
- return slots.default;
111
- });
112
- const avatarLength = (children) => {
113
- var _a, _b, _c;
114
- state.maxIndex = children.length;
115
- for (let i = 0; i < children.length; i++) {
116
- if (children[i] && children[i].classList && children[i].classList[0] == "nut-avatar") {
117
- children[i].setAttribute("data-index", i + 1);
118
- }
119
- }
120
- state.index = (_b = (_a = avatarRef == null ? void 0 : avatarRef.value) == null ? void 0 : _a.dataset) == null ? void 0 : _b.index;
121
- if (state.index == state.maxIndex && state.index != ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.maxCount)) {
122
- state.showMax = true;
123
- }
124
- };
125
- const activeAvatar = (event) => {
126
- emit("active-avatar", event);
127
- };
128
- const onError = (event) => {
129
- emit("onError", event);
130
- };
131
- return __spreadValues({
132
- classes,
133
- styles,
134
- iconStyles,
135
- isShowText,
136
- maxStyles,
137
- activeAvatar,
138
- onError,
139
- avatarGroup,
140
- visible,
141
- avatarRef
142
- }, toRefs(state));
143
- }
144
- });
145
- const _hoisted_1 = ["src", "alt"];
146
- const _hoisted_2 = {
147
- key: 2,
148
- class: "text"
149
- };
150
- const _hoisted_3 = {
151
- key: 1,
152
- class: "text"
153
- };
154
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
26
+ const { componentName: h, create: y } = f("avatar"), C = y({ props: { size: { type: String, default: "" }, shape: { type: String, default: "round" }, bgColor: { type: String, default: "#eee" }, color: { type: String, default: "#666" }, url: { type: String, default: "" }, alt: { type: String, default: "" }, icon: { type: String, default: "" } }, emits: ["active-avatar", "onError"], setup(s2, { emit: l2, slots: p2 }) {
27
+ const { size: u2, shape: i2, bgColor: x2, color: v2, icon: c2 } = a(s2), m2 = ["large", "normal", "small"], d2 = e("avatarGroup", null), f2 = t(null), g2 = r({ lightTheme: false }), y2 = r({ index: 1, showMax: false, maxIndex: 0 });
28
+ o(() => {
29
+ var _a, _b;
30
+ const a2 = (_b = (_a = d2 == null ? void 0 : d2.avatarGroupRef) == null ? void 0 : _a.value) == null ? void 0 : _b.children;
31
+ a2 && k(a2);
32
+ });
33
+ const C2 = n(() => {
34
+ var _a, _b;
35
+ return { [h]: true, [`nut-avatar-${u2.value || ((_a = d2 == null ? void 0 : d2.props) == null ? void 0 : _a.size) || "normal"}`]: true, [`nut-avatar-${i2.value || ((_b = d2 == null ? void 0 : d2.props) == null ? void 0 : _b.shape) || "normal"}`]: true };
36
+ }), S2 = n(() => {
37
+ var _a, _b, _c;
38
+ return { width: m2.indexOf(u2.value) > -1 ? "" : `${u2.value}px`, height: m2.indexOf(u2.value) > -1 ? "" : `${u2.value}px`, backgroundColor: `${x2.value}`, color: `${v2.value}`, marginLeft: y2.index != 1 && (((_a = d2 == null ? void 0 : d2.props) == null ? void 0 : _a.span) ? `${(_b = d2 == null ? void 0 : d2.props) == null ? void 0 : _b.span}px` : ""), zIndex: ((_c = d2 == null ? void 0 : d2.props) == null ? void 0 : _c.zIndex) == "right" ? `${Math.abs(y2.maxIndex - y2.index)}` : "" };
39
+ }), w2 = n(() => {
40
+ var _a, _b;
41
+ return { backgroundColor: `${(_a = d2 == null ? void 0 : d2.props) == null ? void 0 : _a.maxBgColor}`, color: `${(_b = d2 == null ? void 0 : d2.props) == null ? void 0 : _b.maxColor}` };
42
+ }), $2 = n(() => c2.value ? c2.value : ""), G2 = n(() => p2.default), k = (a2) => {
43
+ var _a, _b, _c;
44
+ y2.maxIndex = a2.length;
45
+ for (let e2 = 0; e2 < a2.length; e2++)
46
+ a2[e2] && a2[e2].classList && a2[e2].classList[0] == "nut-avatar" && a2[e2].setAttribute("data-index", e2 + 1);
47
+ y2.index = (_b = (_a = f2 == null ? void 0 : f2.value) == null ? void 0 : _a.dataset) == null ? void 0 : _b.index, y2.index == y2.maxIndex && y2.index != ((_c = d2 == null ? void 0 : d2.props) == null ? void 0 : _c.maxCount) && (y2.showMax = true);
48
+ };
49
+ return __spreadValues({ classes: C2, styles: S2, iconStyles: $2, isShowText: G2, maxStyles: w2, activeAvatar: (a2) => {
50
+ l2("active-avatar", a2);
51
+ }, onError: (a2) => {
52
+ l2("onError", a2);
53
+ }, avatarGroup: d2, visible: g2, avatarRef: f2 }, a(y2));
54
+ } }), S = ["src", "alt"], w = { key: 2, class: "text" }, $ = { key: 1, class: "text" };
55
+ var G = g(C, [["render", function(a2, e2, t2, r2, o2, n2) {
155
56
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
156
- const _component_nut_icon = resolveComponent("nut-icon");
157
- return _ctx.showMax || !((_b = (_a = _ctx.avatarGroup) == null ? void 0 : _a.props) == null ? void 0 : _b.maxCount) || _ctx.index <= ((_d = (_c = _ctx.avatarGroup) == null ? void 0 : _c.props) == null ? void 0 : _d.maxCount) ? (openBlock(), createElementBlock("view", {
158
- key: 0,
159
- style: normalizeStyle(!_ctx.showMax ? _ctx.styles : _ctx.maxStyles),
160
- class: normalizeClass(_ctx.classes),
161
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.activeAvatar(_ctx.e)),
162
- ref: "avatarRef"
163
- }, [
164
- !((_f = (_e = _ctx.avatarGroup) == null ? void 0 : _e.props) == null ? void 0 : _f.maxCount) || _ctx.index <= ((_h = (_g = _ctx.avatarGroup) == null ? void 0 : _g.props) == null ? void 0 : _h.maxCount) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
165
- _ctx.url ? (openBlock(), createElementBlock("img", {
166
- key: 0,
167
- src: _ctx.url,
168
- alt: _ctx.alt,
169
- onError: _cache[0] || (_cache[0] = (...args) => _ctx.onError && _ctx.onError(...args))
170
- }, null, 40, _hoisted_1)) : _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
171
- key: 1,
172
- class: "icon",
173
- name: _ctx.iconStyles
174
- }, null, 8, ["name"])) : createCommentVNode("", true),
175
- _ctx.isShowText ? (openBlock(), createElementBlock("view", _hoisted_2, [
176
- renderSlot(_ctx.$slots, "default")
177
- ])) : createCommentVNode("", true)
178
- ], 64)) : createCommentVNode("", true),
179
- _ctx.showMax ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(((_j = (_i = _ctx.avatarGroup) == null ? void 0 : _i.props) == null ? void 0 : _j.maxContent) ? (_l = (_k = _ctx.avatarGroup) == null ? void 0 : _k.props) == null ? void 0 : _l.maxContent : `+ ${_ctx.maxIndex - ((_n = (_m = _ctx.avatarGroup) == null ? void 0 : _m.props) == null ? void 0 : _n.maxCount)}`), 1)) : createCommentVNode("", true)
180
- ], 6)) : createCommentVNode("", true);
181
- }
182
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
183
- export { index as default };
57
+ const f2 = s("nut-icon");
58
+ return a2.showMax || !((_b = (_a = a2.avatarGroup) == null ? void 0 : _a.props) == null ? void 0 : _b.maxCount) || a2.index <= ((_d = (_c = a2.avatarGroup) == null ? void 0 : _c.props) == null ? void 0 : _d.maxCount) ? (l(), p("view", { key: 0, style: u(a2.showMax ? a2.maxStyles : a2.styles), class: i(a2.classes), onClick: e2[1] || (e2[1] = (e3) => a2.activeAvatar(a2.e)), ref: "avatarRef" }, [!((_f = (_e = a2.avatarGroup) == null ? void 0 : _e.props) == null ? void 0 : _f.maxCount) || a2.index <= ((_h = (_g = a2.avatarGroup) == null ? void 0 : _g.props) == null ? void 0 : _h.maxCount) ? (l(), p(x, { key: 0 }, [a2.url ? (l(), p("img", { key: 0, src: a2.url, alt: a2.alt, onError: e2[0] || (e2[0] = (...e3) => a2.onError && a2.onError(...e3)) }, null, 40, S)) : a2.icon ? (l(), v(f2, { key: 1, class: "icon", name: a2.iconStyles }, null, 8, ["name"])) : c("", true), a2.isShowText ? (l(), p("view", w, [m(a2.$slots, "default")])) : c("", true)], 64)) : c("", true), a2.showMax ? (l(), p("view", $, d(((_j = (_i = a2.avatarGroup) == null ? void 0 : _i.props) == null ? void 0 : _j.maxContent) ? (_l = (_k = a2.avatarGroup) == null ? void 0 : _k.props) == null ? void 0 : _l.maxContent : "+ " + (a2.maxIndex - ((_n = (_m = a2.avatarGroup) == null ? void 0 : _m.props) == null ? void 0 : _n.maxCount))), 1)) : c("", true)], 6)) : c("", true);
59
+ }]]);
60
+ export { G as default };
@@ -1,78 +1,19 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { toRefs, ref, computed, onMounted, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { toRefs as e, ref as t, computed as a, onMounted as r, provide as o, openBlock as p, createElementBlock as n, normalizeClass as l, renderSlot as s } from "vue";
7
+ import { c as u } from "./component.js";
8
+ import { _ as f } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("avatar-group");
11
- const _sfc_main = create({
12
- props: {
13
- maxContent: {
14
- type: String,
15
- default: ""
16
- },
17
- maxCount: {
18
- type: [Number, String],
19
- default: ""
20
- },
21
- maxBgColor: {
22
- type: String,
23
- default: "#eee"
24
- },
25
- maxColor: {
26
- type: String,
27
- default: "#666"
28
- },
29
- size: {
30
- type: String,
31
- default: ""
32
- },
33
- shape: {
34
- type: String,
35
- default: ""
36
- },
37
- span: {
38
- type: String,
39
- default: "-8"
40
- },
41
- zIndex: {
42
- type: String,
43
- default: "left"
44
- }
45
- },
46
- setup(props, { emit, slots }) {
47
- toRefs(props);
48
- const avatarGroupRef = ref(null);
49
- const index2 = ref(0);
50
- const classes = computed(() => {
51
- const prefixCls = componentName;
52
- return {
53
- [prefixCls]: true
54
- };
55
- });
56
- onMounted(() => {
57
- });
58
- provide("avatarGroup", {
59
- props,
60
- avatarGroupRef,
61
- index: index2
62
- });
63
- return {
64
- classes,
65
- avatarGroupRef
66
- };
67
- }
68
- });
69
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
70
- return openBlock(), createElementBlock("view", {
71
- class: normalizeClass(_ctx.classes),
72
- ref: "avatarGroupRef"
73
- }, [
74
- renderSlot(_ctx.$slots, "default")
75
- ], 2);
76
- }
77
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
78
- export { index as default };
10
+ const { componentName: i, create: m } = u("avatar-group"), d = m({ props: { maxContent: { type: String, default: "" }, maxCount: { type: [Number, String], default: "" }, maxBgColor: { type: String, default: "#eee" }, maxColor: { type: String, default: "#666" }, size: { type: String, default: "" }, shape: { type: String, default: "" }, span: { type: String, default: "-8" }, zIndex: { type: String, default: "left" } }, setup(p2, { emit: n2, slots: l2 }) {
11
+ e(p2);
12
+ const s2 = t(null), u2 = t(0), f2 = a(() => ({ [i]: true }));
13
+ return r(() => {
14
+ }), o("avatarGroup", { props: p2, avatarGroupRef: s2, index: u2 }), { classes: f2, avatarGroupRef: s2 };
15
+ } });
16
+ var g = f(d, [["render", function(e2, t2, a2, r2, o2, u2) {
17
+ return p(), n("view", { class: l(e2.classes), ref: "avatarGroupRef" }, [s(e2.$slots, "default")], 2);
18
+ }]]);
19
+ export { g as default };
@@ -1,163 +1,50 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive, computed, onMounted, onUnmounted, onActivated, onDeactivated, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, createVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { reactive as e, computed as t, onMounted as o, onUnmounted as l, onActivated as n, onDeactivated as i, resolveComponent as r, openBlock as c, createElementBlock as s, normalizeClass as a, normalizeStyle as d, withModifiers as m, renderSlot as p, createVNode as u } from "vue";
7
+ import { c as f } from "./component.js";
8
+ import { _ as w } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("backtop");
11
- const _sfc_main = create({
12
- props: {
13
- bottom: {
14
- type: Number,
15
- default: 20
16
- },
17
- right: {
18
- type: Number,
19
- default: 10
20
- },
21
- elId: {
22
- type: [String, Element],
23
- default: "body"
24
- },
25
- distance: {
26
- type: Number,
27
- default: 200
28
- },
29
- zIndex: {
30
- type: Number,
31
- default: 10
32
- },
33
- isAnimation: {
34
- type: Boolean,
35
- default: true
36
- },
37
- duration: {
38
- type: Number,
39
- default: 1e3
40
- }
41
- },
42
- emits: ["click"],
43
- setup(props, { emit }) {
44
- const state = reactive({
45
- backTop: false,
46
- scrollTop: 0,
47
- scrollEl: window,
48
- startTime: 0,
49
- keepAlive: false
50
- });
51
- const classes = computed(() => {
52
- const prefixCls = componentName;
53
- return {
54
- [prefixCls]: true,
55
- show: state.backTop
56
- };
57
- });
58
- const style = computed(() => {
59
- return {
60
- right: `${props.right}px`,
61
- bottom: `${props.bottom}px`,
62
- zIndex: props.zIndex
63
- };
64
- });
65
- function scrollListener() {
66
- if (state.scrollEl instanceof Window) {
67
- state.scrollTop = state.scrollEl.pageYOffset;
68
- } else {
69
- state.scrollTop = state.scrollEl.scrollTop;
70
- }
71
- state.backTop = state.scrollTop >= props.distance;
72
- }
73
- function scroll(y = 0) {
74
- if (state.scrollEl instanceof Window) {
75
- window.scrollTo(0, y);
76
- } else {
77
- state.scrollEl.scrollTop = y;
78
- }
79
- }
80
- function scrollAnimation() {
81
- let cid = requestAniFrame()(function fn() {
82
- var t = props.duration - Math.max(0, state.startTime - +new Date() + props.duration);
83
- var y = t * -state.scrollTop / props.duration + state.scrollTop;
84
- scroll(y);
85
- cid = requestAniFrame()(fn);
86
- if (t == props.duration || y == 0) {
87
- window.cancelAnimationFrame(cid);
88
- }
89
- });
90
- }
91
- function addEventListener() {
92
- state.scrollEl.addEventListener("scroll", scrollListener, false);
93
- state.scrollEl.addEventListener("resize", scrollListener, false);
94
- }
95
- function removeEventListener() {
96
- state.scrollEl.removeEventListener("scroll", scrollListener, false);
97
- state.scrollEl.removeEventListener("resize", scrollListener, false);
98
- }
99
- function initCancelAniFrame() {
100
- window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
101
- }
102
- function requestAniFrame() {
103
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(callback) {
104
- window.setTimeout(callback, 1e3 / 60);
105
- };
106
- }
107
- function click(e) {
108
- state.startTime = +new Date();
109
- props.isAnimation && props.duration > 0 ? scrollAnimation() : scroll();
110
- emit("click", e);
111
- }
112
- function init() {
113
- if (props.elId && document.getElementById(props.elId)) {
114
- state.scrollEl = document.getElementById(props.elId);
115
- }
116
- addEventListener();
117
- initCancelAniFrame();
118
- }
119
- onMounted(() => {
120
- if (props.distance == 0) {
121
- state.backTop = true;
122
- }
123
- init();
124
- });
125
- onUnmounted(() => {
126
- removeEventListener();
127
- });
128
- onActivated(() => {
129
- if (state.keepAlive) {
130
- state.keepAlive = false;
131
- init();
132
- }
133
- });
134
- onDeactivated(() => {
135
- state.keepAlive = true;
136
- removeEventListener();
137
- });
138
- return {
139
- state,
140
- classes,
141
- style,
142
- click
10
+ const { componentName: k, create: E } = f("backtop");
11
+ var b = w(E({ props: { bottom: { type: Number, default: 20 }, right: { type: Number, default: 10 }, elId: { type: [String, Element], default: "body" }, distance: { type: Number, default: 200 }, zIndex: { type: Number, default: 10 }, isAnimation: { type: Boolean, default: true }, duration: { type: Number, default: 1e3 } }, emits: ["click"], setup(r2, { emit: c2 }) {
12
+ const s2 = e({ backTop: false, scrollTop: 0, scrollEl: window, startTime: 0, keepAlive: false }), a2 = t(() => ({ [k]: true, show: s2.backTop })), d2 = t(() => ({ right: `${r2.right}px`, bottom: `${r2.bottom}px`, zIndex: r2.zIndex }));
13
+ function m2() {
14
+ s2.scrollEl instanceof Window ? s2.scrollTop = s2.scrollEl.pageYOffset : s2.scrollTop = s2.scrollEl.scrollTop, s2.backTop = s2.scrollTop >= r2.distance;
15
+ }
16
+ function p2(e2 = 0) {
17
+ s2.scrollEl instanceof Window ? window.scrollTo(0, e2) : s2.scrollEl.scrollTop = e2;
18
+ }
19
+ function u2() {
20
+ s2.scrollEl.removeEventListener("scroll", m2, false), s2.scrollEl.removeEventListener("resize", m2, false);
21
+ }
22
+ function f2() {
23
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(e2) {
24
+ window.setTimeout(e2, 1e3 / 60);
143
25
  };
144
26
  }
145
- });
146
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
147
- const _component_nut_icon = resolveComponent("nut-icon");
148
- return openBlock(), createElementBlock("div", {
149
- class: normalizeClass(_ctx.classes),
150
- style: normalizeStyle(_ctx.style),
151
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.click && _ctx.click(...args), ["stop"]))
152
- }, [
153
- renderSlot(_ctx.$slots, "default", {}, () => [
154
- createVNode(_component_nut_icon, {
155
- size: "19px",
156
- class: "nut-backtop-main",
157
- name: "top"
158
- })
159
- ])
160
- ], 6);
161
- }
162
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
163
- export { index as default };
27
+ function w2() {
28
+ r2.elId && document.getElementById(r2.elId) && (s2.scrollEl = document.getElementById(r2.elId)), s2.scrollEl.addEventListener("scroll", m2, false), s2.scrollEl.addEventListener("resize", m2, false), window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
29
+ }
30
+ return o(() => {
31
+ r2.distance == 0 && (s2.backTop = true), w2();
32
+ }), l(() => {
33
+ u2();
34
+ }), n(() => {
35
+ s2.keepAlive && (s2.keepAlive = false, w2());
36
+ }), i(() => {
37
+ s2.keepAlive = true, u2();
38
+ }), { state: s2, classes: a2, style: d2, click: function(e2) {
39
+ s2.startTime = +new Date(), r2.isAnimation && r2.duration > 0 ? function() {
40
+ let e3 = f2()(function t2() {
41
+ var o2 = r2.duration - Math.max(0, s2.startTime - +new Date() + r2.duration), l2 = o2 * -s2.scrollTop / r2.duration + s2.scrollTop;
42
+ p2(l2), e3 = f2()(t2), o2 != r2.duration && l2 != 0 || window.cancelAnimationFrame(e3);
43
+ });
44
+ }() : p2(), c2("click", e2);
45
+ } };
46
+ } }), [["render", function(e2, t2, o2, l2, n2, i2) {
47
+ const f2 = r("nut-icon");
48
+ return c(), s("div", { class: a(e2.classes), style: d(e2.style), onClick: t2[0] || (t2[0] = m((...t3) => e2.click && e2.click(...t3), ["stop"])) }, [p(e2.$slots, "default", {}, () => [u(f2, { size: "19px", class: "nut-backtop-main", name: "top" })])], 6);
49
+ }]]);
50
+ export { b as default };
@@ -1,91 +1,19 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive, computed, openBlock, createElementBlock, createElementVNode, renderSlot, withDirectives, toDisplayString, normalizeClass, normalizeStyle, vShow } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { reactive as t, computed as e, openBlock as o, createElementBlock as n, createElementVNode as r, renderSlot as l, withDirectives as a, toDisplayString as u, normalizeClass as p, normalizeStyle as s, vShow as d } from "vue";
7
+ import { c as i } from "./component.js";
8
+ import { _ as c } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { create } = createComponent("badge");
11
- const _sfc_main = create({
12
- props: {
13
- value: {
14
- type: [String, Number]
15
- },
16
- max: {
17
- type: Number,
18
- default: 1e4
19
- },
20
- dot: {
21
- type: Boolean,
22
- default: false
23
- },
24
- hidden: {
25
- type: Boolean,
26
- default: false
27
- },
28
- top: {
29
- type: String,
30
- default: "0"
31
- },
32
- right: {
33
- type: String,
34
- default: "0"
35
- },
36
- zIndex: {
37
- type: Number,
38
- default: 9
39
- },
40
- color: {
41
- type: String,
42
- default: ""
43
- }
44
- },
45
- setup(props) {
46
- const state = reactive({});
47
- const stl = computed(() => {
48
- return {
49
- top: `${props.top}px`,
50
- right: `${props.right}px`,
51
- zIndex: props.zIndex,
52
- background: props.color
53
- };
54
- });
55
- const content = computed(() => {
56
- if (props.dot)
57
- return;
58
- const value = props.value;
59
- const max = props.max;
60
- if (typeof value === "number" && typeof max === "number") {
61
- return max < value ? `${max}+` : value;
62
- }
63
- return value;
64
- });
65
- return {
66
- state,
67
- stl,
68
- content
69
- };
70
- }
71
- });
72
- const _hoisted_1 = { class: "nut-badge" };
73
- const _hoisted_2 = { class: "slot-icons" };
74
- const _hoisted_3 = ["textContent"];
75
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
76
- return openBlock(), createElementBlock("view", _hoisted_1, [
77
- createElementVNode("view", _hoisted_2, [
78
- renderSlot(_ctx.$slots, "icons")
79
- ]),
80
- renderSlot(_ctx.$slots, "default"),
81
- withDirectives(createElementVNode("view", {
82
- textContent: toDisplayString(_ctx.content),
83
- class: normalizeClass(["nut-badge__content sup", { "is-dot": _ctx.dot }]),
84
- style: normalizeStyle(_ctx.stl)
85
- }, null, 14, _hoisted_3), [
86
- [vShow, !_ctx.hidden && (_ctx.content || _ctx.dot)]
87
- ])
88
- ]);
89
- }
90
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
91
- export { index as default };
10
+ const { create: f } = i("badge"), m = f({ props: { value: { type: [String, Number] }, max: { type: Number, default: 1e4 }, dot: { type: Boolean, default: false }, hidden: { type: Boolean, default: false }, top: { type: String, default: "0" }, right: { type: String, default: "0" }, zIndex: { type: Number, default: 9 }, color: { type: String, default: "" } }, setup: (o2) => ({ state: t({}), stl: e(() => ({ top: `${o2.top}px`, right: `${o2.right}px`, zIndex: o2.zIndex, background: o2.color })), content: e(() => {
11
+ if (o2.dot)
12
+ return;
13
+ const t2 = o2.value, e2 = o2.max;
14
+ return typeof t2 == "number" && typeof e2 == "number" && e2 < t2 ? `${e2}+` : t2;
15
+ }) }) }), g = { class: "nut-badge" }, x = { class: "slot-icons" }, y = ["textContent"];
16
+ var b = c(m, [["render", function(t2, e2, i2, c2, f2, m2) {
17
+ return o(), n("view", g, [r("view", x, [l(t2.$slots, "icons")]), l(t2.$slots, "default"), a(r("view", { textContent: u(t2.content), class: p(["nut-badge__content sup", { "is-dot": t2.dot }]), style: s(t2.stl) }, null, 14, y), [[d, !t2.hidden && (t2.content || t2.dot)]])]);
18
+ }]]);
19
+ export { b as default };