@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,197 +5,38 @@ 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 { c as createComponent } from "./component.js";
26
- import { h, reactive, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode } from "vue";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
+ import { c as t } from "./component.js";
26
+ import { h as e, reactive as a, computed as s, watch as l, toRefs as r, resolveComponent as n, openBlock as o, createElementBlock as _, normalizeClass as u, createElementVNode as c, Fragment as i, renderList as d, createTextVNode as m, toDisplayString as p, renderSlot as y, createBlock as b, createCommentVNode as f } from "vue";
27
+ import { _ as v } from "./plugin-vue_export-helper.js";
28
28
  import "../locale/lang";
29
- var RenderColumn = {
30
- setup(props) {
31
- return () => h(`view`, {}, props.slots[0] ? props.slots[0](props.record) : props.slots[1](props.record));
32
- },
33
- props: {
34
- slots: Array,
35
- record: Object
36
- }
37
- };
38
- const component = (componentName2, translate2) => {
39
- return {
40
- components: {
41
- RenderColumn
42
- },
43
- props: {
44
- bordered: {
45
- type: Boolean,
46
- default: true
47
- },
48
- columns: {
49
- type: Array,
50
- default: () => {
51
- return [];
52
- }
53
- },
54
- data: {
55
- type: Object,
56
- default: () => {
57
- return {};
58
- }
59
- },
60
- summary: {
61
- type: Function,
62
- default: null
63
- },
64
- striped: {
65
- type: Boolean,
66
- default: false
67
- }
68
- },
69
- emits: ["sorter"],
70
- setup(props, { emit, slots }) {
71
- const state = reactive({
72
- curData: props.data
73
- });
74
- const classes = computed(() => {
75
- const prefixCls = componentName2;
76
- return {
77
- [prefixCls]: true
78
- };
79
- });
80
- const cellClasses = (item) => {
81
- return {
82
- "nut-table__main__head__tr--border": props.bordered,
83
- [`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
84
- };
85
- };
86
- const getColumnItem = (value) => {
87
- return props.columns.filter((item) => item.key === value)[0];
88
- };
89
- const handleSorterClick = (item) => {
90
- if (item.sorter) {
91
- emit("sorter", item);
92
- state.curData = typeof item.sorter === "function" ? state.curData.sort(item.sorter) : item.sorter === "default" ? state.curData.sort() : state.curData;
93
- }
94
- };
95
- const sortDataItem = () => {
96
- return props.columns.map((columns) => {
97
- return [columns.key, columns.render];
98
- });
99
- };
100
- watch(() => props.data, (val) => {
101
- state.curData = val.slice();
102
- });
103
- return __spreadProps(__spreadValues({}, toRefs(state)), {
104
- classes,
105
- cellClasses,
106
- getColumnItem,
107
- handleSorterClick,
108
- sortDataItem,
109
- translate: translate2
110
- });
111
- }
112
- };
113
- };
114
- const { componentName, create, translate } = createComponent("table");
115
- const _sfc_main = create(component(componentName, translate));
116
- const _hoisted_1 = { class: "nut-table__main__head" };
117
- const _hoisted_2 = { class: "nut-table__main__head__tr" };
118
- const _hoisted_3 = ["onClick"];
119
- const _hoisted_4 = { class: "nut-table__main__body" };
120
- const _hoisted_5 = { key: 1 };
121
- const _hoisted_6 = {
122
- key: 0,
123
- class: "nut-table__summary"
124
- };
125
- const _hoisted_7 = ["innerHTML"];
126
- const _hoisted_8 = {
127
- key: 1,
128
- class: "nut-table__nodata"
129
- };
130
- const _hoisted_9 = {
131
- key: 0,
132
- class: "nut-table__nodata__text"
133
- };
134
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
- const _component_nut_icon = resolveComponent("nut-icon");
136
- const _component_RenderColumn = resolveComponent("RenderColumn");
137
- return openBlock(), createElementBlock("view", {
138
- class: normalizeClass(_ctx.classes)
139
- }, [
140
- createElementVNode("view", {
141
- class: normalizeClass(["nut-table__main", { "nut-table__main--striped": _ctx.striped }])
142
- }, [
143
- createElementVNode("view", _hoisted_1, [
144
- createElementVNode("view", _hoisted_2, [
145
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
146
- return openBlock(), createElementBlock("span", {
147
- class: normalizeClass(["nut-table__main__head__tr__th", _ctx.cellClasses(item)]),
148
- key: item.key,
149
- onClick: ($event) => _ctx.handleSorterClick(item)
150
- }, [
151
- createTextVNode(toDisplayString(item.title) + " ", 1),
152
- renderSlot(_ctx.$slots, "icon"),
153
- !_ctx.$slots.icon && item.sorter ? (openBlock(), createBlock(_component_nut_icon, {
154
- key: 0,
155
- name: "down-arrow",
156
- size: "12px"
157
- })) : createCommentVNode("", true)
158
- ], 10, _hoisted_3);
159
- }), 128))
160
- ])
161
- ]),
162
- createElementVNode("view", _hoisted_4, [
163
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.curData, (item) => {
164
- return openBlock(), createElementBlock("view", {
165
- class: "nut-table__main__body__tr",
166
- key: item
167
- }, [
168
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortDataItem(), ([value, render]) => {
169
- return openBlock(), createElementBlock("span", {
170
- class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
171
- key: value
172
- }, [
173
- typeof item[value] === "function" || typeof render === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
174
- key: 0,
175
- slots: [render, item[value]],
176
- record: item
177
- }, null, 8, ["slots", "record"])) : (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item[value]), 1))
178
- ], 2);
179
- }), 128))
180
- ]);
181
- }), 128))
182
- ])
183
- ], 2),
184
- _ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
185
- createElementVNode("span", {
186
- class: "nut-table__summary__text",
187
- innerHTML: _ctx.summary().value
188
- }, null, 8, _hoisted_7)
189
- ])) : createCommentVNode("", true),
190
- !_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
191
- createElementVNode("div", {
192
- class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
193
- }, [
194
- renderSlot(_ctx.$slots, "nodata"),
195
- !_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
196
- ], 2)
197
- ])) : createCommentVNode("", true)
198
- ], 2);
199
- }
200
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
201
- export { index as default };
29
+ var k = { setup: (t2) => () => e("view", {}, t2.slots[0] ? t2.slots[0](t2.record) : t2.slots[1](t2.record)), props: { slots: Array, record: Object } };
30
+ const { componentName: w, create: C, translate: D } = t("table"), h = C(((t2, e2) => ({ components: { RenderColumn: k }, props: { bordered: { type: Boolean, default: true }, columns: { type: Array, default: () => [] }, data: { type: Object, default: () => ({}) }, summary: { type: Function, default: null }, striped: { type: Boolean, default: false } }, emits: ["sorter"], setup(n2, { emit: o2, slots: _2 }) {
31
+ const u2 = a({ curData: n2.data }), c2 = s(() => ({ [t2]: true }));
32
+ return l(() => n2.data, (t3) => {
33
+ u2.curData = t3.slice();
34
+ }), __spreadProps(__spreadValues({}, r(u2)), { classes: c2, cellClasses: (t3) => ({ "nut-table__main__head__tr--border": n2.bordered, [`nut-table__main__head__tr--align${t3.align ? t3.align : ""}`]: true }), getColumnItem: (t3) => n2.columns.filter((e3) => e3.key === t3)[0], handleSorterClick: (t3) => {
35
+ t3.sorter && (o2("sorter", t3), u2.curData = typeof t3.sorter == "function" ? u2.curData.sort(t3.sorter) : t3.sorter === "default" ? u2.curData.sort() : u2.curData);
36
+ }, sortDataItem: () => n2.columns.map((t3) => [t3.key, t3.render]), translate: e2 });
37
+ } }))(w, D)), g = { class: "nut-table__main__head" }, x = { class: "nut-table__main__head__tr" }, $ = ["onClick"], j = { class: "nut-table__main__body" }, I = { key: 1 }, A = { key: 0, class: "nut-table__summary" }, B = ["innerHTML"], H = { key: 1, class: "nut-table__nodata" }, L = { key: 0, class: "nut-table__nodata__text" };
38
+ var M = v(h, [["render", function(t2, e2, a2, s2, l2, r2) {
39
+ const v2 = n("nut-icon"), k2 = n("RenderColumn");
40
+ return o(), _("view", { class: u(t2.classes) }, [c("view", { class: u(["nut-table__main", { "nut-table__main--striped": t2.striped }]) }, [c("view", g, [c("view", x, [(o(true), _(i, null, d(t2.columns, (e3) => (o(), _("span", { class: u(["nut-table__main__head__tr__th", t2.cellClasses(e3)]), key: e3.key, onClick: (a3) => t2.handleSorterClick(e3) }, [m(p(e3.title) + " ", 1), y(t2.$slots, "icon"), !t2.$slots.icon && e3.sorter ? (o(), b(v2, { key: 0, name: "down-arrow", size: "12px" })) : f("", true)], 10, $))), 128))])]), c("view", j, [(o(true), _(i, null, d(t2.curData, (e3) => (o(), _("view", { class: "nut-table__main__body__tr", key: e3 }, [(o(true), _(i, null, d(t2.sortDataItem(), ([a3, s3]) => (o(), _("span", { class: u(["nut-table__main__body__tr__td", t2.cellClasses(t2.getColumnItem(a3))]), key: a3 }, [typeof e3[a3] == "function" || typeof s3 == "function" ? (o(), b(k2, { key: 0, slots: [s3, e3[a3]], record: e3 }, null, 8, ["slots", "record"])) : (o(), _("view", I, p(e3[a3]), 1))], 2))), 128))]))), 128))])], 2), t2.summary ? (o(), _("view", A, [c("span", { class: "nut-table__summary__text", innerHTML: t2.summary().value }, null, 8, B)])) : f("", true), t2.curData.length ? f("", true) : (o(), _("view", H, [c("div", { class: u(["nut-table__nodata", { "nut-table__nodata--border": t2.bordered }]) }, [y(t2.$slots, "nodata"), t2.$slots.nodata ? f("", true) : (o(), _("div", L, p(t2.translate("noData")), 1))], 2)]))], 2);
41
+ }]]);
42
+ export { M as default };
@@ -3,219 +3,66 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
6
+ var __spreadValues = (a2, b2) => {
7
+ for (var prop in b2 || (b2 = {}))
8
+ if (__hasOwnProp.call(b2, prop))
9
+ __defNormalProp(a2, prop, b2[prop]);
10
10
  if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
11
+ for (var prop of __getOwnPropSymbols(b2)) {
12
+ if (__propIsEnum.call(b2, prop))
13
+ __defNormalProp(a2, prop, b2[prop]);
14
14
  }
15
- return a;
15
+ return a2;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
19
19
  * (c) 2022 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
22
- import { c as createComponent } from "./component.js";
23
- import { p as pxCheck } from "./pxCheck.js";
24
- import { provide, computed, ref, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
25
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
22
+ import { c as e } from "./component.js";
23
+ import { p as t } from "./pxCheck.js";
24
+ import { provide as l, computed as a, ref as i, watch as s, onMounted as n, onActivated as o, resolveComponent as r, openBlock as u, createElementBlock as p, normalizeClass as c, createElementVNode as d, normalizeStyle as y, renderSlot as m, Fragment as b, renderList as g, createCommentVNode as v, createVNode as f, toDisplayString as h } from "vue";
25
+ import { _ } from "./plugin-vue_export-helper.js";
26
26
  import "../locale/lang";
27
- class Title {
27
+ class S {
28
28
  constructor() {
29
- this.title = "";
30
- this.paneKey = "";
31
- this.disabled = false;
29
+ this.title = "", this.paneKey = "", this.disabled = false;
32
30
  }
33
31
  }
34
- const component = {
35
- props: {
36
- modelValue: {
37
- type: [String, Number],
38
- default: 0
39
- },
40
- color: {
41
- type: String,
42
- default: ""
43
- },
44
- direction: {
45
- type: String,
46
- default: "horizontal"
47
- },
48
- size: {
49
- type: String,
50
- default: "normal"
51
- },
52
- type: {
53
- type: String,
54
- default: "line"
55
- },
56
- titleScroll: {
57
- type: Boolean,
58
- default: false
59
- },
60
- ellipsis: {
61
- type: Boolean,
62
- default: true
63
- },
64
- background: {
65
- type: String,
66
- default: ""
67
- },
68
- animatedTime: {
69
- type: [Number, String],
70
- default: 300
71
- },
72
- titleGutter: {
73
- type: [Number, String],
74
- default: 0
75
- }
76
- },
77
- components: {},
78
- emits: ["update:modelValue", "click", "change"],
79
- setup(props, { emit, slots }) {
80
- provide("activeKey", { activeKey: computed(() => props.modelValue) });
81
- const titles = ref([]);
82
- const renderTitles = (vnodes) => {
83
- vnodes.forEach((vnode, index2) => {
84
- var _a, _b, _c, _d, _e;
85
- let type = vnode.type;
86
- type = type.name || type;
87
- if (type == "nut-tabpane") {
88
- let title = new Title();
89
- if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"])) {
90
- title.title = (_c = vnode.props) == null ? void 0 : _c.title;
91
- title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index2;
92
- title.disabled = (_e = vnode.props) == null ? void 0 : _e.disabled;
93
- }
94
- titles.value.push(title);
95
- } else {
96
- renderTitles(vnode.children);
97
- }
98
- });
99
- };
100
- const currentIndex = ref(props.modelValue || 0);
101
- const findTabsIndex = (value) => {
102
- let index2 = titles.value.findIndex((item) => item.paneKey == value);
103
- if (titles.value.length == 0) {
104
- console.error("[NutUI] <Tabs> \u5F53\u524D\u672A\u627E\u5230 TabPane \u7EC4\u4EF6\u5143\u7D20 , \u8BF7\u68C0\u67E5 .");
105
- } else if (index2 == -1) {
106
- console.error("[NutUI] <Tabs> \u8BF7\u68C0\u67E5 v-model \u503C\u662F\u5426\u4E3A paneKey ,\u5982 paneKey \u672A\u8BBE\u7F6E\uFF0C\u8BF7\u91C7\u7528\u4E0B\u6807\u63A7\u5236 .");
107
- } else {
108
- currentIndex.value = index2;
109
- }
110
- };
111
- const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
112
- titles.value = [];
113
- if (vnodes && vnodes.length) {
114
- renderTitles(vnodes);
115
- }
116
- findTabsIndex(props.modelValue);
117
- };
118
- watch(() => {
119
- var _a;
120
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
121
- }, (vnodes) => {
122
- init(vnodes);
123
- });
124
- watch(() => props.modelValue, (value) => {
125
- findTabsIndex(value);
126
- });
127
- onMounted(init);
128
- onActivated(init);
129
- const contentStyle = computed(() => {
130
- return {
131
- transform: props.direction == "horizontal" ? `translate3d(-${currentIndex.value * 100}%, 0, 0)` : `translate3d( 0,-${currentIndex.value * 100}%, 0)`,
132
- transitionDuration: `${props.animatedTime}ms`
133
- };
134
- });
135
- const tabsNavStyle = computed(() => {
136
- return {
137
- background: props.background
138
- };
139
- });
140
- const tabsActiveStyle = computed(() => {
141
- return {
142
- color: props.type == "smile" ? props.color : "",
143
- background: props.type == "line" ? props.color : ""
144
- };
32
+ const k = { props: { modelValue: { type: [String, Number], default: 0 }, color: { type: String, default: "" }, direction: { type: String, default: "horizontal" }, size: { type: String, default: "normal" }, type: { type: String, default: "line" }, titleScroll: { type: Boolean, default: false }, ellipsis: { type: Boolean, default: true }, autoHeight: { type: Boolean, default: false }, background: { type: String, default: "" }, animatedTime: { type: [Number, String], default: 300 }, titleGutter: { type: [Number, String], default: 0 } }, components: {}, emits: ["update:modelValue", "click", "change"], setup(e2, { emit: r2, slots: u2 }) {
33
+ l("activeKey", { activeKey: a(() => e2.modelValue) }), l("autoHeight", { autoHeight: a(() => e2.autoHeight) });
34
+ const p2 = i([]), c2 = (e3) => {
35
+ e3.forEach((e4, t2) => {
36
+ var _a, _b, _c, _d, _e, _f, _g;
37
+ let l2 = e4.type;
38
+ if (l2 = l2.name || l2, l2 == "nut-tabpane") {
39
+ let l3 = new S();
40
+ (((_a = e4.props) == null ? void 0 : _a.title) || ((_b = e4.props) == null ? void 0 : _b["pane-key"]) || ((_c = e4.props) == null ? void 0 : _c.paneKey)) && (l3.title = (_d = e4.props) == null ? void 0 : _d.title, l3.paneKey = ((_e = e4.props) == null ? void 0 : _e["pane-key"]) || ((_f = e4.props) == null ? void 0 : _f.paneKey) || t2, l3.disabled = (_g = e4.props) == null ? void 0 : _g.disabled), p2.value.push(l3);
41
+ } else
42
+ c2(e4.children);
145
43
  });
146
- const titleStyle = computed(() => {
147
- return {
148
- marginLeft: pxCheck(props.titleGutter),
149
- marginRight: pxCheck(props.titleGutter)
150
- };
151
- });
152
- const methods = {
153
- tabChange: (item, index2) => {
154
- emit("click", item);
155
- if (item.disabled) {
156
- return;
157
- }
158
- currentIndex.value = index2;
159
- emit("update:modelValue", item.paneKey);
160
- emit("change", item);
161
- }
162
- };
163
- return __spreadValues({
164
- titles,
165
- contentStyle,
166
- tabsNavStyle,
167
- titleStyle,
168
- tabsActiveStyle
169
- }, methods);
170
- }
171
- };
172
- const _hoisted_1 = ["onClick"];
173
- function render(_ctx, _cache, $props, $setup, $data, $options) {
174
- const _component_nut_icon = resolveComponent("nut-icon");
175
- return openBlock(), createElementBlock("view", {
176
- class: normalizeClass(["nut-tabs", [_ctx.direction]])
177
- }, [
178
- createElementVNode("view", {
179
- class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
180
- style: normalizeStyle(_ctx.tabsNavStyle)
181
- }, [
182
- _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
183
- return openBlock(), createElementBlock("view", {
184
- class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
185
- style: normalizeStyle(_ctx.titleStyle),
186
- onClick: ($event) => _ctx.tabChange(item, index2),
187
- key: item.paneKey
188
- }, [
189
- _ctx.type == "line" ? (openBlock(), createElementBlock("view", {
190
- key: 0,
191
- class: "nut-tabs__titles-item__line",
192
- style: normalizeStyle(_ctx.tabsActiveStyle)
193
- }, null, 4)) : createCommentVNode("", true),
194
- _ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
195
- key: 1,
196
- class: "nut-tabs__titles-item__smile",
197
- style: normalizeStyle(_ctx.tabsActiveStyle)
198
- }, [
199
- createVNode(_component_nut_icon, {
200
- color: _ctx.color,
201
- name: "joy-smile"
202
- }, null, 8, ["color"])
203
- ], 4)) : createCommentVNode("", true),
204
- createElementVNode("view", {
205
- class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis && !_ctx.titleScroll && _ctx.direction == "horizontal" }])
206
- }, toDisplayString(item.title), 3)
207
- ], 14, _hoisted_1);
208
- }), 128))
209
- ], 6),
210
- createElementVNode("view", {
211
- class: "nut-tabs__content",
212
- style: normalizeStyle(_ctx.contentStyle)
213
- }, [
214
- renderSlot(_ctx.$slots, "default")
215
- ], 4)
216
- ], 2);
217
- }
218
- const { create } = createComponent("tabs");
219
- const _sfc_main = create(component);
220
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
221
- export { index as default };
44
+ }, d2 = i(e2.modelValue || 0), y2 = (e3) => {
45
+ let t2 = p2.value.findIndex((t3) => t3.paneKey == e3);
46
+ p2.value.length == 0 || t2 == -1 || (d2.value = t2);
47
+ }, m2 = (t2 = ((_a) => (_a = u2.default) == null ? void 0 : _a.call(u2))()) => {
48
+ p2.value = [], t2 && t2.length && c2(t2), y2(e2.modelValue);
49
+ };
50
+ s(() => {
51
+ var _a;
52
+ return (_a = u2.default) == null ? void 0 : _a.call(u2);
53
+ }, (e3) => {
54
+ m2(e3);
55
+ }), s(() => e2.modelValue, (e3) => {
56
+ y2(e3);
57
+ }), n(m2), o(m2);
58
+ const b2 = a(() => ({ transform: e2.direction == "horizontal" ? `translate3d(-${100 * d2.value}%, 0, 0)` : `translate3d( 0,-${100 * d2.value}%, 0)`, transitionDuration: `${e2.animatedTime}ms` })), g2 = a(() => ({ background: e2.background })), v2 = a(() => ({ color: e2.type == "smile" ? e2.color : "", background: e2.type == "line" ? e2.color : "" })), f2 = a(() => ({ marginLeft: t(e2.titleGutter), marginRight: t(e2.titleGutter) })), h2 = { tabChange: (e3, t2) => {
59
+ r2("click", e3), e3.disabled || (d2.value = t2, r2("update:modelValue", e3.paneKey), r2("change", e3));
60
+ } };
61
+ return __spreadValues({ titles: p2, contentStyle: b2, tabsNavStyle: g2, titleStyle: f2, tabsActiveStyle: v2 }, h2);
62
+ } }, K = ["onClick"];
63
+ const { create: w } = e("tabs");
64
+ var V = _(w(k), [["render", function(e2, t2, l2, a2, i2, s2) {
65
+ const n2 = r("nut-icon");
66
+ return u(), p("view", { class: c(["nut-tabs", [e2.direction]]) }, [d("view", { class: c(["nut-tabs__titles", { [e2.type]: e2.type, scrollable: e2.titleScroll, [e2.size]: e2.size }]), style: y(e2.tabsNavStyle) }, [e2.$slots.titles ? m(e2.$slots, "titles", { key: 0 }) : (u(true), p(b, { key: 1 }, g(e2.titles, (t3, l3) => (u(), p("view", { class: c(["nut-tabs__titles-item", { active: t3.paneKey == e2.modelValue, disabled: t3.disabled }]), style: y(e2.titleStyle), onClick: (a3) => e2.tabChange(t3, l3), key: t3.paneKey }, [e2.type == "line" ? (u(), p("view", { key: 0, class: "nut-tabs__titles-item__line", style: y(e2.tabsActiveStyle) }, null, 4)) : v("", true), e2.type == "smile" ? (u(), p("view", { key: 1, class: "nut-tabs__titles-item__smile", style: y(e2.tabsActiveStyle) }, [f(n2, { color: e2.color, name: "joy-smile" }, null, 8, ["color"])], 4)) : v("", true), d("view", { class: c(["nut-tabs__titles-item__text", { ellipsis: e2.ellipsis }]) }, h(t3.title), 3)], 14, K))), 128))], 6), d("view", { class: "nut-tabs__content", style: y(e2.contentStyle) }, [m(e2.$slots, "default")], 4)], 2);
67
+ }]]);
68
+ export { V as default };
@@ -1,102 +1,25 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21-beta.3 Wed May 18 2022 18:19:57 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { toRefs as e, computed as o, resolveComponent as l, openBlock as t, createElementBlock as a, normalizeClass as n, normalizeStyle as r, renderSlot as c, createBlock as s, createCommentVNode as u } from "vue";
7
+ import { c as p } from "./component.js";
8
+ import { _ as i } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("tag");
11
- const _sfc_main = create({
12
- props: {
13
- color: { type: String, default: "" },
14
- textColor: { type: String, default: "" },
15
- type: {
16
- type: String,
17
- default: "default"
18
- },
19
- plain: {
20
- type: Boolean,
21
- default: false
22
- },
23
- round: {
24
- type: Boolean,
25
- default: false
26
- },
27
- mark: {
28
- type: Boolean,
29
- default: false
30
- },
31
- closeable: {
32
- type: Boolean,
33
- default: false
34
- }
35
- },
36
- emits: ["close", "click"],
37
- setup(props, { emit }) {
38
- const { type, color, plain, round, mark, textColor } = toRefs(props);
39
- const classes = computed(() => {
40
- const prefixCls = componentName;
41
- return {
42
- [prefixCls]: true,
43
- [`${prefixCls}--${type.value}`]: type.value,
44
- [`${prefixCls}--plain`]: plain.value,
45
- [`${prefixCls}--round`]: round.value,
46
- [`${prefixCls}--mark`]: mark.value
47
- };
48
- });
49
- const getStyle = () => {
50
- if (color == null ? void 0 : color.value) {
51
- return {
52
- background: color.value,
53
- color: textColor.value
54
- };
55
- }
56
- if (plain.value) {
57
- return {
58
- color: "#FA2400",
59
- background: "#fff",
60
- border: "1px solid rgba(250,36,0,1)"
61
- };
62
- }
63
- return {
64
- color: "",
65
- background: ""
66
- };
67
- };
68
- const onClose = (event) => {
69
- event.stopPropagation();
70
- emit("close", event);
71
- };
72
- const onClick = (event) => {
73
- event.stopPropagation();
74
- emit("click", event);
75
- };
76
- return {
77
- classes,
78
- getStyle,
79
- onClose,
80
- onClick
81
- };
82
- }
83
- });
84
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
- const _component_nut_icon = resolveComponent("nut-icon");
86
- return openBlock(), createElementBlock("view", {
87
- class: normalizeClass(_ctx.classes),
88
- style: normalizeStyle(_ctx.getStyle()),
89
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
90
- }, [
91
- renderSlot(_ctx.$slots, "default"),
92
- _ctx.closeable ? (openBlock(), createBlock(_component_nut_icon, {
93
- key: 0,
94
- class: "nut-tag--close",
95
- name: "close",
96
- size: "12",
97
- onClick: _ctx.onClose
98
- }, null, 8, ["onClick"])) : createCommentVNode("", true)
99
- ], 6);
100
- }
101
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
102
- export { index as default };
10
+ const { componentName: d, create: f } = p("tag");
11
+ var m = i(f({ props: { color: { type: String, default: "" }, textColor: { type: String, default: "" }, type: { type: String, default: "default" }, plain: { type: Boolean, default: false }, round: { type: Boolean, default: false }, mark: { type: Boolean, default: false }, closeable: { type: Boolean, default: false } }, emits: ["close", "click"], setup(l2, { emit: t2 }) {
12
+ const { type: a2, color: n2, plain: r2, round: c2, mark: s2, textColor: u2 } = e(l2);
13
+ return { classes: o(() => {
14
+ const e2 = d;
15
+ return { [e2]: true, [`${e2}--${a2.value}`]: a2.value, [`${e2}--plain`]: r2.value, [`${e2}--round`]: c2.value, [`${e2}--mark`]: s2.value };
16
+ }), getStyle: () => (n2 == null ? void 0 : n2.value) ? { background: n2.value, color: u2.value } : r2.value ? { color: "#FA2400", background: "#fff", border: "1px solid rgba(250,36,0,1)" } : { color: "", background: "" }, onClose: (e2) => {
17
+ e2.stopPropagation(), t2("close", e2);
18
+ }, onClick: (e2) => {
19
+ e2.stopPropagation(), t2("click", e2);
20
+ } };
21
+ } }), [["render", function(e2, o2, p2, i2, d2, f2) {
22
+ const m2 = l("nut-icon");
23
+ return t(), a("view", { class: n(e2.classes), style: r(e2.getStyle()), onClick: o2[0] || (o2[0] = (...o3) => e2.onClick && e2.onClick(...o3)) }, [c(e2.$slots, "default"), e2.closeable ? (t(), s(m2, { key: 0, class: "nut-tag--close", name: "close", size: "12", onClick: e2.onClose }, null, 8, ["onClick"])) : u("", true)], 6);
24
+ }]]);
25
+ export { m as default };