@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
@@ -5,251 +5,96 @@ 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 { reactive, onMounted, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, h } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import Popup from "./Popup.js";
28
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
+ import { reactive as e, onMounted as t, ref as o, watch as n, resolveComponent as i, openBlock as l, createBlock as s, withCtx as r, createElementVNode as u, normalizeClass as d, normalizeStyle as p, renderSlot as a, createElementBlock as c, Fragment as m, createTextVNode as y, toDisplayString as f, createVNode as g, render as v, h as C } from "vue";
26
+ import { c as b } from "./component.js";
27
+ import h from "./Popup.js";
28
+ import { _ as k } from "./plugin-vue_export-helper.js";
29
29
  import "../locale/lang";
30
30
  import "./OverLay.js";
31
31
  import "./Icon.js";
32
32
  import "./pxCheck.js";
33
- const { componentName, create } = createComponent("notify");
34
- const _sfc_main = create({
35
- components: {
36
- [Popup.name]: Popup
37
- },
38
- props: {
39
- id: String,
40
- color: { type: String, default: "" },
41
- msg: { type: String, default: "" },
42
- duration: { type: Number, default: 3e3 },
43
- className: {
44
- type: String,
45
- default: ""
46
- },
47
- background: { type: String, default: "" },
48
- type: {
49
- type: String,
50
- default: "danger"
51
- },
52
- showPopup: {
53
- type: Boolean,
54
- default: false
55
- },
56
- position: {
57
- type: String,
58
- default: "top"
59
- },
60
- isWrapTeleport: {
61
- type: Boolean,
62
- default: true
63
- },
64
- onClose: Function,
65
- onClick: Function,
66
- unmount: Function
67
- },
68
- setup(props, { slots }) {
69
- let timer = null;
70
- const state = reactive({
71
- mounted: false
72
- });
73
- onMounted(() => {
74
- });
75
- const visible = ref(false);
76
- const clickCover = () => {
77
- props.onClick && props.onClick();
78
- };
79
- const clearTimer = () => {
80
- if (timer) {
81
- clearTimeout(timer);
82
- timer = null;
83
- }
84
- };
85
- const hide = () => {
86
- state.mounted = false;
87
- };
88
- const show = () => {
89
- clearTimer();
90
- if (props.duration) {
91
- timer = setTimeout(() => {
92
- hide();
93
- }, props.duration);
94
- }
95
- };
96
- if (props.duration) {
97
- show();
98
- }
99
- watch(() => props.duration, (val) => {
100
- if (val) {
101
- show();
102
- }
103
- });
104
- const onAfterLeave = () => {
105
- clearTimer();
106
- props.unmount && props.unmount(props.id);
107
- props.onClose && props.onClose();
108
- };
109
- return { state, hide, onAfterLeave, clickCover, visible };
110
- }
111
- });
112
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
113
- const _component_nut_popup = resolveComponent("nut-popup");
114
- return openBlock(), createBlock(_component_nut_popup, {
115
- visible: _ctx.showPopup,
116
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.showPopup = $event),
117
- position: _ctx.position,
118
- overlay: false,
119
- isWrapTeleport: _ctx.isWrapTeleport
120
- }, {
121
- default: withCtx(() => [
122
- createElementVNode("div", {
123
- class: normalizeClass(["nut-notify", `nut-notify--${_ctx.type}`, _ctx.className]),
124
- style: normalizeStyle({ color: _ctx.color, background: _ctx.background }),
125
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
126
- }, [
127
- _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
128
- createTextVNode(toDisplayString(_ctx.msg), 1)
129
- ], 64))
130
- ], 6)
131
- ]),
132
- _: 3
133
- }, 8, ["visible", "position", "isWrapTeleport"]);
134
- }
135
- var Notify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
136
- const defaultOptions = {
137
- type: "base",
138
- showPopup: true,
139
- visible: true,
140
- msg: "",
141
- color: void 0,
142
- background: void 0,
143
- duration: 3e3,
144
- className: "",
145
- onClosed: null,
146
- onClick: null,
147
- onOpened: null,
148
- textTimer: null,
149
- unmount: null
150
- };
151
- let idsMap = [];
152
- let optsMap = [];
153
- const clearNotify = (id) => {
154
- if (id) {
155
- const container = document.getElementById(id);
156
- optsMap = optsMap.filter((item) => item.id !== id);
157
- idsMap = idsMap.filter((item) => item !== id);
158
- if (container) {
159
- document.body.removeChild(container);
160
- }
161
- } else {
162
- idsMap.forEach((item) => {
163
- const container = document.getElementById(item);
164
- if (container) {
165
- document.body.removeChild(container);
166
- }
167
- });
168
- optsMap = [];
169
- idsMap = [];
170
- }
171
- };
172
- const updateNotify = (opts) => {
173
- const container = document.getElementById(opts.id);
174
- if (container) {
175
- const currentOpt = optsMap.find((item) => item.id === opts.id);
176
- if (currentOpt) {
177
- opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
178
- } else {
179
- opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
180
- }
181
- const instance = createVNode(Notify, opts);
182
- render(instance, container);
183
- return instance.component.ctx;
184
- }
185
- };
186
- const mountNotify = (opts) => {
187
- opts.unmount = clearNotify;
188
- let _id;
189
- if (opts.id) {
190
- _id = opts.id;
191
- if (idsMap.find((item) => item === opts.id)) {
192
- return updateNotify(opts);
193
- }
194
- } else {
195
- _id = new Date().getTime() + "";
196
- }
197
- opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
198
- opts.id = _id;
199
- idsMap.push(opts.id);
200
- optsMap.push(opts);
201
- const root = document.createElement("view");
202
- root.id = "notify-" + opts.id;
203
- const Wrapper = {
204
- setup() {
205
- opts.teleport = `#notify-${opts.id}`;
206
- onMounted(() => {
207
- setTimeout(() => {
208
- document.body.removeChild(root);
209
- }, opts.duration);
210
- });
211
- return () => {
212
- return h(Notify, opts);
213
- };
214
- }
33
+ const { componentName: T, create: w } = b("notify");
34
+ var S = k(w({ components: { [h.name]: h }, props: { id: String, color: { type: String, default: "" }, msg: { type: String, default: "" }, duration: { type: Number, default: 3e3 }, className: { type: String, default: "" }, background: { type: String, default: "" }, type: { type: String, default: "danger" }, showPopup: { type: Boolean, default: false }, position: { type: String, default: "top" }, isWrapTeleport: { type: Boolean, default: true }, onClose: Function, onClick: Function, unmount: Function }, setup(i2, { slots: l2 }) {
35
+ let s2 = null;
36
+ const r2 = e({ mounted: false });
37
+ t(() => {
38
+ });
39
+ const u2 = o(false), d2 = () => {
40
+ s2 && (clearTimeout(s2), s2 = null);
41
+ }, p2 = () => {
42
+ r2.mounted = false;
43
+ }, a2 = () => {
44
+ d2(), i2.duration && (s2 = setTimeout(() => {
45
+ p2();
46
+ }, i2.duration));
215
47
  };
216
- const instance = createVNode(Wrapper);
217
- document.body.appendChild(root);
218
- render(instance, root);
219
- };
220
- const errorMsg = (msg) => {
221
- if (!msg) {
222
- console.warn("[NutUI Notify]: msg\u4E0D\u80FD\u4E3A\u7A7A");
223
- return;
224
- }
225
- };
226
- const NotifyFunction = {
227
- text(msg, obj = {}) {
228
- errorMsg(msg);
229
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg }));
230
- },
231
- primary(msg, obj = {}) {
232
- errorMsg(msg);
233
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "primary" }));
234
- },
235
- success(msg, obj = {}) {
236
- errorMsg(msg);
237
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "success" }));
238
- },
239
- danger(msg, obj = {}) {
240
- errorMsg(msg);
241
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "danger" }));
242
- },
243
- warn(msg, obj = {}) {
244
- errorMsg(msg);
245
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "warning" }));
246
- },
247
- hide() {
248
- clearNotify();
249
- },
250
- install(app) {
251
- app.use(Notify);
252
- app.config.globalProperties.$notify = NotifyFunction;
253
- }
254
- };
255
- export { Notify, NotifyFunction, NotifyFunction as default };
48
+ i2.duration && a2(), n(() => i2.duration, (e2) => {
49
+ e2 && a2();
50
+ });
51
+ return { state: r2, hide: p2, onAfterLeave: () => {
52
+ d2(), i2.unmount && i2.unmount(i2.id), i2.onClose && i2.onClose();
53
+ }, clickCover: () => {
54
+ i2.onClick && i2.onClick();
55
+ }, visible: u2 };
56
+ } }), [["render", function(e2, t2, o2, n2, g2, v2) {
57
+ const C2 = i("nut-popup");
58
+ return l(), s(C2, { visible: e2.showPopup, "onUpdate:visible": t2[1] || (t2[1] = (t3) => e2.showPopup = t3), position: e2.position, overlay: false, isWrapTeleport: e2.isWrapTeleport }, { default: r(() => [u("div", { class: d(["nut-notify", `nut-notify--${e2.type}`, e2.className]), style: p({ color: e2.color, background: e2.background }), onClick: t2[0] || (t2[0] = (...t3) => e2.clickCover && e2.clickCover(...t3)) }, [e2.$slots.default ? a(e2.$slots, "default", { key: 0 }) : (l(), c(m, { key: 1 }, [y(f(e2.msg), 1)], 64))], 6)]), _: 3 }, 8, ["visible", "position", "isWrapTeleport"]);
59
+ }]]);
60
+ const j = { type: "base", showPopup: true, visible: true, msg: "", color: void 0, background: void 0, duration: 3e3, className: "", onClosed: null, onClick: null, onOpened: null, textTimer: null, unmount: null };
61
+ let x = [], P = [];
62
+ const B = (e2) => {
63
+ if (e2) {
64
+ const t2 = document.getElementById(e2);
65
+ P = P.filter((t3) => t3.id !== e2), x = x.filter((t3) => t3 !== e2), t2 && document.body.removeChild(t2);
66
+ } else
67
+ x.forEach((e3) => {
68
+ const t2 = document.getElementById(e3);
69
+ t2 && document.body.removeChild(t2);
70
+ }), P = [], x = [];
71
+ }, E = (e2) => {
72
+ let o2;
73
+ if (e2.unmount = B, e2.id) {
74
+ if (o2 = e2.id, x.find((t2) => t2 === e2.id))
75
+ return ((e3) => {
76
+ const t2 = document.getElementById(e3.id);
77
+ if (t2) {
78
+ const o3 = P.find((t3) => t3.id === e3.id);
79
+ e3 = o3 ? __spreadValues(__spreadValues(__spreadValues({}, j), o3), e3) : __spreadValues(__spreadValues({}, j), e3);
80
+ const n3 = g(S, e3);
81
+ return v(n3, t2), n3.component.ctx;
82
+ }
83
+ })(e2);
84
+ } else
85
+ o2 = new Date().getTime() + "";
86
+ (e2 = __spreadValues(__spreadValues({}, j), e2)).id = o2, x.push(e2.id), P.push(e2);
87
+ const n2 = document.createElement("view");
88
+ n2.id = "notify-" + e2.id;
89
+ const i2 = g({ setup: () => (e2.teleport = `#notify-${e2.id}`, t(() => {
90
+ setTimeout(() => {
91
+ document.body.removeChild(n2);
92
+ }, e2.duration);
93
+ }), () => C(S, e2)) });
94
+ document.body.appendChild(n2), v(i2, n2);
95
+ }, N = { text: (e2, t2 = {}) => E(__spreadProps(__spreadValues({}, t2), { msg: e2 })), primary: (e2, t2 = {}) => E(__spreadProps(__spreadValues({}, t2), { msg: e2, type: "primary" })), success: (e2, t2 = {}) => E(__spreadProps(__spreadValues({}, t2), { msg: e2, type: "success" })), danger: (e2, t2 = {}) => E(__spreadProps(__spreadValues({}, t2), { msg: e2, type: "danger" })), warn: (e2, t2 = {}) => E(__spreadProps(__spreadValues({}, t2), { msg: e2, type: "warning" })), hide() {
96
+ B();
97
+ }, install(e2) {
98
+ e2.use(S), e2.config.globalProperties.$notify = N;
99
+ } };
100
+ export { S as Notify, N as NotifyFunction, N as default };
@@ -1,268 +1,47 @@
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, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } 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 o, onMounted as l, resolveComponent as a, openBlock as r, createBlock as n, withCtx as s, createElementVNode as i, createElementBlock as u, toDisplayString as d, createCommentVNode as p, Fragment as c, renderList as y, normalizeClass as m, createTextVNode as h } from "vue";
7
+ import { c as v } from "./component.js";
8
+ import { _ as f } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { create, translate } = createComponent("numberkeyboard");
11
- const _sfc_main = create({
12
- props: {
13
- confirmText: {
14
- type: String,
15
- default: ""
16
- },
17
- title: {
18
- type: String,
19
- default: ""
20
- },
21
- visible: {
22
- type: Boolean,
23
- default: false
24
- },
25
- type: {
26
- type: String,
27
- default: "default"
28
- },
29
- customKey: {
30
- type: Array,
31
- default: () => []
32
- },
33
- value: {
34
- type: String,
35
- default: ""
36
- },
37
- maxlength: {
38
- type: [Number, String],
39
- default: 6
40
- },
41
- randomKeys: {
42
- type: Boolean,
43
- default: false
44
- },
45
- overlay: {
46
- type: Boolean,
47
- default: true
48
- },
49
- isWrapTeleport: {
50
- type: Boolean,
51
- default: true
52
- }
53
- },
54
- emits: ["input", "delete", "close", "update:value"],
55
- setup(props, { emit }) {
56
- const clickKeyIndex = ref(void 0);
57
- const show = ref(props.visible);
58
- const root = ref();
59
- function defaultKey() {
60
- const { customKey } = props;
61
- let object = {
62
- id: "lock",
63
- type: "lock"
64
- };
65
- let customKeys = Array.isArray(customKey) ? customKey : [customKey];
66
- if (customKeys.length === 1) {
67
- object = {
68
- id: customKeys[0],
69
- type: "custom"
70
- };
71
- }
72
- return [...getBasicKeys(), object, { id: 0, type: "number" }, { id: "delete", type: "delete" }];
73
- }
74
- function getBasicKeys() {
75
- const keys = [];
76
- for (let i = 1; i <= 9; i++) {
77
- keys.push({ id: i, type: "number" });
78
- }
79
- if (props.randomKeys) {
80
- return keys.sort(() => Math.random() > 0.5 ? 1 : -1);
81
- }
82
- return keys;
83
- }
84
- function genCustomKeys() {
85
- const keys = getBasicKeys();
86
- const { customKey } = props;
87
- let customKeys = Array.isArray(customKey) ? customKey : [customKey];
88
- if (customKeys.length > 2) {
89
- customKeys = [customKeys[0], customKeys[1]];
90
- }
91
- if (customKeys.length === 1) {
92
- if (props.title) {
93
- keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: "delete", type: "delete" });
94
- } else {
95
- keys.push({ id: 0, type: "number" }, { id: customKeys[0], type: "custom" });
96
- }
97
- } else if (customKeys.length === 2) {
98
- keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: customKeys[1], type: "custom" });
99
- if (props.title) {
100
- keys.push({ id: "delete", type: "delete" });
101
- }
102
- } else {
103
- keys.push({ id: 0, type: "number" });
104
- }
105
- return keys;
106
- }
107
- const keysList = computed(() => {
108
- if (props.type == "rightColumn" || props.title != "") {
109
- return genCustomKeys();
110
- }
111
- return defaultKey();
112
- });
113
- watch(() => props.visible, (value) => {
114
- show.value = value;
115
- });
116
- function onTouchstart(item, event) {
117
- event.stopPropagation();
118
- clickKeyIndex.value = item.id;
119
- if (item.type == "number" || item.type == "custom") {
120
- emit("input", item.id);
121
- if (props.value.length < props.maxlength) {
122
- emit("update:value", props.value + item.id);
123
- }
124
- }
125
- if (item.type == "lock") {
126
- closeBoard();
127
- }
128
- if (item.type == "delete") {
129
- emit("delete");
130
- emit("update:value", props.value.slice(0, props.value.length - 1));
131
- }
132
- }
133
- function onTouchMove(id, event) {
134
- event.stopPropagation();
135
- }
136
- function onTouchEnd(event) {
137
- event.preventDefault();
138
- clickKeyIndex.value = void 0;
139
- }
140
- function closeBoard() {
141
- emit("close");
142
- }
143
- onMounted(() => {
144
- });
145
- return {
146
- clickKeyIndex,
147
- defaultKey,
148
- closeBoard,
149
- onTouchEnd,
150
- onTouchMove,
151
- onTouchstart,
152
- keysList,
153
- genCustomKeys,
154
- getBasicKeys,
155
- root,
156
- show,
157
- translate
158
- };
10
+ const { create: b, translate: g } = v("numberkeyboard"), k = b({ props: { confirmText: { type: String, default: "" }, title: { type: String, default: "" }, visible: { type: Boolean, default: false }, type: { type: String, default: "default" }, customKey: { type: Array, default: () => [] }, value: { type: String, default: "" }, maxlength: { type: [Number, String], default: 6 }, randomKeys: { type: Boolean, default: false }, overlay: { type: Boolean, default: true }, isWrapTeleport: { type: Boolean, default: true }, teleport: { type: [String, Element], default: "body" }, popClass: { type: String, default: "" } }, emits: ["input", "delete", "close", "update:value"], setup(a2, { emit: r2 }) {
11
+ const n2 = e(void 0), s2 = e(a2.visible), i2 = e();
12
+ function u2() {
13
+ const { customKey: e2 } = a2;
14
+ let t2 = { id: "lock", type: "lock" }, o2 = Array.isArray(e2) ? e2 : [e2];
15
+ return o2.length === 1 && (t2 = { id: o2[0], type: "custom" }), [...d2(), t2, { id: 0, type: "number" }, { id: "delete", type: "delete" }];
159
16
  }
160
- });
161
- const _hoisted_1 = {
162
- class: "nut-numberkeyboard",
163
- ref: "root"
164
- };
165
- const _hoisted_2 = {
166
- key: 0,
167
- class: "number-board-header"
168
- };
169
- const _hoisted_3 = { class: "tit" };
170
- const _hoisted_4 = { class: "number-board-body" };
171
- const _hoisted_5 = { class: "number-board" };
172
- const _hoisted_6 = ["onTouchstart", "onTouchmove"];
173
- const _hoisted_7 = {
174
- key: 1,
175
- src: "https://img11.360buyimg.com/imagetools/jfs/t1/146371/38/8485/738/5f606425Eca239740/14f4b4f5f20d8a68.png"
176
- };
177
- const _hoisted_8 = {
178
- key: 2,
179
- src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png"
180
- };
181
- const _hoisted_9 = {
182
- key: 0,
183
- class: "number-board-sidebar"
184
- };
185
- const _hoisted_10 = { class: "key-board-wrapper" };
186
- const _hoisted_11 = /* @__PURE__ */ createElementVNode("img", { src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png" }, null, -1);
187
- const _hoisted_12 = [
188
- _hoisted_11
189
- ];
190
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
191
- const _component_nut_popup = resolveComponent("nut-popup");
192
- return openBlock(), createBlock(_component_nut_popup, {
193
- visible: _ctx.show,
194
- "onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
195
- position: "bottom",
196
- overlay: _ctx.overlay,
197
- onClickOverlay: _cache[7] || (_cache[7] = ($event) => _ctx.closeBoard()),
198
- isWrapTeleport: _ctx.isWrapTeleport,
199
- "overlay-class": "nut-numberkeyboard-overlay"
200
- }, {
201
- default: withCtx(() => [
202
- createElementVNode("div", _hoisted_1, [
203
- _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, [
204
- createElementVNode("h3", _hoisted_3, toDisplayString(_ctx.title), 1),
205
- createElementVNode("span", {
206
- class: "keyboard-close",
207
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.closeBoard())
208
- }, toDisplayString(_ctx.translate("done")), 1)
209
- ])) : createCommentVNode("", true),
210
- createElementVNode("div", _hoisted_4, [
211
- createElementVNode("div", _hoisted_5, [
212
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.keysList, (item) => {
213
- return openBlock(), createElementBlock("div", {
214
- class: normalizeClass([
215
- "key-board-wrapper",
216
- {
217
- "key-board-wrapper-large": item.id == 0 && _ctx.type == "rightColumn" && Array.isArray(_ctx.customKey) && _ctx.customKey.length == 1
218
- }
219
- ]),
220
- key: "key" + item.id
221
- }, [
222
- createElementVNode("div", {
223
- class: normalizeClass([
224
- "key",
225
- { active: item.id == _ctx.clickKeyIndex },
226
- { lock: item.type == "lock" },
227
- { delete: item.type == "delete" }
228
- ]),
229
- onTouchstart: (event) => _ctx.onTouchstart(item, event),
230
- onTouchmove: (event) => _ctx.onTouchMove(item, event),
231
- onTouchend: _cache[1] || (_cache[1] = (event) => _ctx.onTouchEnd(event))
232
- }, [
233
- item.type == "number" || item.type == "custom" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
234
- createTextVNode(toDisplayString(item.id), 1)
235
- ], 64)) : createCommentVNode("", true),
236
- item.type == "lock" ? (openBlock(), createElementBlock("img", _hoisted_7)) : createCommentVNode("", true),
237
- item.type == "delete" ? (openBlock(), createElementBlock("img", _hoisted_8)) : createCommentVNode("", true)
238
- ], 42, _hoisted_6)
239
- ], 2);
240
- }), 128))
241
- ]),
242
- _ctx.type == "rightColumn" ? (openBlock(), createElementBlock("div", _hoisted_9, [
243
- createElementVNode("div", _hoisted_10, [
244
- createElementVNode("div", {
245
- class: normalizeClass(["key", { active: _ctx.clickKeyIndex == "delete" }]),
246
- onTouchstart: _cache[2] || (_cache[2] = (event) => _ctx.onTouchstart({ id: "delete", type: "delete" }, event)),
247
- onTouchmove: _cache[3] || (_cache[3] = (event) => _ctx.onTouchMove({ id: "delete", type: "delete" }, event)),
248
- onTouchend: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
249
- }, _hoisted_12, 34)
250
- ]),
251
- _ctx.title == "" ? (openBlock(), createElementBlock("div", {
252
- key: 0,
253
- class: "key-board-wrapper key-board-finish",
254
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.closeBoard())
255
- }, [
256
- createElementVNode("div", {
257
- class: normalizeClass(["key", "finish", { activeFinsh: _ctx.clickKeyIndex == "finish" }])
258
- }, toDisplayString(_ctx.confirmText || _ctx.translate("done")), 3)
259
- ])) : createCommentVNode("", true)
260
- ])) : createCommentVNode("", true)
261
- ])
262
- ], 512)
263
- ]),
264
- _: 1
265
- }, 8, ["visible", "overlay", "isWrapTeleport"]);
266
- }
267
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
268
- export { index as default };
17
+ function d2() {
18
+ const e2 = [];
19
+ for (let t2 = 1; t2 <= 9; t2++)
20
+ e2.push({ id: t2, type: "number" });
21
+ return a2.randomKeys ? e2.sort(() => Math.random() > 0.5 ? 1 : -1) : e2;
22
+ }
23
+ function p2() {
24
+ const e2 = d2(), { customKey: t2 } = a2;
25
+ let o2 = Array.isArray(t2) ? t2 : [t2];
26
+ return o2.length > 2 && (o2 = [o2[0], o2[1]]), o2.length === 1 ? a2.title ? e2.push({ id: o2[0], type: "custom" }, { id: 0, type: "number" }, { id: "delete", type: "delete" }) : e2.push({ id: 0, type: "number" }, { id: o2[0], type: "custom" }) : o2.length === 2 ? (e2.push({ id: o2[0], type: "custom" }, { id: 0, type: "number" }, { id: o2[1], type: "custom" }), a2.title && e2.push({ id: "delete", type: "delete" })) : e2.push({ id: 0, type: "number" }), e2;
27
+ }
28
+ const c2 = t(() => a2.type == "rightColumn" || a2.title != "" ? p2() : u2());
29
+ function y2() {
30
+ r2("close");
31
+ }
32
+ return o(() => a2.visible, (e2) => {
33
+ s2.value = e2;
34
+ }), l(() => {
35
+ }), { clickKeyIndex: n2, defaultKey: u2, closeBoard: y2, onTouchEnd: function(e2) {
36
+ e2.preventDefault(), n2.value = void 0;
37
+ }, onTouchMove: function(e2, t2) {
38
+ t2.stopPropagation();
39
+ }, onTouchstart: function(e2, t2) {
40
+ t2.stopPropagation(), n2.value = e2.id, e2.type != "number" && e2.type != "custom" || (r2("input", e2.id), a2.value.length < a2.maxlength && r2("update:value", a2.value + e2.id)), e2.type == "lock" && y2(), e2.type == "delete" && (r2("delete"), r2("update:value", a2.value.slice(0, a2.value.length - 1)));
41
+ }, keysList: c2, genCustomKeys: p2, getBasicKeys: d2, root: i2, show: s2, translate: g };
42
+ } }), T = { class: "nut-numberkeyboard", ref: "root" }, K = { key: 0, class: "number-board-header" }, C = { class: "tit" }, x = { class: "number-board-body" }, B = { class: "number-board" }, E = ["onTouchstart", "onTouchmove"], w = { key: 1, src: "https://img11.360buyimg.com/imagetools/jfs/t1/146371/38/8485/738/5f606425Eca239740/14f4b4f5f20d8a68.png" }, A = { key: 2, src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png" }, S = { key: 0, class: "number-board-sidebar" }, j = { class: "key-board-wrapper" }, I = [i("img", { src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png" }, null, -1)];
43
+ var M = f(k, [["render", function(e2, t2, o2, l2, v2, f2) {
44
+ const b2 = a("nut-popup");
45
+ return r(), n(b2, { visible: e2.show, "onUpdate:visible": t2[6] || (t2[6] = (t3) => e2.show = t3), position: "bottom", teleport: e2.teleport, popClass: e2.popClass, overlay: e2.overlay, onClickOverlay: t2[7] || (t2[7] = (t3) => e2.closeBoard()), isWrapTeleport: e2.isWrapTeleport, "overlay-class": "nut-numberkeyboard-overlay" }, { default: s(() => [i("div", T, [e2.title ? (r(), u("div", K, [i("h3", C, d(e2.title), 1), i("span", { class: "keyboard-close", onClick: t2[0] || (t2[0] = (t3) => e2.closeBoard()) }, d(e2.translate("done")), 1)])) : p("", true), i("div", x, [i("div", B, [(r(true), u(c, null, y(e2.keysList, (o3) => (r(), u("div", { class: m(["key-board-wrapper", { "key-board-wrapper-large": o3.id == 0 && e2.type == "rightColumn" && Array.isArray(e2.customKey) && e2.customKey.length == 1 }]), key: "key" + o3.id }, [i("div", { class: m(["key", { active: o3.id == e2.clickKeyIndex }, { lock: o3.type == "lock" }, { delete: o3.type == "delete" }]), onTouchstart: (t3) => e2.onTouchstart(o3, t3), onTouchmove: (t3) => e2.onTouchMove(o3, t3), onTouchend: t2[1] || (t2[1] = (t3) => e2.onTouchEnd(t3)) }, [o3.type == "number" || o3.type == "custom" ? (r(), u(c, { key: 0 }, [h(d(o3.id), 1)], 64)) : p("", true), o3.type == "lock" ? (r(), u("img", w)) : p("", true), o3.type == "delete" ? (r(), u("img", A)) : p("", true)], 42, E)], 2))), 128))]), e2.type == "rightColumn" ? (r(), u("div", S, [i("div", j, [i("div", { class: m(["key", { active: e2.clickKeyIndex == "delete" }]), onTouchstart: t2[2] || (t2[2] = (t3) => e2.onTouchstart({ id: "delete", type: "delete" }, t3)), onTouchmove: t2[3] || (t2[3] = (t3) => e2.onTouchMove({ id: "delete", type: "delete" }, t3)), onTouchend: t2[4] || (t2[4] = (...t3) => e2.onTouchEnd && e2.onTouchEnd(...t3)) }, I, 34)]), e2.title == "" ? (r(), u("div", { key: 0, class: "key-board-wrapper key-board-finish", onClick: t2[5] || (t2[5] = (t3) => e2.closeBoard()) }, [i("div", { class: m(["key", "finish", { activeFinsh: e2.clickKeyIndex == "finish" }]) }, d(e2.confirmText || e2.translate("done")), 3)])) : p("", true)])) : p("", true)])], 512)]), _: 1 }, 8, ["visible", "teleport", "popClass", "overlay", "isWrapTeleport"]);
46
+ }]]);
47
+ export { M as default };