@nutui/nutui 3.2.1 → 3.2.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/nutui.es.js +938 -548
  2. package/dist/nutui.umd.js +938 -548
  3. package/dist/packages/_es/ActionSheet.js +1 -1
  4. package/dist/packages/_es/Address.js +56 -32
  5. package/dist/packages/_es/AddressList.js +6 -2
  6. package/dist/packages/_es/Animate.js +1 -1
  7. package/dist/packages/_es/Audio.js +7 -4
  8. package/dist/packages/_es/AudioOperate.js +1 -1
  9. package/dist/packages/_es/Avatar.js +1 -1
  10. package/dist/packages/_es/AvatarGroup.js +1 -1
  11. package/dist/packages/_es/BackTop.js +1 -1
  12. package/dist/packages/_es/Badge.js +1 -1
  13. package/dist/packages/_es/Barrage.js +7 -4
  14. package/dist/packages/_es/Button.js +1 -1
  15. package/dist/packages/_es/Calendar.js +10 -4
  16. package/dist/packages/_es/CalendarItem.js +1 -1
  17. package/dist/packages/_es/Card.js +1 -1
  18. package/dist/packages/_es/Cascader.js +33 -20
  19. package/dist/packages/_es/Category.js +1 -1
  20. package/dist/packages/_es/CategoryPane.js +1 -1
  21. package/dist/packages/_es/Cell.js +1 -1
  22. package/dist/packages/_es/CellGroup.js +1 -1
  23. package/dist/packages/_es/Checkbox.js +31 -17
  24. package/dist/packages/_es/CheckboxGroup.js +14 -7
  25. package/dist/packages/_es/CircleProgress.js +1 -1
  26. package/dist/packages/_es/Col.js +5 -11
  27. package/dist/packages/_es/Collapse.js +22 -19
  28. package/dist/packages/_es/CollapseItem.js +12 -9
  29. package/dist/packages/_es/Comment.js +13 -9
  30. package/dist/packages/_es/ConfigProvider.js +8 -4
  31. package/dist/packages/_es/CountDown.js +36 -24
  32. package/dist/packages/_es/CountUp.js +35 -19
  33. package/dist/packages/_es/DatePicker.js +19 -10
  34. package/dist/packages/_es/Dialog.js +9 -6
  35. package/dist/packages/_es/Divider.js +1 -1
  36. package/dist/packages/_es/Drag.js +1 -1
  37. package/dist/packages/_es/Ecard.js +7 -4
  38. package/dist/packages/_es/Elevator.js +21 -15
  39. package/dist/packages/_es/Ellipsis.js +13 -8
  40. package/dist/packages/_es/Empty.js +1 -1
  41. package/dist/packages/_es/FixedNav.js +1 -1
  42. package/dist/packages/_es/Form.js +8 -4
  43. package/dist/packages/_es/FormItem.js +1 -1
  44. package/dist/packages/_es/Grid.js +1 -1
  45. package/dist/packages/_es/GridItem.js +1 -1
  46. package/dist/packages/_es/Icon.js +15 -11
  47. package/dist/packages/_es/Image.js +7 -4
  48. package/dist/packages/_es/ImagePreview.js +15 -9
  49. package/dist/packages/_es/Indicator.js +1 -1
  50. package/dist/packages/_es/InfiniteLoading.js +1 -1
  51. package/dist/packages/_es/Input.js +8 -5
  52. package/dist/packages/_es/InputNumber.js +20 -14
  53. package/dist/packages/_es/Layout.js +1 -1
  54. package/dist/packages/_es/List.js +7 -4
  55. package/dist/packages/_es/Menu.js +12 -6
  56. package/dist/packages/_es/MenuItem.js +1 -1
  57. package/dist/packages/_es/Navbar.js +1 -1
  58. package/dist/packages/_es/NoticeBar.js +13 -7
  59. package/dist/packages/_es/Notify.js +8 -5
  60. package/dist/packages/_es/NumberKeyboard.js +12 -5
  61. package/dist/packages/_es/OldPicker.js +36 -19
  62. package/dist/packages/_es/OverLay.js +7 -4
  63. package/dist/packages/_es/Pagination.js +1 -1
  64. package/dist/packages/_es/Picker.js +64 -32
  65. package/dist/packages/_es/Popover.js +52 -31
  66. package/dist/packages/_es/Popup.js +22 -13
  67. package/dist/packages/_es/Price.js +1 -1
  68. package/dist/packages/_es/Progress.js +1 -1
  69. package/dist/packages/_es/PullRefresh.js +1 -1
  70. package/dist/packages/_es/Radio.js +25 -13
  71. package/dist/packages/_es/RadioGroup.js +12 -5
  72. package/dist/packages/_es/Range.js +16 -10
  73. package/dist/packages/_es/Rate.js +1 -1
  74. package/dist/packages/_es/Row.js +5 -11
  75. package/dist/packages/_es/SearchBar.js +1 -1
  76. package/dist/packages/_es/ShortPassword.js +18 -11
  77. package/dist/packages/_es/SideNavBar.js +1 -1
  78. package/dist/packages/_es/SideNavBarItem.js +1 -1
  79. package/dist/packages/_es/Signature.js +1 -1
  80. package/dist/packages/_es/Skeleton.js +1 -1
  81. package/dist/packages/_es/Sku.js +21 -11
  82. package/dist/packages/_es/Step.js +1 -1
  83. package/dist/packages/_es/Steps.js +8 -4
  84. package/dist/packages/_es/Sticky.js +23 -12
  85. package/dist/packages/_es/SubSideNavBar.js +1 -1
  86. package/dist/packages/_es/Swipe.js +1 -1
  87. package/dist/packages/_es/Swiper.js +23 -14
  88. package/dist/packages/_es/SwiperItem.js +1 -1
  89. package/dist/packages/_es/Switch.js +10 -7
  90. package/dist/packages/_es/TabPane.js +1 -1
  91. package/dist/packages/_es/Tabbar.js +7 -4
  92. package/dist/packages/_es/TabbarItem.js +13 -14
  93. package/dist/packages/_es/Table.js +7 -4
  94. package/dist/packages/_es/Tabs.js +16 -10
  95. package/dist/packages/_es/Tag.js +1 -1
  96. package/dist/packages/_es/TextArea.js +8 -5
  97. package/dist/packages/_es/TimeDetail.js +1 -1
  98. package/dist/packages/_es/TimePannel.js +1 -1
  99. package/dist/packages/_es/TimeSelect.js +1 -1
  100. package/dist/packages/_es/Toast.js +8 -5
  101. package/dist/packages/_es/Uploader.js +14 -8
  102. package/dist/packages/_es/Video.js +17 -10
  103. package/dist/packages/_es/WaterMark.js +30 -21
  104. package/dist/packages/_es/common.js +20 -10
  105. package/dist/packages/_es/component.js +1 -1
  106. package/dist/packages/_es/index.js +1 -1
  107. package/dist/packages/_es/index2.js +1 -1
  108. package/dist/packages/_es/index3.js +1 -1
  109. package/dist/packages/_es/index4.js +1 -1
  110. package/dist/packages/_es/index5.js +21 -12
  111. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  112. package/dist/packages/_es/pxCheck.js +1 -1
  113. package/dist/packages/_es/raf.js +1 -1
  114. package/dist/packages/button/index.scss +1 -0
  115. package/dist/packages/locale/lang/baseLang.js +1 -1
  116. package/dist/packages/locale/lang/en-US.js +1 -1
  117. package/dist/packages/locale/lang/id-ID.js +1 -1
  118. package/dist/packages/locale/lang/index.js +1 -1
  119. package/dist/packages/locale/lang/zh-CN.js +1 -1
  120. package/dist/packages/locale/lang/zh-TW.js +1 -1
  121. package/dist/packages/radio/index.scss +1 -0
  122. package/dist/smartips/attributes.json +21 -1
  123. package/dist/smartips/tags.json +7 -2
  124. package/dist/smartips/web-types.json +47 -2
  125. package/dist/style.css +1 -1
  126. package/dist/styles/themes/default.scss +49 -49
  127. package/dist/styles/themes/jdb.scss +49 -49
  128. package/dist/styles/themes/jdt.scss +49 -49
  129. package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
  130. package/dist/types/__VUE/address/index.vue.d.ts +3 -3
  131. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  132. package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
  133. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  134. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  135. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  136. package/dist/types/__VUE/calendar/index.vue.d.ts +8 -1
  137. package/dist/types/__VUE/calendaritem/index.vue.d.ts +1 -1
  138. package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
  139. package/dist/types/__VUE/cell/index.vue.d.ts +8 -8
  140. package/dist/types/__VUE/col/index.vue.d.ts +2 -5
  141. package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
  142. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
  146. package/dist/types/__VUE/fixednav/index.vue.d.ts +4 -4
  147. package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
  148. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  149. package/dist/types/__VUE/imagepreview/index.d.ts +7 -6
  150. package/dist/types/__VUE/imagepreview/index.vue.d.ts +3 -3
  151. package/dist/types/__VUE/imagepreview/types.d.ts +7 -0
  152. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  153. package/dist/types/__VUE/inputnumber/index.vue.d.ts +14 -0
  154. package/dist/types/__VUE/menu/index.vue.d.ts +2 -2
  155. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  156. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +4 -4
  157. package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
  158. package/dist/types/__VUE/picker/Column.vue.d.ts +8 -0
  159. package/dist/types/__VUE/picker/index.vue.d.ts +18 -3
  160. package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
  161. package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
  162. package/dist/types/__VUE/row/index.vue.d.ts +2 -5
  163. package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
  164. package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
  165. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
  167. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  171. package/dist/types/index.d.ts +1 -1
  172. package/package.json +2 -1
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, createElementVNode } from "vue";
6
+ import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, mergeProps, createElementVNode } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import { p as pxCheck } from "./pxCheck.js";
9
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
@@ -46,6 +46,14 @@ const _sfc_main = create({
46
46
  readonly: {
47
47
  type: Boolean,
48
48
  default: false
49
+ },
50
+ iconLeft: {
51
+ type: String,
52
+ default: "minus"
53
+ },
54
+ iconRight: {
55
+ type: String,
56
+ default: "plus"
49
57
  }
50
58
  },
51
59
  emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
@@ -135,12 +143,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
143
  class: normalizeClass(_ctx.classes),
136
144
  style: normalizeStyle({ height: _ctx.pxCheck(_ctx.buttonSize) })
137
145
  }, [
138
- createVNode(_component_nut_icon, {
139
- name: "minus",
140
- class: normalizeClass(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.reduceAllow() }]),
141
- size: _ctx.buttonSize,
142
- onClick: _ctx.reduce
143
- }, null, 8, ["class", "size", "onClick"]),
146
+ createVNode(_component_nut_icon, mergeProps({
147
+ name: _ctx.iconLeft,
148
+ class: ["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.reduceAllow() }],
149
+ size: _ctx.buttonSize
150
+ }, _ctx.$attrs, { onClick: _ctx.reduce }), null, 16, ["name", "class", "size", "onClick"]),
144
151
  createElementVNode("input", {
145
152
  type: "number",
146
153
  min: _ctx.min,
@@ -153,12 +160,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
153
160
  onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
154
161
  onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
155
162
  }, null, 44, _hoisted_1),
156
- createVNode(_component_nut_icon, {
157
- name: "plus",
158
- class: normalizeClass(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.addAllow() }]),
159
- size: _ctx.buttonSize,
160
- onClick: _ctx.add
161
- }, null, 8, ["class", "size", "onClick"])
163
+ createVNode(_component_nut_icon, mergeProps({
164
+ name: _ctx.iconRight,
165
+ class: ["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.addAllow() }],
166
+ size: _ctx.buttonSize
167
+ }, _ctx.$attrs, { onClick: _ctx.add }), null, 16, ["name", "class", "size", "onClick"])
162
168
  ], 6);
163
169
  }
164
170
  var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 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.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -64,9 +64,12 @@ const _sfc_main = create({
64
64
  }
65
65
  state.startOffset = scrollTop - scrollTop % props.height;
66
66
  };
67
- watch(() => props.listData, () => {
68
- state.list = props.listData.slice();
69
- });
67
+ watch(
68
+ () => props.listData,
69
+ () => {
70
+ state.list = props.listData.slice();
71
+ }
72
+ );
70
73
  return {
71
74
  ...toRefs(state),
72
75
  list,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -56,11 +56,17 @@ const _sfc_main = create({
56
56
  publicChildren.push(child.proxy);
57
57
  }
58
58
  };
59
- provide("menuParent", Object.assign({
60
- link,
61
- children: publicChildren,
62
- internalChildren
63
- }, value));
59
+ provide(
60
+ "menuParent",
61
+ Object.assign(
62
+ {
63
+ link,
64
+ children: publicChildren,
65
+ internalChildren
66
+ },
67
+ value
68
+ )
69
+ );
64
70
  };
65
71
  return {
66
72
  children: publicChildren,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 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.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 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.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -152,12 +152,18 @@ const _sfc_main = create({
152
152
  }
153
153
  return styles;
154
154
  });
155
- watch(() => props.text, (value) => {
156
- initScrollWrap();
157
- });
158
- watch(() => props.list, (value) => {
159
- state.scrollList = [].concat(value);
160
- });
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
+ );
161
167
  const initScrollWrap = (value) => {
162
168
  if (state.showNoticeBar == false) {
163
169
  return;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -77,11 +77,14 @@ const _sfc_main = create({
77
77
  if (props.duration) {
78
78
  show();
79
79
  }
80
- watch(() => props.duration, (val) => {
81
- if (val) {
82
- show();
80
+ watch(
81
+ () => props.duration,
82
+ (val) => {
83
+ if (val) {
84
+ show();
85
+ }
83
86
  }
84
- });
87
+ );
85
88
  const onAfterLeave = () => {
86
89
  clearTimer();
87
90
  props.unmount && props.unmount(props.id);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -106,7 +106,11 @@ 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({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: customKeys[1], type: "custom" });
109
+ keys.push(
110
+ { id: customKeys[0], type: "custom" },
111
+ { id: 0, type: "number" },
112
+ { id: customKeys[1], type: "custom" }
113
+ );
110
114
  }
111
115
  return keys;
112
116
  }
@@ -116,9 +120,12 @@ const _sfc_main = create({
116
120
  }
117
121
  return defaultKey();
118
122
  });
119
- watch(() => props.visible, (value) => {
120
- show.value = value;
121
- });
123
+ watch(
124
+ () => props.visible,
125
+ (value) => {
126
+ show.value = value;
127
+ }
128
+ );
122
129
  function onTouchstart(item, event) {
123
130
  event.stopPropagation();
124
131
  clickKeyIndex.value = item.id;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -158,16 +158,23 @@ const _sfc_main$1 = create$1({
158
158
  type && setChooseValue();
159
159
  setMove(-move);
160
160
  };
161
- watch(() => props.listData, (val) => {
162
- state.transformY = 0;
163
- modifyStatus(false);
164
- }, {
165
- deep: true
166
- });
167
- watch(() => props.defaultIndex, (val) => {
168
- state.transformY = 0;
169
- modifyStatus(false);
170
- });
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
+ );
171
178
  onMounted(() => {
172
179
  modifyStatus(true);
173
180
  });
@@ -362,7 +369,9 @@ const _sfc_main = create({
362
369
  _defaultIndex = dataIndex;
363
370
  } else if (dataType.value === "multipleColumns") {
364
371
  defaultIndexList[columnIndex] = dataIndex;
365
- const val = defaultIndexList.map((res, i) => toRaw(state.formattedColumns)[i].values[res]);
372
+ const val = defaultIndexList.map(
373
+ (res, i) => toRaw(state.formattedColumns)[i].values[res]
374
+ );
366
375
  emit("change", val, columnIndex, dataIndex);
367
376
  }
368
377
  };
@@ -374,7 +383,9 @@ const _sfc_main = create({
374
383
  for (let i = 0; i < defaultIndexList.length; i++) {
375
384
  state.formattedColumns[i].defaultIndex = defaultIndexList[i];
376
385
  }
377
- const checkedArr = toRaw(state.formattedColumns).map((res) => res.values && res.values[res.defaultIndex]);
386
+ const checkedArr = toRaw(state.formattedColumns).map(
387
+ (res) => res.values && res.values[res.defaultIndex]
388
+ );
378
389
  emit("confirm", checkedArr);
379
390
  } else if (dataType.value === "cascade") {
380
391
  emit("confirm", getCascadeData(toRaw(state.formattedColumns), state.defaultIndex));
@@ -389,12 +400,18 @@ const _sfc_main = create({
389
400
  if (props.visible)
390
401
  state.show = false;
391
402
  });
392
- watch(() => props.visible, (val) => {
393
- state.show = val;
394
- });
395
- watch(() => props.listData, (val) => {
396
- state.formattedColumns = val;
397
- });
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
+ );
398
415
  return {
399
416
  classes,
400
417
  ...toRefs(state),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -48,9 +48,12 @@ const _sfc_main = create({
48
48
  [props.overlayClass]: true
49
49
  };
50
50
  });
51
- watch(() => props.visible, (value) => {
52
- value ? lock() : unlock();
53
- });
51
+ watch(
52
+ () => props.visible,
53
+ (value) => {
54
+ value ? lock() : unlock();
55
+ }
56
+ );
54
57
  const lock = () => {
55
58
  if (props.lockScroll && props.visible) {
56
59
  document.body.classList.add("nut-overflow-hidden");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 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.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -32,6 +32,10 @@ const _sfc_main$1 = create$1({
32
32
  threeDimensional: {
33
33
  type: Boolean,
34
34
  default: true
35
+ },
36
+ swipeDuration: {
37
+ type: [Number, String],
38
+ default: 1e3
35
39
  }
36
40
  },
37
41
  emits: ["click", "change"],
@@ -59,6 +63,7 @@ const _sfc_main$1 = create$1({
59
63
  const moving = ref(false);
60
64
  const touchDeg = ref(0);
61
65
  const touchTime = ref(0);
66
+ const DEFAULT_DURATION = 200;
62
67
  const INERTIA_TIME = 300;
63
68
  const INERTIA_DISTANCE = 15;
64
69
  const touchRollerStyle = computed(() => {
@@ -107,7 +112,7 @@ const _sfc_main$1 = create$1({
107
112
  let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
108
113
  if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
109
114
  const distance = momentum(move, moveTime);
110
- setMove(distance, "end", moveTime + 1e3);
115
+ setMove(distance, "end", +props.swipeDuration);
111
116
  return;
112
117
  } else {
113
118
  setMove(move, "end");
@@ -129,7 +134,7 @@ const _sfc_main$1 = create$1({
129
134
  return false;
130
135
  }
131
136
  };
132
- const setTransform = (translateY = 0, type, time = 1e3, deg) => {
137
+ const setTransform = (translateY = 0, type, time = DEFAULT_DURATION, deg) => {
133
138
  if (type === "end") {
134
139
  touchTime.value = time;
135
140
  } else {
@@ -186,20 +191,28 @@ const _sfc_main$1 = create$1({
186
191
  moving.value = false;
187
192
  setChooseValue();
188
193
  };
189
- watch(() => props.column, (val) => {
190
- if (props.column && props.column.length > 0) {
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) => {
191
209
  state.transformY = 0;
192
210
  modifyStatus(false);
211
+ },
212
+ {
213
+ deep: true
193
214
  }
194
- }, {
195
- deep: true
196
- });
197
- watch(() => props.value, (val) => {
198
- state.transformY = 0;
199
- modifyStatus(false);
200
- }, {
201
- deep: true
202
- });
215
+ );
203
216
  onMounted(() => {
204
217
  modifyStatus(true);
205
218
  });
@@ -304,6 +317,10 @@ const _sfc_main = create({
304
317
  threeDimensional: {
305
318
  type: Boolean,
306
319
  default: true
320
+ },
321
+ swipeDuration: {
322
+ type: [Number, String],
323
+ default: 1e3
307
324
  }
308
325
  },
309
326
  emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
@@ -423,25 +440,39 @@ const _sfc_main = create({
423
440
  if (props.visible)
424
441
  state.show = false;
425
442
  });
426
- watch(() => props.modelValue, (newValues) => {
427
- const isSameValue = JSON.stringify(newValues) === JSON.stringify(defaultValues.value);
428
- if (!isSameValue) {
429
- defaultValues.value = newValues;
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;
430
467
  }
431
- }, { deep: true });
432
- watch(defaultValues, (newValues) => {
433
- const isSameValue = JSON.stringify(newValues) === JSON.stringify(props.modelValue);
434
- if (!isSameValue) {
435
- emit("update:modelValue", newValues);
468
+ );
469
+ watch(
470
+ () => props.columns,
471
+ (val) => {
472
+ if (val.length)
473
+ state.formattedColumns = val;
436
474
  }
437
- }, { immediate: true });
438
- watch(() => props.visible, (val) => {
439
- state.show = val;
440
- });
441
- watch(() => props.columns, (val) => {
442
- if (val.length)
443
- state.formattedColumns = val;
444
- });
475
+ );
445
476
  return {
446
477
  classes,
447
478
  ...toRefs(state),
@@ -507,10 +538,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
507
538
  columnsType: _ctx.columnsType,
508
539
  value: _ctx.defaultValues[columnIndex],
509
540
  threeDimensional: _ctx.threeDimensional,
541
+ swipeDuration: _ctx.swipeDuration,
510
542
  onChange: (option) => {
511
543
  _ctx.changeHandler(columnIndex, option);
512
544
  }
513
- }, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "onChange"])
545
+ }, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "swipeDuration", "onChange"])
514
546
  ]);
515
547
  }), 128))
516
548
  ], 512),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -38,32 +38,47 @@ function isShadowRoot(node) {
38
38
  return node instanceof OwnElement || node instanceof ShadowRoot;
39
39
  }
40
40
  var round = Math.round;
41
- function getBoundingClientRect(element, includeScale) {
41
+ function getUAString() {
42
+ var uaData = navigator.userAgentData;
43
+ if (uaData != null && uaData.brands) {
44
+ return uaData.brands.map(function(item) {
45
+ return item.brand + "/" + item.version;
46
+ }).join(" ");
47
+ }
48
+ return navigator.userAgent;
49
+ }
50
+ function isLayoutViewport() {
51
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
52
+ }
53
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
42
54
  if (includeScale === void 0) {
43
55
  includeScale = false;
44
56
  }
45
- var rect = element.getBoundingClientRect();
57
+ if (isFixedStrategy === void 0) {
58
+ isFixedStrategy = false;
59
+ }
60
+ var clientRect = element.getBoundingClientRect();
46
61
  var scaleX = 1;
47
62
  var scaleY = 1;
48
- if (isHTMLElement(element) && includeScale) {
49
- var offsetHeight = element.offsetHeight;
50
- var offsetWidth = element.offsetWidth;
51
- if (offsetWidth > 0) {
52
- scaleX = round(rect.width) / offsetWidth || 1;
53
- }
54
- if (offsetHeight > 0) {
55
- scaleY = round(rect.height) / offsetHeight || 1;
56
- }
57
- }
63
+ if (includeScale && isHTMLElement(element)) {
64
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
65
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
66
+ }
67
+ var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
68
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
69
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
70
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
71
+ var width = clientRect.width / scaleX;
72
+ var height = clientRect.height / scaleY;
58
73
  return {
59
- width: rect.width / scaleX,
60
- height: rect.height / scaleY,
61
- top: rect.top / scaleY,
62
- right: rect.right / scaleX,
63
- bottom: rect.bottom / scaleY,
64
- left: rect.left / scaleX,
65
- x: rect.left / scaleX,
66
- y: rect.top / scaleY
74
+ width,
75
+ height,
76
+ top: y,
77
+ right: x + width,
78
+ bottom: y + height,
79
+ left: x,
80
+ x,
81
+ y
67
82
  };
68
83
  }
69
84
  function getWindowScroll(node) {
@@ -117,7 +132,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
117
132
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
118
133
  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
119
134
  var documentElement = getDocumentElement(offsetParent);
120
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
135
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
121
136
  var scroll = {
122
137
  scrollLeft: 0,
123
138
  scrollTop: 0
@@ -199,8 +214,8 @@ function getTrueOffsetParent(element) {
199
214
  return element.offsetParent;
200
215
  }
201
216
  function getContainingBlock(element) {
202
- var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
203
- var isIE = navigator.userAgent.indexOf("Trident") !== -1;
217
+ var isFirefox = /firefox/i.test(getUAString());
218
+ var isIE = /Trident/i.test(getUAString());
204
219
  if (isIE && isHTMLElement(element)) {
205
220
  var elementCss = getComputedStyle(element);
206
221
  if (elementCss.position === "fixed") {
@@ -888,13 +903,19 @@ const _sfc_main = create({
888
903
  onUnmounted(() => {
889
904
  window.removeEventListener("click", clickAway, true);
890
905
  });
891
- watch(() => props.visible, (value) => {
892
- showPopup.value = value;
893
- uploadLocation();
894
- });
895
- watch(() => props.location, (value) => {
896
- uploadLocation();
897
- });
906
+ watch(
907
+ () => props.visible,
908
+ (value) => {
909
+ showPopup.value = value;
910
+ uploadLocation();
911
+ }
912
+ );
913
+ watch(
914
+ () => props.location,
915
+ (value) => {
916
+ uploadLocation();
917
+ }
918
+ );
898
919
  const update = (val) => {
899
920
  emit("update", val);
900
921
  emit("update:visible", val);