@nutui/nutui 4.0.0 → 4.0.1-2.beta-1

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 (285) hide show
  1. package/CHANGELOG.md +226 -0
  2. package/README.md +34 -65
  3. package/dist/nutui.es.js +10 -17
  4. package/dist/nutui.js +16202 -0
  5. package/dist/nutui.umd.js +1 -7
  6. package/dist/packages/_es/ActionSheet.js +79 -94
  7. package/dist/packages/_es/Address.js +260 -345
  8. package/dist/packages/_es/AddressList.js +269 -354
  9. package/dist/packages/_es/Animate.js +46 -38
  10. package/dist/packages/_es/Audio.js +128 -180
  11. package/dist/packages/_es/AudioOperate.js +60 -52
  12. package/dist/packages/_es/Avatar.js +67 -75
  13. package/dist/packages/_es/AvatarGroup.js +23 -31
  14. package/dist/packages/_es/Backtop.js +59 -99
  15. package/dist/packages/_es/Badge.js +39 -46
  16. package/dist/packages/_es/Barrage.js +68 -145
  17. package/dist/packages/_es/Button.js +47 -66
  18. package/dist/packages/_es/Calendar.js +135 -152
  19. package/dist/packages/_es/CalendarItem.js +6 -6
  20. package/dist/packages/_es/Card.js +42 -56
  21. package/dist/packages/_es/Cascader.js +323 -433
  22. package/dist/packages/_es/Category.js +29 -39
  23. package/dist/packages/_es/CategoryPane.js +57 -83
  24. package/dist/packages/_es/Cell.js +56 -71
  25. package/dist/packages/_es/CellGroup.js +19 -27
  26. package/dist/packages/_es/Checkbox.js +109 -138
  27. package/dist/packages/_es/CheckboxGroup.js +38 -61
  28. package/dist/packages/_es/CircleProgress.js +67 -96
  29. package/dist/packages/_es/Col.js +23 -31
  30. package/dist/packages/_es/Collapse.js +37 -67
  31. package/dist/packages/_es/CollapseItem.js +91 -184
  32. package/dist/packages/_es/Comment.js +207 -279
  33. package/dist/packages/_es/ConfigProvider.js +38 -56
  34. package/dist/packages/_es/Countdown.js +100 -194
  35. package/dist/packages/_es/Countup.js +232 -428
  36. package/dist/packages/_es/DatePicker.js +169 -245
  37. package/dist/packages/_es/Dialog.js +163 -188
  38. package/dist/packages/_es/Divider.js +42 -40
  39. package/dist/packages/_es/Drag.js +70 -153
  40. package/dist/packages/_es/Ecard.js +64 -104
  41. package/dist/packages/_es/Elevator.js +144 -201
  42. package/dist/packages/_es/Ellipsis.js +95 -159
  43. package/dist/packages/_es/Empty.js +23 -39
  44. package/dist/packages/_es/FixedNav.js +93 -116
  45. package/dist/packages/_es/Form.js +108 -164
  46. package/dist/packages/_es/FormItem.js +48 -61
  47. package/dist/packages/_es/Grid.js +5 -6
  48. package/dist/packages/_es/GridItem.js +58 -84
  49. package/dist/packages/_es/Image.js +98 -88
  50. package/dist/packages/_es/ImagePreview.js +262 -392
  51. package/dist/packages/_es/Indicator.js +30 -34
  52. package/dist/packages/_es/InfiniteLoading.js +83 -117
  53. package/dist/packages/_es/Input.js +176 -223
  54. package/dist/packages/_es/InputNumber.js +81 -117
  55. package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
  56. package/dist/packages/_es/Invoice.js +105 -113
  57. package/dist/packages/_es/Layout.js +3 -4
  58. package/dist/packages/_es/List.js +147 -89
  59. package/dist/packages/_es/Menu.js +96 -152
  60. package/dist/packages/_es/MenuItem.js +117 -153
  61. package/dist/packages/_es/Navbar.js +103 -119
  62. package/dist/packages/_es/Noticebar.js +207 -273
  63. package/dist/packages/_es/Notify.js +110 -147
  64. package/dist/packages/_es/NumberKeyboard.js +127 -202
  65. package/dist/packages/_es/Overlay.js +53 -66
  66. package/dist/packages/_es/Pagination.js +70 -100
  67. package/dist/packages/_es/Picker.js +276 -425
  68. package/dist/packages/_es/Popover.js +122 -225
  69. package/dist/packages/_es/Popup.js +4 -4
  70. package/dist/packages/_es/Price.js +47 -80
  71. package/dist/packages/_es/Progress.js +63 -79
  72. package/dist/packages/_es/PullRefresh.js +96 -157
  73. package/dist/packages/_es/Radio.js +4 -4
  74. package/dist/packages/_es/RadioGroup.js +3 -3
  75. package/dist/packages/_es/Range.js +205 -329
  76. package/dist/packages/_es/Rate.js +93 -122
  77. package/dist/packages/_es/Row.js +21 -27
  78. package/dist/packages/_es/Searchbar.js +130 -160
  79. package/dist/packages/_es/ShortPassword.js +69 -93
  80. package/dist/packages/_es/SideNavbar.js +49 -59
  81. package/dist/packages/_es/SideNavbarItem.js +22 -32
  82. package/dist/packages/_es/Signature.js +83 -128
  83. package/dist/packages/_es/Skeleton.js +110 -130
  84. package/dist/packages/_es/Sku.js +251 -326
  85. package/dist/packages/_es/Step.js +60 -69
  86. package/dist/packages/_es/Steps.js +26 -31
  87. package/dist/packages/_es/Sticky.js +4 -4
  88. package/dist/packages/_es/SubSideNavbar.js +52 -56
  89. package/dist/packages/_es/Swipe.js +84 -137
  90. package/dist/packages/_es/Swiper.js +175 -310
  91. package/dist/packages/_es/SwiperItem.js +28 -44
  92. package/dist/packages/_es/Switch.js +55 -67
  93. package/dist/packages/_es/TabPane.js +32 -20
  94. package/dist/packages/_es/Tabbar.js +41 -52
  95. package/dist/packages/_es/TabbarItem.js +61 -81
  96. package/dist/packages/_es/Table.js +110 -148
  97. package/dist/packages/_es/Tabs.js +284 -205
  98. package/dist/packages/_es/Tag.js +44 -61
  99. package/dist/packages/_es/Textarea.js +80 -124
  100. package/dist/packages/_es/TimeDetail.js +49 -57
  101. package/dist/packages/_es/TimePannel.js +35 -31
  102. package/dist/packages/_es/TimeSelect.js +47 -68
  103. package/dist/packages/_es/Toast.js +150 -203
  104. package/dist/packages/_es/Tour.js +139 -175
  105. package/dist/packages/_es/TrendArrow.js +57 -58
  106. package/dist/packages/_es/Uploader.js +235 -359
  107. package/dist/packages/_es/Video.js +191 -298
  108. package/dist/packages/_es/Watermark.js +84 -98
  109. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
  110. package/dist/packages/_es/common-d218746f.js +116 -0
  111. package/dist/packages/_es/component-234624bc.js +89 -0
  112. package/dist/packages/_es/index-14dfadc4.js +561 -0
  113. package/dist/packages/_es/index-192a3ef6.js +29 -0
  114. package/dist/packages/_es/index-360c5092.js +210 -0
  115. package/dist/packages/_es/index-496e6e05.js +24 -0
  116. package/dist/packages/_es/index-50eed3d9.js +7 -0
  117. package/dist/packages/_es/index-53ec2d4d.js +34 -0
  118. package/dist/packages/_es/index-fadb0974.js +8 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
  120. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
  121. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
  122. package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
  123. package/dist/packages/_es/pxCheck-38173291.js +4 -0
  124. package/dist/packages/_es/raf-a74f1a06.js +16 -0
  125. package/dist/packages/_es/renderIcon-47498b32.js +5 -0
  126. package/dist/packages/actionsheet/index.scss +2 -0
  127. package/dist/packages/actionsheet/style.mjs +0 -2
  128. package/dist/packages/address/index.scss +5 -2
  129. package/dist/packages/address/style.mjs +0 -3
  130. package/dist/packages/addresslist/index.scss +3 -0
  131. package/dist/packages/addresslist/style.mjs +0 -2
  132. package/dist/packages/audio/index.scss +2 -0
  133. package/dist/packages/audio/style.mjs +0 -1
  134. package/dist/packages/audiooperate/index.scss +2 -0
  135. package/dist/packages/audiooperate/style.mjs +0 -1
  136. package/dist/packages/badge/index.scss +3 -0
  137. package/dist/packages/button/index.scss +1 -1
  138. package/dist/packages/calendar/index.scss +3 -0
  139. package/dist/packages/calendar/style.mjs +0 -3
  140. package/dist/packages/card/index.scss +3 -0
  141. package/dist/packages/card/style.mjs +0 -2
  142. package/dist/packages/cascader/index.scss +4 -0
  143. package/dist/packages/cascader/style.mjs +0 -5
  144. package/dist/packages/cellgroup/index.scss +1 -1
  145. package/dist/packages/checkbox/index.scss +41 -0
  146. package/dist/packages/col/index.scss +2 -2
  147. package/dist/packages/comment/index.scss +2 -0
  148. package/dist/packages/comment/style.mjs +0 -1
  149. package/dist/packages/datepicker/index.scss +1 -2
  150. package/dist/packages/datepicker/style.mjs +0 -3
  151. package/dist/packages/dialog/index.scss +11 -0
  152. package/dist/packages/dialog/style.mjs +0 -3
  153. package/dist/packages/ecard/index.scss +2 -0
  154. package/dist/packages/ecard/style.mjs +0 -1
  155. package/dist/packages/fixednav/index.scss +2 -0
  156. package/dist/packages/fixednav/style.mjs +0 -1
  157. package/dist/packages/form/index.scss +1 -2
  158. package/dist/packages/form/style.mjs +0 -1
  159. package/dist/packages/formitem/index.scss +3 -0
  160. package/dist/packages/formitem/style.mjs +0 -1
  161. package/dist/packages/imagepreview/index.scss +5 -5
  162. package/dist/packages/imagepreview/style.mjs +0 -5
  163. package/dist/packages/input/index.scss +13 -13
  164. package/dist/packages/invoice/index.scss +6 -0
  165. package/dist/packages/invoice/style.mjs +0 -7
  166. package/dist/packages/list/index.scss +8 -8
  167. package/dist/packages/menuitem/index.scss +9 -10
  168. package/dist/packages/menuitem/style.mjs +0 -2
  169. package/dist/packages/navbar/index.scss +0 -1
  170. package/dist/packages/noticebar/index.scss +12 -2
  171. package/dist/packages/notify/index.scss +2 -0
  172. package/dist/packages/notify/style.mjs +0 -2
  173. package/dist/packages/numberkeyboard/index.scss +2 -0
  174. package/dist/packages/numberkeyboard/style.mjs +0 -2
  175. package/dist/packages/picker/index.scss +4 -9
  176. package/dist/packages/picker/style.mjs +0 -2
  177. package/dist/packages/popover/index.scss +2 -0
  178. package/dist/packages/popover/style.mjs +0 -2
  179. package/dist/packages/popup/index.scss +2 -0
  180. package/dist/packages/popup/style.mjs +0 -1
  181. package/dist/packages/price/index.scss +5 -10
  182. package/dist/packages/rate/index.scss +6 -9
  183. package/dist/packages/searchbar/index.scss +4 -0
  184. package/dist/packages/shortpassword/index.scss +18 -0
  185. package/dist/packages/shortpassword/style.mjs +0 -2
  186. package/dist/packages/signature/index.scss +2 -0
  187. package/dist/packages/signature/style.mjs +0 -1
  188. package/dist/packages/skeleton/index.scss +2 -0
  189. package/dist/packages/skeleton/style.mjs +0 -1
  190. package/dist/packages/sku/index.scss +4 -0
  191. package/dist/packages/sku/style.mjs +0 -4
  192. package/dist/packages/tabbaritem/index.scss +2 -0
  193. package/dist/packages/tabbaritem/style.mjs +0 -1
  194. package/dist/packages/tabs/index.scss +36 -2
  195. package/dist/packages/tabs/style.mjs +0 -1
  196. package/dist/packages/textarea/index.scss +2 -0
  197. package/dist/packages/timeselect/index.scss +2 -0
  198. package/dist/packages/timeselect/style.mjs +0 -2
  199. package/dist/packages/tour/index.scss +2 -0
  200. package/dist/packages/tour/style.mjs +0 -3
  201. package/dist/packages/uploader/index.scss +10 -2
  202. package/dist/packages/uploader/style.mjs +0 -2
  203. package/dist/resolver/index.d.ts +6 -0
  204. package/dist/resolver/index.js +1 -0
  205. package/dist/resolver/index.mjs +24 -0
  206. package/dist/resolver/package.json +20 -0
  207. package/dist/smartips/web-types.json +114 -15
  208. package/dist/style.css +1 -1
  209. package/dist/styles/themes/default.scss +155 -52
  210. package/dist/styles/themes/jdb.scss +155 -52
  211. package/dist/styles/themes/jddkh.scss +155 -52
  212. package/dist/styles/themes/jdt.scss +155 -52
  213. package/dist/styles/variables-jdb.scss +9 -1
  214. package/dist/styles/variables-jddkh.scss +9 -1
  215. package/dist/styles/variables-jdt.scss +9 -1
  216. package/dist/styles/variables.scss +8 -0
  217. package/dist/types/__VUE/address/index.vue.d.ts +2 -1
  218. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
  219. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
  220. package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
  221. package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
  222. package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
  223. package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
  224. package/dist/types/__VUE/button/type.d.ts +1 -0
  225. package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
  226. package/dist/types/__VUE/collapse/index.vue.d.ts +31 -5
  227. package/dist/types/__VUE/collapseitem/index.vue.d.ts +117 -11
  228. package/dist/types/__VUE/configprovider/index.vue.d.ts +2 -2
  229. package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
  230. package/dist/types/__VUE/dialog/index.d.ts +1 -0
  231. package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
  232. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  233. package/dist/types/__VUE/image/index.vue.d.ts +14 -3
  234. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
  235. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  236. package/dist/types/__VUE/input/index.vue.d.ts +27 -2
  237. package/dist/types/__VUE/list/index.vue.d.ts +42 -13
  238. package/dist/types/__VUE/list/type.d.ts +13 -0
  239. package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
  240. package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
  241. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  242. package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -2
  243. package/dist/types/__VUE/picker/common.d.ts +2 -0
  244. package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
  245. package/dist/types/__VUE/price/index.vue.d.ts +9 -0
  246. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  247. package/dist/types/__VUE/row/index.vue.d.ts +1 -1
  248. package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
  249. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  250. package/dist/types/__VUE/swiper/index.vue.d.ts +9 -2
  251. package/dist/types/__VUE/switch/index.vue.d.ts +1 -0
  252. package/dist/types/__VUE/table/common.d.ts +55 -2
  253. package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
  254. package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
  255. package/dist/types/__VUE/tabs/index.vue.d.ts +35 -5
  256. package/dist/types/__VUE/tabs/types.d.ts +12 -0
  257. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  258. package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
  259. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  260. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  261. package/dist/types/index.d.ts +1 -2
  262. package/dist/types/resolver/index.d.ts +6 -0
  263. package/dist/types/utils/date.d.ts +4 -0
  264. package/dist/types/utils/useTaroRect/index.d.ts +1 -1
  265. package/dist/types/utils/util.d.ts +1 -1
  266. package/package.json +13 -6
  267. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  268. package/dist/packages/_es/common-b9a5e726.js +0 -145
  269. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  270. package/dist/packages/_es/index-29892cda.js +0 -33
  271. package/dist/packages/_es/index-2ae3ae87.js +0 -846
  272. package/dist/packages/_es/index-43c34ac6.js +0 -30
  273. package/dist/packages/_es/index-54d03fc1.js +0 -8
  274. package/dist/packages/_es/index-79c5dc33.js +0 -10
  275. package/dist/packages/_es/index-7a7385e4.js +0 -67
  276. package/dist/packages/_es/index-991c279f.js +0 -244
  277. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  278. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  279. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  280. package/dist/packages/_es/interceptor-956b24fc.js +0 -29
  281. package/dist/packages/_es/mountComponent-1ece4110.js +0 -39
  282. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  283. package/dist/packages/_es/raf-729dad54.js +0 -25
  284. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
  285. /package/dist/types/utils/{interceptor.d.ts → Interceptor.d.ts} +0 -0
@@ -1,9 +1,8 @@
1
- import { ref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { ref as i, openBlock as o, createElementBlock as s, createElementVNode as l, Fragment as m, renderList as y, normalizeClass as u, toDisplayString as _, createCommentVNode as f, renderSlot as g } from "vue";
2
+ import { c as h } from "./component-234624bc.js";
3
+ import { _ as L } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import "../locale/lang";
5
- const { componentName, create } = createComponent("category");
6
- const _sfc_main = create({
5
+ const { componentName: D, create: k } = h("category"), C = k({
7
6
  props: {
8
7
  //分类模式
9
8
  type: {
@@ -16,45 +15,36 @@ const _sfc_main = create({
16
15
  default: []
17
16
  }
18
17
  },
19
- setup(props, { emit, slots }) {
20
- const checkIndex = ref(0);
21
- const categoryLeft = ref(false);
22
- const getChildList = (index2) => {
23
- checkIndex.value = index2;
24
- emit("change", index2);
25
- };
18
+ setup(e, { emit: a, slots: d }) {
19
+ const r = i(0), n = i(!1);
26
20
  return {
27
- getChildList,
28
- checkIndex,
29
- categoryLeft
21
+ getChildList: (t) => {
22
+ r.value = t, a("change", t);
23
+ },
24
+ checkIndex: r,
25
+ categoryLeft: n
30
26
  };
31
27
  }
32
- });
33
- const _hoisted_1 = { class: "nut-category" };
34
- const _hoisted_2 = { class: "nut-category__cateList" };
35
- const _hoisted_3 = { key: 0 };
36
- const _hoisted_4 = ["onClick"];
37
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
38
- return openBlock(), createElementBlock("div", _hoisted_1, [
39
- createElementVNode("div", _hoisted_2, [
40
- _ctx.type == "classify" || _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_3, [
41
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.category, (item, index2) => {
42
- return openBlock(), createElementBlock("div", {
43
- class: "nut-category__cateListLeft",
44
- key: index2
45
- }, [
46
- createElementVNode("div", {
47
- class: normalizeClass([_ctx.checkIndex == index2 ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]),
48
- onClick: ($event) => _ctx.getChildList(index2)
49
- }, toDisplayString(item.catName), 11, _hoisted_4)
50
- ]);
51
- }), 128))
52
- ])) : createCommentVNode("", true),
53
- renderSlot(_ctx.$slots, "default")
28
+ }), v = { class: "nut-category" }, $ = { class: "nut-category__cateList" }, I = { key: 0 }, N = ["onClick"];
29
+ function S(e, a, d, r, n, p) {
30
+ return o(), s("div", v, [
31
+ l("div", $, [
32
+ e.type == "classify" || e.type == "text" ? (o(), s("div", I, [
33
+ (o(!0), s(m, null, y(e.category, (t, c) => (o(), s("div", {
34
+ class: "nut-category__cateListLeft",
35
+ key: c
36
+ }, [
37
+ l("div", {
38
+ class: u([e.checkIndex == c ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]),
39
+ onClick: (B) => e.getChildList(c)
40
+ }, _(t.catName), 11, N)
41
+ ]))), 128))
42
+ ])) : f("", !0),
43
+ g(e.$slots, "default")
54
44
  ])
55
45
  ]);
56
46
  }
57
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
47
+ const F = /* @__PURE__ */ L(C, [["render", S]]);
58
48
  export {
59
- index as default
49
+ F as default
60
50
  };
@@ -1,9 +1,8 @@
1
- import { c as createComponent } from "./component-81a4c1d0.js";
2
- import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { c as u } from "./component-234624bc.js";
2
+ import { openBlock as t, createElementBlock as n, Fragment as s, renderList as r, createElementVNode as l, toDisplayString as _, createCommentVNode as i } from "vue";
3
+ import { _ as C } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import "../locale/lang";
5
- const { componentName, create } = createComponent("category-pane");
6
- const _sfc_main = create({
5
+ const { componentName: H, create: v } = u("category-pane"), m = v({
7
6
  props: {
8
7
  //分类模式
9
8
  type: {
@@ -21,98 +20,73 @@ const _sfc_main = create({
21
20
  default: () => []
22
21
  }
23
22
  },
24
- setup(props, { emit }) {
25
- const onChange = (sku) => {
26
- emit("onChange", sku);
27
- };
23
+ setup(o, { emit: p }) {
28
24
  return {
29
- onChange
25
+ onChange: (y) => {
26
+ p("onChange", y);
27
+ }
30
28
  };
31
29
  }
32
- });
33
- const _hoisted_1 = { class: "nut-category-pane" };
34
- const _hoisted_2 = {
30
+ }), f = { class: "nut-category-pane" }, N = {
35
31
  key: 0,
36
32
  class: "nut-category-pane__cateListRight"
37
- };
38
- const _hoisted_3 = { class: "nut-category-pane__childTitle" };
39
- const _hoisted_4 = {
33
+ }, I = { class: "nut-category-pane__childTitle" }, L = {
40
34
  key: 0,
41
35
  class: "nut-category-pane__childItemList"
42
- };
43
- const _hoisted_5 = ["onClick"];
44
- const _hoisted_6 = ["src"];
45
- const _hoisted_7 = { class: "nut-category-pane__skuImg" };
46
- const _hoisted_8 = {
36
+ }, $ = ["onClick"], T = ["src"], k = { class: "nut-category-pane__skuImg" }, A = {
47
37
  key: 1,
48
38
  class: "nut-category-pane__cateListRight"
49
- };
50
- const _hoisted_9 = { class: "nut-category-pane__childTitle" };
51
- const _hoisted_10 = {
39
+ }, B = { class: "nut-category-pane__childTitle" }, E = {
52
40
  key: 0,
53
41
  class: "nut-category-pane__childItemList"
54
- };
55
- const _hoisted_11 = ["onClick"];
56
- const _hoisted_12 = { class: "nut-category-pane__skuName" };
57
- const _hoisted_13 = {
42
+ }, R = ["onClick"], S = { class: "nut-category-pane__skuName" }, V = {
58
43
  key: 2,
59
44
  class: "nut-category-pane__selfItemList"
60
- };
61
- const _hoisted_14 = ["onClick"];
62
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
63
- return openBlock(), createElementBlock("div", _hoisted_1, [
64
- _ctx.type == "classify" ? (openBlock(), createElementBlock("div", _hoisted_2, [
65
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
66
- return openBlock(), createElementBlock("div", { key: index2 }, [
67
- createElementVNode("div", _hoisted_3, toDisplayString(item == null ? void 0 : item.catName), 1),
68
- (item == null ? void 0 : item.catType) == 1 ? (openBlock(), createElementBlock("div", _hoisted_4, [
69
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
70
- return openBlock(), createElementBlock("div", {
71
- class: "nut-category-pane__childItem",
72
- key,
73
- onClick: ($event) => _ctx.onChange(sku)
74
- }, [
75
- createElementVNode("img", {
76
- class: "nut-category-pane__childImg",
77
- src: sku.backImg
78
- }, null, 8, _hoisted_6),
79
- createElementVNode("div", _hoisted_7, toDisplayString(sku == null ? void 0 : sku.catName), 1)
80
- ], 8, _hoisted_5);
81
- }), 128))
82
- ])) : createCommentVNode("", true)
83
- ]);
84
- }), 128))
85
- ])) : createCommentVNode("", true),
86
- _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_8, [
87
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
88
- return openBlock(), createElementBlock("div", { key: index2 }, [
89
- createElementVNode("div", _hoisted_9, toDisplayString(item == null ? void 0 : item.catName), 1),
90
- (item == null ? void 0 : item.catType) == 1 ? (openBlock(), createElementBlock("div", _hoisted_10, [
91
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
92
- return openBlock(), createElementBlock("div", {
93
- class: "nut-category-pane__childItem",
94
- key,
95
- onClick: ($event) => _ctx.onChange(sku)
96
- }, [
97
- createElementVNode("div", _hoisted_12, toDisplayString(sku == null ? void 0 : sku.catName), 1)
98
- ], 8, _hoisted_11);
99
- }), 128))
100
- ])) : createCommentVNode("", true)
101
- ]);
102
- }), 128))
103
- ])) : createCommentVNode("", true),
104
- _ctx.type == "custom" ? (openBlock(), createElementBlock("div", _hoisted_13, [
105
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.customCategory, (sku, key) => {
106
- return openBlock(), createElementBlock("div", {
107
- class: "nut-category-pane__skuName",
108
- key,
109
- onClick: ($event) => _ctx.onChange(sku)
110
- }, toDisplayString(sku == null ? void 0 : sku.catName), 9, _hoisted_14);
111
- }), 128))
112
- ])) : createCommentVNode("", true)
45
+ }, b = ["onClick"];
46
+ function D(o, p, g, y, F, j) {
47
+ return t(), n("div", f, [
48
+ o.type == "classify" ? (t(), n("div", N, [
49
+ (t(!0), n(s, null, r(o.categoryChild, (e, c) => (t(), n("div", { key: c }, [
50
+ l("div", I, _(e == null ? void 0 : e.catName), 1),
51
+ (e == null ? void 0 : e.catType) == 1 ? (t(), n("div", L, [
52
+ (t(!0), n(s, null, r(e.childCateList, (a, d) => (t(), n("div", {
53
+ class: "nut-category-pane__childItem",
54
+ key: d,
55
+ onClick: (h) => o.onChange(a)
56
+ }, [
57
+ l("img", {
58
+ class: "nut-category-pane__childImg",
59
+ src: a.backImg
60
+ }, null, 8, T),
61
+ l("div", k, _(a == null ? void 0 : a.catName), 1)
62
+ ], 8, $))), 128))
63
+ ])) : i("", !0)
64
+ ]))), 128))
65
+ ])) : i("", !0),
66
+ o.type == "text" ? (t(), n("div", A, [
67
+ (t(!0), n(s, null, r(o.categoryChild, (e, c) => (t(), n("div", { key: c }, [
68
+ l("div", B, _(e == null ? void 0 : e.catName), 1),
69
+ (e == null ? void 0 : e.catType) == 1 ? (t(), n("div", E, [
70
+ (t(!0), n(s, null, r(e.childCateList, (a, d) => (t(), n("div", {
71
+ class: "nut-category-pane__childItem",
72
+ key: d,
73
+ onClick: (h) => o.onChange(a)
74
+ }, [
75
+ l("div", S, _(a == null ? void 0 : a.catName), 1)
76
+ ], 8, R))), 128))
77
+ ])) : i("", !0)
78
+ ]))), 128))
79
+ ])) : i("", !0),
80
+ o.type == "custom" ? (t(), n("div", V, [
81
+ (t(!0), n(s, null, r(o.customCategory, (e, c) => (t(), n("div", {
82
+ class: "nut-category-pane__skuName",
83
+ key: c,
84
+ onClick: (a) => o.onChange(e)
85
+ }, _(e == null ? void 0 : e.catName), 9, b))), 128))
86
+ ])) : i("", !0)
113
87
  ]);
114
88
  }
115
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
89
+ const J = /* @__PURE__ */ C(m, [["render", D]]);
116
90
  export {
117
- index as default
91
+ J as default
118
92
  };
@@ -1,105 +1,90 @@
1
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, createBlock } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { u as useRouter } from "./index-54d03fc1.js";
4
- import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
5
- import { Right } from "@nutui/icons-vue";
6
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { computed as d, resolveComponent as g, openBlock as l, createElementBlock as s, normalizeClass as m, normalizeStyle as f, renderSlot as i, createCommentVNode as o, Fragment as $, createElementVNode as k, toDisplayString as a, createTextVNode as h, createBlock as S } from "vue";
2
+ import { c as C } from "./component-234624bc.js";
3
+ import { u as b } from "./index-50eed3d9.js";
4
+ import { p as v } from "./pxCheck-38173291.js";
5
+ import { Right as T } from "@nutui/icons-vue";
6
+ import { _ as R } from "./_plugin-vue_export-helper-dad06003.js";
7
7
  import "../locale/lang";
8
- const { componentName, create } = createComponent("cell");
9
- const _sfc_main = create({
10
- components: { Right },
8
+ const { componentName: w, create: B } = C("cell"), N = B({
9
+ components: { Right: T },
11
10
  props: {
12
11
  title: { type: String, default: "" },
13
12
  subTitle: { type: String, default: "" },
14
13
  desc: { type: String, default: "" },
15
14
  descTextAlign: { type: String, default: "right" },
16
- isLink: { type: Boolean, default: false },
15
+ isLink: { type: Boolean, default: !1 },
17
16
  to: [String, Object],
18
- replace: { type: Boolean, default: false },
17
+ replace: { type: Boolean, default: !1 },
19
18
  roundRadius: { type: [String, Number], default: "" },
20
19
  url: { type: String, default: "" },
21
- center: { type: Boolean, default: false },
20
+ center: { type: Boolean, default: !1 },
22
21
  size: { type: String, default: "" }
23
22
  // large
24
23
  },
25
24
  emits: ["click"],
26
- setup(props, { emit }) {
27
- const classes = computed(() => {
28
- const prefixCls = componentName;
25
+ setup(e, { emit: n }) {
26
+ const c = d(() => {
27
+ const t = w;
29
28
  return {
30
- [prefixCls]: true,
31
- [`${prefixCls}--clickable`]: props.isLink || props.to,
32
- [`${prefixCls}--center`]: props.center,
33
- [`${prefixCls}--large`]: props.size == "large"
29
+ [t]: !0,
30
+ [`${t}--clickable`]: e.isLink || e.to,
31
+ [`${t}--center`]: e.center,
32
+ [`${t}--large`]: e.size == "large"
34
33
  };
35
- });
36
- const router = useRouter();
37
- const baseStyle = computed(() => {
38
- return {
39
- borderRadius: pxCheck(props.roundRadius)
40
- };
41
- });
42
- const handleClick = (event) => {
43
- emit("click", event);
44
- if (props.to && router) {
45
- router[props.replace ? "replace" : "push"](props.to);
46
- } else if (props.url) {
47
- props.replace ? location.replace(props.url) : location.href = props.url;
48
- }
49
- };
34
+ }), r = b(), u = d(() => ({
35
+ borderRadius: v(e.roundRadius)
36
+ }));
50
37
  return {
51
- handleClick,
52
- classes,
53
- baseStyle
38
+ handleClick: (t) => {
39
+ n("click", t), e.to && r ? r[e.replace ? "replace" : "push"](e.to) : e.url && (e.replace ? location.replace(e.url) : location.href = e.url);
40
+ },
41
+ classes: c,
42
+ baseStyle: u
54
43
  };
55
44
  }
56
- });
57
- const _hoisted_1 = {
45
+ }), z = {
58
46
  key: 0,
59
47
  class: "nut-cell__icon"
60
- };
61
- const _hoisted_2 = {
48
+ }, L = {
62
49
  key: 1,
63
50
  class: "nut-cell__title"
64
- };
65
- const _hoisted_3 = { class: "title" };
66
- const _hoisted_4 = { class: "nut-cell__title-desc" };
67
- function render(_ctx, _cache, $props, $setup, $data, $options) {
68
- const _component_Right = resolveComponent("Right");
69
- return openBlock(), createElementBlock("view", {
70
- class: normalizeClass(_ctx.classes),
71
- style: normalizeStyle(_ctx.baseStyle),
72
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
51
+ }, V = { class: "title" }, A = { class: "nut-cell__title-desc" };
52
+ function E(e, n, c, r, u, y) {
53
+ const t = g("Right");
54
+ return l(), s("view", {
55
+ class: m(e.classes),
56
+ style: f(e.baseStyle),
57
+ onClick: n[0] || (n[0] = (...p) => e.handleClick && e.handleClick(...p))
73
58
  }, [
74
- renderSlot(_ctx.$slots, "default", {}, () => [
75
- _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
76
- renderSlot(_ctx.$slots, "icon")
77
- ])) : createCommentVNode("", true),
78
- _ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
79
- _ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
80
- renderSlot(_ctx.$slots, "title", {}, () => [
81
- createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
59
+ i(e.$slots, "default", {}, () => [
60
+ e.$slots.icon ? (l(), s("view", z, [
61
+ i(e.$slots, "icon")
62
+ ])) : o("", !0),
63
+ e.title || e.subTitle || e.$slots.title ? (l(), s("view", L, [
64
+ e.subTitle ? (l(), s($, { key: 0 }, [
65
+ i(e.$slots, "title", {}, () => [
66
+ k("view", V, a(e.title), 1)
82
67
  ]),
83
- createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
84
- ], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
85
- createTextVNode(toDisplayString(_ctx.title), 1)
68
+ k("view", A, a(e.subTitle), 1)
69
+ ], 64)) : i(e.$slots, "title", { key: 1 }, () => [
70
+ h(a(e.title), 1)
86
71
  ])
87
- ])) : createCommentVNode("", true),
88
- _ctx.desc ? (openBlock(), createElementBlock("view", {
72
+ ])) : o("", !0),
73
+ e.desc ? (l(), s("view", {
89
74
  key: 2,
90
- class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
91
- style: normalizeStyle({ "text-align": _ctx.descTextAlign })
92
- }, toDisplayString(_ctx.desc), 7)) : createCommentVNode("", true),
93
- renderSlot(_ctx.$slots, "link", {}, () => [
94
- _ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_Right, {
75
+ class: m(["nut-cell__value", { "nut-cell__value--alone": !e.title && !e.subTitle && !e.$slots.title }]),
76
+ style: f({ "text-align": e.descTextAlign })
77
+ }, a(e.desc), 7)) : o("", !0),
78
+ i(e.$slots, "link", {}, () => [
79
+ e.isLink || e.to ? (l(), S(t, {
95
80
  key: 0,
96
81
  class: "nut-cell__link"
97
- })) : createCommentVNode("", true)
82
+ })) : o("", !0)
98
83
  ])
99
84
  ])
100
85
  ], 6);
101
86
  }
102
- const Cell = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
87
+ const H = /* @__PURE__ */ R(N, [["render", E]]);
103
88
  export {
104
- Cell as default
89
+ H as default
105
90
  };
@@ -1,46 +1,38 @@
1
- import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { computed as c, openBlock as t, createElementBlock as s, normalizeClass as a, renderSlot as o, toDisplayString as r, createCommentVNode as l, createElementVNode as p } from "vue";
2
+ import { c as i } from "./component-234624bc.js";
3
+ import { _ as u } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import "../locale/lang";
5
- const { componentName, create } = createComponent("cell-group");
6
- const _sfc_main = create({
5
+ const { componentName: d, create: m } = i("cell-group"), f = m({
7
6
  props: {
8
7
  title: { type: String, default: "" },
9
8
  desc: { type: String, default: "" }
10
9
  },
11
10
  setup() {
12
- const classes = computed(() => {
13
- const prefixCls = componentName;
14
- return {
15
- [prefixCls]: true
16
- };
17
- });
18
11
  return {
19
- classes
12
+ classes: c(() => ({
13
+ [d]: !0
14
+ }))
20
15
  };
21
16
  }
22
- });
23
- const _hoisted_1 = {
17
+ }), _ = {
24
18
  key: 1,
25
19
  class: "nut-cell-group__title"
26
- };
27
- const _hoisted_2 = {
20
+ }, $ = {
28
21
  key: 3,
29
22
  class: "nut-cell-group__desc"
30
- };
31
- const _hoisted_3 = { class: "nut-cell-group__warp" };
32
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
33
- return openBlock(), createElementBlock("view", {
34
- class: normalizeClass(_ctx.classes)
23
+ }, g = { class: "nut-cell-group__wrap" };
24
+ function y(e, n, k, C, w, h) {
25
+ return t(), s("view", {
26
+ class: a(e.classes)
35
27
  }, [
36
- _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
37
- _ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
38
- createElementVNode("view", _hoisted_3, [
39
- renderSlot(_ctx.$slots, "default")
28
+ e.$slots.title ? o(e.$slots, "title", { key: 0 }) : e.title ? (t(), s("view", _, r(e.title), 1)) : l("", !0),
29
+ e.$slots.desc ? o(e.$slots, "desc", { key: 2 }) : e.desc ? (t(), s("view", $, r(e.desc), 1)) : l("", !0),
30
+ p("view", g, [
31
+ o(e.$slots, "default")
40
32
  ])
41
33
  ], 2);
42
34
  }
43
- const CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
35
+ const E = /* @__PURE__ */ u(f, [["render", y]]);
44
36
  export {
45
- CellGroup as default
37
+ E as default
46
38
  };