@nutui/nutui 3.1.19-beta.1 → 3.1.19-beta.4

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 (236) hide show
  1. package/README.md +9 -8
  2. package/dist/nutui.es.js +3044 -3533
  3. package/dist/nutui.umd.js +3135 -3536
  4. package/dist/packages/_es/ActionSheet.js +64 -42
  5. package/dist/packages/_es/Address.js +69 -78
  6. package/dist/packages/_es/Audio.js +12 -12
  7. package/dist/packages/_es/AudioOperate.js +1 -1
  8. package/dist/packages/_es/Avatar.js +3 -3
  9. package/dist/packages/_es/BackTop.js +110 -68
  10. package/dist/packages/_es/Badge.js +3 -3
  11. package/dist/packages/_es/Barrage.js +55 -62
  12. package/dist/packages/_es/Button.js +2 -2
  13. package/dist/packages/_es/Calendar.js +27 -32
  14. package/dist/packages/_es/CalendarItem.js +3 -3
  15. package/dist/packages/_es/Card.js +5 -6
  16. package/dist/packages/_es/Cascader.js +9 -9
  17. package/dist/packages/_es/Cell.js +11 -4
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +13 -3
  20. package/dist/packages/_es/CheckboxGroup.js +2 -2
  21. package/dist/packages/_es/CircleProgress.js +40 -149
  22. package/dist/packages/_es/Col.js +1 -1
  23. package/dist/packages/_es/Collapse.js +8 -34
  24. package/dist/packages/_es/CollapseItem.js +59 -90
  25. package/dist/packages/_es/CountDown.js +11 -10
  26. package/dist/packages/_es/CountUp.js +51 -43
  27. package/dist/packages/_es/DatePicker.js +22 -23
  28. package/dist/packages/_es/Dialog.js +91 -12
  29. package/dist/packages/_es/Divider.js +4 -4
  30. package/dist/packages/_es/Drag.js +54 -92
  31. package/dist/packages/_es/Ecard.js +153 -0
  32. package/dist/packages/_es/Elevator.js +50 -75
  33. package/dist/packages/_es/Empty.js +8 -7
  34. package/dist/packages/_es/FixedNav.js +10 -11
  35. package/dist/packages/_es/Form.js +5 -9
  36. package/dist/packages/_es/FormItem.js +1 -1
  37. package/dist/packages/_es/Grid.js +1 -1
  38. package/dist/packages/_es/GridItem.js +26 -8
  39. package/dist/packages/_es/Icon.js +1 -1
  40. package/dist/packages/_es/ImagePreview.js +83 -14
  41. package/dist/packages/_es/Indicator.js +3 -3
  42. package/dist/packages/_es/InfiniteLoading.js +107 -93
  43. package/dist/packages/_es/Input.js +21 -20
  44. package/dist/packages/_es/InputNumber.js +16 -23
  45. package/dist/packages/_es/Layout.js +1 -1
  46. package/dist/packages/_es/List.js +34 -41
  47. package/dist/packages/_es/Menu.js +12 -15
  48. package/dist/packages/_es/MenuItem.js +7 -7
  49. package/dist/packages/_es/Navbar.js +5 -4
  50. package/dist/packages/_es/NoticeBar.js +40 -47
  51. package/dist/packages/_es/Notify.js +166 -27
  52. package/dist/packages/_es/NumberKeyboard.js +22 -11
  53. package/dist/packages/_es/OldPicker.js +120 -122
  54. package/dist/packages/_es/OverLay.js +25 -5
  55. package/dist/packages/_es/Pagination.js +14 -13
  56. package/dist/packages/_es/Picker.js +23 -45
  57. package/dist/packages/_es/Popover.js +29 -154
  58. package/dist/packages/_es/Popup.js +69 -6
  59. package/dist/packages/_es/Price.js +5 -17
  60. package/dist/packages/_es/Progress.js +23 -19
  61. package/dist/packages/_es/PullRefresh.js +1 -1
  62. package/dist/packages/_es/Radio.js +14 -4
  63. package/dist/packages/_es/RadioGroup.js +1 -1
  64. package/dist/packages/_es/Range.js +33 -46
  65. package/dist/packages/_es/Rate.js +19 -16
  66. package/dist/packages/_es/Row.js +1 -1
  67. package/dist/packages/_es/SearchBar.js +11 -12
  68. package/dist/packages/_es/ShortPassword.js +75 -96
  69. package/dist/packages/_es/SideNavBar.js +16 -5
  70. package/dist/packages/_es/SideNavBarItem.js +1 -1
  71. package/dist/packages/_es/Signature.js +88 -69
  72. package/dist/packages/_es/Skeleton.js +11 -8
  73. package/dist/packages/_es/Sku.js +57 -49
  74. package/dist/packages/_es/Step.js +1 -1
  75. package/dist/packages/_es/Steps.js +1 -1
  76. package/dist/packages/_es/Sticky.js +23 -28
  77. package/dist/packages/_es/SubSideNavBar.js +1 -1
  78. package/dist/packages/_es/Swipe.js +26 -39
  79. package/dist/packages/_es/Swiper.js +14 -32
  80. package/dist/packages/_es/SwiperItem.js +2 -2
  81. package/dist/packages/_es/Switch.js +3 -3
  82. package/dist/packages/_es/TabPane.js +1 -1
  83. package/dist/packages/_es/Tabbar.js +3 -3
  84. package/dist/packages/_es/TabbarItem.js +21 -11
  85. package/dist/packages/_es/Table.js +18 -17
  86. package/dist/packages/_es/Tabs.js +20 -21
  87. package/dist/packages/_es/Tag.js +4 -4
  88. package/dist/packages/_es/TextArea.js +47 -48
  89. package/dist/packages/_es/TimeDetail.js +3 -4
  90. package/dist/packages/_es/TimePannel.js +3 -3
  91. package/dist/packages/_es/TimeSelect.js +7 -8
  92. package/dist/packages/_es/Toast.js +170 -41
  93. package/dist/packages/_es/Uploader.js +145 -116
  94. package/dist/packages/_es/Video.js +9 -8
  95. package/dist/packages/_es/common.js +1 -1
  96. package/dist/packages/_es/component.js +165 -3
  97. package/dist/packages/_es/index.js +6 -44
  98. package/dist/packages/_es/index2.js +31 -8
  99. package/dist/packages/_es/index3.js +7 -58
  100. package/dist/packages/_es/index4.js +56 -413
  101. package/dist/packages/_es/{index.taro.js → index5.js} +113 -140
  102. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  103. package/dist/packages/_es/pxCheck.js +1 -1
  104. package/dist/packages/_es/raf.js +19 -0
  105. package/dist/packages/actionsheet/index.scss +8 -0
  106. package/dist/packages/ecard/index.scss +83 -0
  107. package/dist/style.css +1 -1
  108. package/dist/styles/themes/default.scss +48 -47
  109. package/dist/styles/themes/jdt.scss +48 -47
  110. package/dist/styles/variables-jdt.scss +3 -0
  111. package/dist/styles/variables.scss +3 -0
  112. package/dist/types/__VUE/actionsheet/index.d.ts +280 -0
  113. package/dist/types/__VUE/address/index.d.ts +386 -0
  114. package/dist/types/__VUE/audio/index.d.ts +92 -0
  115. package/dist/types/__VUE/audiooperate/index.d.ts +68 -0
  116. package/dist/types/__VUE/avatar/index.d.ts +66 -0
  117. package/dist/types/__VUE/backtop/index.d.ts +105 -0
  118. package/dist/types/__VUE/badge/index.d.ts +94 -0
  119. package/dist/types/__VUE/barrage/index.d.ts +80 -0
  120. package/dist/types/__VUE/button/index.d.ts +116 -0
  121. package/dist/types/__VUE/calendar/index.d.ts +155 -0
  122. package/dist/types/__VUE/calendaritem/index.d.ts +195 -0
  123. package/dist/types/__VUE/card/index.d.ts +81 -0
  124. package/dist/types/__VUE/cascader/cascader-item.d.ts +76 -0
  125. package/dist/types/__VUE/cascader/helper.d.ts +8 -0
  126. package/dist/types/__VUE/cascader/index.d.ts +76 -0
  127. package/dist/types/__VUE/cascader/tree.d.ts +17 -0
  128. package/dist/types/__VUE/cascader/types.d.ts +30 -0
  129. package/dist/types/__VUE/cell/index.d.ts +109 -0
  130. package/dist/types/__VUE/cellgroup/index.d.ts +38 -0
  131. package/dist/types/__VUE/checkbox/index.d.ts +102 -0
  132. package/dist/types/__VUE/checkboxgroup/index.d.ts +39 -0
  133. package/dist/types/__VUE/circleprogress/index.d.ts +66 -0
  134. package/dist/types/__VUE/col/index.d.ts +42 -0
  135. package/dist/types/__VUE/collapse/index.d.ts +104 -0
  136. package/dist/types/__VUE/collapseitem/index.d.ts +83 -0
  137. package/dist/types/__VUE/countdown/index.d.ts +91 -0
  138. package/dist/types/__VUE/countup/index.d.ts +216 -0
  139. package/dist/types/__VUE/datepicker/index.d.ts +347 -0
  140. package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
  141. package/dist/types/__VUE/dialog/index.d.ts +306 -0
  142. package/dist/types/__VUE/divider/index.d.ts +47 -0
  143. package/dist/types/__VUE/drag/index.d.ts +61 -0
  144. package/dist/types/__VUE/ecard/index.d.ts +123 -0
  145. package/dist/types/__VUE/elevator/index.d.ts +71 -0
  146. package/dist/types/__VUE/empty/index.d.ts +47 -0
  147. package/dist/types/__VUE/fixednav/index.d.ts +96 -0
  148. package/dist/types/__VUE/form/common.d.ts +20 -0
  149. package/dist/types/__VUE/form/index.d.ts +32 -0
  150. package/dist/types/__VUE/form/types.d.ts +13 -0
  151. package/dist/types/__VUE/formitem/index.d.ts +120 -0
  152. package/dist/types/__VUE/formitem/types.d.ts +10 -0
  153. package/dist/types/__VUE/grid/common.d.ts +91 -0
  154. package/dist/types/__VUE/grid/index.d.ts +100 -0
  155. package/dist/types/__VUE/griditem/index.d.ts +80 -0
  156. package/dist/types/__VUE/icon/index.d.ts +74 -0
  157. package/dist/types/__VUE/imagepreview/index.d.ts +125 -0
  158. package/dist/types/__VUE/indicator/index.d.ts +70 -0
  159. package/dist/types/__VUE/infiniteloading/index.d.ts +140 -0
  160. package/dist/types/__VUE/input/index.d.ts +337 -0
  161. package/dist/types/__VUE/input/util.d.ts +5 -0
  162. package/dist/types/__VUE/inputnumber/index.d.ts +117 -0
  163. package/dist/types/__VUE/layout/index.d.ts +13 -0
  164. package/dist/types/__VUE/list/index.d.ts +48 -0
  165. package/dist/types/__VUE/menu/index.d.ts +51 -0
  166. package/dist/types/__VUE/menuitem/index.d.ts +77 -0
  167. package/dist/types/__VUE/navbar/index.d.ts +83 -0
  168. package/dist/types/__VUE/noticebar/index.d.ts +209 -0
  169. package/dist/types/__VUE/notify/index.d.ts +103 -0
  170. package/dist/types/__VUE/numberkeyboard/index.d.ts +124 -0
  171. package/dist/types/__VUE/oldpicker/Column.d.ts +96 -0
  172. package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
  173. package/dist/types/__VUE/oldpicker/index.d.ts +360 -0
  174. package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
  175. package/dist/types/__VUE/overlay/index.d.ts +1614 -0
  176. package/dist/types/__VUE/pagination/index.d.ts +112 -0
  177. package/dist/types/__VUE/picker/Column.d.ts +90 -0
  178. package/dist/types/__VUE/picker/index.d.ts +343 -0
  179. package/dist/types/__VUE/picker/types.d.ts +26 -0
  180. package/dist/types/__VUE/popover/index.d.ts +233 -0
  181. package/dist/types/__VUE/popup/index.d.ts +1734 -0
  182. package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
  183. package/dist/types/__VUE/price/index.d.ts +87 -0
  184. package/dist/types/__VUE/progress/index.d.ts +138 -0
  185. package/dist/types/__VUE/pullrefresh/index.d.ts +128 -0
  186. package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
  187. package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
  188. package/dist/types/__VUE/radio/index.d.ts +90 -0
  189. package/dist/types/__VUE/radiogroup/index.d.ts +48 -0
  190. package/dist/types/__VUE/range/index.d.ts +156 -0
  191. package/dist/types/__VUE/rate/index.d.ts +142 -0
  192. package/dist/types/__VUE/row/index.d.ts +63 -0
  193. package/dist/types/__VUE/searchbar/index.d.ts +100 -0
  194. package/dist/types/__VUE/shortpassword/index.d.ts +137 -0
  195. package/dist/types/__VUE/sidenavbar/index.d.ts +36 -0
  196. package/dist/types/__VUE/sidenavbaritem/index.d.ts +41 -0
  197. package/dist/types/__VUE/signature/index.d.ts +73 -0
  198. package/dist/types/__VUE/skeleton/common.d.ts +63 -0
  199. package/dist/types/__VUE/skeleton/index.d.ts +117 -0
  200. package/dist/types/__VUE/sku/components/SkuHeader.d.ts +27 -0
  201. package/dist/types/__VUE/sku/components/SkuOperate.d.ts +70 -0
  202. package/dist/types/__VUE/sku/components/SkuSelect.d.ts +30 -0
  203. package/dist/types/__VUE/sku/components/SkuStepper.d.ts +67 -0
  204. package/dist/types/__VUE/sku/index.d.ts +300 -0
  205. package/dist/types/__VUE/step/index.d.ts +70 -0
  206. package/dist/types/__VUE/steps/index.d.ts +47 -0
  207. package/dist/types/__VUE/sticky/index.d.ts +63 -0
  208. package/dist/types/__VUE/subsidenavbar/index.d.ts +54 -0
  209. package/dist/types/__VUE/swipe/index.d.ts +69 -0
  210. package/dist/types/__VUE/swiper/index.d.ts +163 -0
  211. package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
  212. package/dist/types/__VUE/swiperitem/index.d.ts +24 -0
  213. package/dist/types/__VUE/switch/index.d.ts +136 -0
  214. package/dist/types/__VUE/tabbar/index.d.ts +84 -0
  215. package/dist/types/__VUE/tabbaritem/index.d.ts +108 -0
  216. package/dist/types/__VUE/table/common.d.ts +55 -0
  217. package/dist/types/__VUE/table/index.d.ts +76 -0
  218. package/dist/types/__VUE/table/renderColumn.d.ts +20 -0
  219. package/dist/types/__VUE/table/types.d.ts +19 -0
  220. package/dist/types/__VUE/tabpane/index.d.ts +47 -0
  221. package/dist/types/__VUE/tabs/index.d.ts +128 -0
  222. package/dist/types/__VUE/tag/index.d.ts +89 -0
  223. package/dist/types/__VUE/textarea/index.d.ts +121 -0
  224. package/dist/types/__VUE/timedetail/index.d.ts +48 -0
  225. package/dist/types/__VUE/timepannel/index.d.ts +43 -0
  226. package/dist/types/__VUE/timeselect/index.d.ts +82 -0
  227. package/dist/types/__VUE/toast/index.d.ts +149 -0
  228. package/dist/types/__VUE/uploader/index.d.ts +258 -0
  229. package/dist/types/__VUE/uploader/uploader.d.ts +25 -0
  230. package/dist/types/__VUE/video/index.d.ts +123 -0
  231. package/dist/{index.d.ts → types/index.d.ts} +0 -0
  232. package/dist/types/nutui.d.ts +93 -0
  233. package/package.json +14 -5
  234. package/dist/nutui.d.ts +0 -104
  235. package/dist/packages/_es/use-lock-scroll.js +0 -23
  236. package/dist/packages/_es/util.js +0 -47
@@ -35,7 +35,7 @@ var __publicField = (obj, key, value) => {
35
35
  return value;
36
36
  };
37
37
  /*!
38
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
38
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
39
39
  * (c) 2022 @jdf2e.
40
40
  * Released under the MIT License.
41
41
  */
@@ -163,7 +163,7 @@ class Tree {
163
163
  return Array.isArray(children) && Boolean(children.length);
164
164
  }
165
165
  }
166
- const { create: create$1 } = createComponent("cascader-item");
166
+ const { create: create$1, translate } = createComponent("cascader-item");
167
167
  const _sfc_main$1 = create$1({
168
168
  props: {
169
169
  visible: Boolean,
@@ -266,8 +266,8 @@ const _sfc_main$1 = create$1({
266
266
  }
267
267
  if (needToSync.length && currentValue === props.modelValue) {
268
268
  const pathNodes = tree.value.getPathNodesByValue(needToSync);
269
- pathNodes.map((node, index) => {
270
- tabsCursor.value = index;
269
+ pathNodes.map((node, index2) => {
270
+ tabsCursor.value = index2;
271
271
  methods.handleNode(node, true);
272
272
  });
273
273
  }
@@ -355,7 +355,7 @@ const _sfc_main$1 = create$1({
355
355
  tabsCursor.value = tab.paneKey;
356
356
  },
357
357
  formatTabTitle(pane) {
358
- return pane.selectedNode ? pane.selectedNode.text : "\u8BF7\u9009\u62E9";
358
+ return pane.selectedNode ? pane.selectedNode.text : translate("select");
359
359
  },
360
360
  isSelected(pane, node) {
361
361
  return pane.selectedNode && pane.selectedNode.value === node.value;
@@ -400,10 +400,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
400
400
  "title-scroll": ""
401
401
  }, {
402
402
  default: withCtx(() => [
403
- !_ctx.initLoading && _ctx.panes.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.panes, (pane, index) => {
403
+ !_ctx.initLoading && _ctx.panes.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.panes, (pane, index2) => {
404
404
  return openBlock(), createBlock(_component_nut_tabpane, {
405
405
  title: _ctx.formatTabTitle(pane),
406
- key: index
406
+ key: index2
407
407
  }, {
408
408
  default: withCtx(() => [
409
409
  createElementVNode("view", _hoisted_1$1, [
@@ -543,5 +543,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
543
543
  _: 1
544
544
  }, 8, ["visible"]);
545
545
  }
546
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
547
- export { index_taro as default };
546
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
547
+ export { index as default };
@@ -1,10 +1,11 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
+ import { u as useRouter } from "./index.js";
8
9
  import { p as pxCheck } from "./pxCheck.js";
9
10
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
11
  const { componentName, create } = createComponent("cell");
@@ -15,7 +16,7 @@ const _sfc_main = create({
15
16
  desc: { type: String, default: "" },
16
17
  descTextAlign: { type: String, default: "right" },
17
18
  isLink: { type: Boolean, default: false },
18
- to: { type: String, default: "" },
19
+ to: [String, Object],
19
20
  replace: { type: Boolean, default: false },
20
21
  roundRadius: { type: [String, Number], default: "" },
21
22
  url: { type: String, default: "" },
@@ -30,6 +31,7 @@ const _sfc_main = create({
30
31
  [`${prefixCls}--clickable`]: props.isLink || props.to
31
32
  };
32
33
  });
34
+ const router = useRouter();
33
35
  const baseStyle = computed(() => {
34
36
  return {
35
37
  borderRadius: pxCheck(props.roundRadius)
@@ -37,6 +39,11 @@ const _sfc_main = create({
37
39
  });
38
40
  const handleClick = (event) => {
39
41
  emit("click", event);
42
+ if (props.to && router) {
43
+ router[props.replace ? "replace" : "push"](props.to);
44
+ } else if (props.url) {
45
+ props.replace ? location.replace(props.url) : location.href = props.url;
46
+ }
40
47
  };
41
48
  return {
42
49
  handleClick,
@@ -91,5 +98,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
91
98
  ])
92
99
  ], 6);
93
100
  }
94
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
95
- export { index_taro as default };
101
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
102
+ export { index as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -40,6 +40,14 @@ const _sfc_main = create({
40
40
  label: {
41
41
  type: String,
42
42
  default: ""
43
+ },
44
+ iconClassPrefix: {
45
+ type: String,
46
+ default: "nut-icon"
47
+ },
48
+ iconFontClassName: {
49
+ type: String,
50
+ default: "nutui-iconfont"
43
51
  }
44
52
  },
45
53
  emits: ["change", "update:modelValue"],
@@ -65,11 +73,13 @@ const _sfc_main = create({
65
73
  emit("change", value, label);
66
74
  };
67
75
  const renderIcon = () => {
68
- const { iconName, iconSize, iconActiveName } = props;
76
+ const { iconName, iconSize, iconActiveName, iconClassPrefix, iconFontClassName } = props;
69
77
  return h(_sfc_main$1, {
70
78
  name: !pValue.value ? iconName : iconActiveName,
71
79
  size: iconSize,
72
- class: color.value
80
+ class: color.value,
81
+ classPrefix: iconClassPrefix,
82
+ fontClassName: iconFontClassName
73
83
  });
74
84
  };
75
85
  const renderLabel = () => {
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { reactive, provide, computed, watch, h } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
- import { u as useExpose } from "./index2.js";
8
+ import { u as useExpose } from "./index3.js";
9
9
  const { create, componentName } = createComponent("checkboxgroup");
10
10
  const _sfc_main = create({
11
11
  props: {
@@ -1,10 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import Taro from "@tarojs/taro";
7
- import { ref, reactive, watch, onMounted, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
6
+ import { computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
8
7
  import { c as createComponent } from "./component.js";
9
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
9
  const { componentName, create } = createComponent("circleprogress");
@@ -29,79 +28,12 @@ const _sfc_main = create({
29
28
  }
30
29
  },
31
30
  setup(props, { emit }) {
32
- const rotateLeft = ref();
33
- const rotateRight = ref();
34
- const InnerWidth = ref(props.strokeInnerWidth);
35
- const isMobile = ref(false);
36
- const cricleData = reactive({
37
- radius: 50,
38
- strokeOutWidth: 10,
39
- backColor: "#d9d9d9",
40
- progressColor: "red"
41
- });
42
- const loadPercent = (x, y) => {
43
- let rotate = x / y * 360;
44
- let rotateRc = 0;
45
- let rotateLc = 0;
46
- if (rotate < 180) {
47
- rotateRc = rotate + -45;
48
- } else {
49
- rotateRc = 135;
50
- rotateLc = rotate - 180 - 45;
51
- rotateLeft.value = rotateLc;
52
- }
53
- rotateRight.value = rotateRc;
54
- };
55
- watch(() => props.progress, (value) => {
56
- loadPercent(value, 100);
57
- });
58
- onMounted(() => {
59
- if (Taro.getEnv() === "WEB") {
60
- isMobile.value = true;
61
- } else {
62
- isMobile.value = false;
63
- loadPercent(props.progress, 100);
64
- Object.assign(cricleData, props.progressOption);
65
- }
66
- });
67
31
  const classes = computed(() => {
68
32
  const prefixCls = componentName;
69
33
  return {
70
34
  [prefixCls]: true
71
35
  };
72
36
  });
73
- const pieStyle = computed(() => {
74
- return {
75
- width: (cricleData.radius + cricleData.strokeOutWidth) * 2 + "px",
76
- height: (cricleData.radius + cricleData.strokeOutWidth) * 2 + "px"
77
- };
78
- });
79
- const mobileStyle = computed(() => {
80
- return {
81
- width: "100%",
82
- height: "100%"
83
- };
84
- });
85
- const RightStyle = computed(() => {
86
- return {
87
- transform: `rotate(${rotateRight.value + "deg"})`,
88
- transition: `all 0.3s`,
89
- borderTop: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
90
- borderLeft: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
91
- borderBottom: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`,
92
- borderRight: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`
93
- };
94
- });
95
- const LeftStyle = computed(() => {
96
- return {
97
- transform: `rotate(${rotateLeft.value + "deg"})`,
98
- transition: `all 0.3s`,
99
- borderTop: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
100
- borderLeft: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
101
- borderBottom: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`,
102
- borderRight: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`
103
- };
104
- });
105
37
  const option = computed(() => {
106
38
  let baseOption = {
107
39
  radius: 50,
@@ -125,94 +57,53 @@ const _sfc_main = create({
125
57
  return `${progressLength},${circleLength}`;
126
58
  });
127
59
  return {
128
- isMobile,
129
- rotateLeft,
130
- InnerWidth,
131
- rotateRight,
132
60
  classes,
133
- pieStyle,
134
- RightStyle,
135
- LeftStyle,
136
61
  option,
137
- arcLength,
138
- mobileStyle
62
+ arcLength
139
63
  };
140
64
  }
141
65
  });
142
- const _hoisted_1 = { class: "nut-circleprogress__right" };
143
- const _hoisted_2 = { class: "nut-circleprogress__line nut-circleprogress__r" };
144
- const _hoisted_3 = { class: "nut-circleprogress__progress" };
145
- const _hoisted_4 = { class: "nut-circleprogress__left" };
146
- const _hoisted_5 = { class: "nut-circleprogress__line nut-circleprogress__l" };
147
- const _hoisted_6 = { key: 1 };
148
- const _hoisted_7 = ["height", "width"];
149
- const _hoisted_8 = ["r", "cx", "cy", "stroke", "stroke-width"];
150
- const _hoisted_9 = ["r", "cx", "cy", "stroke", "stroke-dasharray", "stroke-width", "transform"];
151
- const _hoisted_10 = { class: "nut-circleprogress__progress" };
66
+ const _hoisted_1 = ["height", "width"];
67
+ const _hoisted_2 = ["r", "cx", "cy", "stroke", "stroke-width"];
68
+ const _hoisted_3 = ["r", "cx", "cy", "stroke", "stroke-dasharray", "stroke-width", "transform"];
69
+ const _hoisted_4 = { class: "nut-circleprogress-content" };
152
70
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
153
71
  return openBlock(), createElementBlock("div", {
154
72
  class: normalizeClass(_ctx.classes),
155
- style: normalizeStyle(_ctx.pieStyle)
73
+ style: normalizeStyle({ height: _ctx.option.size + "px", width: _ctx.option.size + "px" })
156
74
  }, [
157
- !_ctx.isMobile ? (openBlock(), createElementBlock("div", {
158
- key: 0,
159
- style: normalizeStyle(_ctx.mobileStyle)
75
+ (openBlock(), createElementBlock("svg", {
76
+ height: _ctx.option.size,
77
+ width: _ctx.option.size,
78
+ "x-mlns": "http://www.w3.org/200/svg"
160
79
  }, [
161
- createElementVNode("div", _hoisted_1, [
162
- createElementVNode("div", _hoisted_2, [
163
- createElementVNode("div", {
164
- class: "nut-circleprogress__line__c",
165
- style: normalizeStyle(_ctx.RightStyle)
166
- }, null, 4)
167
- ])
168
- ]),
169
- createElementVNode("div", _hoisted_3, [
170
- !_ctx.isAuto ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
171
- createTextVNode(toDisplayString(_ctx.progress) + "%", 1)
172
- ]) : renderSlot(_ctx.$slots, "default", { key: 1 })
173
- ]),
174
- createElementVNode("div", _hoisted_4, [
175
- createElementVNode("div", _hoisted_5, [
176
- createElementVNode("div", {
177
- class: "nut-circleprogress__line__c",
178
- style: normalizeStyle(_ctx.LeftStyle)
179
- }, null, 4)
180
- ])
181
- ])
182
- ], 4)) : (openBlock(), createElementBlock("div", _hoisted_6, [
183
- (openBlock(), createElementBlock("svg", {
184
- height: _ctx.option.size,
185
- width: _ctx.option.size,
186
- "x-mlns": "http://www.w3.org/200/svg"
187
- }, [
188
- createElementVNode("circle", {
189
- r: _ctx.option.radius,
190
- cx: _ctx.option.cx,
191
- cy: _ctx.option.cy,
192
- stroke: _ctx.option.backColor,
193
- "stroke-width": _ctx.option.strokeOutWidth,
194
- fill: "none"
195
- }, null, 8, _hoisted_8),
196
- createElementVNode("circle", {
197
- r: _ctx.option.radius,
198
- cx: _ctx.option.cx,
199
- cy: _ctx.option.cy,
200
- stroke: _ctx.option.progressColor,
201
- "stroke-dasharray": _ctx.arcLength,
202
- "stroke-width": _ctx.strokeInnerWidth,
203
- fill: "none",
204
- transform: _ctx.option.startPosition,
205
- "stroke-linecap": "round",
206
- style: { "transition": "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s" }
207
- }, null, 8, _hoisted_9)
208
- ], 8, _hoisted_7)),
209
- createElementVNode("div", _hoisted_10, [
210
- !_ctx.isAuto ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
211
- createTextVNode(toDisplayString(_ctx.progress) + "%", 1)
212
- ]) : renderSlot(_ctx.$slots, "default", { key: 1 })
213
- ])
214
- ]))
80
+ createElementVNode("circle", {
81
+ r: _ctx.option.radius,
82
+ cx: _ctx.option.cx,
83
+ cy: _ctx.option.cy,
84
+ stroke: _ctx.option.backColor,
85
+ "stroke-width": _ctx.option.strokeOutWidth,
86
+ fill: "none"
87
+ }, null, 8, _hoisted_2),
88
+ createElementVNode("circle", {
89
+ r: _ctx.option.radius,
90
+ cx: _ctx.option.cx,
91
+ cy: _ctx.option.cy,
92
+ stroke: _ctx.option.progressColor,
93
+ "stroke-dasharray": _ctx.arcLength,
94
+ "stroke-width": _ctx.strokeInnerWidth,
95
+ fill: "none",
96
+ transform: _ctx.option.startPosition,
97
+ "stroke-linecap": "round",
98
+ style: { "transition": "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s" }
99
+ }, null, 8, _hoisted_3)
100
+ ], 8, _hoisted_1)),
101
+ createElementVNode("div", _hoisted_4, [
102
+ !_ctx.isAuto ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
103
+ createTextVNode(toDisplayString(_ctx.progress) + "%", 1)
104
+ ]) : renderSlot(_ctx.$slots, "default", { key: 1 })
105
+ ])
215
106
  ], 6);
216
107
  }
217
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
218
- export { index_taro as default };
108
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
109
+ export { index as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -49,20 +49,20 @@ const _sfc_main = create({
49
49
  }
50
50
  },
51
51
  emits: ["update:active", "change"],
52
- setup(props, { emit, slots }) {
52
+ setup(props, { emit }) {
53
53
  const changeVal = (val) => {
54
54
  emit("update:active", val);
55
55
  emit("change", val);
56
56
  };
57
57
  const changeValAry = (name) => {
58
58
  const activeItem = props.active instanceof Object ? Object.values(props.active) : props.active;
59
- let index = -1;
59
+ let index2 = -1;
60
60
  activeItem.forEach((item, idx) => {
61
61
  if (String(item) == String(name)) {
62
- index = idx;
62
+ index2 = idx;
63
63
  }
64
64
  });
65
- index > -1 ? activeItem.splice(index, 1) : activeItem.push(name);
65
+ index2 > -1 ? activeItem.splice(index2, 1) : activeItem.push(name);
66
66
  changeVal(activeItem);
67
67
  };
68
68
  const isExpanded = (name) => {
@@ -71,38 +71,12 @@ const _sfc_main = create({
71
71
  return typeof active === "number" || typeof active === "string" ? active == name : false;
72
72
  }
73
73
  };
74
- const activeIndex = () => {
75
- var _a;
76
- const activeCollapse = props.active;
77
- const childrenList = (_a = slots.default) == null ? void 0 : _a.call(slots);
78
- let act = [];
79
- childrenList.forEach((item, index) => {
80
- if (typeof activeCollapse == "number" || typeof activeCollapse == "string") {
81
- if (item.props.name == activeCollapse) {
82
- act.push(item.flag);
83
- return act;
84
- }
85
- } else {
86
- let ary = Array.from(activeCollapse);
87
- if (ary.includes(String(item.props.name)) || ary.includes(Number(item.props.name))) {
88
- act.push(item.flag);
89
- }
90
- }
91
- });
92
- return act;
93
- };
94
- const getParentChildren = () => {
95
- var _a;
96
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
97
- };
98
74
  provide("collapseParent", {
99
75
  children: [],
100
76
  props,
101
77
  changeValAry,
102
78
  changeVal,
103
- isExpanded,
104
- activeIndex,
105
- getParentChildren
79
+ isExpanded
106
80
  });
107
81
  }
108
82
  });
@@ -111,5 +85,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
111
85
  renderSlot(_ctx.$slots, "default")
112
86
  ]);
113
87
  }
114
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
115
- export { index_taro as default };
88
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
89
+ export { index as default };