@nutui/nutui 3.1.21 → 3.1.22-beta.5

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 (233) hide show
  1. package/dist/nutui.es.js +4203 -19263
  2. package/dist/nutui.umd.js +4208 -19368
  3. package/dist/packages/_es/ActionSheet.js +17 -167
  4. package/dist/packages/_es/Address.js +110 -552
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +53 -274
  8. package/dist/packages/_es/AudioOperate.js +13 -121
  9. package/dist/packages/_es/Avatar.js +38 -177
  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 -120
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +30 -237
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +147 -523
  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 -100
  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 +32 -84
  28. package/dist/packages/_es/CollapseItem.js +59 -272
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +56 -256
  32. package/dist/packages/_es/CountUp.js +140 -556
  33. package/dist/packages/_es/DatePicker.js +98 -332
  34. package/dist/packages/_es/Dialog.js +60 -271
  35. package/dist/packages/_es/Divider.js +13 -82
  36. package/dist/packages/_es/Drag.js +56 -197
  37. package/dist/packages/_es/Ecard.js +24 -159
  38. package/dist/packages/_es/Elevator.js +58 -212
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +12 -71
  41. package/dist/packages/_es/FixedNav.js +15 -122
  42. package/dist/packages/_es/Form.js +64 -151
  43. package/dist/packages/_es/FormItem.js +15 -110
  44. package/dist/packages/_es/Grid.js +5 -6
  45. package/dist/packages/_es/GridItem.js +33 -144
  46. package/dist/packages/_es/Icon.js +15 -40
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +77 -309
  49. package/dist/packages/_es/Indicator.js +15 -62
  50. package/dist/packages/_es/InfiniteLoading.js +57 -268
  51. package/dist/packages/_es/Input.js +51 -413
  52. package/dist/packages/_es/InputNumber.js +41 -160
  53. package/dist/packages/_es/Layout.js +4 -5
  54. package/dist/packages/_es/List.js +18 -124
  55. package/dist/packages/_es/Menu.js +45 -118
  56. package/dist/packages/_es/MenuItem.js +37 -162
  57. package/dist/packages/_es/Navbar.js +30 -192
  58. package/dist/packages/_es/NoticeBar.js +74 -397
  59. package/dist/packages/_es/Notify.js +72 -246
  60. package/dist/packages/_es/NumberKeyboard.js +41 -272
  61. package/dist/packages/_es/OldPicker.js +131 -474
  62. package/dist/packages/_es/OverLay.js +24 -113
  63. package/dist/packages/_es/Pagination.js +39 -157
  64. package/dist/packages/_es/Picker.js +129 -469
  65. package/dist/packages/_es/Popover.js +318 -975
  66. package/dist/packages/_es/Popup.js +55 -313
  67. package/dist/packages/_es/Price.js +16 -118
  68. package/dist/packages/_es/Progress.js +14 -146
  69. package/dist/packages/_es/PullRefresh.js +84 -354
  70. package/dist/packages/_es/Radio.js +22 -90
  71. package/dist/packages/_es/RadioGroup.js +8 -37
  72. package/dist/packages/_es/Range.js +83 -427
  73. package/dist/packages/_es/Rate.js +35 -137
  74. package/dist/packages/_es/Row.js +22 -64
  75. package/dist/packages/_es/SearchBar.js +37 -257
  76. package/dist/packages/_es/ShortPassword.js +35 -225
  77. package/dist/packages/_es/SideNavBar.js +24 -99
  78. package/dist/packages/_es/SideNavBarItem.js +11 -46
  79. package/dist/packages/_es/Signature.js +41 -179
  80. package/dist/packages/_es/Skeleton.js +20 -136
  81. package/dist/packages/_es/Sku.js +84 -509
  82. package/dist/packages/_es/Step.js +20 -133
  83. package/dist/packages/_es/Steps.js +18 -53
  84. package/dist/packages/_es/Sticky.js +53 -138
  85. package/dist/packages/_es/SubSideNavBar.js +17 -100
  86. package/dist/packages/_es/Swipe.js +41 -197
  87. package/dist/packages/_es/Swiper.js +121 -433
  88. package/dist/packages/_es/SwiperItem.js +22 -53
  89. package/dist/packages/_es/Switch.js +21 -116
  90. package/dist/packages/_es/TabPane.js +12 -39
  91. package/dist/packages/_es/Tabbar.js +17 -72
  92. package/dist/packages/_es/TabbarItem.js +29 -151
  93. package/dist/packages/_es/Table.js +18 -196
  94. package/dist/packages/_es/Tabs.js +43 -217
  95. package/dist/packages/_es/Tag.js +20 -97
  96. package/dist/packages/_es/TextArea.js +42 -160
  97. package/dist/packages/_es/TimeDetail.js +18 -98
  98. package/dist/packages/_es/TimePannel.js +14 -66
  99. package/dist/packages/_es/TimeSelect.js +15 -103
  100. package/dist/packages/_es/Toast.js +71 -329
  101. package/dist/packages/_es/Uploader.js +104 -468
  102. package/dist/packages/_es/Video.js +74 -350
  103. package/dist/packages/_es/common.js +38 -128
  104. package/dist/packages/_es/component.js +35 -76
  105. package/dist/packages/_es/index.js +5 -6
  106. package/dist/packages/_es/index2.js +9 -30
  107. package/dist/packages/_es/index3.js +6 -8
  108. package/dist/packages/_es/index4.js +13 -58
  109. package/dist/packages/_es/index5.js +164 -682
  110. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  111. package/dist/packages/_es/pxCheck.js +3 -5
  112. package/dist/packages/_es/raf.js +8 -15
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/button/index.scss +2 -1
  115. package/dist/packages/cell/index.scss +18 -1
  116. package/dist/packages/checkbox/index.scss +16 -0
  117. package/dist/packages/configprovider/index.scss +2 -0
  118. package/dist/packages/dialog/index.scss +1 -0
  119. package/dist/packages/elevator/index.scss +21 -0
  120. package/dist/packages/ellipsis/index.scss +12 -0
  121. package/dist/packages/formitem/index.scss +12 -0
  122. package/dist/packages/griditem/index.scss +11 -0
  123. package/dist/packages/image/index.scss +39 -0
  124. package/dist/packages/imagepreview/index.scss +21 -2
  125. package/dist/packages/input/index.scss +26 -1
  126. package/dist/packages/inputnumber/index.scss +21 -0
  127. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  128. package/dist/packages/locale/lang/baseLang.js +3 -3
  129. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  130. package/dist/packages/locale/lang/en-US.js +5 -97
  131. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  132. package/dist/packages/locale/lang/id-ID.js +5 -97
  133. package/dist/packages/locale/lang/index.js +16 -38
  134. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  135. package/dist/packages/locale/lang/zh-CN.js +5 -97
  136. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-TW.js +5 -97
  138. package/dist/packages/menu/index.scss +45 -36
  139. package/dist/packages/menuitem/index.scss +4 -0
  140. package/dist/packages/navbar/index.scss +9 -0
  141. package/dist/packages/pagination/index.scss +19 -0
  142. package/dist/packages/radio/index.scss +19 -0
  143. package/dist/packages/range/index.scss +19 -0
  144. package/dist/packages/rate/index.scss +1 -1
  145. package/dist/packages/searchbar/index.scss +21 -0
  146. package/dist/packages/switch/index.scss +4 -3
  147. package/dist/packages/tabbar/index.scss +5 -0
  148. package/dist/packages/tabbaritem/index.scss +7 -0
  149. package/dist/packages/tabpane/index.scss +6 -0
  150. package/dist/packages/tabs/index.scss +22 -0
  151. package/dist/packages/textarea/index.scss +8 -0
  152. package/dist/smartips/attributes.json +192 -12
  153. package/dist/smartips/tags.json +70 -10
  154. package/dist/smartips/web-types.json +6945 -0
  155. package/dist/style.css +1 -1
  156. package/dist/style.es.js +1 -1
  157. package/dist/styles/font/config.json +3 -1
  158. package/dist/styles/font/demo_index.html +49 -3
  159. package/dist/styles/font/iconfont.css +11 -3
  160. package/dist/styles/font/iconfont.js +15 -15
  161. package/dist/styles/font/iconfont.json +14 -0
  162. package/dist/styles/font/iconfont.ttf +0 -0
  163. package/dist/styles/font/iconfont.woff +0 -0
  164. package/dist/styles/font/iconfont.woff2 +0 -0
  165. package/dist/styles/themes/default.scss +54 -50
  166. package/dist/styles/themes/jdb.scss +54 -50
  167. package/dist/styles/themes/jdt.scss +54 -50
  168. package/dist/styles/variables-jdb.scss +19 -1
  169. package/dist/styles/variables-jdt.scss +19 -1
  170. package/dist/styles/variables.scss +22 -1
  171. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  173. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  174. package/dist/types/__VUE/animate/type.d.ts +6 -0
  175. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  176. package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
  177. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  181. package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
  182. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  183. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  184. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  185. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  186. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  187. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  189. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  190. package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
  194. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  195. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  196. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  197. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  199. package/dist/types/__VUE/grid/common.d.ts +3 -3
  200. package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
  201. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  202. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  203. package/dist/types/__VUE/image/type.d.ts +6 -0
  204. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  205. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  206. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  207. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  208. package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
  209. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  210. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  211. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  212. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  213. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  215. package/dist/types/__VUE/rate/common.d.ts +149 -0
  216. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  217. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  218. package/dist/types/__VUE/skeleton/common.d.ts +2 -4
  219. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  220. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  222. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  223. package/dist/types/__VUE/tabs/common.d.ts +2 -2
  224. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
  226. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  227. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  229. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  230. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +5 -1
  233. package/package.json +7 -3
@@ -1,63 +1,20 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
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";
9
9
  import "../locale/lang";
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 };
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 };
@@ -1,116 +1,16 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
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";
9
9
  import "../locale/lang";
10
- var index_vue_vue_type_style_index_0_lang = "";
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 };
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 };
@@ -1,105 +1,26 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode } 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";
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";
11
11
  import "../locale/lang";
12
- const { componentName, create } = createComponent("cell");
13
- const _sfc_main = create({
14
- props: {
15
- title: { type: String, default: "" },
16
- subTitle: { type: String, default: "" },
17
- desc: { type: String, default: "" },
18
- descTextAlign: { type: String, default: "right" },
19
- isLink: { type: Boolean, default: false },
20
- to: [String, Object],
21
- replace: { type: Boolean, default: false },
22
- roundRadius: { type: [String, Number], default: "" },
23
- url: { type: String, default: "" },
24
- icon: { type: String, default: "" },
25
- center: { type: Boolean, default: false }
26
- },
27
- emits: ["click"],
28
- setup(props, { emit }) {
29
- const classes = computed(() => {
30
- const prefixCls = componentName;
31
- return {
32
- [prefixCls]: true,
33
- [`${prefixCls}--clickable`]: props.isLink || props.to,
34
- [`${prefixCls}--center`]: props.center
35
- };
36
- });
37
- const router = useRouter();
38
- const baseStyle = computed(() => {
39
- return {
40
- borderRadius: pxCheck(props.roundRadius)
41
- };
42
- });
43
- const handleClick = (event) => {
44
- emit("click", event);
45
- if (props.to && router) {
46
- router[props.replace ? "replace" : "push"](props.to);
47
- } else if (props.url) {
48
- props.replace ? location.replace(props.url) : location.href = props.url;
49
- }
50
- };
51
- return {
52
- handleClick,
53
- classes,
54
- baseStyle
55
- };
56
- }
57
- });
58
- const _hoisted_1 = {
59
- key: 0,
60
- class: "nut-cell__icon"
61
- };
62
- const _hoisted_2 = {
63
- key: 1,
64
- class: "nut-cell__title"
65
- };
66
- const _hoisted_3 = { class: "title" };
67
- const _hoisted_4 = { class: "nut-cell__title-desc" };
68
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
69
- const _component_nut_icon = resolveComponent("nut-icon");
70
- return openBlock(), createElementBlock("view", {
71
- class: normalizeClass(_ctx.classes),
72
- style: normalizeStyle(_ctx.baseStyle),
73
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
74
- }, [
75
- renderSlot(_ctx.$slots, "default", {}, () => [
76
- _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
77
- _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
78
- key: 1,
79
- class: "icon",
80
- name: _ctx.icon
81
- }, null, 8, ["name"])) : createCommentVNode("", true)
82
- ])) : createCommentVNode("", true),
83
- _ctx.title || _ctx.subTitle ? (openBlock(), createElementBlock("view", _hoisted_2, [
84
- _ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
85
- createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1),
86
- createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
87
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
88
- createTextVNode(toDisplayString(_ctx.title), 1)
89
- ], 64))
90
- ])) : createCommentVNode("", true),
91
- _ctx.desc ? (openBlock(), createElementBlock("view", {
92
- key: 2,
93
- class: "nut-cell__value",
94
- style: normalizeStyle({ "text-align": _ctx.descTextAlign })
95
- }, toDisplayString(_ctx.desc), 5)) : createCommentVNode("", true),
96
- _ctx.$slots.link ? renderSlot(_ctx.$slots, "link", { key: 3 }) : _ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_nut_icon, {
97
- key: 4,
98
- class: "nut-cell__link",
99
- name: "right"
100
- })) : createCommentVNode("", true)
101
- ])
102
- ], 6);
103
- }
104
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
105
- export { index as default };
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 };
@@ -1,49 +1,14 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
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";
9
9
  import "../locale/lang";
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 };
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 };
@@ -1,120 +1,38 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { inject, computed, onMounted, getCurrentInstance, h } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import _sfc_main$1 from "./Icon.js";
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";
9
9
  import "../locale/lang";
10
10
  import "./pxCheck.js";
11
- const { create, componentName } = createComponent("checkbox");
12
- const _sfc_main = create({
13
- components: {
14
- nutIcon: _sfc_main$1
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
- label: {
42
- type: String,
43
- default: ""
44
- },
45
- iconClassPrefix: {
46
- type: String,
47
- default: "nut-icon"
48
- },
49
- iconFontClassName: {
50
- type: String,
51
- default: "nutui-iconfont"
52
- }
53
- },
54
- emits: ["change", "update:modelValue"],
55
- setup(props, { emit, slots }) {
56
- const parent = inject("parent", null);
57
- const hasParent = computed(() => !!parent);
58
- const pValue = computed(() => {
59
- if (hasParent.value) {
60
- return parent.value.value.includes(props.label);
61
- } else {
62
- return props.modelValue;
63
- }
64
- });
65
- const pDisabled = computed(() => {
66
- return hasParent.value ? parent.disabled.value : props.disabled;
67
- });
68
- const checked = computed(() => !!props.modelValue);
69
- const color = computed(() => {
70
- return !pDisabled.value ? !pValue.value ? "nut-checkbox__icon--unchecked" : "nut-checkbox__icon" : "nut-checkbox__icon--disable";
71
- });
72
- const emitChange = (value, label) => {
73
- emit("update:modelValue", value);
74
- emit("change", value, label);
75
- };
76
- const renderIcon = () => {
77
- const { iconName, iconSize, iconActiveName, iconClassPrefix, iconFontClassName } = props;
78
- return h(_sfc_main$1, {
79
- name: !pValue.value ? iconName : iconActiveName,
80
- size: iconSize,
81
- class: color.value,
82
- classPrefix: iconClassPrefix,
83
- fontClassName: iconFontClassName
84
- });
85
- };
86
- const renderLabel = () => {
87
- var _a;
88
- return h("view", {
89
- class: `${componentName}__label ${pDisabled.value ? `${componentName}__label--disabled` : ""}`
90
- }, (_a = slots.default) == null ? void 0 : _a.call(slots));
91
- };
92
- const handleClick = (e) => {
93
- var _a;
94
- if (pDisabled.value)
95
- return;
96
- emitChange(!checked.value, (_a = slots.default) == null ? void 0 : _a.call(slots)[0].children);
97
- if (hasParent.value) {
98
- let value = parent.value.value;
99
- let { label } = props;
100
- const index = value.indexOf(label);
101
- if (index > -1) {
102
- value.splice(index, 1);
103
- } else {
104
- value.push(label);
105
- }
106
- parent.updateValue(value);
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);
107
26
  }
108
- };
109
- onMounted(() => {
110
- hasParent.value && parent["relation"](getCurrentInstance());
111
- });
112
- return () => {
113
- return h("view", {
114
- class: `${componentName} ${props.textPosition === "left" ? `${componentName}--reverse` : ""}`,
115
- onClick: handleClick
116
- }, [renderIcon(), renderLabel()]);
117
- };
118
- }
119
- });
120
- export { _sfc_main as default };
27
+ }
28
+ };
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 };
@@ -1,63 +1,34 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive, provide, computed, watch, h } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { u as useExpose } from "./index3.js";
6
+ import { reactive as e, provide as l, computed as a, watch as o, h as d } from "vue";
7
+ import { c as t } from "./component.js";
8
+ import { u } from "./index3.js";
9
9
  import "../locale/lang";
10
- const { create, componentName } = createComponent("checkboxgroup");
11
- const _sfc_main = create({
12
- props: {
13
- modelValue: {
14
- type: Array,
15
- default: () => []
16
- },
17
- disabled: {
18
- type: Boolean,
19
- default: false
20
- }
21
- },
22
- emits: ["change", "update:modelValue"],
23
- setup(props, { slots, emit }) {
24
- const state = reactive({
25
- children: []
26
- });
27
- const relation = (child) => {
28
- if (child.proxy) {
29
- state.children.push(child.proxy);
30
- }
31
- };
32
- const updateValue = (value) => {
33
- emit("update:modelValue", value);
34
- emit("change", value);
35
- };
36
- const toggleAll = (checked) => {
37
- let values = [];
38
- if (!!checked) {
39
- state.children.forEach((item) => {
40
- values.push(item == null ? void 0 : item.label);
41
- });
42
- }
43
- emit("update:modelValue", values);
44
- };
45
- provide("parent", {
46
- value: computed(() => props.modelValue),
47
- disabled: computed(() => props.disabled),
48
- updateValue,
49
- relation
50
- });
51
- watch(() => props.modelValue, (value) => {
52
- emit("change", value);
53
- });
54
- useExpose({ toggleAll });
55
- return () => {
56
- var _a;
57
- return h("view", {
58
- class: `${componentName}`
59
- }, (_a = slots.default) == null ? void 0 : _a.call(slots));
60
- };
61
- }
62
- });
63
- export { _sfc_main as default };
10
+ const { create: r, componentName: p } = t("checkboxgroup"), s = r({ props: { modelValue: { type: Array, default: () => [] }, disabled: { type: Boolean, default: false }, max: { type: Number, default: 0 } }, emits: ["change", "update:modelValue"], setup(t2, { slots: r2, emit: s2 }) {
11
+ const m = e({ children: [] });
12
+ return l("parent", { value: a(() => t2.modelValue), disabled: a(() => t2.disabled), max: a(() => t2.max), updateValue: (e2) => {
13
+ s2("update:modelValue", e2), s2("change", e2);
14
+ }, relation: (e2) => {
15
+ e2.proxy && m.children.push(e2.proxy);
16
+ } }), o(() => t2.modelValue, (e2) => {
17
+ s2("change", e2);
18
+ }), u({ toggleAll: (e2) => {
19
+ let l2 = [];
20
+ e2 && m.children.forEach((e3) => {
21
+ (e3 == null ? void 0 : e3.disabled) || l2.push(e3 == null ? void 0 : e3.label);
22
+ }), s2("update:modelValue", l2);
23
+ }, toggleReverse: () => {
24
+ let e2 = t2.modelValue.slice();
25
+ m.children.forEach((l2) => {
26
+ let a2 = e2.findIndex((e3) => e3 === l2.label);
27
+ a2 > -1 ? e2.splice(a2, 1) : (l2 == null ? void 0 : l2.disabled) || e2.push(l2 == null ? void 0 : l2.label);
28
+ }), s2("update:modelValue", e2);
29
+ } }), () => {
30
+ var _a;
31
+ return d("view", { class: `${p}` }, (_a = r2.default) == null ? void 0 : _a.call(r2));
32
+ };
33
+ } });
34
+ export { s as default };