@nutui/nutui 3.1.0 → 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 +505 -0
  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 +122 -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 +2 -1
  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 +52 -13
  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 +26 -3
  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 +88 -35
  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 -28
  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,519 @@
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 { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
7
+ import { popupProps } from "./Popup.js";
8
+ import { c as createComponent } from "./component.js";
9
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
+ import "./OverLay.js";
11
+ import "../locale/lang";
12
+ import "./Icon.js";
13
+ import "./pxCheck.js";
14
+ const formatTree = (tree, parent, config) => tree.map((node) => {
15
+ const { value: valueKey = "value", text: textKey = "text", children: childrenKey = "children" } = config;
16
+ const { [valueKey]: value, [textKey]: text, [childrenKey]: children, ...others } = node;
17
+ const newNode = {
18
+ loading: false,
19
+ ...others,
20
+ level: parent ? (parent && parent.level || 0) + 1 : 0,
21
+ value,
22
+ text,
23
+ children,
24
+ _parent: parent
25
+ };
26
+ if (newNode.children && newNode.children.length) {
27
+ newNode.children = formatTree(newNode.children, newNode, config);
28
+ }
29
+ return newNode;
30
+ });
31
+ const eachTree = (tree, cb) => {
32
+ let i = 0;
33
+ let node;
34
+ while (node = tree[i++]) {
35
+ if (cb(node) === true) {
36
+ break;
37
+ }
38
+ if (node.children && node.children.length) {
39
+ eachTree(node.children, cb);
40
+ }
41
+ }
42
+ };
43
+ const defaultConvertConfig = {
44
+ topId: null,
45
+ idKey: "id",
46
+ pidKey: "pid",
47
+ sortKey: ""
48
+ };
49
+ const convertListToOptions = (list, options) => {
50
+ const mergedOptions = {
51
+ ...defaultConvertConfig,
52
+ ...options || {}
53
+ };
54
+ const { topId, idKey, pidKey, sortKey } = mergedOptions;
55
+ let result = [];
56
+ let map = {};
57
+ list.forEach((node) => {
58
+ node = { ...node };
59
+ const { [idKey]: id, [pidKey]: pid } = node;
60
+ const children = map[pid] = map[pid] || [];
61
+ if (!result.length && pid === topId) {
62
+ result = children;
63
+ }
64
+ children.push(node);
65
+ node.children = map[id] || (map[id] = []);
66
+ });
67
+ if (sortKey) {
68
+ Object.keys(map).forEach((i) => {
69
+ if (map[i].length > 1) {
70
+ map[i].sort((a, b) => a[sortKey] - b[sortKey]);
71
+ }
72
+ });
73
+ }
74
+ map = null;
75
+ return result;
76
+ };
77
+ class Tree {
78
+ constructor(nodes, config) {
79
+ this.config = {
80
+ value: "value",
81
+ text: "text",
82
+ children: "children",
83
+ ...config || {}
84
+ };
85
+ this.nodes = formatTree(nodes, null, this.config);
86
+ }
87
+ updateChildren(nodes, parent) {
88
+ if (!parent) {
89
+ this.nodes = formatTree(nodes, null, this.config);
90
+ } else {
91
+ parent.children = formatTree(nodes, parent, this.config);
92
+ }
93
+ }
94
+ getNodeByValue(value) {
95
+ let foundNode;
96
+ eachTree(this.nodes, (node) => {
97
+ if (node.value === value) {
98
+ foundNode = node;
99
+ return true;
100
+ }
101
+ });
102
+ return foundNode;
103
+ }
104
+ getPathNodesByValue(value) {
105
+ if (!value.length) {
106
+ return [];
107
+ }
108
+ const pathNodes = [];
109
+ let currentNodes = this.nodes;
110
+ while (currentNodes && currentNodes.length) {
111
+ const foundNode = currentNodes.find((node) => node.value === value[node.level]);
112
+ if (!foundNode) {
113
+ break;
114
+ }
115
+ pathNodes.push(foundNode);
116
+ currentNodes = foundNode.children;
117
+ }
118
+ return pathNodes;
119
+ }
120
+ isLeaf(node, lazy) {
121
+ const { leaf, children } = node;
122
+ const hasChildren = Array.isArray(children) && Boolean(children.length);
123
+ return leaf || !hasChildren && !lazy;
124
+ }
125
+ hasChildren(node, lazy) {
126
+ const isLeaf = this.isLeaf(node, lazy);
127
+ if (isLeaf) {
128
+ return false;
129
+ }
130
+ const { children } = node;
131
+ return Array.isArray(children) && Boolean(children.length);
132
+ }
133
+ }
134
+ const { create: create$1, translate } = createComponent("cascader-item");
135
+ const _sfc_main$1 = create$1({
136
+ props: {
137
+ visible: Boolean,
138
+ modelValue: Array,
139
+ options: {
140
+ type: Array,
141
+ default: () => []
142
+ },
143
+ lazy: Boolean,
144
+ lazyLoad: Function,
145
+ valueKey: {
146
+ type: String,
147
+ default: "value"
148
+ },
149
+ textKey: {
150
+ type: String,
151
+ default: "text"
152
+ },
153
+ childrenKey: {
154
+ type: String,
155
+ default: "children"
156
+ },
157
+ convertConfig: Object
158
+ },
159
+ components: {},
160
+ emits: ["update:modelValue", "change", "pathChange"],
161
+ setup(props, { emit }) {
162
+ const configs = computed(() => ({
163
+ lazy: props.lazy,
164
+ lazyLoad: props.lazyLoad,
165
+ valueKey: props.valueKey,
166
+ textKey: props.textKey,
167
+ childrenKey: props.childrenKey,
168
+ convertConfig: props.convertConfig
169
+ }));
170
+ const tabsCursor = ref(0);
171
+ const initLoading = ref(false);
172
+ const innerValue = ref(props.modelValue);
173
+ const tree = ref(new Tree([], {}));
174
+ const panes = ref([]);
175
+ const isLazy = computed(() => configs.value.lazy && Boolean(configs.value.lazyLoad));
176
+ const lazyLoadMap = /* @__PURE__ */ new Map();
177
+ let currentProcessNode;
178
+ const init = async () => {
179
+ lazyLoadMap.clear();
180
+ panes.value = [];
181
+ tabsCursor.value = 0;
182
+ initLoading.value = false;
183
+ currentProcessNode = null;
184
+ let { options } = props;
185
+ if (configs.value.convertConfig) {
186
+ options = convertListToOptions(options, configs.value.convertConfig);
187
+ }
188
+ tree.value = new Tree(options, {
189
+ value: configs.value.valueKey,
190
+ text: configs.value.textKey,
191
+ children: configs.value.childrenKey
192
+ });
193
+ if (isLazy.value && !tree.value.nodes.length) {
194
+ await invokeLazyLoad({
195
+ root: true,
196
+ loading: true,
197
+ text: "",
198
+ value: ""
199
+ });
200
+ }
201
+ panes.value = [{ nodes: tree.value.nodes, selectedNode: null }];
202
+ syncValue();
203
+ };
204
+ const syncValue = async () => {
205
+ const currentValue = innerValue.value;
206
+ if (currentValue === void 0 || !tree.value.nodes.length) {
207
+ return;
208
+ }
209
+ if (currentValue.length === 0) {
210
+ tabsCursor.value = 0;
211
+ panes.value = [{ nodes: tree.value.nodes, selectedNode: null }];
212
+ return;
213
+ }
214
+ let needToSync = currentValue;
215
+ if (isLazy.value && Array.isArray(currentValue) && currentValue.length) {
216
+ needToSync = [];
217
+ let parent = tree.value.nodes.find((node) => node.value === currentValue[0]);
218
+ if (parent) {
219
+ needToSync = [parent.value];
220
+ initLoading.value = true;
221
+ const last = await currentValue.slice(1).reduce(async (p, value) => {
222
+ var _a;
223
+ const parent2 = await p;
224
+ await invokeLazyLoad(parent2);
225
+ const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find((item) => item.value === value);
226
+ if (node) {
227
+ needToSync.push(value);
228
+ }
229
+ return Promise.resolve(node);
230
+ }, Promise.resolve(parent));
231
+ await invokeLazyLoad(last);
232
+ initLoading.value = false;
233
+ }
234
+ }
235
+ if (needToSync.length && currentValue === props.modelValue) {
236
+ const pathNodes = tree.value.getPathNodesByValue(needToSync);
237
+ pathNodes.map((node, index2) => {
238
+ tabsCursor.value = index2;
239
+ methods.handleNode(node, true);
240
+ });
241
+ }
242
+ };
243
+ const invokeLazyLoad = async (node) => {
244
+ if (!node) {
245
+ return;
246
+ }
247
+ if (!configs.value.lazyLoad) {
248
+ node.leaf = true;
249
+ return;
250
+ }
251
+ if (tree.value.isLeaf(node, isLazy.value) || tree.value.hasChildren(node, isLazy.value)) {
252
+ return;
253
+ }
254
+ node.loading = true;
255
+ const parent = node.root ? null : node;
256
+ let lazyLoadPromise = lazyLoadMap.get(node);
257
+ if (!lazyLoadPromise) {
258
+ lazyLoadPromise = new Promise((resolve) => {
259
+ var _a, _b;
260
+ (_b = (_a = configs.value).lazyLoad) == null ? void 0 : _b.call(_a, node, resolve);
261
+ });
262
+ lazyLoadMap.set(node, lazyLoadPromise);
263
+ }
264
+ const nodes = await lazyLoadPromise;
265
+ if (Array.isArray(nodes) && nodes.length > 0) {
266
+ tree.value.updateChildren(nodes, parent);
267
+ } else {
268
+ node.leaf = true;
269
+ }
270
+ node.loading = false;
271
+ lazyLoadMap.delete(node);
272
+ };
273
+ const emitChange = (pathNodes) => {
274
+ const emitValue = pathNodes.map((node) => node.value);
275
+ innerValue.value = emitValue;
276
+ emit("change", emitValue, pathNodes);
277
+ emit("update:modelValue", emitValue, pathNodes);
278
+ };
279
+ const methods = {
280
+ async handleNode(node, silent) {
281
+ const { disabled, loading } = node;
282
+ if (!silent && disabled || !panes.value[tabsCursor.value]) {
283
+ return;
284
+ }
285
+ if (tree.value.isLeaf(node, isLazy.value)) {
286
+ node.leaf = true;
287
+ panes.value[tabsCursor.value].selectedNode = node;
288
+ panes.value = panes.value.slice(0, node.level + 1);
289
+ if (!silent) {
290
+ const pathNodes = panes.value.map((pane) => pane.selectedNode);
291
+ emitChange(pathNodes);
292
+ emit("pathChange", pathNodes);
293
+ }
294
+ return;
295
+ }
296
+ if (tree.value.hasChildren(node, isLazy.value)) {
297
+ const level = node.level + 1;
298
+ panes.value[tabsCursor.value].selectedNode = node;
299
+ panes.value = panes.value.slice(0, level);
300
+ panes.value.push({
301
+ nodes: node.children || [],
302
+ selectedNode: null
303
+ });
304
+ tabsCursor.value = level;
305
+ if (!silent) {
306
+ const pathNodes = panes.value.map((pane) => pane.selectedNode);
307
+ emit("pathChange", pathNodes);
308
+ }
309
+ return;
310
+ }
311
+ currentProcessNode = node;
312
+ if (loading) {
313
+ return;
314
+ }
315
+ await invokeLazyLoad(node);
316
+ if (currentProcessNode === node) {
317
+ panes.value[tabsCursor.value].selectedNode = node;
318
+ methods.handleNode(node, silent);
319
+ }
320
+ },
321
+ handleTabClick(tab) {
322
+ currentProcessNode = null;
323
+ tabsCursor.value = tab.paneKey;
324
+ },
325
+ formatTabTitle(pane) {
326
+ return pane.selectedNode ? pane.selectedNode.text : translate("select");
327
+ },
328
+ isSelected(pane, node) {
329
+ return pane.selectedNode && pane.selectedNode.value === node.value;
330
+ }
331
+ };
332
+ watch([configs, () => props.options], () => {
333
+ init();
334
+ }, {
335
+ deep: true,
336
+ immediate: true
337
+ });
338
+ watch(() => props.modelValue, (value) => {
339
+ if (value !== innerValue.value) {
340
+ innerValue.value = value;
341
+ syncValue();
342
+ }
343
+ });
344
+ watch(() => props.visible, (val) => {
345
+ if (val && Array.isArray(innerValue.value) && innerValue.value.length > 0) {
346
+ syncValue();
347
+ }
348
+ });
349
+ return { panes, initLoading, tabsCursor, ...methods };
350
+ }
351
+ });
352
+ const _hoisted_1$1 = {
353
+ role: "menu",
354
+ class: "nut-cascader-pane"
355
+ };
356
+ const _hoisted_2 = ["aria-checked", "aria-disabled", "onClick"];
357
+ const _hoisted_3 = { class: "nut-cascader-item__title" };
358
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("view", { class: "nut-cascader-pane" }, null, -1);
359
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
360
+ const _component_nut_icon = resolveComponent("nut-icon");
361
+ const _component_nut_tabpane = resolveComponent("nut-tabpane");
362
+ const _component_nut_tabs = resolveComponent("nut-tabs");
363
+ return openBlock(), createBlock(_component_nut_tabs, {
364
+ class: "nut-cascader",
365
+ modelValue: _ctx.tabsCursor,
366
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.tabsCursor = $event),
367
+ onClick: _ctx.handleTabClick,
368
+ "title-scroll": ""
369
+ }, {
370
+ default: withCtx(() => [
371
+ !_ctx.initLoading && _ctx.panes.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.panes, (pane, index2) => {
372
+ return openBlock(), createBlock(_component_nut_tabpane, {
373
+ title: _ctx.formatTabTitle(pane),
374
+ key: index2
375
+ }, {
376
+ default: withCtx(() => [
377
+ createElementVNode("view", _hoisted_1$1, [
378
+ (openBlock(true), createElementBlock(Fragment, null, renderList(pane.nodes, (node) => {
379
+ return openBlock(), createElementBlock("view", {
380
+ key: node.value,
381
+ class: normalizeClass(["nut-cascader-item", { active: _ctx.isSelected(pane, node), disabled: node.disabled }]),
382
+ "aria-checked": _ctx.isSelected(pane, node),
383
+ "aria-disabled": node.disabled || void 0,
384
+ role: "menuitemradio",
385
+ onClick: ($event) => _ctx.handleNode(node, false)
386
+ }, [
387
+ createElementVNode("view", _hoisted_3, toDisplayString(node.text), 1),
388
+ node.loading ? (openBlock(), createBlock(_component_nut_icon, {
389
+ key: 0,
390
+ class: "nut-cascader-item__icon-loading",
391
+ name: "loading"
392
+ })) : (openBlock(), createBlock(_component_nut_icon, {
393
+ key: 1,
394
+ class: "nut-cascader-item__icon-check",
395
+ name: "checklist"
396
+ }))
397
+ ], 10, _hoisted_2);
398
+ }), 128))
399
+ ])
400
+ ]),
401
+ _: 2
402
+ }, 1032, ["title"]);
403
+ }), 128)) : (openBlock(), createBlock(_component_nut_tabpane, {
404
+ key: 1,
405
+ title: "Loading..."
406
+ }, {
407
+ default: withCtx(() => [
408
+ _hoisted_4
409
+ ]),
410
+ _: 1
411
+ }))
412
+ ]),
413
+ _: 1
414
+ }, 8, ["modelValue", "onClick"]);
415
+ }
416
+ var CascaderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
417
+ const { create } = createComponent("cascader");
418
+ const _sfc_main = create({
419
+ components: {
420
+ [CascaderItem.name]: CascaderItem
421
+ },
422
+ props: {
423
+ ...popupProps,
424
+ modelValue: Array,
425
+ visible: Boolean,
426
+ title: String,
427
+ options: {
428
+ type: Array,
429
+ default: () => []
430
+ },
431
+ lazy: Boolean,
432
+ lazyLoad: Function,
433
+ valueKey: {
434
+ type: String,
435
+ default: "value"
436
+ },
437
+ textKey: {
438
+ type: String,
439
+ default: "text"
440
+ },
441
+ childrenKey: {
442
+ type: String,
443
+ default: "children"
444
+ },
445
+ convertConfig: Object
446
+ },
447
+ emits: ["update:modelValue", "change", "pathChange", "update:visible"],
448
+ setup(props, { emit }) {
449
+ const innerValue = ref(props.modelValue);
450
+ const innerVisible = computed({
451
+ get() {
452
+ return props.visible;
453
+ },
454
+ set(value) {
455
+ emit("update:visible", value);
456
+ }
457
+ });
458
+ const onChange = (value, pathNodes) => {
459
+ innerValue.value = value;
460
+ innerVisible.value = false;
461
+ emit("change", value, pathNodes);
462
+ emit("update:modelValue", value);
463
+ };
464
+ const onPathChange = (pathNodes) => {
465
+ emit("pathChange", pathNodes);
466
+ };
467
+ watch(() => props.modelValue, (value) => {
468
+ if (value !== innerValue.value) {
469
+ innerValue.value = value;
470
+ }
471
+ });
472
+ return {
473
+ onChange,
474
+ onPathChange,
475
+ innerValue,
476
+ innerVisible
477
+ };
478
+ }
479
+ });
480
+ const _hoisted_1 = ["innerHTML"];
481
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
482
+ const _component_nut_cascader_item = resolveComponent("nut-cascader-item");
483
+ const _component_nut_popup = resolveComponent("nut-popup");
484
+ return openBlock(), createBlock(_component_nut_popup, {
485
+ visible: _ctx.innerVisible,
486
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.innerVisible = $event),
487
+ position: "bottom",
488
+ "pop-class": "nut-cascader__popup",
489
+ round: "",
490
+ closeable: !_ctx.closeable,
491
+ "close-icon": _ctx.closeIcon,
492
+ "destroy-on-close": false,
493
+ "close-icon-position": _ctx.closeIconPosition
494
+ }, {
495
+ default: withCtx(() => [
496
+ _ctx.title ? (openBlock(), createElementBlock("view", {
497
+ key: 0,
498
+ class: "nut-cascader__bar",
499
+ innerHTML: _ctx.title
500
+ }, null, 8, _hoisted_1)) : createCommentVNode("", true),
501
+ createVNode(_component_nut_cascader_item, {
502
+ onChange: _ctx.onChange,
503
+ onPathChange: _ctx.onPathChange,
504
+ modelValue: _ctx.innerValue,
505
+ options: _ctx.options,
506
+ lazy: _ctx.lazy,
507
+ "lazy-load": _ctx.lazyLoad,
508
+ "value-key": _ctx.valueKey,
509
+ "text-key": _ctx.textKey,
510
+ "children-key": _ctx.childrenKey,
511
+ "convert-config": _ctx.convertConfig,
512
+ visible: _ctx.innerVisible
513
+ }, null, 8, ["onChange", "onPathChange", "modelValue", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible"])
514
+ ]),
515
+ _: 1
516
+ }, 8, ["visible", "closeable", "close-icon", "close-icon-position"]);
517
+ }
518
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
519
+ export { index as default };
@@ -0,0 +1,63 @@
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, onMounted, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, 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 } = createComponent("category");
11
+ const _sfc_main = create({
12
+ props: {
13
+ type: {
14
+ type: String,
15
+ default: "classify"
16
+ },
17
+ category: {
18
+ type: Array,
19
+ default: () => []
20
+ }
21
+ },
22
+ setup(props, { emit, slots }) {
23
+ const checkIndex = ref(0);
24
+ const categoryLeft = ref(false);
25
+ const getChildList = (index2) => {
26
+ checkIndex.value = index2;
27
+ emit("change", index2);
28
+ };
29
+ onMounted(() => {
30
+ });
31
+ return {
32
+ getChildList,
33
+ checkIndex,
34
+ categoryLeft
35
+ };
36
+ }
37
+ });
38
+ const _hoisted_1 = { class: "nut-category" };
39
+ const _hoisted_2 = { class: "nut-category__cateList" };
40
+ const _hoisted_3 = { key: 0 };
41
+ const _hoisted_4 = ["onClick"];
42
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
43
+ return openBlock(), createElementBlock("div", _hoisted_1, [
44
+ createElementVNode("div", _hoisted_2, [
45
+ _ctx.type == "classify" || _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_3, [
46
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.category, (item, index2) => {
47
+ return openBlock(), createElementBlock("div", {
48
+ class: "nut-category__cateListLeft",
49
+ key: index2
50
+ }, [
51
+ createElementVNode("div", {
52
+ class: normalizeClass([_ctx.checkIndex == index2 ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]),
53
+ onClick: ($event) => _ctx.getChildList(index2)
54
+ }, toDisplayString(item.catName), 11, _hoisted_4)
55
+ ]);
56
+ }), 128))
57
+ ])) : createCommentVNode("", true),
58
+ renderSlot(_ctx.$slots, "default")
59
+ ])
60
+ ]);
61
+ }
62
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
63
+ export { index as default };
@@ -0,0 +1,118 @@
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 { c as createComponent } from "./component.js";
7
+ import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
+ import "../locale/lang";
10
+ var index_vue_vue_type_style_index_0_lang = "";
11
+ const { componentName, create } = createComponent("categorypane");
12
+ const _sfc_main = create({
13
+ props: {
14
+ type: {
15
+ type: String,
16
+ default: "classify"
17
+ },
18
+ categoryChild: {
19
+ type: Array,
20
+ default: () => []
21
+ },
22
+ customCategory: {
23
+ type: Array,
24
+ default: () => []
25
+ }
26
+ },
27
+ setup(props, { emit }) {
28
+ const onChange = (sku) => {
29
+ emit("onChange", sku);
30
+ };
31
+ return {
32
+ onChange
33
+ };
34
+ }
35
+ });
36
+ const _hoisted_1 = { class: "nut-categorypane" };
37
+ const _hoisted_2 = {
38
+ key: 0,
39
+ class: "nut-categorypane__cateListRight"
40
+ };
41
+ const _hoisted_3 = { class: "nut-categorypane__childTitle" };
42
+ const _hoisted_4 = {
43
+ key: 0,
44
+ class: "nut-categorypane__childItemList"
45
+ };
46
+ const _hoisted_5 = ["onClick"];
47
+ const _hoisted_6 = ["src"];
48
+ const _hoisted_7 = { class: "nut-categorypane__skuImg" };
49
+ const _hoisted_8 = {
50
+ key: 1,
51
+ class: "nut-categorypane__cateListRight"
52
+ };
53
+ const _hoisted_9 = { class: "nut-categorypane__childTitle" };
54
+ const _hoisted_10 = {
55
+ key: 0,
56
+ class: "nut-categorypane__childItemList"
57
+ };
58
+ const _hoisted_11 = ["onClick"];
59
+ const _hoisted_12 = { class: "nut-categorypane__skuName" };
60
+ const _hoisted_13 = {
61
+ key: 2,
62
+ class: "nut-categorypane__selfItemList"
63
+ };
64
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
65
+ return openBlock(), createElementBlock("div", _hoisted_1, [
66
+ _ctx.type == "classify" ? (openBlock(), createElementBlock("div", _hoisted_2, [
67
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
68
+ return openBlock(), createElementBlock("div", { key: index2 }, [
69
+ createElementVNode("div", _hoisted_3, toDisplayString(item.catName), 1),
70
+ item.catType == 1 ? (openBlock(), createElementBlock("div", _hoisted_4, [
71
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
72
+ return openBlock(), createElementBlock("div", {
73
+ class: "nut-categorypane__childItem",
74
+ key,
75
+ onClick: ($event) => _ctx.onChange(sku)
76
+ }, [
77
+ createElementVNode("img", {
78
+ class: "nut-categorypane__childImg",
79
+ src: sku.backImg
80
+ }, null, 8, _hoisted_6),
81
+ createElementVNode("div", _hoisted_7, toDisplayString(sku.catName), 1)
82
+ ], 8, _hoisted_5);
83
+ }), 128))
84
+ ])) : createCommentVNode("", true)
85
+ ]);
86
+ }), 128))
87
+ ])) : createCommentVNode("", true),
88
+ _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_8, [
89
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
90
+ return openBlock(), createElementBlock("div", { key: index2 }, [
91
+ createElementVNode("div", _hoisted_9, toDisplayString(item.catName), 1),
92
+ item.catType == 1 ? (openBlock(), createElementBlock("div", _hoisted_10, [
93
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
94
+ return openBlock(), createElementBlock("div", {
95
+ class: "nut-categorypane__childItem",
96
+ key,
97
+ onClick: ($event) => _ctx.onChange(sku)
98
+ }, [
99
+ createElementVNode("div", _hoisted_12, toDisplayString(sku.catName), 1)
100
+ ], 8, _hoisted_11);
101
+ }), 128))
102
+ ])) : createCommentVNode("", true)
103
+ ]);
104
+ }), 128))
105
+ ])) : createCommentVNode("", true),
106
+ _ctx.type == "custom" ? (openBlock(), createElementBlock("div", _hoisted_13, [
107
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.customCategory, (sku, key) => {
108
+ return openBlock(), createElementBlock("div", {
109
+ class: "nut-categorypane__skuName",
110
+ key,
111
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onChange())
112
+ }, toDisplayString(sku.catName), 1);
113
+ }), 128))
114
+ ])) : createCommentVNode("", true)
115
+ ]);
116
+ }
117
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
118
+ export { index as default };