@nutui/nutui 3.0.2 → 3.1.2-3.beta-4

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 (408) hide show
  1. package/CHANGELOG.md +530 -1
  2. package/LICENSE +1 -1
  3. package/README.md +155 -36
  4. package/dist/nutui.es.js +20777 -4
  5. package/dist/nutui.umd.js +20886 -4
  6. package/dist/packages/_es/ActionSheet.js +162 -0
  7. package/dist/packages/_es/Address.js +551 -0
  8. package/dist/packages/_es/AddressList.js +620 -0
  9. package/dist/packages/_es/Animate.js +64 -0
  10. package/dist/packages/_es/Audio.js +263 -0
  11. package/dist/packages/_es/AudioOperate.js +105 -0
  12. package/dist/packages/_es/Avatar.js +168 -0
  13. package/dist/packages/_es/AvatarGroup.js +78 -0
  14. package/dist/packages/_es/BackTop.js +163 -0
  15. package/dist/packages/_es/Badge.js +91 -0
  16. package/dist/packages/_es/Barrage.js +126 -0
  17. package/dist/packages/_es/Button.js +134 -0
  18. package/dist/packages/_es/Calendar.js +252 -0
  19. package/dist/packages/_es/CalendarItem.js +12 -0
  20. package/dist/packages/_es/Card.js +115 -0
  21. package/dist/packages/_es/Cascader.js +519 -0
  22. package/dist/packages/_es/Category.js +63 -0
  23. package/dist/packages/_es/CategoryPane.js +118 -0
  24. package/dist/packages/_es/Cell.js +113 -0
  25. package/dist/packages/_es/CellGroup.js +49 -0
  26. package/dist/packages/_es/Checkbox.js +152 -0
  27. package/dist/packages/_es/CheckboxGroup.js +84 -0
  28. package/dist/packages/_es/CircleProgress.js +155 -0
  29. package/dist/packages/_es/Col.js +61 -0
  30. package/dist/packages/_es/Collapse.js +115 -0
  31. package/dist/packages/_es/CollapseItem.js +260 -0
  32. package/dist/packages/_es/Comment.js +441 -0
  33. package/dist/packages/_es/ConfigProvider.js +25 -0
  34. package/dist/packages/_es/CountDown.js +246 -0
  35. package/dist/packages/_es/CountUp.js +549 -0
  36. package/dist/packages/_es/DatePicker.js +332 -0
  37. package/dist/packages/_es/Dialog.js +306 -0
  38. package/dist/packages/_es/Divider.js +70 -0
  39. package/dist/packages/_es/Drag.js +204 -0
  40. package/dist/packages/_es/Ecard.js +164 -0
  41. package/dist/packages/_es/Elevator.js +262 -0
  42. package/dist/packages/_es/Ellipsis.js +206 -0
  43. package/dist/packages/_es/Empty.js +76 -0
  44. package/dist/packages/_es/FixedNav.js +127 -0
  45. package/dist/packages/_es/Form.js +158 -0
  46. package/dist/packages/_es/FormItem.js +119 -0
  47. package/dist/packages/_es/Grid.js +13 -0
  48. package/dist/packages/_es/GridItem.js +150 -0
  49. package/dist/packages/_es/Icon.js +45 -0
  50. package/dist/packages/_es/Image.js +142 -0
  51. package/dist/packages/_es/ImagePreview.js +565 -0
  52. package/dist/packages/_es/Indicator.js +67 -0
  53. package/dist/packages/_es/InfiniteLoading.js +256 -0
  54. package/dist/packages/_es/Input.js +440 -0
  55. package/dist/packages/_es/InputNumber.js +165 -0
  56. package/dist/packages/_es/Layout.js +11 -0
  57. package/dist/packages/_es/List.js +111 -0
  58. package/dist/packages/_es/Menu.js +175 -0
  59. package/dist/packages/_es/MenuItem.js +181 -0
  60. package/dist/packages/_es/Navbar.js +198 -0
  61. package/dist/packages/_es/NoticeBar.js +387 -0
  62. package/dist/packages/_es/Notify.js +236 -0
  63. package/dist/packages/_es/NumberKeyboard.js +278 -0
  64. package/dist/packages/_es/OldPicker.js +469 -0
  65. package/dist/packages/_es/OverLay.js +104 -0
  66. package/dist/packages/_es/Pagination.js +165 -0
  67. package/dist/packages/_es/Picker.js +508 -0
  68. package/dist/packages/_es/Popover.js +987 -0
  69. package/dist/packages/_es/Popup.js +302 -0
  70. package/dist/packages/_es/Price.js +123 -0
  71. package/dist/packages/_es/Progress.js +151 -0
  72. package/dist/packages/_es/PullRefresh.js +349 -0
  73. package/dist/packages/_es/Radio.js +96 -0
  74. package/dist/packages/_es/RadioGroup.js +42 -0
  75. package/dist/packages/_es/Range.js +414 -0
  76. package/dist/packages/_es/Rate.js +198 -0
  77. package/dist/packages/_es/Row.js +69 -0
  78. package/dist/packages/_es/SearchBar.js +243 -0
  79. package/dist/packages/_es/ShortPassword.js +231 -0
  80. package/dist/packages/_es/SideNavBar.js +87 -0
  81. package/dist/packages/_es/SideNavBarItem.js +51 -0
  82. package/dist/packages/_es/Signature.js +166 -0
  83. package/dist/packages/_es/Skeleton.js +141 -0
  84. package/dist/packages/_es/Sku.js +499 -0
  85. package/dist/packages/_es/Step.js +120 -0
  86. package/dist/packages/_es/Steps.js +58 -0
  87. package/dist/packages/_es/Sticky.js +144 -0
  88. package/dist/packages/_es/SubSideNavBar.js +87 -0
  89. package/dist/packages/_es/Swipe.js +188 -0
  90. package/dist/packages/_es/Swiper.js +460 -0
  91. package/dist/packages/_es/SwiperItem.js +58 -0
  92. package/dist/packages/_es/Switch.js +129 -0
  93. package/dist/packages/_es/TabPane.js +44 -0
  94. package/dist/packages/_es/Tabbar.js +78 -0
  95. package/dist/packages/_es/TabbarItem.js +179 -0
  96. package/dist/packages/_es/Table.js +183 -0
  97. package/dist/packages/_es/Tabs.js +211 -0
  98. package/dist/packages/_es/Tag.js +102 -0
  99. package/dist/packages/_es/TextArea.js +166 -0
  100. package/dist/packages/_es/TimeDetail.js +84 -0
  101. package/dist/packages/_es/TimePannel.js +53 -0
  102. package/dist/packages/_es/TimeSelect.js +117 -0
  103. package/dist/packages/_es/Toast.js +316 -0
  104. package/dist/packages/_es/Uploader.js +489 -0
  105. package/dist/packages/_es/Video.js +339 -0
  106. package/dist/packages/_es/WaterMark.js +187 -0
  107. package/dist/packages/_es/common.js +136 -0
  108. package/dist/packages/_es/component.js +102 -0
  109. package/dist/packages/_es/index.js +11 -0
  110. package/dist/packages/_es/index2.js +36 -0
  111. package/dist/packages/_es/index3.js +13 -0
  112. package/dist/packages/_es/index4.js +70 -0
  113. package/dist/packages/_es/index5.js +791 -0
  114. package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
  115. package/dist/packages/_es/pxCheck.js +9 -0
  116. package/dist/packages/_es/raf.js +19 -0
  117. package/dist/packages/_es/style.css +111 -0
  118. package/dist/packages/actionsheet/index.scss +12 -7
  119. package/dist/packages/address/index.scss +18 -1
  120. package/dist/packages/addresslist/index.scss +144 -0
  121. package/dist/packages/animate/index.scss +299 -0
  122. package/dist/packages/audio/index.scss +66 -0
  123. package/dist/packages/audiooperate/index.scss +13 -0
  124. package/dist/packages/avatar/index.scss +11 -6
  125. package/dist/packages/avatargroup/index.scss +14 -0
  126. package/dist/packages/badge/index.scss +33 -0
  127. package/dist/packages/barrage/index.scss +48 -0
  128. package/dist/packages/button/index.scss +18 -4
  129. package/dist/packages/calendar/index.scss +67 -46
  130. package/dist/packages/calendaritem/index.scss +0 -195
  131. package/dist/packages/card/index.scss +97 -0
  132. package/dist/packages/cascader/index.scss +94 -0
  133. package/dist/packages/category/index.scss +38 -0
  134. package/dist/packages/categorypane/index.scss +124 -0
  135. package/dist/packages/cell/index.scss +33 -11
  136. package/dist/packages/cellgroup/index.scss +10 -1
  137. package/dist/packages/checkbox/index.scss +31 -3
  138. package/dist/packages/circleprogress/index.scss +24 -0
  139. package/dist/packages/col/index.scss +2 -4
  140. package/dist/packages/collapseitem/index.scss +33 -13
  141. package/dist/packages/comment/index.scss +353 -0
  142. package/dist/packages/configprovider/index.scss +2 -0
  143. package/dist/packages/countdown/index.scss +5 -0
  144. package/dist/packages/countup/index.scss +67 -0
  145. package/dist/packages/dialog/index.scss +18 -1
  146. package/dist/packages/divider/index.scss +63 -0
  147. package/dist/packages/drag/index.scss +11 -0
  148. package/dist/packages/ecard/index.scss +83 -0
  149. package/dist/packages/elevator/index.scss +94 -0
  150. package/dist/packages/ellipsis/index.scss +12 -0
  151. package/dist/packages/empty/index.scss +33 -0
  152. package/dist/packages/fixednav/index.scss +134 -0
  153. package/dist/packages/form/index.scss +2 -0
  154. package/dist/packages/formitem/index.scss +83 -0
  155. package/dist/packages/grid/index.scss +10 -0
  156. package/dist/packages/griditem/index.scss +103 -0
  157. package/dist/packages/icon/index.scss +103 -12
  158. package/dist/packages/image/index.scss +39 -0
  159. package/dist/packages/imagepreview/index.scss +72 -0
  160. package/dist/packages/indicator/index.scss +48 -0
  161. package/dist/packages/infiniteloading/index.scss +1 -1
  162. package/dist/packages/input/index.scss +123 -20
  163. package/dist/packages/inputnumber/index.scss +25 -2
  164. package/dist/packages/layout/index.scss +0 -0
  165. package/dist/packages/list/index.scss +24 -0
  166. package/dist/packages/locale/index.d.ts +8 -0
  167. package/dist/packages/locale/index.scss +1 -0
  168. package/dist/packages/locale/lang/baseLang.d.ts +88 -0
  169. package/dist/packages/locale/lang/baseLang.js +8 -0
  170. package/dist/packages/locale/lang/en-US.d.ts +104 -0
  171. package/dist/packages/locale/lang/en-US.js +112 -0
  172. package/dist/packages/locale/lang/id-ID.d.ts +104 -0
  173. package/dist/packages/locale/lang/id-ID.js +112 -0
  174. package/dist/packages/locale/lang/index.js +48 -0
  175. package/dist/packages/locale/lang/index.scss +1 -0
  176. package/dist/packages/locale/lang/zh-CN.d.ts +104 -0
  177. package/dist/packages/locale/lang/zh-CN.js +112 -0
  178. package/dist/packages/locale/lang/zh-TW.d.ts +104 -0
  179. package/dist/packages/locale/lang/zh-TW.js +112 -0
  180. package/dist/packages/menu/index.scss +56 -5
  181. package/dist/packages/menuitem/index.scss +40 -99
  182. package/dist/packages/navbar/index.scss +54 -42
  183. package/dist/packages/noticebar/index.scss +114 -0
  184. package/dist/packages/notify/index.scss +12 -0
  185. package/dist/packages/numberkeyboard/index.scss +109 -0
  186. package/dist/packages/oldpicker/index.scss +131 -0
  187. package/dist/packages/overlay/index.scss +5 -1
  188. package/dist/packages/pagination/index.scss +69 -0
  189. package/dist/packages/picker/index.scss +118 -37
  190. package/dist/packages/popover/index.scss +454 -0
  191. package/dist/packages/popup/index.scss +7 -0
  192. package/dist/packages/price/index.scss +40 -3
  193. package/dist/packages/progress/index.scss +104 -0
  194. package/dist/packages/radio/index.scss +64 -5
  195. package/dist/packages/radiogroup/index.scss +20 -0
  196. package/dist/packages/range/index.scss +136 -10
  197. package/dist/packages/rate/index.scss +3 -2
  198. package/dist/packages/row/index.scss +3 -0
  199. package/dist/packages/searchbar/index.scss +123 -0
  200. package/dist/packages/shortpassword/index.scss +65 -21
  201. package/dist/packages/sidenavbar/index.scss +14 -0
  202. package/dist/packages/sidenavbaritem/index.scss +10 -0
  203. package/dist/packages/signature/index.scss +14 -0
  204. package/dist/packages/skeleton/index.scss +57 -0
  205. package/dist/packages/sku/index.scss +147 -0
  206. package/dist/packages/step/index.scss +29 -29
  207. package/dist/packages/sticky/index.scss +5 -0
  208. package/dist/packages/subsidenavbar/index.scss +41 -0
  209. package/dist/packages/swipe/index.scss +22 -0
  210. package/dist/packages/swiper/index.scss +4 -4
  211. package/dist/packages/switch/index.scss +10 -9
  212. package/dist/packages/tabbar/index.scss +15 -3
  213. package/dist/packages/tabbaritem/index.scss +29 -4
  214. package/dist/packages/table/index.scss +114 -0
  215. package/dist/packages/tabpane/index.scss +20 -0
  216. package/dist/packages/tabs/index.scss +191 -0
  217. package/dist/packages/tag/index.scss +48 -0
  218. package/dist/packages/textarea/index.scss +10 -1
  219. package/dist/packages/timedetail/index.scss +54 -0
  220. package/dist/packages/timepannel/index.scss +26 -0
  221. package/dist/packages/timeselect/index.scss +56 -0
  222. package/dist/packages/toast/index.scss +13 -6
  223. package/dist/packages/uploader/index.scss +109 -13
  224. package/dist/packages/watermark/index.scss +13 -0
  225. package/dist/smartips/attributes.json +2894 -0
  226. package/dist/smartips/tags.json +1064 -0
  227. package/dist/smartips/web-types.json +7123 -0
  228. package/dist/style.css +1 -1
  229. package/dist/style.es.js +2 -0
  230. package/dist/styles/animation/icon.scss +245 -0
  231. package/dist/styles/animation/index.scss +1 -0
  232. package/dist/styles/font/config.json +169 -0
  233. package/dist/styles/font/demo_index.html +210 -3
  234. package/dist/styles/font/iconfont.css +39 -3
  235. package/dist/styles/font/iconfont.js +32 -32
  236. package/dist/styles/font/iconfont.json +63 -0
  237. package/dist/styles/font/iconfont.ttf +0 -0
  238. package/dist/styles/font/iconfont.woff +0 -0
  239. package/dist/styles/font/iconfont.woff2 +0 -0
  240. package/dist/styles/themes/default.scss +85 -32
  241. package/dist/styles/themes/jdb.scss +102 -0
  242. package/dist/styles/themes/jdt.scss +102 -0
  243. package/dist/styles/variables-jdb.scss +875 -0
  244. package/dist/styles/variables-jdt.scss +781 -0
  245. package/dist/styles/variables.scss +700 -164
  246. package/dist/types/__VUE/actionsheet/index.vue.d.ts +235 -0
  247. package/dist/types/__VUE/address/index.vue.d.ts +326 -0
  248. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +34 -0
  249. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +40 -0
  250. package/dist/types/__VUE/addresslist/components/LongPressShell.vue.d.ts +46 -0
  251. package/dist/types/__VUE/addresslist/components/SwipeShell.vue.d.ts +36 -0
  252. package/dist/types/__VUE/addresslist/index.vue.d.ts +72 -0
  253. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  254. package/dist/types/__VUE/animate/type.d.ts +6 -0
  255. package/dist/types/__VUE/audio/index.vue.d.ts +102 -0
  256. package/dist/types/__VUE/audiooperate/index.vue.d.ts +88 -0
  257. package/dist/types/__VUE/avatar/index.vue.d.ts +97 -0
  258. package/dist/types/__VUE/avatargroup/index.vue.d.ts +78 -0
  259. package/dist/types/__VUE/backtop/index.vue.d.ts +89 -0
  260. package/dist/types/__VUE/badge/index.vue.d.ts +81 -0
  261. package/dist/types/__VUE/barrage/index.vue.d.ts +69 -0
  262. package/dist/types/__VUE/button/index.vue.d.ts +99 -0
  263. package/dist/types/__VUE/button/type.d.ts +7 -0
  264. package/dist/types/__VUE/calendar/index.vue.d.ts +130 -0
  265. package/dist/types/__VUE/calendaritem/index.vue.d.ts +178 -0
  266. package/dist/types/__VUE/card/index.vue.d.ts +75 -0
  267. package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +75 -0
  268. package/dist/types/__VUE/cascader/helper.d.ts +8 -0
  269. package/dist/types/__VUE/cascader/index.vue.d.ts +204 -0
  270. package/dist/types/__VUE/cascader/tree.d.ts +16 -0
  271. package/dist/types/__VUE/cascader/types.d.ts +30 -0
  272. package/dist/types/__VUE/category/index.vue.d.ts +35 -0
  273. package/dist/types/__VUE/categorypane/index.vue.d.ts +40 -0
  274. package/dist/types/__VUE/cell/index.vue.d.ts +108 -0
  275. package/dist/types/__VUE/cellgroup/index.vue.d.ts +35 -0
  276. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  277. package/dist/types/__VUE/checkbox/index.vue.d.ts +98 -0
  278. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +43 -0
  279. package/dist/types/__VUE/circleprogress/index.vue.d.ts +81 -0
  280. package/dist/types/__VUE/col/index.vue.d.ts +42 -0
  281. package/dist/types/__VUE/collapse/index.vue.d.ts +90 -0
  282. package/dist/types/__VUE/collapseitem/index.vue.d.ts +75 -0
  283. package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +47 -0
  284. package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +42 -0
  285. package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +46 -0
  286. package/dist/types/__VUE/comment/index.vue.d.ts +93 -0
  287. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  288. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  289. package/dist/types/__VUE/countdown/index.vue.d.ts +91 -0
  290. package/dist/types/__VUE/countdown/util.d.ts +6 -0
  291. package/dist/types/__VUE/countup/index.vue.d.ts +183 -0
  292. package/dist/types/__VUE/datepicker/index.vue.d.ts +309 -0
  293. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  294. package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
  295. package/dist/types/__VUE/dialog/index.d.ts +48 -0
  296. package/dist/types/__VUE/dialog/index.vue.d.ts +263 -0
  297. package/dist/types/__VUE/divider/index.vue.d.ts +47 -0
  298. package/dist/types/__VUE/drag/index.vue.d.ts +51 -0
  299. package/dist/types/__VUE/ecard/index.vue.d.ts +105 -0
  300. package/dist/types/__VUE/elevator/index.vue.d.ts +96 -0
  301. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  302. package/dist/types/__VUE/empty/index.vue.d.ts +42 -0
  303. package/dist/types/__VUE/fixednav/index.vue.d.ts +80 -0
  304. package/dist/types/__VUE/form/common.d.ts +20 -0
  305. package/dist/types/__VUE/form/index.vue.d.ts +31 -0
  306. package/dist/types/__VUE/form/types.d.ts +13 -0
  307. package/dist/types/__VUE/formitem/index.vue.d.ts +94 -0
  308. package/dist/types/__VUE/formitem/types.d.ts +10 -0
  309. package/dist/types/__VUE/grid/common.d.ts +91 -0
  310. package/dist/types/__VUE/grid/index.vue.d.ts +84 -0
  311. package/dist/types/__VUE/griditem/index.vue.d.ts +73 -0
  312. package/dist/types/__VUE/icon/index.vue.d.ts +63 -0
  313. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  314. package/dist/types/__VUE/image/type.d.ts +6 -0
  315. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
  316. package/dist/types/__VUE/imagepreview/index.d.ts +24 -0
  317. package/dist/types/__VUE/imagepreview/index.vue.d.ts +140 -0
  318. package/dist/types/__VUE/indicator/index.vue.d.ts +59 -0
  319. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +123 -0
  320. package/dist/types/__VUE/input/index.vue.d.ts +274 -0
  321. package/dist/types/__VUE/input/type.d.ts +13 -0
  322. package/dist/types/__VUE/input/util.d.ts +5 -0
  323. package/dist/types/__VUE/inputnumber/index.vue.d.ts +100 -0
  324. package/dist/types/__VUE/layout/index.vue.d.ts +13 -0
  325. package/dist/types/__VUE/list/index.vue.d.ts +52 -0
  326. package/dist/types/__VUE/menu/index.vue.d.ts +80 -0
  327. package/dist/types/__VUE/menuitem/index.vue.d.ts +82 -0
  328. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  329. package/dist/types/__VUE/navbar/index.vue.d.ts +105 -0
  330. package/dist/types/__VUE/noticebar/index.vue.d.ts +180 -0
  331. package/dist/types/__VUE/notify/index.d.ts +16 -0
  332. package/dist/types/__VUE/notify/index.vue.d.ts +101 -0
  333. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +122 -0
  334. package/dist/types/__VUE/oldpicker/Column.vue.d.ts +91 -0
  335. package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
  336. package/dist/types/__VUE/oldpicker/index.vue.d.ts +316 -0
  337. package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
  338. package/dist/types/__VUE/overlay/index.vue.d.ts +1603 -0
  339. package/dist/types/__VUE/pagination/index.vue.d.ts +95 -0
  340. package/dist/types/__VUE/picker/Column.vue.d.ts +96 -0
  341. package/dist/types/__VUE/picker/index.vue.d.ts +317 -0
  342. package/dist/types/__VUE/picker/types.d.ts +26 -0
  343. package/dist/types/__VUE/popover/index.vue.d.ts +218 -0
  344. package/dist/types/__VUE/popover/type.d.ts +6 -0
  345. package/dist/types/__VUE/popup/index.vue.d.ts +1708 -0
  346. package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
  347. package/dist/types/__VUE/price/index.vue.d.ts +74 -0
  348. package/dist/types/__VUE/progress/index.vue.d.ts +114 -0
  349. package/dist/types/__VUE/pullrefresh/index.vue.d.ts +100 -0
  350. package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
  351. package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
  352. package/dist/types/__VUE/radio/index.vue.d.ts +75 -0
  353. package/dist/types/__VUE/radiogroup/index.vue.d.ts +43 -0
  354. package/dist/types/__VUE/range/index.vue.d.ts +144 -0
  355. package/dist/types/__VUE/range/type.d.ts +5 -0
  356. package/dist/types/__VUE/rate/common.d.ts +149 -0
  357. package/dist/types/__VUE/rate/index.vue.d.ts +127 -0
  358. package/dist/types/__VUE/row/index.vue.d.ts +57 -0
  359. package/dist/types/__VUE/searchbar/index.vue.d.ts +130 -0
  360. package/dist/types/__VUE/shortpassword/index.vue.d.ts +118 -0
  361. package/dist/types/__VUE/sidenavbar/index.vue.d.ts +35 -0
  362. package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +38 -0
  363. package/dist/types/__VUE/signature/index.vue.d.ts +65 -0
  364. package/dist/types/__VUE/skeleton/common.d.ts +61 -0
  365. package/dist/types/__VUE/skeleton/index.vue.d.ts +98 -0
  366. package/dist/types/__VUE/sku/components/SkuHeader.vue.d.ts +27 -0
  367. package/dist/types/__VUE/sku/components/SkuOperate.vue.d.ts +61 -0
  368. package/dist/types/__VUE/sku/components/SkuSelect.vue.d.ts +29 -0
  369. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +60 -0
  370. package/dist/types/__VUE/sku/index.vue.d.ts +252 -0
  371. package/dist/types/__VUE/step/index.vue.d.ts +61 -0
  372. package/dist/types/__VUE/steps/index.vue.d.ts +42 -0
  373. package/dist/types/__VUE/sticky/index.vue.d.ts +56 -0
  374. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +49 -0
  375. package/dist/types/__VUE/swipe/index.vue.d.ts +62 -0
  376. package/dist/types/__VUE/swiper/index.vue.d.ts +150 -0
  377. package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
  378. package/dist/types/__VUE/swiperitem/index.vue.d.ts +18 -0
  379. package/dist/types/__VUE/switch/index.vue.d.ts +113 -0
  380. package/dist/types/__VUE/tabbar/index.vue.d.ts +71 -0
  381. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +99 -0
  382. package/dist/types/__VUE/table/common.d.ts +56 -0
  383. package/dist/types/__VUE/table/index.vue.d.ts +67 -0
  384. package/dist/types/__VUE/table/renderColumn.d.ts +15 -0
  385. package/dist/types/__VUE/table/types.d.ts +19 -0
  386. package/dist/types/__VUE/tabpane/index.vue.d.ts +43 -0
  387. package/dist/types/__VUE/tabs/common.d.ts +82 -0
  388. package/dist/types/__VUE/tabs/index.vue.d.ts +114 -0
  389. package/dist/types/__VUE/tag/index.vue.d.ts +76 -0
  390. package/dist/types/__VUE/tag/type.d.ts +5 -0
  391. package/dist/types/__VUE/textarea/index.vue.d.ts +102 -0
  392. package/dist/types/__VUE/timedetail/index.vue.d.ts +45 -0
  393. package/dist/types/__VUE/timepannel/index.vue.d.ts +40 -0
  394. package/dist/types/__VUE/timeselect/index.vue.d.ts +80 -0
  395. package/dist/types/__VUE/toast/index.d.ts +16 -0
  396. package/dist/types/__VUE/toast/index.vue.d.ts +134 -0
  397. package/dist/types/__VUE/uploader/index.vue.d.ts +211 -0
  398. package/dist/types/__VUE/uploader/type.d.ts +18 -0
  399. package/dist/types/__VUE/uploader/uploader.d.ts +27 -0
  400. package/dist/types/__VUE/video/index.vue.d.ts +106 -0
  401. package/dist/types/__VUE/watermark/index.vue.d.ts +143 -0
  402. package/dist/types/index.d.ts +8 -0
  403. package/dist/types/nutui.d.ts +104 -0
  404. package/package.json +56 -29
  405. package/dist/index.d.ts +0 -3
  406. package/dist/nutui.d.ts +0 -50
  407. package/dist/packages/tab/index.scss +0 -102
  408. package/dist/styles/font/config.js +0 -111
@@ -0,0 +1,263 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.23.beta-4 Mon Jul 25 2022 22:38:45 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
+ import "../locale/lang";
10
+ const { componentName, create } = createComponent("audio");
11
+ const _sfc_main = create({
12
+ props: {
13
+ url: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ muted: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ autoplay: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ loop: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ preload: {
30
+ type: String,
31
+ default: "auto"
32
+ },
33
+ second: {
34
+ type: Number,
35
+ default: 0
36
+ },
37
+ type: {
38
+ type: String,
39
+ default: "progress"
40
+ }
41
+ },
42
+ components: {},
43
+ emits: ["fastBack", "play", "forward", "ended", "changeProgress", "mute"],
44
+ setup(props, { emit }) {
45
+ const audioRef = ref(null);
46
+ const audioData = reactive({
47
+ currentTime: 0,
48
+ currentDuration: "00:00:00",
49
+ percent: 0,
50
+ duration: "00:00:00",
51
+ second: 0,
52
+ hanMuted: props.muted,
53
+ playing: props.autoplay,
54
+ handPlaying: false
55
+ });
56
+ onMounted(() => {
57
+ var arr = ["webkitVisibilityState", "visibilitychange"];
58
+ try {
59
+ for (let i = 0; i < arr.length; i++) {
60
+ document.addEventListener(arr[i], () => {
61
+ if (document.hidden) {
62
+ audioRef.value.pause();
63
+ } else {
64
+ if (audioData.playing) {
65
+ setTimeout(() => {
66
+ audioRef.value.play();
67
+ }, 200);
68
+ }
69
+ }
70
+ });
71
+ }
72
+ } catch (e) {
73
+ console.log(e.message);
74
+ }
75
+ setTimeout(() => {
76
+ const audioR = audioRef.value;
77
+ if (props.autoplay) {
78
+ if (audioR && audioR.paused) {
79
+ audioR.play();
80
+ }
81
+ }
82
+ audioData.second = audioR.duration;
83
+ audioData.duration = formatSeconds(audioR.duration);
84
+ }, 500);
85
+ });
86
+ const onTimeupdate = (e) => {
87
+ audioData.currentTime = parseInt(e.target.currentTime);
88
+ };
89
+ const fastBack = () => {
90
+ audioData.currentTime--;
91
+ audioRef.value.currentTime = audioData.currentTime;
92
+ emit("fastBack", audioData.currentTime);
93
+ };
94
+ const changeStatus = () => {
95
+ const audioR = audioRef.value;
96
+ if (audioData.playing) {
97
+ audioR.pause();
98
+ audioData.handPlaying = false;
99
+ } else {
100
+ audioR.play();
101
+ audioData.handPlaying = true;
102
+ }
103
+ audioData.playing = !audioData.playing;
104
+ emit("play", audioData.playing);
105
+ };
106
+ const forward = () => {
107
+ audioData.currentTime++;
108
+ audioRef.value.currentTime = audioData.currentTime;
109
+ emit("forward", audioData.currentTime);
110
+ };
111
+ const handle = (val) => {
112
+ audioData.currentDuration = formatSeconds(val);
113
+ audioData.percent = val / audioData.second * 100;
114
+ };
115
+ const audioEnd = () => {
116
+ audioData.playing = false;
117
+ emit("ended");
118
+ };
119
+ const progressChange = (val) => {
120
+ const ar = audioRef.value;
121
+ ar.currentTime = audioData.second * val / 100;
122
+ emit("changeProgress", ar.currentTime);
123
+ };
124
+ const handleMute = () => {
125
+ audioData.hanMuted = !audioData.hanMuted;
126
+ emit("mute", audioData.hanMuted);
127
+ };
128
+ const formatSeconds = (value) => {
129
+ let theTime = parseInt(value);
130
+ let theTime1 = 0;
131
+ let theTime2 = 0;
132
+ if (theTime > 60) {
133
+ theTime1 = Math.floor(theTime / 60);
134
+ theTime = Math.floor(theTime % 60);
135
+ if (theTime1 > 60) {
136
+ theTime2 = Math.floor(theTime1 / 60);
137
+ theTime1 = Math.floor(theTime1 % 60);
138
+ }
139
+ }
140
+ let result = "";
141
+ if (theTime < 10) {
142
+ result = "0" + result;
143
+ }
144
+ if (theTime1 > 0) {
145
+ result = "" + theTime1 + ":" + result;
146
+ if (theTime1 < 10) {
147
+ result = "0" + result;
148
+ }
149
+ } else {
150
+ result = "00:" + result;
151
+ }
152
+ if (theTime2 > 0) {
153
+ result = "" + theTime2 + ":" + result;
154
+ if (theTime2 < 10) {
155
+ result = "0" + result;
156
+ }
157
+ } else {
158
+ result = "00:" + result;
159
+ }
160
+ return result;
161
+ };
162
+ watch(() => audioData.currentTime, (value) => {
163
+ handle(value);
164
+ });
165
+ provide("audioParent", {
166
+ children: [],
167
+ props,
168
+ audioData,
169
+ handleMute,
170
+ forward,
171
+ fastBack,
172
+ changeStatus
173
+ });
174
+ return {
175
+ ...toRefs(props),
176
+ ...toRefs(audioData),
177
+ audioRef,
178
+ fastBack,
179
+ forward,
180
+ changeStatus,
181
+ progressChange,
182
+ audioEnd,
183
+ onTimeupdate,
184
+ handleMute
185
+ };
186
+ }
187
+ });
188
+ const _hoisted_1 = { class: "nut-audio" };
189
+ const _hoisted_2 = {
190
+ key: 0,
191
+ class: "progress-wrapper"
192
+ };
193
+ const _hoisted_3 = { class: "time" };
194
+ const _hoisted_4 = { class: "progress-bar-wrapper" };
195
+ const _hoisted_5 = /* @__PURE__ */ createElementVNode("div", { class: "custom-button" }, null, -1);
196
+ const _hoisted_6 = { class: "time" };
197
+ const _hoisted_7 = {
198
+ key: 1,
199
+ class: "nut-audio-icon"
200
+ };
201
+ const _hoisted_8 = ["controls", "src", "preload", "autoplay", "loop", "muted"];
202
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
203
+ const _component_nut_range = resolveComponent("nut-range");
204
+ const _component_nut_icon = resolveComponent("nut-icon");
205
+ return openBlock(), createElementBlock("div", _hoisted_1, [
206
+ _ctx.type == "progress" ? (openBlock(), createElementBlock("div", _hoisted_2, [
207
+ createElementVNode("div", _hoisted_3, toDisplayString(_ctx.currentDuration), 1),
208
+ createElementVNode("div", _hoisted_4, [
209
+ createVNode(_component_nut_range, {
210
+ modelValue: _ctx.percent,
211
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.percent = $event),
212
+ "hidden-range": "",
213
+ onChange: _ctx.progressChange,
214
+ "inactive-color": "#cccccc",
215
+ "active-color": "#fa2c19"
216
+ }, {
217
+ button: withCtx(() => [
218
+ _hoisted_5
219
+ ]),
220
+ _: 1
221
+ }, 8, ["modelValue", "onChange"])
222
+ ]),
223
+ createElementVNode("div", _hoisted_6, toDisplayString(_ctx.duration), 1)
224
+ ])) : createCommentVNode("", true),
225
+ _ctx.type == "icon" ? (openBlock(), createElementBlock("div", _hoisted_7, [
226
+ createElementVNode("div", {
227
+ class: normalizeClass(["nut-audio-icon-box", _ctx.playing ? "nut-audio-icon-play" : "nut-audio-icon-stop"]),
228
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
229
+ }, [
230
+ _ctx.playing ? (openBlock(), createBlock(_component_nut_icon, {
231
+ key: 0,
232
+ name: "service",
233
+ class: "nut-icon-am-rotate nut-icon-am-infinite"
234
+ })) : createCommentVNode("", true),
235
+ !_ctx.playing ? (openBlock(), createBlock(_component_nut_icon, {
236
+ key: 1,
237
+ name: "service"
238
+ })) : createCommentVNode("", true)
239
+ ], 2)
240
+ ])) : createCommentVNode("", true),
241
+ _ctx.type == "none" ? (openBlock(), createElementBlock("div", {
242
+ key: 2,
243
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
244
+ }, [
245
+ renderSlot(_ctx.$slots, "default")
246
+ ])) : createCommentVNode("", true),
247
+ _ctx.type != "none" ? renderSlot(_ctx.$slots, "default", { key: 3 }) : createCommentVNode("", true),
248
+ createElementVNode("audio", {
249
+ class: "audioMain",
250
+ controls: _ctx.type == "controls",
251
+ ref: "audioRef",
252
+ src: _ctx.url,
253
+ preload: _ctx.preload,
254
+ autoplay: _ctx.autoplay,
255
+ loop: _ctx.loop,
256
+ onTimeupdate: _cache[3] || (_cache[3] = (...args) => _ctx.onTimeupdate && _ctx.onTimeupdate(...args)),
257
+ onEnded: _cache[4] || (_cache[4] = (...args) => _ctx.audioEnd && _ctx.audioEnd(...args)),
258
+ muted: _ctx.hanMuted
259
+ }, null, 40, _hoisted_8)
260
+ ]);
261
+ }
262
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
263
+ export { index as default };
@@ -0,0 +1,105 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.23.beta-4 Mon Jul 25 2022 22:38:45 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
+ import "../locale/lang";
10
+ const { componentName, create, translate } = createComponent("audio-operate");
11
+ const _sfc_main = create({
12
+ props: {
13
+ type: {
14
+ type: String,
15
+ default() {
16
+ return "play";
17
+ }
18
+ }
19
+ },
20
+ components: {},
21
+ emits: ["click"],
22
+ setup(props, { emit }) {
23
+ const audio = inject("audioParent");
24
+ const parent = reactive(audio);
25
+ const customSlot = ref(useSlots().default);
26
+ return { ...toRefs(props), ...toRefs(parent), customSlot, translate };
27
+ }
28
+ });
29
+ const _hoisted_1 = { class: "nut-audio-operate" };
30
+ const _hoisted_2 = /* @__PURE__ */ createTextVNode("\u5FEB\u8FDB");
31
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32
+ const _component_nut_button = resolveComponent("nut-button");
33
+ return openBlock(), createElementBlock("div", _hoisted_1, [
34
+ _ctx.type == "back" ? (openBlock(), createElementBlock("div", {
35
+ key: 0,
36
+ class: "nut-audio-operate-item",
37
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.fastBack && _ctx.fastBack(...args))
38
+ }, [
39
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
40
+ key: 0,
41
+ type: "primary",
42
+ size: "small"
43
+ }, {
44
+ default: withCtx(() => [
45
+ createTextVNode(toDisplayString(_ctx.translate("back")), 1)
46
+ ]),
47
+ _: 1
48
+ })) : createCommentVNode("", true),
49
+ renderSlot(_ctx.$slots, "default")
50
+ ])) : createCommentVNode("", true),
51
+ _ctx.type == "play" ? (openBlock(), createElementBlock("div", {
52
+ key: 1,
53
+ class: "nut-audio-operate-item",
54
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
55
+ }, [
56
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
57
+ key: 0,
58
+ type: "primary",
59
+ size: "small"
60
+ }, {
61
+ default: withCtx(() => [
62
+ createTextVNode(toDisplayString(!_ctx.audioData.playing ? `${_ctx.translate("start")}` : `${_ctx.translate("pause")}`), 1)
63
+ ]),
64
+ _: 1
65
+ })) : createCommentVNode("", true),
66
+ renderSlot(_ctx.$slots, "default")
67
+ ])) : createCommentVNode("", true),
68
+ _ctx.type == "forward" ? (openBlock(), createElementBlock("div", {
69
+ key: 2,
70
+ class: "nut-audio-operate-item",
71
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.forward && _ctx.forward(...args))
72
+ }, [
73
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
74
+ key: 0,
75
+ type: "primary",
76
+ size: "small"
77
+ }, {
78
+ default: withCtx(() => [
79
+ _hoisted_2
80
+ ]),
81
+ _: 1
82
+ })) : createCommentVNode("", true),
83
+ renderSlot(_ctx.$slots, "default")
84
+ ])) : createCommentVNode("", true),
85
+ _ctx.type == "mute" ? (openBlock(), createElementBlock("div", {
86
+ key: 3,
87
+ class: "nut-audio-operate-item",
88
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleMute && _ctx.handleMute(...args))
89
+ }, [
90
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
91
+ key: 0,
92
+ type: !_ctx.audioData.hanMuted ? "primary" : "default",
93
+ size: "small"
94
+ }, {
95
+ default: withCtx(() => [
96
+ createTextVNode(toDisplayString(_ctx.translate("mute")), 1)
97
+ ]),
98
+ _: 1
99
+ }, 8, ["type"])) : createCommentVNode("", true),
100
+ renderSlot(_ctx.$slots, "default")
101
+ ])) : createCommentVNode("", true)
102
+ ]);
103
+ }
104
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
105
+ export { index as default };
@@ -0,0 +1,168 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.23.beta-4 Mon Jul 25 2022 22:38:45 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { toRefs, inject, ref, reactive, onMounted, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, Fragment, createBlock, createCommentVNode, renderSlot, toDisplayString } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
+ import "../locale/lang";
10
+ const { componentName, create } = createComponent("avatar");
11
+ const _sfc_main = create({
12
+ props: {
13
+ size: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ shape: {
18
+ type: String,
19
+ default: "round"
20
+ },
21
+ bgColor: {
22
+ type: String,
23
+ default: "#eee"
24
+ },
25
+ color: {
26
+ type: String,
27
+ default: "#666"
28
+ },
29
+ url: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ alt: {
34
+ type: String,
35
+ default: ""
36
+ },
37
+ icon: {
38
+ type: String,
39
+ default: ""
40
+ }
41
+ },
42
+ emits: ["active-avatar", "onError"],
43
+ setup(props, { emit, slots }) {
44
+ const { size, shape, bgColor, color, icon } = toRefs(props);
45
+ const sizeValue = ["large", "normal", "small"];
46
+ const avatarGroup = inject("avatarGroup", null);
47
+ const avatarRef = ref(null);
48
+ const visible = reactive({
49
+ lightTheme: false
50
+ });
51
+ const state = reactive({
52
+ index: 1,
53
+ showMax: false,
54
+ maxIndex: 0
55
+ });
56
+ onMounted(() => {
57
+ var _a, _b;
58
+ const children = (_b = (_a = avatarGroup == null ? void 0 : avatarGroup.avatarGroupRef) == null ? void 0 : _a.value) == null ? void 0 : _b.children;
59
+ if (children) {
60
+ avatarLength(children);
61
+ }
62
+ });
63
+ const classes = computed(() => {
64
+ var _a, _b;
65
+ const prefixCls = componentName;
66
+ return {
67
+ [prefixCls]: true,
68
+ [`nut-avatar-${size.value || ((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.size) || "normal"}`]: true,
69
+ [`nut-avatar-${shape.value || ((_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.shape) || "normal"}`]: true
70
+ };
71
+ });
72
+ const styles = computed(() => {
73
+ var _a, _b, _c;
74
+ return {
75
+ width: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
76
+ height: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
77
+ backgroundColor: `${bgColor.value}`,
78
+ color: `${color.value}`,
79
+ 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` : ""),
80
+ zIndex: ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.zIndex) == "right" ? `${Math.abs(state.maxIndex - state.index)}` : ""
81
+ };
82
+ });
83
+ const maxStyles = computed(() => {
84
+ var _a, _b;
85
+ return {
86
+ backgroundColor: `${(_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.maxBgColor}`,
87
+ color: `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.maxColor}`
88
+ };
89
+ });
90
+ const iconStyles = computed(() => {
91
+ return !!icon.value ? icon.value : "";
92
+ });
93
+ const isShowText = computed(() => {
94
+ return slots.default;
95
+ });
96
+ const avatarLength = (children) => {
97
+ var _a, _b, _c;
98
+ state.maxIndex = children.length;
99
+ for (let i = 0; i < children.length; i++) {
100
+ if (children[i] && children[i].classList && children[i].classList[0] == "nut-avatar") {
101
+ children[i].setAttribute("data-index", i + 1);
102
+ }
103
+ }
104
+ state.index = (_b = (_a = avatarRef == null ? void 0 : avatarRef.value) == null ? void 0 : _a.dataset) == null ? void 0 : _b.index;
105
+ if (state.index == state.maxIndex && state.index != ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.maxCount)) {
106
+ state.showMax = true;
107
+ }
108
+ };
109
+ const activeAvatar = (event) => {
110
+ emit("active-avatar", event);
111
+ };
112
+ const onError = (event) => {
113
+ emit("onError", event);
114
+ };
115
+ return {
116
+ classes,
117
+ styles,
118
+ iconStyles,
119
+ isShowText,
120
+ maxStyles,
121
+ activeAvatar,
122
+ onError,
123
+ avatarGroup,
124
+ visible,
125
+ avatarRef,
126
+ ...toRefs(state)
127
+ };
128
+ }
129
+ });
130
+ const _hoisted_1 = ["src", "alt"];
131
+ const _hoisted_2 = {
132
+ key: 2,
133
+ class: "text"
134
+ };
135
+ const _hoisted_3 = {
136
+ key: 1,
137
+ class: "text"
138
+ };
139
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
140
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
141
+ const _component_nut_icon = resolveComponent("nut-icon");
142
+ 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", {
143
+ key: 0,
144
+ style: normalizeStyle(!_ctx.showMax ? _ctx.styles : _ctx.maxStyles),
145
+ class: normalizeClass(_ctx.classes),
146
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.activeAvatar(_ctx.e)),
147
+ ref: "avatarRef"
148
+ }, [
149
+ !((_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 }, [
150
+ _ctx.url ? (openBlock(), createElementBlock("img", {
151
+ key: 0,
152
+ src: _ctx.url,
153
+ alt: _ctx.alt,
154
+ onError: _cache[0] || (_cache[0] = (...args) => _ctx.onError && _ctx.onError(...args))
155
+ }, null, 40, _hoisted_1)) : _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
156
+ key: 1,
157
+ class: "icon",
158
+ name: _ctx.iconStyles
159
+ }, null, 8, ["name"])) : createCommentVNode("", true),
160
+ _ctx.isShowText ? (openBlock(), createElementBlock("view", _hoisted_2, [
161
+ renderSlot(_ctx.$slots, "default")
162
+ ])) : createCommentVNode("", true)
163
+ ], 64)) : createCommentVNode("", true),
164
+ _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)
165
+ ], 6)) : createCommentVNode("", true);
166
+ }
167
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
168
+ export { index as default };
@@ -0,0 +1,78 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.23.beta-4 Mon Jul 25 2022 22:38:45 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
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";
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 };