@nutui/nutui 3.1.22-beta.5 → 3.1.23-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 (168) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +3 -4
  3. package/dist/nutui.es.js +20412 -4214
  4. package/dist/nutui.umd.js +20518 -4216
  5. package/dist/packages/_es/ActionSheet.js +149 -17
  6. package/dist/packages/_es/Address.js +535 -110
  7. package/dist/packages/_es/AddressList.js +615 -113
  8. package/dist/packages/_es/Animate.js +59 -17
  9. package/dist/packages/_es/Audio.js +257 -53
  10. package/dist/packages/_es/AudioOperate.js +100 -13
  11. package/dist/packages/_es/Avatar.js +162 -38
  12. package/dist/packages/_es/AvatarGroup.js +73 -14
  13. package/dist/packages/_es/BackTop.js +156 -43
  14. package/dist/packages/_es/Badge.js +86 -14
  15. package/dist/packages/_es/Barrage.js +120 -41
  16. package/dist/packages/_es/Button.js +128 -23
  17. package/dist/packages/_es/Calendar.js +246 -30
  18. package/dist/packages/_es/CalendarItem.js +1 -1
  19. package/dist/packages/_es/Card.js +107 -10
  20. package/dist/packages/_es/Cascader.js +496 -147
  21. package/dist/packages/_es/Category.js +58 -15
  22. package/dist/packages/_es/CategoryPane.js +111 -11
  23. package/dist/packages/_es/Cell.js +108 -21
  24. package/dist/packages/_es/CellGroup.js +44 -9
  25. package/dist/packages/_es/Checkbox.js +134 -29
  26. package/dist/packages/_es/CheckboxGroup.js +79 -29
  27. package/dist/packages/_es/CircleProgress.js +150 -28
  28. package/dist/packages/_es/Col.js +56 -14
  29. package/dist/packages/_es/Collapse.js +109 -32
  30. package/dist/packages/_es/CollapseItem.js +253 -59
  31. package/dist/packages/_es/Comment.js +434 -64
  32. package/dist/packages/_es/ConfigProvider.js +20 -8
  33. package/dist/packages/_es/CountDown.js +238 -56
  34. package/dist/packages/_es/CountUp.js +539 -140
  35. package/dist/packages/_es/DatePicker.js +315 -98
  36. package/dist/packages/_es/Dialog.js +289 -60
  37. package/dist/packages/_es/Divider.js +65 -13
  38. package/dist/packages/_es/Drag.js +197 -56
  39. package/dist/packages/_es/Ecard.js +159 -24
  40. package/dist/packages/_es/Elevator.js +255 -58
  41. package/dist/packages/_es/Ellipsis.js +200 -58
  42. package/dist/packages/_es/Empty.js +71 -12
  43. package/dist/packages/_es/FixedNav.js +122 -15
  44. package/dist/packages/_es/Form.js +151 -64
  45. package/dist/packages/_es/FormItem.js +114 -15
  46. package/dist/packages/_es/Grid.js +6 -5
  47. package/dist/packages/_es/GridItem.js +144 -33
  48. package/dist/packages/_es/Icon.js +40 -15
  49. package/dist/packages/_es/Image.js +137 -26
  50. package/dist/packages/_es/ImagePreview.js +547 -76
  51. package/dist/packages/_es/Indicator.js +62 -15
  52. package/dist/packages/_es/InfiniteLoading.js +249 -57
  53. package/dist/packages/_es/Input.js +433 -51
  54. package/dist/packages/_es/InputNumber.js +160 -41
  55. package/dist/packages/_es/Layout.js +5 -4
  56. package/dist/packages/_es/List.js +106 -18
  57. package/dist/packages/_es/Menu.js +168 -44
  58. package/dist/packages/_es/MenuItem.js +173 -37
  59. package/dist/packages/_es/Navbar.js +192 -30
  60. package/dist/packages/_es/NoticeBar.js +380 -74
  61. package/dist/packages/_es/Notify.js +227 -72
  62. package/dist/packages/_es/NumberKeyboard.js +272 -41
  63. package/dist/packages/_es/OldPicker.js +457 -130
  64. package/dist/packages/_es/OverLay.js +98 -24
  65. package/dist/packages/_es/Pagination.js +157 -39
  66. package/dist/packages/_es/Picker.js +454 -129
  67. package/dist/packages/_es/Popover.js +957 -318
  68. package/dist/packages/_es/Popup.js +299 -55
  69. package/dist/packages/_es/Price.js +118 -16
  70. package/dist/packages/_es/Progress.js +146 -14
  71. package/dist/packages/_es/PullRefresh.js +339 -84
  72. package/dist/packages/_es/Radio.js +90 -22
  73. package/dist/packages/_es/RadioGroup.js +37 -8
  74. package/dist/packages/_es/Range.js +408 -83
  75. package/dist/packages/_es/Rate.js +192 -36
  76. package/dist/packages/_es/Row.js +64 -22
  77. package/dist/packages/_es/SearchBar.js +238 -37
  78. package/dist/packages/_es/ShortPassword.js +225 -35
  79. package/dist/packages/_es/SideNavBar.js +81 -24
  80. package/dist/packages/_es/SideNavBarItem.js +46 -11
  81. package/dist/packages/_es/Signature.js +160 -41
  82. package/dist/packages/_es/Skeleton.js +136 -20
  83. package/dist/packages/_es/Sku.js +491 -84
  84. package/dist/packages/_es/Step.js +115 -20
  85. package/dist/packages/_es/Steps.js +53 -18
  86. package/dist/packages/_es/Sticky.js +138 -53
  87. package/dist/packages/_es/SubSideNavBar.js +82 -17
  88. package/dist/packages/_es/Swipe.js +178 -41
  89. package/dist/packages/_es/Swiper.js +433 -121
  90. package/dist/packages/_es/SwiperItem.js +53 -22
  91. package/dist/packages/_es/Switch.js +116 -21
  92. package/dist/packages/_es/TabPane.js +39 -12
  93. package/dist/packages/_es/Tabbar.js +72 -17
  94. package/dist/packages/_es/TabbarItem.js +151 -29
  95. package/dist/packages/_es/Table.js +178 -18
  96. package/dist/packages/_es/Tabs.js +202 -43
  97. package/dist/packages/_es/Tag.js +97 -20
  98. package/dist/packages/_es/TextArea.js +160 -42
  99. package/dist/packages/_es/TimeDetail.js +79 -18
  100. package/dist/packages/_es/TimePannel.js +48 -14
  101. package/dist/packages/_es/TimeSelect.js +112 -15
  102. package/dist/packages/_es/Toast.js +310 -71
  103. package/dist/packages/_es/Uploader.js +455 -104
  104. package/dist/packages/_es/Video.js +332 -74
  105. package/dist/packages/_es/common.js +128 -38
  106. package/dist/packages/_es/component.js +76 -35
  107. package/dist/packages/_es/index.js +6 -5
  108. package/dist/packages/_es/index2.js +30 -9
  109. package/dist/packages/_es/index3.js +8 -6
  110. package/dist/packages/_es/index4.js +64 -13
  111. package/dist/packages/_es/index5.js +780 -164
  112. package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
  113. package/dist/packages/_es/pxCheck.js +5 -3
  114. package/dist/packages/_es/raf.js +15 -8
  115. package/dist/packages/imagepreview/index.scss +6 -1
  116. package/dist/packages/locale/lang/baseLang.js +3 -3
  117. package/dist/packages/locale/lang/en-US.js +105 -5
  118. package/dist/packages/locale/lang/id-ID.js +105 -5
  119. package/dist/packages/locale/lang/index.js +38 -16
  120. package/dist/packages/locale/lang/zh-CN.js +105 -5
  121. package/dist/packages/locale/lang/zh-TW.js +105 -5
  122. package/dist/packages/picker/index.scss +13 -0
  123. package/dist/smartips/attributes.json +8 -0
  124. package/dist/smartips/tags.json +3 -1
  125. package/dist/smartips/web-types.json +19 -1
  126. package/dist/style.css +1 -1
  127. package/dist/style.es.js +1 -1
  128. package/dist/styles/themes/default.scss +49 -49
  129. package/dist/styles/themes/jdb.scss +49 -49
  130. package/dist/styles/themes/jdt.scss +49 -49
  131. package/dist/styles/variables-jdb.scss +4 -1
  132. package/dist/styles/variables-jdt.scss +4 -1
  133. package/dist/styles/variables.scss +1 -1
  134. package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
  135. package/dist/types/__VUE/address/index.vue.d.ts +4 -4
  136. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  137. package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
  138. package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
  139. package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
  140. package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
  141. package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
  142. package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
  146. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
  147. package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
  148. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  149. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  150. package/dist/types/__VUE/menu/index.vue.d.ts +4 -4
  151. package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
  152. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
  153. package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
  155. package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
  156. package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
  157. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  158. package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
  159. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
  162. package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
  163. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
  165. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  167. package/dist/types/index.d.ts +1 -1
  168. package/package.json +1 -2
@@ -1,20 +1,63 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref as t, onMounted as e, openBlock as a, createElementBlock as c, createElementVNode as o, Fragment as r, renderList as s, normalizeClass as i, toDisplayString as n, createCommentVNode as l, renderSlot as y } from "vue";
7
- import { c as p } from "./component.js";
8
- import { _ as u } from "./plugin-vue_export-helper.js";
6
+ import { ref, onMounted, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName: d, create: g } = p("category"), m = g({ props: { type: { type: String, default: "classify" }, category: { type: Array, default: () => [] } }, setup(a2, { emit: c2, slots: o2 }) {
11
- const r2 = t(0), s2 = t(false);
12
- return e(() => {
13
- }), { getChildList: (t2) => {
14
- r2.value = t2, c2("change", t2);
15
- }, checkIndex: r2, categoryLeft: s2 };
16
- } }), f = { class: "nut-category" }, _ = { class: "nut-category__cateList" }, v = { key: 0 }, L = ["onClick"];
17
- var h = u(m, [["render", function(t2, e2, p2, u2, d2, g2) {
18
- return a(), c("div", f, [o("div", _, [t2.type == "classify" || t2.type == "text" ? (a(), c("div", v, [(a(true), c(r, null, s(t2.category, (e3, r2) => (a(), c("div", { class: "nut-category__cateListLeft", key: r2 }, [o("div", { class: i([t2.checkIndex == r2 ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]), onClick: (e4) => t2.getChildList(r2) }, n(e3.catName), 11, L)]))), 128))])) : l("", true), y(t2.$slots, "default")])]);
19
- }]]);
20
- export { h as default };
10
+ const { componentName, create } = createComponent("category");
11
+ const _sfc_main = create({
12
+ props: {
13
+ type: {
14
+ type: String,
15
+ default: "classify"
16
+ },
17
+ category: {
18
+ type: Array,
19
+ default: () => []
20
+ }
21
+ },
22
+ setup(props, { emit, slots }) {
23
+ const checkIndex = ref(0);
24
+ const categoryLeft = ref(false);
25
+ const getChildList = (index2) => {
26
+ checkIndex.value = index2;
27
+ emit("change", index2);
28
+ };
29
+ onMounted(() => {
30
+ });
31
+ return {
32
+ getChildList,
33
+ checkIndex,
34
+ categoryLeft
35
+ };
36
+ }
37
+ });
38
+ const _hoisted_1 = { class: "nut-category" };
39
+ const _hoisted_2 = { class: "nut-category__cateList" };
40
+ const _hoisted_3 = { key: 0 };
41
+ const _hoisted_4 = ["onClick"];
42
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
43
+ return openBlock(), createElementBlock("div", _hoisted_1, [
44
+ createElementVNode("div", _hoisted_2, [
45
+ _ctx.type == "classify" || _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_3, [
46
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.category, (item, index2) => {
47
+ return openBlock(), createElementBlock("div", {
48
+ class: "nut-category__cateListLeft",
49
+ key: index2
50
+ }, [
51
+ createElementVNode("div", {
52
+ class: normalizeClass([_ctx.checkIndex == index2 ? "nut-category__cateListItemChecked" : "nut-category__cateListItem"]),
53
+ onClick: ($event) => _ctx.getChildList(index2)
54
+ }, toDisplayString(item.catName), 11, _hoisted_4)
55
+ ]);
56
+ }), 128))
57
+ ])) : createCommentVNode("", true),
58
+ renderSlot(_ctx.$slots, "default")
59
+ ])
60
+ ]);
61
+ }
62
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
63
+ export { index as default };
@@ -1,16 +1,116 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { c as e } from "./component.js";
7
- import { openBlock as t, createElementBlock as a, Fragment as c, renderList as n, createElementVNode as s, toDisplayString as l, createCommentVNode as i } from "vue";
8
- import { _ as o } from "./plugin-vue_export-helper.js";
6
+ import { c as createComponent } from "./component.js";
7
+ import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName: r, create: y } = e("categorypane"), p = y({ props: { type: { type: String, default: "classify" }, categoryChild: { type: Array, default: () => [] }, customCategory: { type: Array, default: () => [] } }, setup: (e2, { emit: t2 }) => ({ onChange: () => {
11
- t2("onChange");
12
- } }) }), u = { class: "nut-categorypane" }, g = { key: 0, class: "nut-categorypane__cateListRight" }, d = { class: "nut-categorypane__childTitle" }, m = { key: 0, class: "nut-categorypane__childItemList" }, _ = ["src"], h = { class: "nut-categorypane__skuImg" }, v = { key: 1, class: "nut-categorypane__cateListRight" }, k = { class: "nut-categorypane__childTitle" }, C = { key: 0, class: "nut-categorypane__childItemList" }, f = { class: "nut-categorypane__skuName" }, I = { key: 2, class: "nut-categorypane__selfItemList" };
13
- var N = o(p, [["render", function(e2, o2, r2, y2, p2, N2) {
14
- return t(), a("div", u, [e2.type == "classify" ? (t(), a("div", g, [(t(true), a(c, null, n(e2.categoryChild, (r3, y3) => (t(), a("div", { key: y3 }, [s("div", d, l(r3.catName), 1), r3.catType == 1 ? (t(), a("div", m, [(t(true), a(c, null, n(r3.childCateList, (c2, n2) => (t(), a("div", { class: "nut-categorypane__childItem", key: n2, onClick: o2[0] || (o2[0] = (t2) => e2.onChange()) }, [s("img", { class: "nut-categorypane__childImg", src: c2.backImg }, null, 8, _), s("div", h, l(c2.catName), 1)]))), 128))])) : i("", true)]))), 128))])) : i("", true), e2.type == "text" ? (t(), a("div", v, [(t(true), a(c, null, n(e2.categoryChild, (r3, y3) => (t(), a("div", { key: y3 }, [s("div", k, l(r3.catName), 1), r3.catType == 1 ? (t(), a("div", C, [(t(true), a(c, null, n(r3.childCateList, (c2, n2) => (t(), a("div", { class: "nut-categorypane__childItem", key: n2, onClick: o2[1] || (o2[1] = (t2) => e2.onChange()) }, [s("div", f, l(c2.catName), 1)]))), 128))])) : i("", true)]))), 128))])) : i("", true), e2.type == "custom" ? (t(), a("div", I, [(t(true), a(c, null, n(e2.customCategory, (c2, n2) => (t(), a("div", { class: "nut-categorypane__skuName", key: n2, onClick: o2[2] || (o2[2] = (t2) => e2.onChange()) }, l(c2.catName), 1))), 128))])) : i("", true)]);
15
- }]]);
16
- export { N as default };
10
+ var index_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".nut-categorypane__cateList {\n display: flex;\n background: rgb(255, 255, 255);\n}\n.nut-categorypane__cateListLeft {\n background: rgb(246, 247, 249);\n}\n.nut-categorypane__cateListItemChecked, .nut-categorypane__cateListItem {\n width: 100px;\n height: 50px;\n font-size: 13px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(51, 51, 51);\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 0.3s;\n}\n.nut-categorypane__cateListItemChecked {\n background: rgb(255, 255, 255);\n font-weight: 500;\n transition: all 0.3s;\n}\n.nut-categorypane__cateListRight {\n padding-left: 15px;\n background: rgb(255, 255, 255);\n}\n.nut-categorypane__childTitle {\n margin-top: 15px;\n margin-bottom: 15px;\n font-size: 13px;\n font-family: PingFangSC;\n font-weight: 500;\n color: rgb(51, 51, 51);\n}\n.nut-categorypane__childItemList {\n display: flex;\n flex-wrap: wrap;\n}\n.nut-categorypane__childItem {\n margin-right: 10px;\n}\n.nut-categorypane__childImg {\n width: 75px;\n height: 75px;\n border-radius: 5px;\n}\n.nut-categorypane__skuName {\n margin-right: 10px;\n width: 75px;\n height: 40px;\n border: 1px solid rgb(153, 153, 153);\n border-radius: 5px;\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.nut-categorypane__skuName:nth-child(3n) {\n margin-right: 0;\n}\n.nut-categorypane__skuName:nth-child(n+4) {\n margin-top: 15px;\n}\n.nut-categorypane__skuImg {\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n margin-top: 10px;\n margin-bottom: 10px;\n text-align: center;\n}\n.nut-categorypane__selfItemList {\n display: flex;\n flex-wrap: wrap;\n}\n.nut-categorypane__selfskuName {\n margin-left: 15px;\n margin-top: 15px;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 75px;\n height: 40px;\n border: 1px solid rgb(153, 153, 153);\n border-radius: 5px;\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n}\n.nut-categorypane__skuName {\n margin-left: 15px;\n margin-top: 15px;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 75px;\n height: 40px;\n border: 1px solid rgb(153, 153, 153);\n border-radius: 5px;\n font-size: 12px;\n font-family: PingFangSC;\n font-weight: normal;\n color: rgb(102, 102, 102);\n}")();
11
+ const { componentName, create } = createComponent("categorypane");
12
+ const _sfc_main = create({
13
+ props: {
14
+ type: {
15
+ type: String,
16
+ default: "classify"
17
+ },
18
+ categoryChild: {
19
+ type: Array,
20
+ default: () => []
21
+ },
22
+ customCategory: {
23
+ type: Array,
24
+ default: () => []
25
+ }
26
+ },
27
+ setup(props, { emit }) {
28
+ const onChange = () => {
29
+ emit("onChange");
30
+ };
31
+ return {
32
+ onChange
33
+ };
34
+ }
35
+ });
36
+ const _hoisted_1 = { class: "nut-categorypane" };
37
+ const _hoisted_2 = {
38
+ key: 0,
39
+ class: "nut-categorypane__cateListRight"
40
+ };
41
+ const _hoisted_3 = { class: "nut-categorypane__childTitle" };
42
+ const _hoisted_4 = {
43
+ key: 0,
44
+ class: "nut-categorypane__childItemList"
45
+ };
46
+ const _hoisted_5 = ["src"];
47
+ const _hoisted_6 = { class: "nut-categorypane__skuImg" };
48
+ const _hoisted_7 = {
49
+ key: 1,
50
+ class: "nut-categorypane__cateListRight"
51
+ };
52
+ const _hoisted_8 = { class: "nut-categorypane__childTitle" };
53
+ const _hoisted_9 = {
54
+ key: 0,
55
+ class: "nut-categorypane__childItemList"
56
+ };
57
+ const _hoisted_10 = { class: "nut-categorypane__skuName" };
58
+ const _hoisted_11 = {
59
+ key: 2,
60
+ class: "nut-categorypane__selfItemList"
61
+ };
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.catName), 1),
68
+ 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-categorypane__childItem",
72
+ key,
73
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onChange())
74
+ }, [
75
+ createElementVNode("img", {
76
+ class: "nut-categorypane__childImg",
77
+ src: sku.backImg
78
+ }, null, 8, _hoisted_5),
79
+ createElementVNode("div", _hoisted_6, toDisplayString(sku.catName), 1)
80
+ ]);
81
+ }), 128))
82
+ ])) : createCommentVNode("", true)
83
+ ]);
84
+ }), 128))
85
+ ])) : createCommentVNode("", true),
86
+ _ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_7, [
87
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
88
+ return openBlock(), createElementBlock("div", { key: index2 }, [
89
+ createElementVNode("div", _hoisted_8, toDisplayString(item.catName), 1),
90
+ item.catType == 1 ? (openBlock(), createElementBlock("div", _hoisted_9, [
91
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
92
+ return openBlock(), createElementBlock("div", {
93
+ class: "nut-categorypane__childItem",
94
+ key,
95
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.onChange())
96
+ }, [
97
+ createElementVNode("div", _hoisted_10, toDisplayString(sku.catName), 1)
98
+ ]);
99
+ }), 128))
100
+ ])) : createCommentVNode("", true)
101
+ ]);
102
+ }), 128))
103
+ ])) : createCommentVNode("", true),
104
+ _ctx.type == "custom" ? (openBlock(), createElementBlock("div", _hoisted_11, [
105
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.customCategory, (sku, key) => {
106
+ return openBlock(), createElementBlock("div", {
107
+ class: "nut-categorypane__skuName",
108
+ key,
109
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.onChange())
110
+ }, toDisplayString(sku.catName), 1);
111
+ }), 128))
112
+ ])) : createCommentVNode("", true)
113
+ ]);
114
+ }
115
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
116
+ export { index as default };
@@ -1,26 +1,113 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { resolveComponent as e, openBlock as t, createElementBlock as l, normalizeClass as i, normalizeStyle as s, renderSlot as n, createBlock as c, createCommentVNode as o, Fragment as a, createElementVNode as r, toDisplayString as u, createTextVNode as p, computed as d } from "vue";
7
- import { c as y } from "./component.js";
8
- import { u as f } from "./index.js";
9
- import { p as k } from "./pxCheck.js";
10
- import { _ as m } from "./plugin-vue_export-helper.js";
6
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, computed } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { u as useRouter } from "./index.js";
9
+ import { p as pxCheck } from "./pxCheck.js";
10
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
11
11
  import "../locale/lang";
12
- const g = { key: 0, class: "nut-cell__icon" }, _ = { key: 1, class: "nut-cell__title" }, b = { class: "title" }, v = { class: "nut-cell__title-desc" };
13
- const { componentName: S, create: $ } = y("cell");
14
- var h = m($({ props: { title: { type: String, default: "" }, subTitle: { type: String, default: "" }, desc: { type: String, default: "" }, descTextAlign: { type: String, default: "right" }, isLink: { type: Boolean, default: false }, to: [String, Object], replace: { type: Boolean, default: false }, roundRadius: { type: [String, Number], default: "" }, url: { type: String, default: "" }, icon: { type: String, default: "" }, center: { type: Boolean, default: false }, size: { type: String, default: "" } }, emits: ["click"], setup(e2, { emit: t2 }) {
15
- const l2 = d(() => {
16
- const t3 = S;
17
- return { [t3]: true, [`${t3}--clickable`]: e2.isLink || e2.to, [`${t3}--center`]: e2.center, [`${t3}--large`]: e2.size == "large" };
18
- }), i2 = f();
19
- return { handleClick: (l3) => {
20
- t2("click", l3), e2.to && i2 ? i2[e2.replace ? "replace" : "push"](e2.to) : e2.url && (e2.replace ? location.replace(e2.url) : location.href = e2.url);
21
- }, classes: l2, baseStyle: d(() => ({ borderRadius: k(e2.roundRadius) })) };
22
- } }), [["render", function(d2, y2, f2, k2, m2, S2) {
23
- const $2 = e("nut-icon");
24
- return t(), l("view", { class: i(d2.classes), style: s(d2.baseStyle), onClick: y2[0] || (y2[0] = (...e2) => d2.handleClick && d2.handleClick(...e2)) }, [n(d2.$slots, "default", {}, () => [d2.icon || d2.$slots.icon ? (t(), l("view", g, [n(d2.$slots, "icon", {}, () => [d2.icon ? (t(), c($2, { key: 0, class: "icon", name: d2.icon }, null, 8, ["name"])) : o("", true)])])) : o("", true), d2.title || d2.subTitle || d2.$slots.title ? (t(), l("view", _, [d2.subTitle ? (t(), l(a, { key: 0 }, [n(d2.$slots, "title", {}, () => [r("view", b, u(d2.title), 1)]), r("view", v, u(d2.subTitle), 1)], 64)) : n(d2.$slots, "title", { key: 1 }, () => [p(u(d2.title), 1)])])) : o("", true), d2.desc ? (t(), l("view", { key: 2, class: i(["nut-cell__value", { "nut-cell__value--alone": !d2.title && !d2.subTitle && !d2.$slots.title }]), style: s({ "text-align": d2.descTextAlign }) }, u(d2.desc), 7)) : o("", true), n(d2.$slots, "link", {}, () => [d2.isLink || d2.to ? (t(), c($2, { key: 0, class: "nut-cell__link", name: "right" })) : o("", true)])])], 6);
25
- }]]);
26
- export { h as default };
12
+ const _hoisted_1 = {
13
+ key: 0,
14
+ class: "nut-cell__icon"
15
+ };
16
+ const _hoisted_2 = {
17
+ key: 1,
18
+ class: "nut-cell__title"
19
+ };
20
+ const _hoisted_3 = { class: "title" };
21
+ const _hoisted_4 = { class: "nut-cell__title-desc" };
22
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
23
+ const _component_nut_icon = resolveComponent("nut-icon");
24
+ return openBlock(), createElementBlock("view", {
25
+ class: normalizeClass(_ctx.classes),
26
+ style: normalizeStyle(_ctx.baseStyle),
27
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
28
+ }, [
29
+ renderSlot(_ctx.$slots, "default", {}, () => [
30
+ _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
31
+ renderSlot(_ctx.$slots, "icon", {}, () => [
32
+ _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
33
+ key: 0,
34
+ class: "icon",
35
+ name: _ctx.icon
36
+ }, null, 8, ["name"])) : createCommentVNode("", true)
37
+ ])
38
+ ])) : createCommentVNode("", true),
39
+ _ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
40
+ _ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
41
+ renderSlot(_ctx.$slots, "title", {}, () => [
42
+ createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
43
+ ]),
44
+ createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
45
+ ], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
46
+ createTextVNode(toDisplayString(_ctx.title), 1)
47
+ ])
48
+ ])) : createCommentVNode("", true),
49
+ _ctx.desc ? (openBlock(), createElementBlock("view", {
50
+ key: 2,
51
+ class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
52
+ style: normalizeStyle({ "text-align": _ctx.descTextAlign })
53
+ }, toDisplayString(_ctx.desc), 7)) : createCommentVNode("", true),
54
+ renderSlot(_ctx.$slots, "link", {}, () => [
55
+ _ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_nut_icon, {
56
+ key: 0,
57
+ class: "nut-cell__link",
58
+ name: "right"
59
+ })) : createCommentVNode("", true)
60
+ ])
61
+ ])
62
+ ], 6);
63
+ }
64
+ const { componentName, create } = createComponent("cell");
65
+ const _sfc_main = create({
66
+ props: {
67
+ title: { type: String, default: "" },
68
+ subTitle: { type: String, default: "" },
69
+ desc: { type: String, default: "" },
70
+ descTextAlign: { type: String, default: "right" },
71
+ isLink: { type: Boolean, default: false },
72
+ to: [String, Object],
73
+ replace: { type: Boolean, default: false },
74
+ roundRadius: { type: [String, Number], default: "" },
75
+ url: { type: String, default: "" },
76
+ icon: { type: String, default: "" },
77
+ center: { type: Boolean, default: false },
78
+ size: { type: String, default: "" }
79
+ },
80
+ emits: ["click"],
81
+ setup(props, { emit }) {
82
+ const classes = computed(() => {
83
+ const prefixCls = componentName;
84
+ return {
85
+ [prefixCls]: true,
86
+ [`${prefixCls}--clickable`]: props.isLink || props.to,
87
+ [`${prefixCls}--center`]: props.center,
88
+ [`${prefixCls}--large`]: props.size == "large"
89
+ };
90
+ });
91
+ const router = useRouter();
92
+ const baseStyle = computed(() => {
93
+ return {
94
+ borderRadius: pxCheck(props.roundRadius)
95
+ };
96
+ });
97
+ const handleClick = (event) => {
98
+ emit("click", event);
99
+ if (props.to && router) {
100
+ router[props.replace ? "replace" : "push"](props.to);
101
+ } else if (props.url) {
102
+ props.replace ? location.replace(props.url) : location.href = props.url;
103
+ }
104
+ };
105
+ return {
106
+ handleClick,
107
+ classes,
108
+ baseStyle
109
+ };
110
+ }
111
+ });
112
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
113
+ export { index as default };
@@ -1,14 +1,49 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed as e, openBlock as t, createElementBlock as s, normalizeClass as l, renderSlot as o, toDisplayString as r, createCommentVNode as c, createElementVNode as p } from "vue";
7
- import { c as a } from "./component.js";
8
- import { _ as i } from "./plugin-vue_export-helper.js";
6
+ import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName: u, create: n } = a("cell-group"), d = n({ props: { title: { type: String, default: "" }, desc: { type: String, default: "" } }, setup: () => ({ classes: e(() => ({ [u]: true })) }) }), m = { key: 1, class: "nut-cell-group__title" }, f = { key: 3, class: "nut-cell-group__desc" }, g = { class: "nut-cell-group__warp" };
11
- var _ = i(d, [["render", function(e2, a2, i2, u2, n2, d2) {
12
- return t(), s("view", { class: l(e2.classes) }, [e2.$slots.title ? o(e2.$slots, "title", { key: 0 }) : e2.title ? (t(), s("view", m, r(e2.title), 1)) : c("", true), e2.$slots.desc ? o(e2.$slots, "desc", { key: 2 }) : e2.desc ? (t(), s("view", f, r(e2.desc), 1)) : c("", true), p("view", g, [o(e2.$slots, "default")])], 2);
13
- }]]);
14
- export { _ as default };
10
+ const { componentName, create } = createComponent("cell-group");
11
+ const _sfc_main = create({
12
+ props: {
13
+ title: { type: String, default: "" },
14
+ desc: { type: String, default: "" }
15
+ },
16
+ setup() {
17
+ const classes = computed(() => {
18
+ const prefixCls = componentName;
19
+ return {
20
+ [prefixCls]: true
21
+ };
22
+ });
23
+ return {
24
+ classes
25
+ };
26
+ }
27
+ });
28
+ const _hoisted_1 = {
29
+ key: 1,
30
+ class: "nut-cell-group__title"
31
+ };
32
+ const _hoisted_2 = {
33
+ key: 3,
34
+ class: "nut-cell-group__desc"
35
+ };
36
+ const _hoisted_3 = { class: "nut-cell-group__warp" };
37
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
38
+ return openBlock(), createElementBlock("view", {
39
+ class: normalizeClass(_ctx.classes)
40
+ }, [
41
+ _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
42
+ _ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
43
+ createElementVNode("view", _hoisted_3, [
44
+ renderSlot(_ctx.$slots, "default")
45
+ ])
46
+ ], 2);
47
+ }
48
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
49
+ export { index as default };
@@ -1,38 +1,143 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { c as e } from "./component.js";
7
- import { inject as a, reactive as t, computed as l, onMounted as n, getCurrentInstance as i, watch as o, h as c } from "vue";
8
- import u from "./Icon.js";
6
+ import { c as createComponent } from "./component.js";
7
+ import { inject, reactive, computed, onMounted, getCurrentInstance, watch, h } from "vue";
8
+ import _sfc_main$1 from "./Icon.js";
9
9
  import "../locale/lang";
10
10
  import "./pxCheck.js";
11
- const { create: d, componentName: r } = e("checkbox"), s = d(((e2, u2) => ({ components: { nutIcon: u2 }, props: { modelValue: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, textPosition: { type: String, default: "right" }, iconSize: { type: [String, Number], default: "" }, iconName: { type: String, default: "check-normal" }, iconActiveName: { type: String, default: "checked" }, iconIndeterminateName: { type: String, default: "check-disabled" }, label: { type: String, default: "" }, iconClassPrefix: { type: String, default: "nut-icon" }, iconFontClassName: { type: String, default: "nutui-iconfont" }, indeterminate: { type: Boolean, default: false } }, emits: ["change", "update:modelValue"], setup(d2, { emit: r2, slots: s2 }) {
12
- const m = a("parent", null), p = t({ partialSelect: d2.indeterminate }), f = l(() => !!m), v = l(() => f.value ? m.value.value.includes(d2.label) : d2.modelValue), b = l(() => f.value && m.disabled.value ? m.disabled.value : d2.disabled), h = l(() => !!d2.modelValue), S = l(() => b.value ? "nut-checkbox__icon--disable" : v.value ? p.partialSelect ? "nut-checkbox__icon--indeterminate" : "nut-checkbox__icon" : "nut-checkbox__icon--unchecked"), x = (e3, a2) => {
13
- r2("update:modelValue", e3), r2("change", e3, a2);
14
- }, g = () => {
15
- const { iconName: e3, iconSize: a2, iconActiveName: t2, iconClassPrefix: l2, iconFontClassName: n2, iconIndeterminateName: i2 } = d2;
16
- return c(u2, { name: v.value ? p.partialSelect ? i2 : t2 : e3, size: a2, class: S.value, classPrefix: l2, fontClassName: n2 });
17
- }, _ = (e3) => {
18
- var _a, _b;
19
- if (!b.value) {
20
- if (h.value && p.partialSelect)
21
- return p.partialSelect = false, void x(h.value, (_a = s2.default) == null ? void 0 : _a.call(s2)[0].children);
22
- if (x(!h.value, (_b = s2.default) == null ? void 0 : _b.call(s2)[0].children), f.value) {
23
- let e4 = m.value.value, a2 = m.max.value, { label: t2 } = d2;
24
- const l2 = e4.indexOf(t2);
25
- l2 > -1 ? e4.splice(l2, 1) : l2 <= -1 && (e4.length < a2 || !a2) && e4.push(t2), m.updateValue(e4);
11
+ const component = (componentName2, nutIcon) => {
12
+ return {
13
+ components: {
14
+ nutIcon
15
+ },
16
+ props: {
17
+ modelValue: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ disabled: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ textPosition: {
26
+ type: String,
27
+ default: "right"
28
+ },
29
+ iconSize: {
30
+ type: [String, Number],
31
+ default: ""
32
+ },
33
+ iconName: {
34
+ type: String,
35
+ default: "check-normal"
36
+ },
37
+ iconActiveName: {
38
+ type: String,
39
+ default: "checked"
40
+ },
41
+ iconIndeterminateName: {
42
+ type: String,
43
+ default: "check-disabled"
44
+ },
45
+ label: {
46
+ type: String,
47
+ default: ""
48
+ },
49
+ iconClassPrefix: {
50
+ type: String,
51
+ default: "nut-icon"
52
+ },
53
+ iconFontClassName: {
54
+ type: String,
55
+ default: "nutui-iconfont"
56
+ },
57
+ indeterminate: {
58
+ type: Boolean,
59
+ default: false
26
60
  }
61
+ },
62
+ emits: ["change", "update:modelValue"],
63
+ setup(props, { emit, slots }) {
64
+ const parent = inject("parent", null);
65
+ const state = reactive({
66
+ partialSelect: props.indeterminate
67
+ });
68
+ const hasParent = computed(() => !!parent);
69
+ const pValue = computed(() => {
70
+ if (hasParent.value) {
71
+ return parent.value.value.includes(props.label);
72
+ } else {
73
+ return props.modelValue;
74
+ }
75
+ });
76
+ const pDisabled = computed(() => {
77
+ return hasParent.value ? parent.disabled.value ? parent.disabled.value : props.disabled : props.disabled;
78
+ });
79
+ const checked = computed(() => !!props.modelValue);
80
+ const color = computed(() => {
81
+ return !pDisabled.value ? !pValue.value ? "nut-checkbox__icon--unchecked" : state.partialSelect ? "nut-checkbox__icon--indeterminate" : "nut-checkbox__icon" : "nut-checkbox__icon--disable";
82
+ });
83
+ const emitChange = (value, label) => {
84
+ emit("update:modelValue", value);
85
+ emit("change", value, label);
86
+ };
87
+ const renderIcon = () => {
88
+ const { iconName, iconSize, iconActiveName, iconClassPrefix, iconFontClassName, iconIndeterminateName } = props;
89
+ return h(nutIcon, {
90
+ name: !pValue.value ? iconName : state.partialSelect ? iconIndeterminateName : iconActiveName,
91
+ size: iconSize,
92
+ class: color.value,
93
+ classPrefix: iconClassPrefix,
94
+ fontClassName: iconFontClassName
95
+ });
96
+ };
97
+ const renderLabel = () => {
98
+ var _a;
99
+ return h("view", {
100
+ class: `${componentName2}__label ${pDisabled.value ? `${componentName2}__label--disabled` : ""}`
101
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
102
+ };
103
+ const handleClick = (e) => {
104
+ var _a, _b;
105
+ if (pDisabled.value)
106
+ return;
107
+ if (checked.value && state.partialSelect) {
108
+ state.partialSelect = false;
109
+ emitChange(checked.value, (_a = slots.default) == null ? void 0 : _a.call(slots)[0].children);
110
+ return;
111
+ }
112
+ emitChange(!checked.value, (_b = slots.default) == null ? void 0 : _b.call(slots)[0].children);
113
+ if (hasParent.value) {
114
+ let value = parent.value.value;
115
+ let max = parent.max.value;
116
+ let { label } = props;
117
+ const index = value.indexOf(label);
118
+ if (index > -1) {
119
+ value.splice(index, 1);
120
+ } else if (index <= -1 && (value.length < max || !max)) {
121
+ value.push(label);
122
+ }
123
+ parent.updateValue(value);
124
+ }
125
+ };
126
+ onMounted(() => {
127
+ hasParent.value && parent["relation"](getCurrentInstance());
128
+ });
129
+ watch(() => props.indeterminate, (newVal) => {
130
+ state.partialSelect = newVal;
131
+ });
132
+ return () => {
133
+ return h("view", {
134
+ class: `${componentName2} ${props.textPosition === "left" ? `${componentName2}--reverse` : ""}`,
135
+ onClick: handleClick
136
+ }, [renderIcon(), renderLabel()]);
137
+ };
27
138
  }
28
139
  };
29
- return n(() => {
30
- f.value && m.relation(i());
31
- }), o(() => d2.indeterminate, (e3) => {
32
- p.partialSelect = e3;
33
- }), () => {
34
- var _a;
35
- return c("view", { class: `${e2} ${d2.textPosition === "left" ? `${e2}--reverse` : ""}`, onClick: _ }, [g(), c("view", { class: `${e2}__label ${b.value ? `${e2}__label--disabled` : ""}` }, (_a = s2.default) == null ? void 0 : _a.call(s2))]);
36
- };
37
- } }))(r, u));
38
- export { s as default };
140
+ };
141
+ const { create, componentName } = createComponent("checkbox");
142
+ const _sfc_main = create(component(componentName, _sfc_main$1));
143
+ export { _sfc_main as default };