@nutui/nutui 3.2.2-beta.1 → 3.2.2

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 (183) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +5 -3
  3. package/dist/nutui.es.js +1767 -1993
  4. package/dist/nutui.umd.js +1777 -2002
  5. package/dist/packages/_es/ActionSheet.js +22 -4
  6. package/dist/packages/_es/Address.js +57 -63
  7. package/dist/packages/_es/AddressList.js +3 -7
  8. package/dist/packages/_es/Animate.js +21 -2
  9. package/dist/packages/_es/Audio.js +25 -11
  10. package/dist/packages/_es/AudioOperate.js +21 -2
  11. package/dist/packages/_es/Avatar.js +20 -5
  12. package/dist/packages/_es/AvatarGroup.js +1 -1
  13. package/dist/packages/_es/BackTop.js +2 -2
  14. package/dist/packages/_es/Badge.js +1 -1
  15. package/dist/packages/_es/Barrage.js +4 -7
  16. package/dist/packages/_es/Button.js +1 -1
  17. package/dist/packages/_es/Calendar.js +1 -1
  18. package/dist/packages/_es/CalendarItem.js +1 -1
  19. package/dist/packages/_es/Card.js +1 -1
  20. package/dist/packages/_es/Cascader.js +65 -51
  21. package/dist/packages/_es/Category.js +1 -1
  22. package/dist/packages/_es/CategoryPane.js +1 -1
  23. package/dist/packages/_es/Cell.js +1 -1
  24. package/dist/packages/_es/CellGroup.js +1 -1
  25. package/dist/packages/_es/Checkbox.js +17 -31
  26. package/dist/packages/_es/CheckboxGroup.js +7 -14
  27. package/dist/packages/_es/CircleProgress.js +1 -1
  28. package/dist/packages/_es/Col.js +1 -1
  29. package/dist/packages/_es/Collapse.js +19 -22
  30. package/dist/packages/_es/CollapseItem.js +32 -18
  31. package/dist/packages/_es/Comment.js +9 -13
  32. package/dist/packages/_es/ConfigProvider.js +4 -8
  33. package/dist/packages/_es/CountDown.js +46 -40
  34. package/dist/packages/_es/CountUp.js +40 -39
  35. package/dist/packages/_es/DatePicker.js +40 -27
  36. package/dist/packages/_es/Dialog.js +28 -13
  37. package/dist/packages/_es/Divider.js +24 -7
  38. package/dist/packages/_es/Drag.js +4 -4
  39. package/dist/packages/_es/Ecard.js +4 -7
  40. package/dist/packages/_es/Elevator.js +38 -25
  41. package/dist/packages/_es/Ellipsis.js +28 -14
  42. package/dist/packages/_es/Empty.js +1 -1
  43. package/dist/packages/_es/FixedNav.js +1 -1
  44. package/dist/packages/_es/Form.js +5 -9
  45. package/dist/packages/_es/FormItem.js +5 -4
  46. package/dist/packages/_es/Grid.js +1 -1
  47. package/dist/packages/_es/GridItem.js +1 -1
  48. package/dist/packages/_es/Icon.js +11 -15
  49. package/dist/packages/_es/Image.js +24 -8
  50. package/dist/packages/_es/ImagePreview.js +34 -22
  51. package/dist/packages/_es/Indicator.js +1 -1
  52. package/dist/packages/_es/InfiniteLoading.js +24 -5
  53. package/dist/packages/_es/Input.js +9 -13
  54. package/dist/packages/_es/InputNumber.js +1 -1
  55. package/dist/packages/_es/Invoice.js +156 -0
  56. package/dist/packages/_es/Layout.js +1 -1
  57. package/dist/packages/_es/List.js +25 -10
  58. package/dist/packages/_es/Menu.js +7 -13
  59. package/dist/packages/_es/MenuItem.js +22 -3
  60. package/dist/packages/_es/Navbar.js +2 -2
  61. package/dist/packages/_es/NoticeBar.js +28 -17
  62. package/dist/packages/_es/Notify.js +38 -20
  63. package/dist/packages/_es/NumberKeyboard.js +5 -12
  64. package/dist/packages/_es/OldPicker.js +46 -47
  65. package/dist/packages/_es/OverLay.js +23 -11
  66. package/dist/packages/_es/Pagination.js +1 -1
  67. package/dist/packages/_es/Picker.js +72 -64
  68. package/dist/packages/_es/Popover.js +52 -55
  69. package/dist/packages/_es/Popup.js +40 -35
  70. package/dist/packages/_es/Price.js +1 -1
  71. package/dist/packages/_es/Progress.js +1 -1
  72. package/dist/packages/_es/PullRefresh.js +20 -5
  73. package/dist/packages/_es/Radio.js +15 -27
  74. package/dist/packages/_es/RadioGroup.js +5 -12
  75. package/dist/packages/_es/Range.js +33 -20
  76. package/dist/packages/_es/Rate.js +24 -5
  77. package/dist/packages/_es/Row.js +1 -1
  78. package/dist/packages/_es/SearchBar.js +44 -11
  79. package/dist/packages/_es/ShortPassword.js +11 -18
  80. package/dist/packages/_es/SideNavBar.js +22 -4
  81. package/dist/packages/_es/SideNavBarItem.js +1 -1
  82. package/dist/packages/_es/Signature.js +21 -2
  83. package/dist/packages/_es/Skeleton.js +1 -1
  84. package/dist/packages/_es/Sku.js +32 -24
  85. package/dist/packages/_es/Step.js +22 -4
  86. package/dist/packages/_es/Steps.js +4 -8
  87. package/dist/packages/_es/Sticky.js +12 -23
  88. package/dist/packages/_es/SubSideNavBar.js +22 -4
  89. package/dist/packages/_es/Swipe.js +24 -5
  90. package/dist/packages/_es/Swiper.js +14 -23
  91. package/dist/packages/_es/SwiperItem.js +1 -1
  92. package/dist/packages/_es/Switch.js +7 -10
  93. package/dist/packages/_es/TabPane.js +1 -1
  94. package/dist/packages/_es/Tabbar.js +4 -7
  95. package/dist/packages/_es/TabbarItem.js +1 -1
  96. package/dist/packages/_es/Table.js +25 -10
  97. package/dist/packages/_es/Tabs.js +41 -25
  98. package/dist/packages/_es/Tag.js +1 -1
  99. package/dist/packages/_es/TextArea.js +5 -8
  100. package/dist/packages/_es/TimeDetail.js +24 -5
  101. package/dist/packages/_es/TimePannel.js +22 -4
  102. package/dist/packages/_es/TimeSelect.js +1 -1
  103. package/dist/packages/_es/Toast.js +47 -28
  104. package/dist/packages/_es/Uploader.js +27 -18
  105. package/dist/packages/_es/Video.js +33 -22
  106. package/dist/packages/_es/WaterMark.js +41 -31
  107. package/dist/packages/_es/common.js +11 -21
  108. package/dist/packages/_es/component.js +5 -5
  109. package/dist/packages/_es/index.js +1 -1
  110. package/dist/packages/_es/index2.js +1 -1
  111. package/dist/packages/_es/index3.js +1 -1
  112. package/dist/packages/_es/index4.js +1 -1
  113. package/dist/packages/_es/index5.js +31 -23
  114. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  115. package/dist/packages/_es/pxCheck.js +1 -1
  116. package/dist/packages/_es/raf.js +1 -1
  117. package/dist/packages/address/index.scss +17 -0
  118. package/dist/packages/invoice/index.scss +33 -0
  119. package/dist/packages/locale/lang/baseLang.js +1 -1
  120. package/dist/packages/locale/lang/en-US.js +1 -1
  121. package/dist/packages/locale/lang/id-ID.js +1 -1
  122. package/dist/packages/locale/lang/index.js +1 -1
  123. package/dist/packages/locale/lang/zh-CN.js +1 -1
  124. package/dist/packages/locale/lang/zh-TW.js +1 -1
  125. package/dist/packages/menuitem/index.scss +3 -1
  126. package/dist/packages/navbar/index.scss +6 -8
  127. package/dist/packages/picker/index.scss +8 -0
  128. package/dist/packages/price/index.scss +1 -1
  129. package/dist/packages/searchbar/index.scss +2 -0
  130. package/dist/packages/textarea/index.scss +4 -1
  131. package/dist/packages/toast/index.scss +3 -0
  132. package/dist/smartips/attributes.json +36 -12
  133. package/dist/smartips/tags.json +20 -10
  134. package/dist/smartips/web-types.json +74 -13
  135. package/dist/style.css +1 -1
  136. package/dist/style.es.js +1 -1
  137. package/dist/styles/themes/default.scss +51 -50
  138. package/dist/styles/themes/jdb.scss +51 -50
  139. package/dist/styles/themes/jdt.scss +51 -50
  140. package/dist/styles/variables-jdb.scss +4 -1
  141. package/dist/styles/variables-jdt.scss +4 -1
  142. package/dist/styles/variables.scss +4 -1
  143. package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
  144. package/dist/types/__VUE/address/index.vue.d.ts +3 -3
  145. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  146. package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
  147. package/dist/types/__VUE/backtop/index.vue.d.ts +5 -8
  148. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  149. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  150. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  151. package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
  152. package/dist/types/__VUE/cell/index.vue.d.ts +8 -8
  153. package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
  154. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  155. package/dist/types/__VUE/datepicker/index.vue.d.ts +9 -2
  156. package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
  157. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  158. package/dist/types/__VUE/formitem/index.vue.d.ts +1 -0
  159. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  160. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/input/index.vue.d.ts +6 -7
  162. package/dist/types/__VUE/invoice/index.vue.d.ts +48 -0
  163. package/dist/types/__VUE/menu/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  165. package/dist/types/__VUE/notify/index.d.ts +15 -5
  166. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
  167. package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
  168. package/dist/types/__VUE/picker/index.vue.d.ts +5 -3
  169. package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
  170. package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
  171. package/dist/types/__VUE/radio/index.vue.d.ts +3 -3
  172. package/dist/types/__VUE/searchbar/index.vue.d.ts +18 -3
  173. package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
  174. package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
  175. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  176. package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
  177. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/toast/index.vue.d.ts +5 -2
  179. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  181. package/dist/types/index.d.ts +1 -1
  182. package/dist/types/nutui.d.ts +2 -1
  183. package/package.json +1 -1
@@ -1,5 +1,24 @@
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
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
22
  * (c) 2022 @jdf2e.
4
23
  * Released under the MIT License.
5
24
  */
@@ -152,18 +171,12 @@ const _sfc_main = create({
152
171
  }
153
172
  return styles;
154
173
  });
155
- watch(
156
- () => props.text,
157
- (value) => {
158
- initScrollWrap();
159
- }
160
- );
161
- watch(
162
- () => props.list,
163
- (value) => {
164
- state.scrollList = [].concat(value);
165
- }
166
- );
174
+ watch(() => props.text, (value) => {
175
+ initScrollWrap(value);
176
+ });
177
+ watch(() => props.list, (value) => {
178
+ state.scrollList = [].concat(value);
179
+ });
167
180
  const initScrollWrap = (value) => {
168
181
  if (state.showNoticeBar == false) {
169
182
  return;
@@ -264,9 +277,7 @@ const _sfc_main = create({
264
277
  onUnmounted(() => {
265
278
  clearInterval(state.timer);
266
279
  });
267
- return {
268
- ...toRefs(props),
269
- ...toRefs(state),
280
+ return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(state)), {
270
281
  isEllipsis,
271
282
  classes,
272
283
  iconShow,
@@ -282,7 +293,7 @@ const _sfc_main = create({
282
293
  go,
283
294
  handleClickIcon,
284
295
  slots
285
- };
296
+ });
286
297
  }
287
298
  });
288
299
  const _hoisted_1 = {
@@ -1,5 +1,24 @@
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
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
22
  * (c) 2022 @jdf2e.
4
23
  * Released under the MIT License.
5
24
  */
@@ -11,7 +30,7 @@ import "../locale/lang";
11
30
  import "./OverLay.js";
12
31
  import "./Icon.js";
13
32
  import "./pxCheck.js";
14
- const { componentName, create } = createComponent("notify");
33
+ const { create } = createComponent("notify");
15
34
  const _sfc_main = create({
16
35
  components: {
17
36
  [Popup.name]: Popup
@@ -46,7 +65,7 @@ const _sfc_main = create({
46
65
  onClick: Function,
47
66
  unmount: Function
48
67
  },
49
- setup(props, { slots }) {
68
+ setup(props) {
50
69
  let timer = null;
51
70
  const state = reactive({
52
71
  mounted: false
@@ -77,14 +96,11 @@ const _sfc_main = create({
77
96
  if (props.duration) {
78
97
  show();
79
98
  }
80
- watch(
81
- () => props.duration,
82
- (val) => {
83
- if (val) {
84
- show();
85
- }
99
+ watch(() => props.duration, (val) => {
100
+ if (val) {
101
+ show();
86
102
  }
87
- );
103
+ });
88
104
  const onAfterLeave = () => {
89
105
  clearTimer();
90
106
  props.unmount && props.unmount(props.id);
@@ -124,7 +140,9 @@ const defaultOptions = {
124
140
  color: void 0,
125
141
  background: void 0,
126
142
  duration: 3e3,
127
- className: ""
143
+ className: "",
144
+ teleport: "",
145
+ unmount: new Function()
128
146
  };
129
147
  let idsMap = [];
130
148
  let optsMap = [];
@@ -152,13 +170,13 @@ const updateNotify = (opts) => {
152
170
  if (container) {
153
171
  const currentOpt = optsMap.find((item) => item.id === opts.id);
154
172
  if (currentOpt) {
155
- opts = { ...defaultOptions, ...currentOpt, ...opts };
173
+ opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
156
174
  } else {
157
- opts = { ...defaultOptions, ...opts };
175
+ opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
158
176
  }
159
177
  const instance = createVNode(Notify, opts);
160
178
  render(instance, container);
161
- return instance.component.ctx;
179
+ return instance.component.data;
162
180
  }
163
181
  };
164
182
  const mountNotify = (opts) => {
@@ -172,7 +190,7 @@ const mountNotify = (opts) => {
172
190
  } else {
173
191
  _id = new Date().getTime() + "";
174
192
  }
175
- opts = { ...defaultOptions, ...opts };
193
+ opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
176
194
  opts.id = _id;
177
195
  idsMap.push(opts.id);
178
196
  optsMap.push(opts);
@@ -204,23 +222,23 @@ const errorMsg = (msg) => {
204
222
  const NotifyFunction = {
205
223
  text(msg, obj = {}) {
206
224
  errorMsg(msg);
207
- return mountNotify({ ...obj, msg });
225
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg }));
208
226
  },
209
227
  primary(msg, obj = {}) {
210
228
  errorMsg(msg);
211
- return mountNotify({ ...obj, msg, type: "primary" });
229
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "primary" }));
212
230
  },
213
231
  success(msg, obj = {}) {
214
232
  errorMsg(msg);
215
- return mountNotify({ ...obj, msg, type: "success" });
233
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "success" }));
216
234
  },
217
235
  danger(msg, obj = {}) {
218
236
  errorMsg(msg);
219
- return mountNotify({ ...obj, msg, type: "danger" });
237
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "danger" }));
220
238
  },
221
239
  warn(msg, obj = {}) {
222
240
  errorMsg(msg);
223
- return mountNotify({ ...obj, msg, type: "warning" });
241
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "warning" }));
224
242
  },
225
243
  hide() {
226
244
  clearNotify();
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -106,11 +106,7 @@ const _sfc_main = create({
106
106
  keys.push({ id: 0, type: "number" }, { id: customKeys[0], type: "custom" });
107
107
  }
108
108
  } else if (customKeys.length === 2) {
109
- keys.push(
110
- { id: customKeys[0], type: "custom" },
111
- { id: 0, type: "number" },
112
- { id: customKeys[1], type: "custom" }
113
- );
109
+ keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: customKeys[1], type: "custom" });
114
110
  }
115
111
  return keys;
116
112
  }
@@ -120,12 +116,9 @@ const _sfc_main = create({
120
116
  }
121
117
  return defaultKey();
122
118
  });
123
- watch(
124
- () => props.visible,
125
- (value) => {
126
- show.value = value;
127
- }
128
- );
119
+ watch(() => props.visible, (value) => {
120
+ show.value = value;
121
+ });
129
122
  function onTouchstart(item, event) {
130
123
  event.stopPropagation();
131
124
  clickKeyIndex.value = item.id;
@@ -1,5 +1,24 @@
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
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
22
  * (c) 2022 @jdf2e.
4
23
  * Released under the MIT License.
5
24
  */
@@ -158,29 +177,20 @@ const _sfc_main$1 = create$1({
158
177
  type && setChooseValue();
159
178
  setMove(-move);
160
179
  };
161
- watch(
162
- () => props.listData,
163
- (val) => {
164
- state.transformY = 0;
165
- modifyStatus(false);
166
- },
167
- {
168
- deep: true
169
- }
170
- );
171
- watch(
172
- () => props.defaultIndex,
173
- (val) => {
174
- state.transformY = 0;
175
- modifyStatus(false);
176
- }
177
- );
180
+ watch(() => props.listData, (val) => {
181
+ state.transformY = 0;
182
+ modifyStatus(false);
183
+ }, {
184
+ deep: true
185
+ });
186
+ watch(() => props.defaultIndex, (val) => {
187
+ state.transformY = 0;
188
+ modifyStatus(false);
189
+ });
178
190
  onMounted(() => {
179
191
  modifyStatus(true);
180
192
  });
181
- return {
182
- ...toRefs(state),
183
- ...toRefs(props),
193
+ return __spreadProps(__spreadValues(__spreadValues({}, toRefs(state)), toRefs(props)), {
184
194
  wrapper,
185
195
  setRollerStyle,
186
196
  isHidden,
@@ -193,7 +203,7 @@ const _sfc_main$1 = create$1({
193
203
  touchRollerStyle,
194
204
  touchListStyle,
195
205
  setMove
196
- };
206
+ });
197
207
  }
198
208
  });
199
209
  const _hoisted_1$1 = { class: "nut-oldpicker-content" };
@@ -245,8 +255,7 @@ const _sfc_main = create({
245
255
  [column.name]: column,
246
256
  [Popup.name]: Popup
247
257
  },
248
- props: {
249
- ...popupProps,
258
+ props: __spreadProps(__spreadValues({}, popupProps), {
250
259
  title: {
251
260
  type: String,
252
261
  default: ""
@@ -273,7 +282,7 @@ const _sfc_main = create({
273
282
  type: [Number, String],
274
283
  default: 0
275
284
  }
276
- },
285
+ }),
277
286
  emits: ["close", "change", "confirm", "update:visible"],
278
287
  setup(props, { emit }) {
279
288
  const childrenKey = "children";
@@ -369,9 +378,7 @@ const _sfc_main = create({
369
378
  _defaultIndex = dataIndex;
370
379
  } else if (dataType.value === "multipleColumns") {
371
380
  defaultIndexList[columnIndex] = dataIndex;
372
- const val = defaultIndexList.map(
373
- (res, i) => toRaw(state.formattedColumns)[i].values[res]
374
- );
381
+ const val = defaultIndexList.map((res, i) => toRaw(state.formattedColumns)[i].values[res]);
375
382
  emit("change", val, columnIndex, dataIndex);
376
383
  }
377
384
  };
@@ -383,9 +390,7 @@ const _sfc_main = create({
383
390
  for (let i = 0; i < defaultIndexList.length; i++) {
384
391
  state.formattedColumns[i].defaultIndex = defaultIndexList[i];
385
392
  }
386
- const checkedArr = toRaw(state.formattedColumns).map(
387
- (res) => res.values && res.values[res.defaultIndex]
388
- );
393
+ const checkedArr = toRaw(state.formattedColumns).map((res) => res.values && res.values[res.defaultIndex]);
389
394
  emit("confirm", checkedArr);
390
395
  } else if (dataType.value === "cascade") {
391
396
  emit("confirm", getCascadeData(toRaw(state.formattedColumns), state.defaultIndex));
@@ -400,28 +405,22 @@ const _sfc_main = create({
400
405
  if (props.visible)
401
406
  state.show = false;
402
407
  });
403
- watch(
404
- () => props.visible,
405
- (val) => {
406
- state.show = val;
407
- }
408
- );
409
- watch(
410
- () => props.listData,
411
- (val) => {
412
- state.formattedColumns = val;
413
- }
414
- );
415
- return {
416
- classes,
417
- ...toRefs(state),
408
+ watch(() => props.visible, (val) => {
409
+ state.show = val;
410
+ });
411
+ watch(() => props.listData, (val) => {
412
+ state.formattedColumns = val;
413
+ });
414
+ return __spreadProps(__spreadValues({
415
+ classes
416
+ }, toRefs(state)), {
418
417
  column,
419
418
  dataType,
420
419
  columnList,
421
420
  close,
422
421
  changeHandler,
423
422
  confirm
424
- };
423
+ });
425
424
  }
426
425
  });
427
426
  const _hoisted_1 = { class: "nut-oldpicker__bar" };
@@ -1,5 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
1
17
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
19
  * (c) 2022 @jdf2e.
4
20
  * Released under the MIT License.
5
21
  */
@@ -48,12 +64,9 @@ const _sfc_main = create({
48
64
  [props.overlayClass]: true
49
65
  };
50
66
  });
51
- watch(
52
- () => props.visible,
53
- (value) => {
54
- value ? lock() : unlock();
55
- }
56
- );
67
+ watch(() => props.visible, (value) => {
68
+ value ? lock() : unlock();
69
+ });
57
70
  const lock = () => {
58
71
  if (props.lockScroll && props.visible) {
59
72
  document.body.classList.add("nut-overflow-hidden");
@@ -67,11 +80,10 @@ const _sfc_main = create({
67
80
  onMounted(lock);
68
81
  onActivated(lock);
69
82
  const style = computed(() => {
70
- return {
83
+ return __spreadValues({
71
84
  animationDuration: `${props.duration}s`,
72
- zIndex: props.zIndex,
73
- ...props.overlayStyle
74
- };
85
+ zIndex: props.zIndex
86
+ }, props.overlayStyle);
75
87
  });
76
88
  const touchmove = (e) => {
77
89
  if (props.lockScroll)
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,24 @@
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
  /*!
2
- * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
3
22
  * (c) 2022 @jdf2e.
4
23
  * Released under the MIT License.
5
24
  */
@@ -189,36 +208,27 @@ const _sfc_main$1 = create$1({
189
208
  };
190
209
  const stopMomentum = () => {
191
210
  moving.value = false;
211
+ touchTime.value = 0;
192
212
  setChooseValue();
193
213
  };
194
- watch(
195
- () => props.column,
196
- (val) => {
197
- if (props.column && props.column.length > 0) {
198
- state.transformY = 0;
199
- modifyStatus(false);
200
- }
201
- },
202
- {
203
- deep: true
204
- }
205
- );
206
- watch(
207
- () => props.value,
208
- (val) => {
214
+ watch(() => props.column, (val) => {
215
+ if (props.column && props.column.length > 0) {
209
216
  state.transformY = 0;
210
217
  modifyStatus(false);
211
- },
212
- {
213
- deep: true
214
218
  }
215
- );
219
+ }, {
220
+ deep: true
221
+ });
222
+ watch(() => props.value, (val) => {
223
+ state.transformY = 0;
224
+ modifyStatus(false);
225
+ }, {
226
+ deep: true
227
+ });
216
228
  onMounted(() => {
217
229
  modifyStatus(true);
218
230
  });
219
- return {
220
- ...toRefs(state),
221
- ...toRefs(props),
231
+ return __spreadProps(__spreadValues(__spreadValues({}, toRefs(state)), toRefs(props)), {
222
232
  wrapper,
223
233
  setRollerStyle,
224
234
  isHidden,
@@ -231,7 +241,7 @@ const _sfc_main$1 = create$1({
231
241
  touchTileStyle,
232
242
  setMove,
233
243
  stopMomentum
234
- };
244
+ });
235
245
  }
236
246
  });
237
247
  const _hoisted_1$1 = {
@@ -286,8 +296,7 @@ const _sfc_main = create({
286
296
  [column.name]: column,
287
297
  [Popup.name]: Popup
288
298
  },
289
- props: {
290
- ...popupProps,
299
+ props: __spreadProps(__spreadValues({}, popupProps), {
291
300
  modelValue: {
292
301
  type: Array,
293
302
  default: () => []
@@ -322,7 +331,7 @@ const _sfc_main = create({
322
331
  type: [Number, String],
323
332
  default: 1e3
324
333
  }
325
- },
334
+ }),
326
335
  emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
327
336
  setup(props, { emit }) {
328
337
  const state = reactive({
@@ -330,7 +339,12 @@ const _sfc_main = create({
330
339
  formattedColumns: props.columns
331
340
  });
332
341
  let defaultValues = ref(props.modelValue);
333
- ref();
342
+ const pickerColumn = ref([]);
343
+ const swipeRef = (el) => {
344
+ if (el && pickerColumn.value.length < columnsList.value.length) {
345
+ pickerColumn.value.push(el);
346
+ }
347
+ };
334
348
  const classes = computed(() => {
335
349
  const prefixCls = componentName;
336
350
  return {
@@ -420,6 +434,9 @@ const _sfc_main = create({
420
434
  }
421
435
  };
422
436
  const confirmHandler = () => {
437
+ pickerColumn.value.length > 0 && pickerColumn.value.forEach((column2) => {
438
+ column2.stopMomentum();
439
+ });
423
440
  if (defaultValues.value && !defaultValues.value.length) {
424
441
  columnsList.value.forEach((columns) => {
425
442
  defaultValues.value.push(columns[0].value);
@@ -440,42 +457,30 @@ const _sfc_main = create({
440
457
  if (props.visible)
441
458
  state.show = false;
442
459
  });
443
- watch(
444
- () => props.modelValue,
445
- (newValues) => {
446
- const isSameValue = JSON.stringify(newValues) === JSON.stringify(defaultValues.value);
447
- if (!isSameValue) {
448
- defaultValues.value = newValues;
449
- }
450
- },
451
- { deep: true }
452
- );
453
- watch(
454
- defaultValues,
455
- (newValues) => {
456
- const isSameValue = JSON.stringify(newValues) === JSON.stringify(props.modelValue);
457
- if (!isSameValue) {
458
- emit("update:modelValue", newValues);
459
- }
460
- },
461
- { immediate: true }
462
- );
463
- watch(
464
- () => props.visible,
465
- (val) => {
466
- state.show = val;
460
+ watch(() => props.modelValue, (newValues) => {
461
+ const isSameValue = JSON.stringify(newValues) === JSON.stringify(defaultValues.value);
462
+ if (!isSameValue) {
463
+ defaultValues.value = newValues;
467
464
  }
468
- );
469
- watch(
470
- () => props.columns,
471
- (val) => {
472
- if (val.length)
473
- state.formattedColumns = val;
465
+ }, { deep: true });
466
+ watch(defaultValues, (newValues) => {
467
+ const isSameValue = JSON.stringify(newValues) === JSON.stringify(props.modelValue);
468
+ if (!isSameValue) {
469
+ emit("update:modelValue", newValues);
474
470
  }
475
- );
476
- return {
477
- classes,
478
- ...toRefs(state),
471
+ }, { immediate: true });
472
+ watch(() => props.visible, (val) => {
473
+ state.show = val;
474
+ if (val)
475
+ pickerColumn.value = [];
476
+ });
477
+ watch(() => props.columns, (val) => {
478
+ if (val.length)
479
+ state.formattedColumns = val;
480
+ });
481
+ return __spreadProps(__spreadValues({
482
+ classes
483
+ }, toRefs(state)), {
479
484
  column,
480
485
  columnsType,
481
486
  columnsList,
@@ -483,8 +488,10 @@ const _sfc_main = create({
483
488
  changeHandler,
484
489
  confirmHandler,
485
490
  defaultValues,
486
- translate
487
- };
491
+ translate,
492
+ pickerColumn,
493
+ swipeRef
494
+ });
488
495
  }
489
496
  });
490
497
  const _hoisted_1 = { class: "nut-picker__bar" };
@@ -532,6 +539,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
532
539
  key: columnIndex
533
540
  }, [
534
541
  createVNode(_component_nut_picker_column, {
542
+ ref: _ctx.swipeRef,
535
543
  itemShow: _ctx.show,
536
544
  column: column2,
537
545
  readonly: _ctx.readonly,