@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
@@ -1,231 +1,41 @@
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 { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, withDirectives, normalizeStyle, vModelText, Fragment, renderList, createCommentVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { ref as e, computed as t, watch as l, resolveComponent as n, openBlock as s, createElementBlock as a, createVNode as o, withCtx as i, createElementVNode as r, toDisplayString as u, withDirectives as c, normalizeStyle as p, vModelText as d, Fragment as v, renderList as m, createCommentVNode as f } from "vue";
7
+ import { c as g } from "./component.js";
8
+ import { _ as h } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { create, translate } = createComponent("shortpassword");
11
- const _sfc_main = create({
12
- props: {
13
- title: {
14
- type: String,
15
- default: ""
16
- },
17
- desc: {
18
- type: String,
19
- default: ""
20
- },
21
- tips: {
22
- type: String,
23
- default: ""
24
- },
25
- visible: {
26
- type: Boolean,
27
- default: false
28
- },
29
- modelValue: {
30
- type: String,
31
- default: ""
32
- },
33
- errorMsg: {
34
- type: String,
35
- default: ""
36
- },
37
- noButton: {
38
- type: Boolean,
39
- default: true
40
- },
41
- closeOnClickOverlay: {
42
- type: Boolean,
43
- default: true
44
- },
45
- length: {
46
- type: [String, Number],
47
- default: 6
48
- },
49
- isWrapTeleport: {
50
- type: Boolean,
51
- default: true
52
- }
53
- },
54
- emits: ["update:modelValue", "update:visible", "complete", "change", "ok", "tips", "close", "cancel"],
55
- setup(props, { emit }) {
56
- const realInput = ref(props.modelValue);
57
- const realpwd = ref();
58
- const comLen = computed(() => range(Number(props.length)));
59
- const show = ref(props.visible);
60
- function sureClick() {
61
- emit("ok", realInput.value);
62
- }
63
- function focus() {
64
- realpwd.value.focus();
65
- }
66
- watch(() => props.visible, (value) => {
67
- show.value = value;
68
- });
69
- watch(() => props.modelValue, (value) => {
70
- realInput.value = value;
71
- emit("update:modelValue", value);
72
- }, {
73
- deep: true,
74
- immediate: true
75
- });
76
- function changeValue(e) {
77
- const input = e.target;
78
- let val = input.value;
79
- if (val.length > comLen.value) {
80
- val = val.slice(0, comLen.value);
81
- realInput.value = val;
82
- }
83
- if (String(realInput.value).length === comLen.value) {
84
- emit("complete", val);
85
- }
86
- emit("change", val);
87
- emit("update:modelValue", val);
88
- }
89
- function close() {
90
- emit("update:visible", false);
91
- emit("cancel");
92
- }
93
- function closeIcon() {
94
- emit("update:visible", false);
95
- emit("close");
96
- }
97
- function range(val) {
98
- return Math.min(Math.max(4, val), 6);
99
- }
100
- function onTips() {
101
- emit("tips");
102
- }
103
- function systemStyle() {
104
- let u = navigator.userAgent;
105
- let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
106
- let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
107
- if (isIOS) {
108
- return {
109
- paddingRight: "1200px"
110
- };
111
- }
112
- if (isAndroid) {
113
- return {
114
- opacity: 0,
115
- zindex: 10
116
- };
117
- }
118
- }
119
- return {
120
- comLen,
121
- sureClick,
122
- realInput,
123
- realpwd,
124
- focus,
125
- range,
126
- changeValue,
127
- close,
128
- onTips,
129
- show,
130
- systemStyle,
131
- closeIcon,
132
- translate
133
- };
10
+ const { create: y, translate: k } = g("shortpassword"), w = y({ props: { title: { type: String, default: "" }, desc: { type: String, default: "" }, tips: { type: String, default: "" }, visible: { type: Boolean, default: false }, modelValue: { type: String, default: "" }, errorMsg: { type: String, default: "" }, noButton: { type: Boolean, default: true }, closeOnClickOverlay: { type: Boolean, default: true }, length: { type: [String, Number], default: 6 }, isWrapTeleport: { type: Boolean, default: true } }, emits: ["update:modelValue", "update:visible", "complete", "change", "ok", "tips", "close", "cancel"], setup(n2, { emit: s2 }) {
11
+ const a2 = e(n2.modelValue), o2 = e(), i2 = t(() => u2(Number(n2.length))), r2 = e(n2.visible);
12
+ function u2(e2) {
13
+ return Math.min(Math.max(4, e2), 6);
134
14
  }
135
- });
136
- const _hoisted_1 = { class: "nut-shortpsd-title" };
137
- const _hoisted_2 = { class: "nut-shortpsd-subtitle" };
138
- const _hoisted_3 = { class: "nut-input-normalw" };
139
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "nut-input-site" }, null, -1);
140
- const _hoisted_5 = {
141
- key: 0,
142
- class: "nut-shortpsd-icon"
143
- };
144
- const _hoisted_6 = { class: "nut-shortpsd-message" };
145
- const _hoisted_7 = { class: "nut-shortpsd-error" };
146
- const _hoisted_8 = {
147
- key: 0,
148
- class: "nut-shortpsd-forget"
149
- };
150
- const _hoisted_9 = {
151
- key: 0,
152
- class: "nut-shortpsd-footer"
153
- };
154
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
155
- const _component_nut_icon = resolveComponent("nut-icon");
156
- const _component_nut_popup = resolveComponent("nut-popup");
157
- return openBlock(), createElementBlock("view", null, [
158
- createVNode(_component_nut_popup, {
159
- style: {
160
- padding: "32px 24px 28px 24px",
161
- borderRadius: "12px",
162
- textAlign: "center"
163
- },
164
- visible: _ctx.show,
165
- "onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
166
- closeable: true,
167
- onClickCloseIcon: _ctx.closeIcon,
168
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
169
- onClickOverlay: _ctx.close,
170
- isWrapTeleport: _ctx.isWrapTeleport
171
- }, {
172
- default: withCtx(() => [
173
- createElementVNode("view", _hoisted_1, toDisplayString(_ctx.title || _ctx.translate("title")), 1),
174
- createElementVNode("view", _hoisted_2, toDisplayString(_ctx.desc || _ctx.translate("desc")), 1),
175
- createElementVNode("div", _hoisted_3, [
176
- withDirectives(createElementVNode("input", {
177
- ref: "realpwd",
178
- class: "nut-input-real",
179
- type: "number",
180
- maxlength: "6",
181
- style: normalizeStyle(_ctx.systemStyle()),
182
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.realInput = $event),
183
- onInput: _cache[1] || (_cache[1] = (...args) => _ctx.changeValue && _ctx.changeValue(...args))
184
- }, null, 36), [
185
- [vModelText, _ctx.realInput]
186
- ]),
187
- _hoisted_4,
188
- createElementVNode("view", {
189
- class: "nut-shortpsd-fake",
190
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
191
- }, [
192
- (openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen, index2) => {
193
- return openBlock(), createElementBlock("view", {
194
- class: "nut-shortpsd-li",
195
- key: index2
196
- }, [
197
- String(_ctx.realInput).length > index2 ? (openBlock(), createElementBlock("view", _hoisted_5)) : createCommentVNode("", true)
198
- ]);
199
- }), 128))
200
- ])
201
- ]),
202
- createElementVNode("view", _hoisted_6, [
203
- createElementVNode("view", _hoisted_7, toDisplayString(_ctx.errorMsg), 1),
204
- _ctx.tips || _ctx.translate("tips") ? (openBlock(), createElementBlock("view", _hoisted_8, [
205
- createVNode(_component_nut_icon, {
206
- class: "icon",
207
- size: "11px",
208
- name: "tips"
209
- }),
210
- createElementVNode("view", {
211
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onTips && _ctx.onTips(...args))
212
- }, toDisplayString(_ctx.tips || _ctx.translate("tips")), 1)
213
- ])) : createCommentVNode("", true)
214
- ]),
215
- !_ctx.noButton ? (openBlock(), createElementBlock("view", _hoisted_9, [
216
- createElementVNode("view", {
217
- class: "nut-shortpsd-cancle",
218
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.close && _ctx.close(...args))
219
- }, toDisplayString(_ctx.translate("cancel")), 1),
220
- createElementVNode("view", {
221
- class: "nut-shortpsd-sure",
222
- onClick: _cache[5] || (_cache[5] = (...args) => _ctx.sureClick && _ctx.sureClick(...args))
223
- }, toDisplayString(_ctx.translate("confirm")), 1)
224
- ])) : createCommentVNode("", true)
225
- ]),
226
- _: 1
227
- }, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay", "isWrapTeleport"])
228
- ]);
229
- }
230
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
231
- export { index as default };
15
+ return l(() => n2.visible, (e2) => {
16
+ r2.value = e2;
17
+ }), l(() => n2.modelValue, (e2) => {
18
+ a2.value = e2, s2("update:modelValue", e2);
19
+ }, { deep: true, immediate: true }), { comLen: i2, sureClick: function() {
20
+ s2("ok", a2.value);
21
+ }, realInput: a2, realpwd: o2, focus: function() {
22
+ o2.value.focus();
23
+ }, range: u2, changeValue: function(e2) {
24
+ let t2 = e2.target.value;
25
+ t2.length > i2.value && (t2 = t2.slice(0, i2.value), a2.value = t2), String(a2.value).length === i2.value && s2("complete", t2), s2("change", t2), s2("update:modelValue", t2);
26
+ }, close: function() {
27
+ s2("update:visible", false), s2("cancel");
28
+ }, onTips: function() {
29
+ s2("tips");
30
+ }, show: r2, systemStyle: function() {
31
+ let e2 = navigator.userAgent, t2 = e2.indexOf("Android") > -1 || e2.indexOf("Linux") > -1;
32
+ return !!e2.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) ? { paddingRight: "1200px" } : t2 ? { opacity: 0, zindex: 10 } : void 0;
33
+ }, closeIcon: function() {
34
+ s2("update:visible", false), s2("close");
35
+ }, translate: k };
36
+ } }), x = { class: "nut-shortpsd-title" }, C = { class: "nut-shortpsd-subtitle" }, b = { class: "nut-input-normalw" }, S = r("div", { class: "nut-input-site" }, null, -1), V = { key: 0, class: "nut-shortpsd-icon" }, I = { class: "nut-shortpsd-message" }, O = { class: "nut-shortpsd-error" }, T = { key: 0, class: "nut-shortpsd-forget" }, B = { key: 0, class: "nut-shortpsd-footer" };
37
+ var M = h(w, [["render", function(e2, t2, l2, g2, h2, y2) {
38
+ const k2 = n("nut-icon"), w2 = n("nut-popup");
39
+ return s(), a("view", null, [o(w2, { style: { padding: "32px 24px 28px 24px", borderRadius: "12px", textAlign: "center" }, visible: e2.show, "onUpdate:visible": t2[6] || (t2[6] = (t3) => e2.show = t3), closeable: true, onClickCloseIcon: e2.closeIcon, "close-on-click-overlay": e2.closeOnClickOverlay, onClickOverlay: e2.close, isWrapTeleport: e2.isWrapTeleport }, { default: i(() => [r("view", x, u(e2.title || e2.translate("title")), 1), r("view", C, u(e2.desc || e2.translate("desc")), 1), r("div", b, [c(r("input", { ref: "realpwd", class: "nut-input-real", type: "number", maxlength: "6", style: p(e2.systemStyle()), "onUpdate:modelValue": t2[0] || (t2[0] = (t3) => e2.realInput = t3), onInput: t2[1] || (t2[1] = (...t3) => e2.changeValue && e2.changeValue(...t3)) }, null, 36), [[d, e2.realInput]]), S, r("view", { class: "nut-shortpsd-fake", onClick: t2[2] || (t2[2] = (...t3) => e2.focus && e2.focus(...t3)) }, [(s(true), a(v, null, m(new Array(e2.comLen), (t3, l3) => (s(), a("view", { class: "nut-shortpsd-li", key: l3 }, [String(e2.realInput).length > l3 ? (s(), a("view", V)) : f("", true)]))), 128))])]), r("view", I, [r("view", O, u(e2.errorMsg), 1), e2.tips || e2.translate("tips") ? (s(), a("view", T, [o(k2, { class: "icon", size: "11px", name: "tips" }), r("view", { onClick: t2[3] || (t2[3] = (...t3) => e2.onTips && e2.onTips(...t3)) }, u(e2.tips || e2.translate("tips")), 1)])) : f("", true)]), e2.noButton ? f("", true) : (s(), a("view", B, [r("view", { class: "nut-shortpsd-cancle", onClick: t2[4] || (t2[4] = (...t3) => e2.close && e2.close(...t3)) }, u(e2.translate("cancel")), 1), r("view", { class: "nut-shortpsd-sure", onClick: t2[5] || (t2[5] = (...t3) => e2.sureClick && e2.sureClick(...t3)) }, u(e2.translate("confirm")), 1)]))]), _: 1 }, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay", "isWrapTeleport"])]);
40
+ }]]);
41
+ export { M as default };
@@ -5,101 +5,45 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
8
+ var __spreadValues = (a2, b2) => {
9
+ for (var prop in b2 || (b2 = {}))
10
+ if (__hasOwnProp.call(b2, prop))
11
+ __defNormalProp(a2, prop, b2[prop]);
12
12
  if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
13
+ for (var prop of __getOwnPropSymbols(b2)) {
14
+ if (__propIsEnum.call(b2, prop))
15
+ __defNormalProp(a2, prop, b2[prop]);
16
16
  }
17
- return a;
17
+ return a2;
18
18
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19
+ var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
20
  /*!
21
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { ref, reactive, computed, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
+ import { ref as e, reactive as t, computed as r, onMounted as s, toRefs as n, openBlock as a, createElementBlock as o, normalizeClass as l, createElementVNode as i, renderSlot as c } from "vue";
26
+ import { c as u } from "./component.js";
27
+ import { _ as d } from "./plugin-vue_export-helper.js";
28
28
  import "../locale/lang";
29
- const { componentName, create } = createComponent("sidenavbar");
30
- const _sfc_main = create({
31
- props: {
32
- offset: {
33
- type: [String, Number],
34
- default: 15
29
+ const { componentName: f, create: p } = u("sidenavbar"), m = p({ props: { offset: { type: [String, Number], default: 15 } }, emits: [], setup: (a2, o2) => {
30
+ const l2 = e(null), i2 = t({ count: 1, observer: null }), c2 = r(() => ({ [f]: true })), u2 = (e2, t2 = 1) => {
31
+ for (let r2 = 0; r2 < e2.length; r2++) {
32
+ let s2 = e2[r2];
33
+ s2.children[0].style.paddingLeft = a2.offset * t2 + "px", s2.className.includes("nut-sidenavbaritem") || u2(Array.from(s2.children[1].children), ++i2.count);
35
34
  }
36
- },
37
- emits: [],
38
- setup: (props, context) => {
39
- const list = ref(null);
40
- const state = reactive({
41
- count: 1,
42
- observer: null
43
- });
44
- const classes = computed(() => {
45
- const prefixCls = componentName;
46
- return {
47
- [prefixCls]: true
48
- };
49
- });
50
- const setPaddingLeft = (nodeList, level = 1) => {
51
- for (let i = 0; i < nodeList.length; i++) {
52
- let item = nodeList[i];
53
- item.children[0].style.paddingLeft = props.offset * level + "px";
54
- if (!item.className.includes("nut-sidenavbaritem")) {
55
- setPaddingLeft(Array.from(item.children[1].children), ++state.count);
56
- }
57
- }
58
- state.count--;
59
- };
60
- const handleSlots = () => {
61
- let childNodes = list.value.childNodes;
62
- if (childNodes.length) {
63
- childNodes = Array.from(childNodes).filter((item) => item.nodeType !== 3).map((item) => {
64
- return item;
65
- });
66
- setPaddingLeft(childNodes);
67
- }
68
- };
69
- onMounted(() => {
70
- handleSlots();
71
- state.observer = new MutationObserver(function() {
72
- state.count = 1;
73
- handleSlots();
74
- });
75
- state.observer.observe(list.value, {
76
- attributes: false,
77
- childList: true,
78
- characterData: false,
79
- subtree: false
80
- });
81
- });
82
- return __spreadProps(__spreadValues({}, toRefs(state)), {
83
- list,
84
- classes
85
- });
86
- }
87
- });
88
- const _hoisted_1 = { class: "nut-sidenavbar__content" };
89
- const _hoisted_2 = {
90
- class: "nut-sidenavbar__content__list",
91
- ref: "list"
92
- };
93
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
94
- return openBlock(), createElementBlock("view", {
95
- class: normalizeClass(_ctx.classes)
96
- }, [
97
- createElementVNode("view", _hoisted_1, [
98
- createElementVNode("view", _hoisted_2, [
99
- renderSlot(_ctx.$slots, "default")
100
- ], 512)
101
- ])
102
- ], 2);
103
- }
104
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
105
- export { index as default };
35
+ i2.count--;
36
+ }, d2 = () => {
37
+ let e2 = l2.value.childNodes;
38
+ e2.length && (e2 = Array.from(e2).filter((e3) => e3.nodeType !== 3).map((e3) => e3), u2(e2));
39
+ };
40
+ return s(() => {
41
+ d2(), i2.observer = new MutationObserver(function() {
42
+ i2.count = 1, d2();
43
+ }), i2.observer.observe(l2.value, { attributes: false, childList: true, characterData: false, subtree: false });
44
+ }), __spreadProps(__spreadValues({}, n(i2)), { list: l2, classes: c2 });
45
+ } }), v = { class: "nut-sidenavbar__content" }, b = { class: "nut-sidenavbar__content__list", ref: "list" };
46
+ var h = d(m, [["render", function(e2, t2, r2, s2, n2, u2) {
47
+ return a(), o("view", { class: l(e2.classes) }, [i("view", v, [i("view", b, [c(e2.$slots, "default")], 512)])], 2);
48
+ }]]);
49
+ export { h as default };
@@ -1,51 +1,16 @@
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 { computed, openBlock, createElementBlock, withModifiers, createElementVNode, toDisplayString } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { computed as e, openBlock as t, createElementBlock as i, withModifiers as a, createElementVNode as l, toDisplayString as n } from "vue";
7
+ import { c as r } from "./component.js";
8
+ import { _ as s } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("sidenavbaritem");
11
- const _sfc_main = create({
12
- props: {
13
- title: {
14
- type: String,
15
- default: ""
16
- },
17
- ikey: {
18
- type: String,
19
- default: ""
20
- }
21
- },
22
- emits: ["click"],
23
- setup: (props, context) => {
24
- const classes = computed(() => {
25
- const prefixCls = componentName;
26
- return {
27
- [prefixCls]: true
28
- };
29
- });
30
- const handleClick = () => {
31
- context.emit("click");
32
- };
33
- return {
34
- classes,
35
- handleClick
36
- };
37
- }
38
- });
39
- const _hoisted_1 = ["ikey"];
40
- const _hoisted_2 = { class: "nut-sidenavbaritem__title" };
41
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
42
- return openBlock(), createElementBlock("view", {
43
- class: "nut-sidenavbaritem",
44
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
45
- ikey: _ctx.ikey
46
- }, [
47
- createElementVNode("span", _hoisted_2, toDisplayString(_ctx.title), 1)
48
- ], 8, _hoisted_1);
49
- }
50
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
51
- export { index as default };
10
+ const { componentName: o, create: c } = r("sidenavbaritem"), p = c({ props: { title: { type: String, default: "" }, ikey: { type: String, default: "" } }, emits: ["click"], setup: (t2, i2) => ({ classes: e(() => ({ [o]: true })), handleClick: () => {
11
+ i2.emit("click");
12
+ } }) }), m = ["ikey"], u = { class: "nut-sidenavbaritem__title" };
13
+ var d = s(p, [["render", function(e2, r2, s2, o2, c2, p2) {
14
+ return t(), i("view", { class: "nut-sidenavbaritem", onClick: r2[0] || (r2[0] = a((...t2) => e2.handleClick && e2.handleClick(...t2), ["stop"])), ikey: e2.ikey }, [l("span", u, n(e2.title), 1)], 8, m);
15
+ }]]);
16
+ export { d as default };