@nutui/nutui 4.1.0-beta.2 → 4.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +10 -42
  3. package/dist/nutui.es.js +1 -1
  4. package/dist/nutui.js +16177 -0
  5. package/dist/nutui.umd.js +1 -7
  6. package/dist/packages/_es/ActionSheet.js +22 -4
  7. package/dist/packages/_es/Address.js +41 -32
  8. package/dist/packages/_es/AddressList.js +5 -5
  9. package/dist/packages/_es/Animate.js +20 -1
  10. package/dist/packages/_es/Audio.js +21 -4
  11. package/dist/packages/_es/AudioOperate.js +20 -1
  12. package/dist/packages/_es/Avatar.js +19 -4
  13. package/dist/packages/_es/Calendar.js +2 -2
  14. package/dist/packages/_es/CalendarItem.js +1 -1
  15. package/dist/packages/_es/Cascader.js +123 -76
  16. package/dist/packages/_es/CellGroup.js +11 -23
  17. package/dist/packages/_es/Checkbox.js +4 -4
  18. package/dist/packages/_es/CheckboxGroup.js +15 -30
  19. package/dist/packages/_es/Collapse.js +18 -10
  20. package/dist/packages/_es/Countdown.js +22 -4
  21. package/dist/packages/_es/Countup.js +21 -4
  22. package/dist/packages/_es/DatePicker.js +21 -3
  23. package/dist/packages/_es/Dialog.js +31 -8
  24. package/dist/packages/_es/Divider.js +8 -18
  25. package/dist/packages/_es/Elevator.js +23 -4
  26. package/dist/packages/_es/Ellipsis.js +20 -1
  27. package/dist/packages/_es/Form.js +54 -24
  28. package/dist/packages/_es/Image.js +57 -7
  29. package/dist/packages/_es/ImagePreview.js +44 -19
  30. package/dist/packages/_es/InfiniteLoading.js +23 -4
  31. package/dist/packages/_es/Input.js +23 -5
  32. package/dist/packages/_es/Invoice.js +22 -4
  33. package/dist/packages/_es/List.js +21 -3
  34. package/dist/packages/_es/Menu.js +1 -2
  35. package/dist/packages/_es/MenuItem.js +44 -35
  36. package/dist/packages/_es/Noticebar.js +21 -4
  37. package/dist/packages/_es/Notify.js +28 -9
  38. package/dist/packages/_es/NumberKeyboard.js +1 -1
  39. package/dist/packages/_es/Overlay.js +19 -4
  40. package/dist/packages/_es/Picker.js +32 -19
  41. package/dist/packages/_es/Popover.js +1 -1
  42. package/dist/packages/_es/Popup.js +1 -1
  43. package/dist/packages/_es/PullRefresh.js +23 -4
  44. package/dist/packages/_es/Radio.js +1 -1
  45. package/dist/packages/_es/Range.js +23 -4
  46. package/dist/packages/_es/Rate.js +23 -4
  47. package/dist/packages/_es/Row.js +12 -12
  48. package/dist/packages/_es/Searchbar.js +33 -12
  49. package/dist/packages/_es/ShortPassword.js +1 -1
  50. package/dist/packages/_es/SideNavbar.js +21 -3
  51. package/dist/packages/_es/Signature.js +20 -1
  52. package/dist/packages/_es/Sku.js +22 -4
  53. package/dist/packages/_es/Step.js +21 -3
  54. package/dist/packages/_es/SubSideNavbar.js +21 -3
  55. package/dist/packages/_es/Swipe.js +23 -4
  56. package/dist/packages/_es/TabPane.js +21 -3
  57. package/dist/packages/_es/TabbarItem.js +8 -7
  58. package/dist/packages/_es/Table.js +21 -3
  59. package/dist/packages/_es/Tabs.js +48 -14
  60. package/dist/packages/_es/TimeDetail.js +23 -4
  61. package/dist/packages/_es/TimePannel.js +21 -3
  62. package/dist/packages/_es/TimeSelect.js +1 -1
  63. package/dist/packages/_es/Toast.js +30 -11
  64. package/dist/packages/_es/Tour.js +22 -4
  65. package/dist/packages/_es/TrendArrow.js +20 -1
  66. package/dist/packages/_es/Video.js +23 -5
  67. package/dist/packages/_es/Watermark.js +20 -1
  68. package/dist/packages/_es/{index-f933fcf6.js → index-87422be8.js} +23 -5
  69. package/dist/packages/_es/{index-c55ad69e.js → index-da0a7662.js} +25 -10
  70. package/dist/packages/_es/{index.vue_vue_type_script_lang-442e4704.js → index.vue_vue_type_script_lang-a8856969.js} +0 -1
  71. package/dist/packages/cell/index.scss +1 -1
  72. package/dist/packages/cellgroup/index.scss +1 -0
  73. package/dist/packages/circleprogress/index.scss +1 -1
  74. package/dist/packages/col/index.scss +2 -2
  75. package/dist/packages/imagepreview/index.scss +0 -5
  76. package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
  77. package/dist/packages/locale/lang/en-US.js +39 -36
  78. package/dist/packages/locale/lang/id-ID.js +39 -36
  79. package/dist/packages/locale/lang/index.js +44 -22
  80. package/dist/packages/locale/lang/zh-CN.js +38 -35
  81. package/dist/packages/locale/lang/zh-TW.js +38 -35
  82. package/dist/packages/menuitem/index.scss +7 -10
  83. package/dist/packages/numberkeyboard/index.scss +5 -3
  84. package/dist/packages/searchbar/index.scss +4 -0
  85. package/dist/packages/textarea/index.scss +1 -1
  86. package/dist/resolver/index.js +26 -1
  87. package/dist/resolver/index.mjs +17 -14
  88. package/dist/smartips/web-types.json +42 -159
  89. package/dist/style.css +1 -1
  90. package/dist/styles/mixins/make-animation.scss +1 -5
  91. package/dist/styles/themes/default.scss +149 -46
  92. package/dist/styles/themes/jdb.scss +149 -46
  93. package/dist/styles/themes/jddkh.scss +149 -46
  94. package/dist/styles/themes/jdt.scss +149 -46
  95. package/dist/styles/variables-jdb.scss +1 -0
  96. package/dist/styles/variables-jddkh.scss +1 -0
  97. package/dist/styles/variables-jdt.scss +1 -0
  98. package/dist/styles/variables.scss +1 -0
  99. package/dist/types/__VUE/actionsheet/index.vue.d.ts +1 -291
  100. package/dist/types/__VUE/address/index.vue.d.ts +1 -345
  101. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -59
  102. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -22
  103. package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -72
  104. package/dist/types/__VUE/animate/index.vue.d.ts +1 -49
  105. package/dist/types/__VUE/audio/index.vue.d.ts +1 -109
  106. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -26
  107. package/dist/types/__VUE/avatar/index.vue.d.ts +1 -65
  108. package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -81
  109. package/dist/types/__VUE/backtop/index.vue.d.ts +1 -87
  110. package/dist/types/__VUE/badge/index.vue.d.ts +1 -91
  111. package/dist/types/__VUE/barrage/index.vue.d.ts +1 -67
  112. package/dist/types/__VUE/button/index.vue.d.ts +1 -79
  113. package/dist/types/__VUE/button/type.d.ts +1 -0
  114. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -164
  115. package/dist/types/__VUE/calendaritem/index.vue.d.ts +1 -205
  116. package/dist/types/__VUE/card/index.vue.d.ts +1 -57
  117. package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +1 -66
  118. package/dist/types/__VUE/cascader/index.vue.d.ts +1 -252
  119. package/dist/types/__VUE/category/index.vue.d.ts +1 -27
  120. package/dist/types/__VUE/categorypane/index.vue.d.ts +1 -34
  121. package/dist/types/__VUE/cell/index.vue.d.ts +1 -106
  122. package/dist/types/__VUE/cellgroup/index.vue.d.ts +1 -26
  123. package/dist/types/__VUE/checkbox/index.vue.d.ts +1 -1
  124. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +1 -36
  125. package/dist/types/__VUE/circleprogress/index.vue.d.ts +1 -83
  126. package/dist/types/__VUE/col/index.vue.d.ts +1 -30
  127. package/dist/types/__VUE/collapse/index.vue.d.ts +1 -56
  128. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -99
  129. package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +1 -41
  130. package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +1 -35
  131. package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +1 -58
  132. package/dist/types/__VUE/comment/index.vue.d.ts +1 -109
  133. package/dist/types/__VUE/configprovider/index.vue.d.ts +1 -34
  134. package/dist/types/__VUE/countdown/index.vue.d.ts +1 -92
  135. package/dist/types/__VUE/countup/index.vue.d.ts +1 -204
  136. package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -222
  137. package/dist/types/__VUE/dialog/index.d.ts +1 -0
  138. package/dist/types/__VUE/dialog/index.vue.d.ts +1 -325
  139. package/dist/types/__VUE/divider/index.vue.d.ts +1 -42
  140. package/dist/types/__VUE/divider/types.d.ts +2 -0
  141. package/dist/types/__VUE/drag/index.vue.d.ts +1 -49
  142. package/dist/types/__VUE/ecard/index.vue.d.ts +1 -114
  143. package/dist/types/__VUE/elevator/index.vue.d.ts +1 -98
  144. package/dist/types/__VUE/ellipsis/index.vue.d.ts +1 -85
  145. package/dist/types/__VUE/empty/index.vue.d.ts +1 -35
  146. package/dist/types/__VUE/fixednav/index.vue.d.ts +1 -94
  147. package/dist/types/__VUE/form/index.vue.d.ts +1 -29
  148. package/dist/types/__VUE/formitem/index.vue.d.ts +1 -103
  149. package/dist/types/__VUE/formitem/types.d.ts +1 -1
  150. package/dist/types/__VUE/grid/index.vue.d.ts +1 -73
  151. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -36
  152. package/dist/types/__VUE/icon/index.vue.d.ts +1 -1
  153. package/dist/types/__VUE/image/index.vue.d.ts +1 -104
  154. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -106
  155. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -172
  156. package/dist/types/__VUE/indicator/index.vue.d.ts +1 -59
  157. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +1 -76
  158. package/dist/types/__VUE/input/index.vue.d.ts +2 -208
  159. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -105
  160. package/dist/types/__VUE/invoice/index.vue.d.ts +1 -41
  161. package/dist/types/__VUE/layout/index.vue.d.ts +1 -1
  162. package/dist/types/__VUE/list/index.vue.d.ts +1 -76
  163. package/dist/types/__VUE/menu/index.vue.d.ts +1 -81
  164. package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -79
  165. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -111
  166. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -196
  167. package/dist/types/__VUE/notify/index.vue.d.ts +1 -99
  168. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +1 -109
  169. package/dist/types/__VUE/overlay/index.vue.d.ts +1 -74
  170. package/dist/types/__VUE/pagination/index.vue.d.ts +1 -100
  171. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -103
  172. package/dist/types/__VUE/picker/common.d.ts +4 -405
  173. package/dist/types/__VUE/picker/index.vue.d.ts +1 -216
  174. package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
  175. package/dist/types/__VUE/popover/index.vue.d.ts +1 -176
  176. package/dist/types/__VUE/popup/index.vue.d.ts +1 -208
  177. package/dist/types/__VUE/price/index.vue.d.ts +1 -84
  178. package/dist/types/__VUE/progress/index.vue.d.ts +1 -109
  179. package/dist/types/__VUE/pullrefresh/index.vue.d.ts +1 -106
  180. package/dist/types/__VUE/radio/index.vue.d.ts +1 -42
  181. package/dist/types/__VUE/radiogroup/index.vue.d.ts +1 -36
  182. package/dist/types/__VUE/range/index.vue.d.ts +1 -146
  183. package/dist/types/__VUE/rate/index.vue.d.ts +1 -122
  184. package/dist/types/__VUE/row/index.vue.d.ts +1 -51
  185. package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -165
  186. package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -92
  187. package/dist/types/__VUE/sidenavbar/index.vue.d.ts +1 -25
  188. package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +1 -29
  189. package/dist/types/__VUE/signature/index.vue.d.ts +1 -70
  190. package/dist/types/__VUE/skeleton/index.vue.d.ts +1 -104
  191. package/dist/types/__VUE/sku/components/SkuHeader.vue.d.ts +1 -16
  192. package/dist/types/__VUE/sku/components/SkuOperate.vue.d.ts +1 -59
  193. package/dist/types/__VUE/sku/components/SkuSelect.vue.d.ts +1 -24
  194. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -55
  195. package/dist/types/__VUE/sku/index.vue.d.ts +1 -312
  196. package/dist/types/__VUE/step/index.vue.d.ts +1 -31
  197. package/dist/types/__VUE/steps/index.vue.d.ts +1 -35
  198. package/dist/types/__VUE/sticky/index.vue.d.ts +1 -52
  199. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +1 -42
  200. package/dist/types/__VUE/swipe/index.vue.d.ts +1 -58
  201. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -163
  202. package/dist/types/__VUE/swiperitem/index.vue.d.ts +1 -7
  203. package/dist/types/__VUE/switch/index.vue.d.ts +1 -98
  204. package/dist/types/__VUE/tabbar/index.vue.d.ts +1 -74
  205. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -49
  206. package/dist/types/__VUE/table/common.d.ts +56 -3
  207. package/dist/types/__VUE/table/index.vue.d.ts +1 -69
  208. package/dist/types/__VUE/table/renderColumn.d.ts +1 -1
  209. package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -33
  210. package/dist/types/__VUE/tabs/index.vue.d.ts +2 -167
  211. package/dist/types/__VUE/tag/index.vue.d.ts +1 -79
  212. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -111
  213. package/dist/types/__VUE/timedetail/index.vue.d.ts +1 -27
  214. package/dist/types/__VUE/timepannel/index.vue.d.ts +1 -31
  215. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -81
  216. package/dist/types/__VUE/toast/index.vue.d.ts +1 -149
  217. package/dist/types/__VUE/tour/index.vue.d.ts +1 -184
  218. package/dist/types/__VUE/trendarrow/index.vue.d.ts +1 -94
  219. package/dist/types/__VUE/uploader/index.vue.d.ts +1 -243
  220. package/dist/types/__VUE/video/index.vue.d.ts +1 -114
  221. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -164
  222. package/dist/types/index.d.ts +1 -1
  223. package/dist/types/utils/create/component.d.ts +24 -3
  224. package/dist/types/utils/unit.d.ts +2 -0
  225. package/package.json +4 -5
  226. package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
@@ -1,3 +1,22 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
20
  import { reactive, computed, onBeforeMount, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot } from "vue";
2
21
  import Picker from "./Picker.js";
3
22
  import { c as createComponent, a as isDate$1, p as padZero } from "./component-81a4c1d0.js";
@@ -324,13 +343,12 @@ const _sfc_main = create({
324
343
  state.title = val;
325
344
  }
326
345
  );
327
- return {
328
- ...toRefs(state),
346
+ return __spreadProps(__spreadValues({}, toRefs(state)), {
329
347
  changeHandler,
330
348
  closeHandler,
331
349
  confirm,
332
350
  columns
333
- };
351
+ });
334
352
  }
335
353
  });
336
354
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -1,5 +1,22 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3
20
  var __publicField = (obj, key, value) => {
4
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
22
  return value;
@@ -7,7 +24,7 @@ var __publicField = (obj, key, value) => {
7
24
  import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, nextTick, h } from "vue";
8
25
  import { c as createComponent } from "./component-81a4c1d0.js";
9
26
  import { f as funInterceptor } from "./Interceptor-956b24fc.js";
10
- import { P as Popup, p as popupProps } from "./index-c55ad69e.js";
27
+ import { P as Popup, p as popupProps } from "./index-da0a7662.js";
11
28
  import Button from "./Button.js";
12
29
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
13
30
  import Overlay from "./Overlay.js";
@@ -21,11 +38,10 @@ const _sfc_main = create({
21
38
  [Popup.name]: Popup,
22
39
  [Button.name]: Button
23
40
  },
24
- props: {
25
- ...popupProps,
41
+ props: __spreadProps(__spreadValues({}, popupProps), {
26
42
  closeOnClickOverlay: {
27
43
  type: Boolean,
28
- default: false
44
+ default: true
29
45
  },
30
46
  title: {
31
47
  type: String,
@@ -80,7 +96,7 @@ const _sfc_main = create({
80
96
  type: Object
81
97
  },
82
98
  beforeClose: Function
83
- },
99
+ }),
84
100
  emits: ["update", "update:visible", "ok", "cancel", "opened", "closed"],
85
101
  setup(props, { emit }) {
86
102
  const showPopup = ref(props.visible);
@@ -131,6 +147,11 @@ const _sfc_main = create({
131
147
  emit("ok");
132
148
  closed("ok");
133
149
  };
150
+ const onClickOverlay = () => {
151
+ if (props.closeOnClickOverlay) {
152
+ closed("");
153
+ }
154
+ };
134
155
  const contentStyle = computed(() => {
135
156
  return {
136
157
  textAlign: props.textAlign
@@ -142,6 +163,7 @@ const _sfc_main = create({
142
163
  onCancel,
143
164
  onOk,
144
165
  showPopup,
166
+ onClickOverlay,
145
167
  contentStyle,
146
168
  translate
147
169
  };
@@ -159,14 +181,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
159
181
  teleport: _ctx.teleport,
160
182
  visible: _ctx.showPopup,
161
183
  "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event),
162
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
184
+ "close-on-click-overlay": false,
163
185
  "lock-scroll": _ctx.lockScroll,
164
186
  "pop-class": _ctx.popClass,
165
187
  "overlay-class": _ctx.overlayClass,
166
188
  "overlay-style": _ctx.overlayStyle,
167
189
  style: normalizeStyle(_ctx.popStyle),
168
190
  round: "",
169
- onClickOverlay: _ctx.closed,
191
+ onClickOverlay: _ctx.onClickOverlay,
170
192
  onClickCloseIcon: _ctx.closed
171
193
  }, {
172
194
  default: withCtx(() => [
@@ -222,7 +244,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
222
244
  ], 2)
223
245
  ]),
224
246
  _: 3
225
- }, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "onClickOverlay", "onClickCloseIcon"]);
247
+ }, 8, ["teleport", "visible", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "onClickOverlay", "onClickCloseIcon"]);
226
248
  }
227
249
  const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
228
250
  class DialogOptions {
@@ -254,6 +276,7 @@ class DialogOptions {
254
276
  __publicField(this, "noCancelBtn", false);
255
277
  __publicField(this, "okBtnDisabled", false);
256
278
  __publicField(this, "closeOnPopstate", false);
279
+ __publicField(this, "closeOnClickOverlay", true);
257
280
  __publicField(this, "lockScroll", true);
258
281
  }
259
282
  }
@@ -1,4 +1,4 @@
1
- import { computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
1
+ import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode } from "vue";
2
2
  import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
@@ -22,17 +22,12 @@ const _sfc_main = create({
22
22
  default: "horizontal"
23
23
  }
24
24
  },
25
- components: {},
26
25
  setup(props, context) {
27
26
  const classes = computed(() => {
28
27
  const prefixCls = componentName;
29
- let defaultClassesObj = {
30
- [prefixCls]: true
31
- };
32
- let classesObj = {};
33
28
  if (props.direction === "horizontal") {
34
- classesObj = {
35
- ...defaultClassesObj,
29
+ return {
30
+ [prefixCls]: true,
36
31
  [`${prefixCls}-center`]: context.slots.default,
37
32
  [`${prefixCls}-left`]: props.contentPosition === "left",
38
33
  [`${prefixCls}-right`]: props.contentPosition === "right",
@@ -40,26 +35,21 @@ const _sfc_main = create({
40
35
  [`${prefixCls}-hairline`]: props.hairline
41
36
  };
42
37
  } else {
43
- classesObj = {
44
- ...defaultClassesObj,
38
+ return {
39
+ [prefixCls]: true,
45
40
  [`${prefixCls}-vertical`]: props.direction === "vertical"
46
41
  };
47
42
  }
48
- return classesObj;
49
43
  });
50
44
  return { classes };
51
45
  }
52
46
  });
53
47
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
54
- return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("view", {
55
- key: 0,
48
+ return openBlock(), createElementBlock("view", {
56
49
  class: normalizeClass(_ctx.classes)
57
50
  }, [
58
- renderSlot(_ctx.$slots, "default")
59
- ], 2)) : (openBlock(), createElementBlock("view", {
60
- key: 1,
61
- class: normalizeClass(_ctx.classes)
62
- }, null, 2));
51
+ _ctx.direction === "horizontal" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
52
+ ], 2);
63
53
  }
64
54
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
65
55
  export {
@@ -1,3 +1,22 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
20
  import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
2
21
  import { c as createComponent } from "./component-81a4c1d0.js";
3
22
  import { u as useExpose } from "./index-79c5dc33.js";
@@ -174,9 +193,9 @@ const _sfc_main = create({
174
193
  context.emit("change", newVal);
175
194
  }
176
195
  );
177
- return {
178
- classes,
179
- ...toRefs(state),
196
+ return __spreadProps(__spreadValues({
197
+ classes
198
+ }, toRefs(state)), {
180
199
  fixedStyle,
181
200
  clientHeight,
182
201
  setListGroup,
@@ -186,7 +205,7 @@ const _sfc_main = create({
186
205
  touchEnd,
187
206
  handleClickItem,
188
207
  handleClickIndex
189
- };
208
+ });
190
209
  }
191
210
  });
192
211
  const _hoisted_1 = { class: "nut-elevator__list__item__code" };
@@ -1,3 +1,22 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
20
  import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
2
21
  import { c as createComponent } from "./component-81a4c1d0.js";
3
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -174,7 +193,7 @@ const _sfc_main = create({
174
193
  const handleClick = () => {
175
194
  emit("click");
176
195
  };
177
- return { ...toRefs(state), root, ellipsis, classes, clickHandle, handleClick };
196
+ return __spreadProps(__spreadValues({}, toRefs(state)), { root, ellipsis, classes, clickHandle, handleClick });
178
197
  }
179
198
  });
180
199
  const _hoisted_1 = { key: 0 };
@@ -1,3 +1,38 @@
1
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
4
+ var __objRest = (source, exclude) => {
5
+ var target = {};
6
+ for (var prop in source)
7
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
8
+ target[prop] = source[prop];
9
+ if (source != null && __getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(source)) {
11
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
12
+ target[prop] = source[prop];
13
+ }
14
+ return target;
15
+ };
16
+ var __async = (__this, __arguments, generator) => {
17
+ return new Promise((resolve, reject) => {
18
+ var fulfilled = (value) => {
19
+ try {
20
+ step(generator.next(value));
21
+ } catch (e) {
22
+ reject(e);
23
+ }
24
+ };
25
+ var rejected = (value) => {
26
+ try {
27
+ step(generator.throw(value));
28
+ } catch (e) {
29
+ reject(e);
30
+ }
31
+ };
32
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
33
+ step((generator = generator.apply(__this, __arguments)).next());
34
+ });
35
+ };
1
36
  import { g as isObject, h as getPropByPath, f as isPromise, c as createComponent } from "./component-81a4c1d0.js";
2
37
  import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
3
38
  import CellGroup from "./CellGroup.js";
@@ -63,7 +98,7 @@ const component = (components) => {
63
98
  }
64
99
  formErrorTip.value[errorMsg.prop] = errorMsg.message;
65
100
  };
66
- const checkRule = (item) => {
101
+ const checkRule = (item) => __async(this, null, function* () {
67
102
  const { rules, prop } = item;
68
103
  const _Promise = (errorMsg) => {
69
104
  return new Promise((resolve, reject) => {
@@ -84,7 +119,7 @@ const component = (components) => {
84
119
  const _rules = [...(formRules == null ? void 0 : formRules[prop]) || [], ...rules];
85
120
  while (_rules.length) {
86
121
  const rule = _rules.shift();
87
- const { validator, ...ruleWithoutValidator } = rule;
122
+ const _a = rule, { validator } = _a, ruleWithoutValidator = __objRest(_a, ["validator"]);
88
123
  const { required, regex, message } = ruleWithoutValidator;
89
124
  const errorMsg = { prop, message };
90
125
  if (required) {
@@ -98,16 +133,15 @@ const component = (components) => {
98
133
  if (validator) {
99
134
  const result = validator(value, ruleWithoutValidator);
100
135
  if (isPromise(result)) {
101
- return new Promise((r, j) => {
102
- result.then((res) => {
103
- if (!res) {
104
- tipMessage(errorMsg);
105
- r(errorMsg);
106
- } else {
107
- r(true);
108
- }
109
- }).catch((e) => j(e));
110
- });
136
+ try {
137
+ const value2 = yield result;
138
+ if (value2 === false) {
139
+ return _Promise(errorMsg);
140
+ }
141
+ } catch (error) {
142
+ const validateErrorMsg = { prop, message: error };
143
+ return _Promise(validateErrorMsg);
144
+ }
111
145
  } else {
112
146
  if (!result) {
113
147
  return _Promise(errorMsg);
@@ -116,24 +150,19 @@ const component = (components) => {
116
150
  }
117
151
  }
118
152
  return Promise.resolve(true);
119
- };
153
+ });
120
154
  const validate = (customProp = "") => {
121
155
  return new Promise((resolve, reject) => {
122
156
  try {
123
157
  const task = findFormItem(slots.default());
124
158
  const errors = task.map((item) => {
125
- if (customProp) {
126
- if (customProp == item.prop) {
127
- return checkRule(item);
128
- } else {
129
- return Promise.resolve(true);
130
- }
131
- } else {
132
- return checkRule(item);
159
+ if (customProp && customProp !== item.prop) {
160
+ return Promise.resolve(true);
133
161
  }
162
+ return checkRule(item);
134
163
  });
135
164
  Promise.all(errors).then((errorRes) => {
136
- errorRes = errorRes.filter((item) => item != true);
165
+ errorRes = errorRes.filter((item) => item !== true);
137
166
  const res = { valid: true, errors: [] };
138
167
  if (errorRes.length) {
139
168
  res.valid = false;
@@ -160,12 +189,13 @@ const _sfc_main = create(
160
189
  [CellGroup.name]: CellGroup
161
190
  })
162
191
  );
192
+ const _hoisted_1 = ["onSubmit"];
163
193
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
164
194
  const _component_nut_cell_group = resolveComponent("nut-cell-group");
165
195
  return openBlock(), createElementBlock("form", {
166
196
  class: "nut-form",
167
197
  action: "#",
168
- onSubmit: _cache[0] || (_cache[0] = withModifiers(() => false, ["prevent"]))
198
+ onSubmit: withModifiers(() => false, ["prevent"])
169
199
  }, [
170
200
  createVNode(_component_nut_cell_group, null, {
171
201
  default: withCtx(() => [
@@ -173,7 +203,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
173
203
  ]),
174
204
  _: 3
175
205
  })
176
- ], 32);
206
+ ], 40, _hoisted_1);
177
207
  }
178
208
  const Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
179
209
  export {
@@ -1,4 +1,23 @@
1
- import { reactive, useSlots, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { reactive, useSlots, computed, ref, onMounted, onBeforeUnmount, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue";
2
21
  import { c as createComponent } from "./component-81a4c1d0.js";
3
22
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
4
23
  import { Image, ImageError } from "@nutui/icons-vue";
@@ -40,6 +59,10 @@ const _sfc_main = create({
40
59
  showLoading: {
41
60
  type: Boolean,
42
61
  default: true
62
+ },
63
+ lazyLoad: {
64
+ type: Boolean,
65
+ default: false
43
66
  }
44
67
  },
45
68
  components: {
@@ -61,6 +84,30 @@ const _sfc_main = create({
61
84
  [`${prefixCls}-round`]: props.round
62
85
  };
63
86
  });
87
+ const observer = ref(null);
88
+ const show = ref(false);
89
+ const imgRef = ref(null);
90
+ const initObserver = () => {
91
+ const options = {
92
+ threshold: [0],
93
+ rootMargin: "0px"
94
+ };
95
+ observer.value = new IntersectionObserver((entires) => {
96
+ entires.forEach((item) => {
97
+ if (item.isIntersecting) {
98
+ show.value = true;
99
+ observer.value.disconnect();
100
+ }
101
+ });
102
+ }, options);
103
+ imgRef.value && observer.value.observe(imgRef.value);
104
+ };
105
+ onMounted(() => {
106
+ props.lazyLoad && initObserver();
107
+ });
108
+ onBeforeUnmount(() => {
109
+ observer.value && observer.value.disconnect();
110
+ });
64
111
  const stylebox = computed(() => {
65
112
  let style = {};
66
113
  if (props.width)
@@ -87,6 +134,7 @@ const _sfc_main = create({
87
134
  }
88
135
  );
89
136
  const load = () => {
137
+ state.isError = false;
90
138
  state.loading = false;
91
139
  emit("load");
92
140
  };
@@ -98,10 +146,10 @@ const _sfc_main = create({
98
146
  const imageClick = (event) => {
99
147
  emit("click", event);
100
148
  };
101
- return { ...toRefs(state), imageClick, classes, styles, stylebox, error, load };
149
+ return __spreadProps(__spreadValues({}, toRefs(state)), { imageClick, classes, styles, stylebox, error, load, show, imgRef });
102
150
  }
103
151
  });
104
- const _hoisted_1 = ["src", "alt"];
152
+ const _hoisted_1 = ["src", "date-src", "alt"];
105
153
  const _hoisted_2 = {
106
154
  key: 0,
107
155
  class: "nut-img-loading"
@@ -113,20 +161,22 @@ const _hoisted_3 = {
113
161
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
114
162
  const _component_Image = resolveComponent("Image");
115
163
  const _component_ImageError = resolveComponent("ImageError");
116
- return openBlock(), createElementBlock("view", {
164
+ return openBlock(), createElementBlock("div", {
117
165
  class: normalizeClass(_ctx.classes),
118
166
  style: normalizeStyle(_ctx.stylebox),
119
167
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.imageClick && _ctx.imageClick(...args))
120
168
  }, [
121
169
  createElementVNode("img", {
170
+ ref: "imgRef",
122
171
  class: "nut-img",
123
- src: _ctx.src,
172
+ src: _ctx.lazyLoad ? _ctx.show ? _ctx.src : void 0 : _ctx.src,
173
+ "date-src": _ctx.lazyLoad ? _ctx.show ? void 0 : _ctx.src : void 0,
124
174
  alt: _ctx.alt,
125
175
  onLoad: _cache[0] || (_cache[0] = (...args) => _ctx.load && _ctx.load(...args)),
126
176
  onError: _cache[1] || (_cache[1] = (...args) => _ctx.error && _ctx.error(...args)),
127
177
  style: normalizeStyle(_ctx.styles)
128
178
  }, null, 44, _hoisted_1),
129
- _ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_2, [
179
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [
130
180
  !_ctx.slotLoding ? (openBlock(), createBlock(_component_Image, {
131
181
  key: 0,
132
182
  width: "16px",
@@ -135,7 +185,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
185
  })) : createCommentVNode("", true),
136
186
  renderSlot(_ctx.$slots, "loading")
137
187
  ])) : createCommentVNode("", true),
138
- _ctx.isError && !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_3, [
188
+ _ctx.isError && !_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_3, [
139
189
  !_ctx.slotError ? (openBlock(), createBlock(_component_ImageError, {
140
190
  key: 0,
141
191
  width: "16px",